Skip to content
Snippets Groups Projects
  1. Jan 22, 2020
  2. Jan 21, 2020
  3. Jan 22, 2020
  4. Jan 21, 2020
    • Nicolas Martinelli's avatar
      [FIX] stock_account: no analytic info on COGS · 5afe4f88
      Nicolas Martinelli authored
      
      - Create a FIFO product, Automated
      - Make some stock
      - Create a SO, add the product
      - On the SO, add an analytic account
      - Validate the picking, create the invoice
        => the analytic info are propagated to the invoice, as expected
      - Validate the invoice
      
      The analytic info is propagated on the COGS entries, in particular the
      the output account, which is incorrect.
      
      opw-2008567
      
      closes odoo/odoo#43690
      
      X-original-commit: e831868f
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      5afe4f88
    • Sébastien Theys's avatar
      [FIX] website_mail_channel: prevent crash in python3 email lib · df18a701
      Sébastien Theys authored
      `AttributeError: 'tuple' object has no attribute 'startswith'`
      
      When given headers that are tuples. They are expected to be string, as per [1].
      The issue was introduced with [2], indeed the code was moved from inside a dict
      where `,` was the usual dict separator to outside of a dict where `,` at the end
      made them tuples.
      
      To reproduce the issue, run the `test_mail` suite after having
      `website_mail_channel` installed.
      
      Issue highlighted as part of task-2178641
      
      [1] https://docs.python.org/3/library/email.policy.html#email.policy.Policy.header_store_parse
      
      
      [2] cae1c397
      
      closes odoo/odoo#43698
      
      X-original-commit: 7e5a7245
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      df18a701
    • Martin Trigaux's avatar
      [ADD] base: replace Filipino by Tagalog language · 194ed76c
      Martin Trigaux authored
      This is the second move to replace Filipino by Tagalog language
      
      Using Filipino (code fil_PH) is problematic as conflicts with Finnish
      (code fi_FI) and users having their browser in Finnish were redirected
      to the Filipino version of the website (cf discussion at opw-2172710).
      
      This problem was also raised in other softwares like in the below
      discssion in Mozilla L10N groups
      https://groups.google.com/forum/#!topic/mozilla.dev.l10n/TW2qYyDDNoE
      
      
      
      Quoting the discussion in above thread:
      
      > Filipino is the national language of the Philippines, but it is
      > commonly referred to (and registered as) Tagalog, since most of the
      > terms therein were derived from it (Tagalog).
      
      This commit targets the master (future 14.0 as of today), adds a new
      Tagalog language and removes the Filipino.
      In 12.0, only the Tagalog was added.
      As fil_PH is only translated on odoo-com project but remains at 0% in
      other Transifex project, it is assumed the language switch won't
      impact too many people.
      
      closes odoo/odoo#43634
      
      Signed-off-by: default avatarOlivier Dony (odo) <odo@openerp.com>
      194ed76c
    • qsm-odoo's avatar
      [FIX] website: restore s_btn style · ac2a063b
      qsm-odoo authored
      
      closes odoo/odoo#43689
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      ac2a063b
    • Romain Derie's avatar
      [FIX] *: fix translations inconsistency in 't-set' · 98678199
      Romain Derie authored
      This commit fix most `t-set` errors that either led to:
        1. unwanted text to be considered as translatable.
           eg: `<t t-set="classes">text-left bg-100 p4</t>` would create an
           `ir.translation`.
        2. text that should be translatable were not.
           eg: `<t t-set="text" t-value="'Both'"/>` would not create an
           `ir.translation` while it should.
      
      If a text should be translatable, it should never be inside a `t-value`:
        - `<t t-set="text">Both</t>`
      If a text should not be translatable, it sould either be inside `t-value`,
      `t-valuef` or the `<t>` tag should have `t-translation="off"`:
        - `<t t-set="classes" t-translation="off">text-left bg-100 p4</t>`
        - `<t t-set="classes" t-valuef="text-left bg-100 p4"/>`
        - `<t t-set="classes" t-value="'text-left bg-100 p4'"/>`
      
      https://github.com/odoo/odoo/pull/43660
      https://github.com/odoo/enterprise/pull/7839
      https://github.com/odoo/design-themes/pull/203
      
      
      
      closes odoo/odoo#43660
      
      Related: odoo/enterprise#7839
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      98678199
    • Rémy Voet (ryv)'s avatar
      [IMP] (website_)mail: improve routes and management of mail followers · 15c934a1
      Rémy Voet (ryv) authored
      
      Purpose of this commit is to improve model of followers, notably management
      code and its use in routes. Indeed it is quite an old model and code had
      to be cleaned a bit to improve code readability and maintenance.
      
      In this commit we
      
        * remove unnecessary code examples in gamification about followers: using
          that model as example of code for goals is probably not a good idea as it
          is technical;
        * rewrite routes called by JS are simplified to better match JS
          implementation;
        * introduce computed fields to fetch related partner or channel name,
          email (partner only) and active status;
      
      LINKS
      
      Task 1933771
      Task 2078313
      
      closes odoo/odoo#39808
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      Co-authored-by: default avatarRemy Voet <ryv@odoo.com>
      Co-authored-by: default avatarjgi-odoo <jgi@odoo.com>
      Co-authored-by: default avatarXavier-Do <xdo@odoo.com>
      15c934a1
    • Thibault Delavallée's avatar
      [IMP] mail: make followers API explicit · e3ff7a49
      Thibault Delavallée authored
      
      Purpose of this commit is to always call followers API with explicit parameters
      about existing followers management (check_existing and existing_policy
      parameters). It makes code easier to read and maintain.
      
      LINKS
      
      Task 1933771
      Task 2078313
      
      Co-Authored-By: default avatarThibault Delavallée <tde@odoo.com>
      Co-Authored-By: default avatarRémy Voet <ryv@odoo.com>
      e3ff7a49
    • wan's avatar
      [FIX] account: multi-post order compare bool and str · 59619987
      wan authored
      
      The `ref` field on `account.move` is not required and can yield a falsy
      value. This produces a TypeError while doing the comparison in sorted().
      
      closes #42434
      
      closes odoo/odoo#43674
      
      X-original-commit: 3bb4c0c9
      Signed-off-by: default avatarQuentin De Paoli (qdp) <qdp@openerp.com>
      59619987
    • Odoo's Mergebot's avatar
      [MERGE] mail, mass_mailing(_sms): split mail and sms marketing activities in systray · 16bb5795
      Odoo's Mergebot authored
      
      PURPOSE
      
      mass_mailing and mass_mailing_sms activities are grouped as 1 item in the systray due to them using the same model name (sms inherits and distinguishes itself with a different field.Selection value). This is confusing behavior because they are 2 separate modules and the default icon ends up mismatching the sms-related activities.
      
      SPECIFICATIONS
      
      Split mass_mailing and mass_mailing_sms activities into 2 separate items in systray. Additionally, make it so when mass_mailing and mass_mailing_sms activities are clicked on, only the relevant activities are shown to prevent confusion. In order to only show relevant activities, an optional "domain" check is needed in __systray_activity_menu.js__ for when overriding _systray_get_activities_ methods provide a domain to apply.
      
      Task: 2169498
      PR #43272
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      16bb5795
    • Adrian Torres's avatar
      [IMP] core: improve mapped and filtered performance · 1d139287
      Adrian Torres authored
      
      Previously, mapped was following a very naive approach, which was simply
      calling the field name passed as input for every record in a recordset,
      sequentially.
      
      The problem with this approach is that we will potentially recompute the
      same fields multiple times for differents records, when this could be
      done once per field for ALL records, and store this value in cache for
      further access.
      
      Another potential problem is that we don't take advantage of the ORM's
      prefetching to fetch all the records that are not in cache at once,
      instead of doing the same query for every record in the recordset.
      
      Yet another problem is the conversion of each cache value to a record
      format and then combining all of the individual records into a single
      recordset, which, depending on the size of the recordset, can take an
      unbelievable amount of CPU time.
      
      With this new implementation of `mapped()` we take care of all of these
      problems:
      
      This is done by first delegating `mapped()` from the model to the field,
      this mapped takes a recordset as input and it will try to batch compute
      and prefetch as much as possible for the entire recordset, but it will
      not keep these values for the actual output, it just stores everything
      in cache and then at the end, retrieves everything from the cache to
      guarantee the same order.
      
      After the mapped, the conversion from cache format to record format is
      delegated to the new `convert_to_record_multi` which will fetch all the
      ids and then perform a single browse to encapsulate all of the records
      into a single recordset with the least amount of overhead possible.
      
      Part of Task 2170344
      
      closes odoo/odoo#42611
      
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      1d139287
    • Tiffany Chang (tic)'s avatar
      [IMP] mass_mailing_sms: Add mailing_type domain activity restriction · dced1d2f
      Tiffany Chang (tic) authored
      Restrict the displayed activities when clicking on "Email Marketing"
      and "SMS Marketing" modules in the activity systray. Due to their
      activities being linked to the same model, we need to distinguish which
      activities belong to which module based on their assigned mailing_type
      value. Without this domain restriction, users can still filter based on
      mailing_type, but it is much less intuitive this way due to them being
      separate apps.
      
      Task: 2169498
      dced1d2f
    • Tiffany Chang (tic)'s avatar
      [IMP] Mail: Add optional activity domain for systray · b786adf2
      Tiffany Chang (tic) authored
      Addition of this optional 'domain' value for systray activity related
      lines allows the restriction of which activities will be included in
      the view opened when the line is clicked on.
      
      One use case is when a model is split between 2 systray activity lines.
      In this case we most likely do not want the same activities of the
      model to show up when we click on either line. For example, say we
      have 2 modules using the same model, but the module instances of that
      model are distingushed by a field.Selection value. Then we would only
      want to show the activities related to each module when we click on
      their appropriate systray activity lines based on that field.Selection
      value.
      
      Task: 2169498
      b786adf2
    • Tiffany Chang (tic)'s avatar
      [IMP] mass_mailing_(sms): split systray activities · abaae1e4
      Tiffany Chang (tic) authored
      Due to 'mass_mailing_sms' inheriting mailing.mailing from
      'mass_mailing', activities for these two modules would show up as one
      "Mass Mailing" line in the systray. This commit adds additional logic
      to remove this "Mass Mailing" line and replace it with 2 lines: "Email
      Marketing" and "SMS Marketing" with their appropriately matching module
      icon. For consistency, when only the 'mass_mailing' module is installed,
      it will still display "Email Marketing".
      
      Task: 2169498
      abaae1e4
    • odooqs's avatar
      [FIX] point_of_sale: payment method name not displayed · 279d3ce0
      odooqs authored
      
      When a payment line is created, and then the order is reloaded, by the
      synchronization feature for example, the name displayed on the payment
      line is empty.
      
      This happens because the field name is not saved on the server, so
      instead of using it, we are directly taking the name of the payment
      method linked to the payment line.
      
      closes odoo/odoo#43615
      
      X-original-commit: ae4322cd81814cf4cdc462ff9d271f83ce2870c4
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      279d3ce0
    • Jeremy Kersten's avatar
      [IMP] web: remove unused controller · e18ac096
      Jeremy Kersten authored
      
      This controller is no more used, probably used in the past with calendar invitation.
      
      closes odoo/odoo#43657
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      e18ac096
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] website_sale_wishlist: fix pricelist assignation · 892a7a7b
      Andrea Grazioso (agr-odoo) authored
      
      Steps to reproduce:
      - Install website_sale_wishlist,stock,sale_management,contacts
      - General Settings>Sales>Multiple Sales Prices per Product
      - Create or edit a product, assign 2 different prices in pricelists A and B
      - Publish it to the website
      - If your user is Mitchell Admin, go to its related res.partner, Sales &
      Purchases tab/Pricelist, choose pricelist B
      - Create a public user and assign it pricelist A
      - Go to the website/shop
      - Reach out the product and add to the wishlist
      
      When the current user is internal the product page will display price of B,
      but if you add the product to the wishlist, whishlist displays public price
      Same for the portal user.
      This happend because to avoid returning 500 when the product is
      unpublished c93f371d the product is
      filtered using sudo() but the recordset is also returned with the sudo
      environment. Using it just to filter solve the issue
      
      opw-2166484
      
      closes odoo/odoo#43646
      
      X-original-commit: 4335f9db
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      892a7a7b
    • Aaron Bohy's avatar
      [FIX] sale_product_configurator: display multiple dialogs · 37462d8a
      Aaron Bohy authored
      
      Create a new quotation, add a row with product Customizable desk.
      The product configurator dialog opens. Click on 'Add'. A second
      dialog opens (to select optional products).
      
      Before this commit, the second dialog was displayed behind the
      first one.
      
      This bug is present since the introduction of Owl dialogs
      (34bbdd88). It is due to an override of the 'open' function that
      doesn't call _super (and thus, doesn't go through the code that
      makes the last opened dialog active).
      
      closes odoo/odoo#43424
      
      Signed-off-by: default avatarGéry Debongnie (ged) <ged@openerp.com>
      37462d8a
    • Aaron Bohy's avatar
      [IMP] web: properly throw errors in MockServer · 7ab364b6
      Aaron Bohy authored
      Otherwise, they could be catched (by a guardedCatch) and thus would
      not make the test fail.
      7ab364b6
    • Aaron Bohy's avatar
      [FIX] web,*: fix race condition with m2o quick create · 50bf8309
      Aaron Bohy authored
      *sale,sale_product_configurator
      
      Let's assume a form view containing a many2one with an onchange
      that updates the value of a one2many. Do a quick create in the
      many2one. While the name_create request is pending, add a row to
      the one2many but do not leave it. When the name_create returns, and
      the onchange has been performed, the one2many is reset, and the row
      is no longer in edition (worse, it could be invalid, i.e. in a state
      that the user could not have reached in a normal situation).
      
      This commit fixes this issue by considering the whole [name_create +
      onchange] operation as one. This operation is executed in the mutex
      of the model, so the other request (adding a row to the one2many) is
      delayed until the many2one value has been correctly set.
      
      This fixes an issue with the sale and rental tours (on sale_order),
      that had been deactivated for a while.
      50bf8309
    • mcm-odoo's avatar
      [REF] web: pivot: use owl_compatibility tools · 01e3a599
      mcm-odoo authored
      
      This commit changes ControllerAdapter to a mixin that inherits
      WidgetAdapterMixin and RendererWrapper now extends ComponentWrapper.
      
      This commit also changes PivotController base class/mixin and uses
      the Odoo legacy custom_events because of the adapter.
      
      closes odoo/odoo#43256
      
      Related: odoo/enterprise#7744
      Signed-off-by: default avatarGéry Debongnie (ged) <ged@openerp.com>
      01e3a599
    • mcm-odoo's avatar
      [IMP] web: WidgetAdapterMixin: add some tests · 083ba2a8
      mcm-odoo authored
      083ba2a8
    • Aaron Bohy's avatar
      ed0b5c26
Loading