Skip to content
Snippets Groups Projects
  1. Jan 08, 2020
  2. Jan 07, 2020
  3. Jan 08, 2020
  4. Jan 07, 2020
    • jerome hanke (jhk)'s avatar
      [FIX] website_sale: base url for shop tour · d560aac6
      jerome hanke (jhk) authored
      
      Steps to reproduce:
      - install sales, website, ecommerce
      - go into debug mode and open your browser's console
      - debug menu > start tour > shop
      
      Previous behavior:
      tour does not find trigger for the first step
      
      Current behavior:
      tour starts properly
      
      opw-2126704
      
      closes odoo/odoo#42870
      
      X-original-commit: 7e0da0b9
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      d560aac6
    • Carlos Mayo's avatar
      [FIX] web: many2many_checkboxes: react to domain changes · 9f49709e
      Carlos Mayo authored
      
      Let's assume a many2many_checkboxes widget in a form view with a
      dynamic domain (depending on another field in the view). At first
      rendering, the widget contains a checkbox for each value matching
      the domain.
      
      Before this rev., if the user changed the value of the field used
      in the domain, the many2many_checkboxes wasn't redrawn, so it still
      displayed the values matching the previous version of the domain.
      
      Closes #38509
      Closes #40173
      
      closes odoo/odoo#42867
      
      X-original-commit: 1ace56f9a8cb56fb39235468dd13447bcbbee40a
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      Co-authored-by: default avatarAaron Bohy <aab@odoo.com>
      9f49709e
    • Romain Derie's avatar
      [IMP] website: load theme images also when module install through CLI · c86bff6a
      Romain Derie authored
      Themes image would not be shown correctly in the theme selection if the
      `website` module was installed in CLI.
      Indeed, the code supposed to load the theme images was done in the kanban view
      during theme selection after installing module through apps screen.
      
      Now, this code is encapsulated and called in post_init hook of website.
      This was also needed for an improvement on `test_themes` module, see
      https://github.com/odoo/design-themes/pull/195
      
      .
      
      closes odoo/odoo#42206
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      c86bff6a
    • Simon Lejeune's avatar
      [FIX] stock_landed_costs: remaining_value and multiple lc · 387f199e
      Simon Lejeune authored
      
      Steps to reproduce:
      Create one product with FIFO and automatic inventory valuation.
      Purchase product with 10 quantity and cost price 100 and mark shipment as done.
      Add landed cost for done incoming shipment with 2 cost lines
      E.g. 1. Freight Charges - 100
      2. Duty and Charges - 50
      So ideally after first outgoing shipment total cost should get updated in product is
      (1000 + 100 + 50) / 10 which is 115
      
      The issue is that we increment `remaining_value` on the wrong layer.
      
      Fixes #41923
      
      task-2167659
      
      closes odoo/odoo#42871
      
      X-original-commit: 8b89a5e4
      Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
      387f199e
    • Odoo's Mergebot's avatar
      [MERGE] partner_autocomplete_address_extended: remove broken module and ensure... · ef825744
      Odoo's Mergebot authored
      [MERGE] partner_autocomplete_address_extended: remove broken module and ensure base_address_extended effectively works
      
      PURPOSE
      
      Remove partner_autocomplete_address_extended and ensure base_address_extended
      effectively works.
      
      SPECIFICATIONS
      
      Commits a6e1eb9f and 8a1815b3 added among a lot of other things
      a bridge module between ``partner_autocomplete`` and ``base_address_extended``.
      It is used only to redefine the ``_split_street_with_params`` method from
      ``base_address_extended``. This method is used to find street name, number and
      number2 from an address, given a format coming from the country.
      
      However the override completely fucks up the original method purpose and uses
      an hardcoded regex coming out of the blue. Parameters like country format is
      not taken into account which is annoying when trying to parse country dependent
      data.
      
      Tests from ``base_address_extended`` crash completely when used with the
      ``partner_autocomplete_address_extended`` implementation.
      
      Considering the original complete specifications from commits
      """
      For Name field or M2O, gives a list of companies
      Data comes from Odoo IAP Service
      """
      
      Or specs found in the original task ID 1867818 pad
      """
      If Extended Address module is installed, the street number should be correctly
      splitted Or the complete address is put in street2 if impossible to parse
      """
      
      We think that this implementation is broken by design. Indeed there is no
      mention of street2 anywhere in the code, and this implementation ensure street
      will never be correctly split. We therefore remove it completely.
      
      In this merge we also
      
        * clean and improve tests in base_address_extended. Purpose is to make tests
          easier to understand and more data oriented. Tests about company / partner
          address fields are added to ensure coherency;
        * reorganize python code of base_address_extended according to guidelines;
        * rename compute / inverse methods of base_address_extended;
        * remove dead code from base partner model;
      
      See sub commits for more details.
      
      LINKS
      
      Task ID 2158302
      PR #42678
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      Unverified
      ef825744
    • Thibault Delavallée's avatar
      [REM] partner_autocomplete_address_extended: remove broken module · bfcf237f
      Thibault Delavallée authored
      Commits a6e1eb9f and 8a1815b3 added among a lot of other things
      a bridge module between ``partner_autocomplete`` and ``base_address_extended``.
      It is used only to redefine the ``_split_street_with_params`` method from
      ``base_address_extended``. This method is used to find street name, number and
      number2 from an address, given a format coming from the country.
      
      However the override completely fucks up the original method purpose and uses
      an hardcoded regex coming out of the blue. Parameters like country format is
      not taken into account which is annoying when trying to parse country dependent
      data.
      
      Tests from ``base_address_extended`` crash completely when used with the
      ``partner_autocomplete_address_extended`` implementation.
      
      Considering the original complete specifications from commits
      """
      For Name field or M2O, gives a list of companies
      Data comes from Odoo IAP Service
      """
      
      Or specs found in the original task ID 1867818 pad
      """
      If Extended Address module is installed, the street number should be correctly
      splitted Or the complete address is put in street2 if impossible to parse
      """
      
      we think that this implementation is broken by design. Indeed there is no
      mention of street2 anywhere in the code, and this implementation ensure street
      will never be correctly split. We therefore remove it completely.
      
      Task ID 2158302
      PR odoo/odoo#42678
      bfcf237f
    • Thibault Delavallée's avatar
      [IMP] base: remove dead code from partner model · fecea95e
      Thibault Delavallée authored
      ``_split_street_with_params`` method is defined in base, on partner model. It
      is redefined in ``base_address_extended`` without calling super. Only that
      module use it. That means that the base implementation is not used anywhere
      in the codebase, leading to dead code. Let us remove that method.
      
      Task ID 2158302
      PR odoo/odoo#42678
      fecea95e
    • Thibault Delavallée's avatar
      [REF] base_address_extended: rename compute / inverse methods · 69081a24
      Thibault Delavallée authored
      Purpose is to make code follow guidelines so that we understand that
      some methods are used for computed stored inverse fields.
      
      Task ID 2158302
      PR odoo/odoo#42678
      69081a24
    • Thibault Delavallée's avatar
      [MOV] base_address_extended: reorganize python code · d160997c
      Thibault Delavallée authored
      Purpose is to reorganize code according to guidelines and split the main
      badly named python file, to understand that 3 models are impacted: res.company,
      res.country and res.partner.
      
      Task ID 2158302
      PR odoo/odoo#42678
      d160997c
    • Thibault Delavallée's avatar
      [REF] base_address_extended: clean and improve tests · cbc2e4c1
      Thibault Delavallée authored
      Purpose is to make tests easier to understand and more data oriented. We
      now understand more clearly what is an input and what is expected.
      
      Tests about company / partner address fields are added to ensure coherency.
      
      Task ID 2158302
      PR odoo/odoo#42678
      cbc2e4c1
    • Thibault Delavallée's avatar
      [FIX] base(_address_extended): correctly update company street information at write · 7943b71a
      Thibault Delavallée authored
      Currently when writing on street field of company model, its sub-fields
      (notably street_name, street_number and street_number2) are not correctly
      computed again in cache.
      
      Indeed address sub fields have no direct trigger as it depends on its
      partner_id and its partner_id children (see ``res_partner.address_get()`` and
      ``res_company._compute_address()``).
      
      When writing on address fields from the company record, we then invalidate
      all address fields cache in order to force their computation.
      
      This commit adds a new tool method giving the list of fields coming from the
      address partner to copy upon the company.
      
      Task ID 2158302
      PR #42678
      7943b71a
  5. Dec 10, 2019
  6. Jan 07, 2020
  7. Jan 06, 2020
    • Yannick Tivisse's avatar
      [IMP] membership: Improve configuration menuitems · 46da3ea5
      Yannick Tivisse authored
      
      PURPOSE
      =======
      
      It is odd that the 'configuration' menu item on the 'Members' app
      does not unfold on configuration items like in all other apps.
      
      Even though there are only membership products to configure, the
      action should still have its dedicated menu item for consistency
      across modules.
      
      SPECIFICATION
      =============
      
      'Move' action membership.action_membership_products to a new
      'Membership Products' menu item under 'Members/Configuration'
      
      closes odoo/odoo#42744
      
      Taskid: 2167683
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      46da3ea5
  8. Jan 07, 2020
  9. Jan 06, 2020
    • Toufik Ben Jaa's avatar
      [FIX] website: avoid to instanciate `env` in request · 427e8d76
      Toufik Ben Jaa authored
      
        - The module `website` instanciate the environment bound to
          request before `_dispatch` is called.
          This causes issues with with routes that create their own
          psycopg2 cursor.
      
          To be more precise, the issue that allowed us to discover this
          instanciation is linked to the module `auth_oauth`.
      
          The route `/auth_oauth/signin` is a `none` route that receives
          a database name. It uses the db name to create a cursor and
          an environment manually to process the OAuth signin, log-in the user
          then assume it is safe to now use `request.env` to process the rest
          of the code.
      
          But here, since a cursor has already been created in `request` before the
          route had the chance to commit its changes to `res.users`, the
          changes made in the route `/auth_oauth/signin` are not available.
      
          And this causes issues with the computation of the session token
          done in the method `_compute_session_token` in the model `res.users`.
      
          It uses the field `oauth_access_token` to compute the session token.
          But since, the cursor in `request` is in a transaction that is not
          yet aware of the changes made on this field, it will compute a
          session token using the old `oauth_access_token` and store this
          outdated token in the client's session.
      
          Then here depending if you are using a multi-worker or a multi-thread
          Odoo, you either are never signed in or your session is expired
          after a cache cleaning (the method `_compute_session_token` is cached).
      
      closes odoo/odoo#42808
      
      X-original-commit: ceec1038
      Signed-off-by: default avatarToufik Benjaa (tbe) <tbe@odoo.com>
      427e8d76
  10. Jan 07, 2020
  11. Jan 03, 2020
  12. Jan 07, 2020
  13. Jan 06, 2020
    • Jason Van Malder's avatar
      [FIX] purchase: prevent changes when a line has an invoice · b6714ee0
      Jason Van Malder authored
      
      Issue from rim:
      
          In runbot 12.3
          - Go to Purchase
          - Create a PO with one product line: qty 1 / unit price 1000
          - Validate the PO and create the Invoice
              => DON'T VALIDATE THE INVOICE YET
          - Go back to the PO, change the unit price to 2000
          - Go back to the invoice, validate it
          ==> the PO is marked as "fully invoiced" because the qty "1 unit"
              is counted as "invoiced"
      
          => we should not be able to change the price of a line that has
              already been invoiced, even in draft
      
      Cause
      
          It seems that in all the PO's invoices state, we can edit a PO line.
          No restriction?
      
      Solution
      
          Set the line price column to read only when they have a linked
          invoice.
      
      OPW-2161477
      
      closes odoo/odoo#42797
      
      X-original-commit: b31c0404
      Signed-off-by: default avatarJason Van Malder <jvm-odoo@users.noreply.github.com>
      b6714ee0
    • Arnaud Joset's avatar
      [FIX] web: human readability of negative numbers. · c411bdfe
      Arnaud Joset authored
      
      Before this commit, negative numbers are never rendered as human readable (e.g. 34000 -> 34k).
      
      closes odoo/odoo#42789
      
      Taskid: 2160790
      X-original-commit: b51877c4
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      c411bdfe
  14. Jan 03, 2020
  15. Jan 06, 2020
    • Yenthe666's avatar
      [FIX] base: always return non-None from ir.actions.run · 5329483d
      Yenthe666 authored
      
      `run_action_` hooks don't always return a value, in which case
      invoking run() over RPC will raise a TypeError (though the call itself
      should still succeed).
      
      Somewhat oddly, "standard" hooks (e.g. in mail) generally do
      things safely and return a `False`, but the "builtin" hooks (code,
      object create and object write) tend to return nothing, and thus break
      when invoked over RPC.
      
      Fixes #42268
      Closes #42272
      
      closes odoo/odoo#42804
      
      X-original-commit: 9ad01ef2
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      5329483d
    • svs-odoo's avatar
      [FIX] product_expiry: default expiration_date · 5f62ec0b
      svs-odoo authored
      
      Before this commit, the default `expiration_date` wasn't set when the
      move line was created with the help of multiple assign serial numbers
      button or when user wrote/copy-pasted a list of SN/LN.
      
      task-2166230
      
      closes odoo/odoo#42809
      
      X-original-commit: ff6126e8077031fb20eada5f3f9d8fd8a4a4c56a
      Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
      5f62ec0b
    • svs-odoo's avatar
      [FIX] product_expiry: editable expiration_date · d67b1471
      svs-odoo authored
      Before this commit, in the move line view, the  field `expiration_date`
      was readonly even when it must be editable. It was because the condition
      who defines if the field is readonly or not was wrong.
      Also, removed the field `expiration_date_readonly` as it mainly referred
      to `picking_type_use_existing_lots`, and use this latter instead.
      
      task-2166230
      
      X-original-commit: f1b8426919dc049df447d50ed3ac365eec2897c3
      d67b1471
Loading