Skip to content
Snippets Groups Projects
  1. Feb 16, 2022
    • Julien Mougenot's avatar
      [FIX] web: assign numbering system to luxon · 5bfe7321
      Julien Mougenot authored
      
      Before this commit, the numbering system used by luxon was the default
      one set by the browser (in most cases: 'latn'). This caused issues when
      translating luxon dates with moment dates, as moment supports some
      locales differently (e.g.: ar_001 uses the 'arab' numbering system
      while Intl uses 'latn').
      
      To have proper consistency, this commit assigns (as much as possible)
      the same numbering systems as luxon for each supported locale.
      
      Warning: since the numbering system is now set according to the user
      'lang' parameter, it's now unsafe to use `DateTime.fromFormat(...)` with
      static date strings, as they might not be parsable with the current
      numbering system.
      
      closes odoo/odoo#83944
      
      Signed-off-by: default avatarGéry Debongnie <ged@odoo.com>
      5bfe7321
    • Antoine Vandevenne (anv)'s avatar
      [FIX] payment: stop showing the content of HTML fields if they are empty · 808cc53b
      Antoine Vandevenne (anv) authored
      
      Before this commit, an empty line would be shown in the payment forms on
      the card of each payment acquirer whose `pre_msg` field was not empty.
      This is because displaying this HTML field in a form view and saving it
      causes the value `<p><br></p>` to be written on the field, even if it
      was left empty. The same issue occurred with the `pending_msg`,
      `auth_msg`, `done_msg`, and `cancel_msg` fields that are shown on the
      portal of some apps (Sales, Accounting...).
      
      With this commit, the value of these fields is tested before displaying
      them. If the value is `<p><br></p>`, the field is not displayed, hence
      avoiding to display a blank line.
      
      closes odoo/odoo#84715
      
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      808cc53b
    • Josse Colpaert's avatar
      [FIX] l10n_pe: street_name and street had wrong edit/read only class · 89318db5
      Josse Colpaert authored
      
      Before, if you would put Peru Street 23, it would put Peru in House number.
      This is because the editable field was the street field, so behind the scenes,
      Odoo will split it and according to the standard format without country,
      this means Peru will go into House.
      
      We tried first with a change inversing it, but as we are doing the change,
      the best thing is to remove the split all together.  We added also onchange
      logic that if you put a district it would automatically put the right city.
      
      City or city_id should depend on the country and is correctly inherited by a
      fields_view_get.
      
      Task 2724531
      
      closes odoo/odoo#84710
      
      X-original-commit: d4ad1abb
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      89318db5
    • Dhwani Patel's avatar
      [FIX] mrp: Use the float_round method to make quantity with the same · cb9f4bfc
      Dhwani Patel authored
      
      decimal places while we compute stock_quants.
      
      closes odoo/odoo#84697
      
      X-original-commit: fba9c9f3
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      cb9f4bfc
    • Adrien Widart's avatar
      [FIX] stock: compute the source location of package level · 732f006b
      Adrien Widart authored
      
      When performing a picking with a package, the source location of the
      package level may become incorrect
      
      To reproduce the issue:
      (Use demo data)
      1. In Settings, enable:
          - Packages
          - Storage Locations
      2. In Operations Types, edit "Internal Transfers":
          - Enable "Move Entire Packages"
      3. Create a storable product P
      4. Create a receipt R with for P
      5. Put 10 P in pack and validate R
          - Let be PK the package generated/used
      6. Process an internal transfer with PK
          - The destination location of the package level is WH/Stock/Shelf 1
      
      Error: Once the picking is validated, the source location of the package
      level is "WH/Stock/Shelf 1". This is not true, it should still be
      "WH/Stock"
      
      The compute method is incorrect. It uses the package location to define
      the source location of the package level. However, once the picking is
      processed, this package has moved so using its location to define the
      source location doesn't make sense anymore.
      
      OPW-2754179
      
      closes odoo/odoo#84696
      
      X-original-commit: 239898ed
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      732f006b
    • Antoine Vandevenne (anv)'s avatar
      [FIX] payment_adyen: unblock the UI when additional details are required · 97f206e0
      Antoine Vandevenne (anv) authored
      
      Commit b6ae8a0a introduced the generic behavior of blocking the UI as
      soon as a submit button is pressed in a payment form. The 3DS2 flow of
      Adyen was not taken into account, resulting in the impossibility to
      enter the additional details required by Adyen.
      
      With this commit, the UI is unblocked at the right time to allow the
      user to submit the additional details. Moreover, the submit button is
      now hidden as soon as we don't want to show it anymore, rather than
      after having submitted the additional payment details.
      
      closes odoo/odoo#84695
      
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      97f206e0
    • aliya's avatar
      [FIX] l10n_ar, l10n_ec, l10n_pe: use fiscal country · cf61089d
      aliya authored
      
      Currently all latam localizations except Chile use country_id in _localization_use_documents().
      account_fiscal_country_id should be used instead in all modules.
      
      closes odoo/odoo#84369
      
      Task: 2761248
      Signed-off-by: default avatarOlivier Colson <oco@odoo.com>
      cf61089d
    • Audric Onockx (auon)'s avatar
      [FIX] base_geolocalize : adapt geocoordinates to partner address · 0c01f2a2
      Audric Onockx (auon) authored
      
      Steps :
      Install Field Service and Contacts.
      Create a FSM task > Customer : Demo.
      Note that the displayed address is his Demo's current one.
      Click Navigate To : it points this same address.
      Go to Contacts > Demo > change the address and return to task.
      Note that the displayed address is his Demo's new one. (Or else refresh)
      
      Issue :
      Click Navigate To : it points the OLD address.
      
      Cause :
      action_fsm_navigate calls partner.geo_localize
      only if partner has no geocoordinates.
      Yet he still have the old coordinates.
      
      Fix :
      Call when the address changes and not in action_fsm_navigate.
      
      closes odoo/odoo#84266
      
      Opw: 2743926
      Related: odoo/enterprise#24198
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      0c01f2a2
    • qsm-odoo's avatar
      [FIX] website: prevent input and datepicker interaction in edit mode · ab9fbfb4
      qsm-odoo authored
      
      Before this commit, during edit mode, the user was able to interact with
      form elements. In 13.0, it was somehow prevented by some JS code by
      losing the focus immediatly but it was not enough: if typing quickly the
      user was able to type text. But the real problem was the user seeing the
      input focused for half a second then not anymore, making him think a bug
      occured. Worse, the datepickers of the form snippet were able to be used
      entirely during edit mode, making the user think it is possible to
      configure a default value (which was not true in 13.0). In following
      versions, the bug is indeed worse as it messes up with the default
      values configuration. In 14.0, it is apparently possible to type
      normally in all of those inputs... although still ignored on save. In
      15.0... the 13.0 behavior of losing the focus immediatly is back though.
      
      This commit fixes that via CSS, still allowing a click on the elements
      to be considered as a click on the parent, but preventing to focus our
      snippet inputs (this fix is limited to our own snippets as stable fix).
      Note: the 13.0/15.0 JS code which prevents the focus right now was not
      found (if it even exists...) but it would not be ok to remove it in
      stable anyway. More investigation and review will be done once this
      reaches master.
      
      task-2523496
      
      closes odoo/odoo#84589
      
      X-original-commit: 3e598a80
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      ab9fbfb4
  2. Feb 15, 2022
  3. Feb 14, 2022
    • Agustín Castro Bugallo's avatar
      [FIX] stock_account: fix expected singleton error on post · f282807a
      Agustín Castro Bugallo authored
      
      While calling `_stock_account_prepare_anglo_saxon_out_lines_vals`, the line
      `credit_expense_account = accounts['expense'] or self.journal_id.default_account_id`
      can cause a 'Expected singleton' error. During upgrades from v13 and earlier,
      the value used for `accounts['expense']` is always `None`.
      If the recordset in `self` contains more than one record, the error will happen.
      
      By replacing `self` with the iteration object `move`, this error is averted.
      
      The error happened during an upgrade from v13. Since the value assigned to
      `accounts['expense']` doesn't exist in that version, it goes to
      `self.journal_id.default_account_id` to grab it.
      If `self` has more than one record, the error happens.
      
      Traceback:
      ```
      Traceback (most recent call last):
        File "/home/odoo/src/odoo/14.0/odoo/service/server.py", line 1199, in preload_registries
          registry = Registry.new(dbname, update_module=update_module)
        File "/home/odoo/src/odoo/14.0/odoo/modules/registry.py", line 89, in new
          odoo.modules.load_modules(registry._db, force_demo, status, update_module)
        File "/home/odoo/src/odoo/14.0/odoo/modules/loading.py", line 475, in load_modules
          migrations.migrate_module(package, 'end')
        File "/home/odoo/src/odoo/14.0/odoo/modules/migration.py", line 180, in migrate_module
          migrate(self.cr, installed_version)
        File "/tmp/tmpae3wx5o6/migrations/account/saas~13.4.1.1/end-09-payment-refactoring.py", line 618, in migrate
          util.iter_browse(env["account.move"].with_context(**ctx), ids, chunk_size=1024).action_post()
        File "/tmp/tmpae3wx5o6/migrations/util/orm.py", line 197, in caller
          return [getattr(chnk, attr)(*args, **kwargs) for chnk in chain(it, self._end())]
        File "/tmp/tmpae3wx5o6/migrations/util/orm.py", line 197, in <listcomp>
          return [getattr(chnk, attr)(*args, **kwargs) for chnk in chain(it, self._end())]
        File "/home/odoo/src/odoo/14.0/addons/sale/models/account_move.py", line 14, in action_post
          res = super(AccountMove, self).action_post()
        File "/home/odoo/src/odoo/14.0/addons/account/models/account_move.py", line 2715, in action_post
          self._post(soft=False)
        File "/home/odoo/src/enterprise/14.0/l10n_mx_edi_landing/models/account_move.py", line 26, in _post
          return super()._post(soft)
        File "/home/odoo/src/enterprise/14.0/l10n_mx_edi/models/account_move.py", line 456, in _post
          return super()._post(soft=soft)
        File "/home/odoo/src/odoo/14.0/addons/sale/models/account_invoice.py", line 75, in _post
          posted = super()._post(soft)
        File "/home/odoo/src/odoo/14.0/addons/purchase_stock/models/account_invoice.py", line 171, in _post
          return super()._post(soft)
        File "/home/odoo/src/enterprise/14.0/account_reports/models/account_activity.py", line 75, in _post
          return super()._post(soft)
        File "/home/odoo/src/odoo/14.0/addons/stock_account/models/account_move.py", line 49, in _post
          self.env['account.move.line'].create(self._stock_account_prepare_anglo_saxon_out_lines_vals())
        File "/home/odoo/src/odoo/14.0/addons/stock_account/models/account_move.py", line 158, in _stock_account_prepare_anglo_saxon_out_lines_vals
          'account_id': credit_expense_account.id,
        File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 3821, in __get__
          raise ValueError("Expected singleton: %s" % record)
      ValueError: Expected singleton: account.account(1383, 38, 30)
      ```
      
      closes odoo/odoo#84100
      
      X-original-commit: acda26fd
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      f282807a
    • Rémi Rahir's avatar
      [FIX] web: Domain arrayToString support 'in' operator · 62f996e4
      Rémi Rahir authored
      
      The function `arrayToString` did not properly support domains containing
      arrays of booleans, for instance `[["val", "in", [true, false]]]`. The
      array containing the boolean was directly JSON stringified without being
      converted to its python equivalent.
      
      closes odoo/odoo#84425
      
      X-original-commit: 9b63ec35
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      Signed-off-by: default avatarRémi Rahir (rar) <rar@odoo.com>
      Co-authored-by: default avatarLucas Lefèvre <lul@odoo.com>
      62f996e4
    • Kevin Baptiste's avatar
      [FIX] hr_holidays: correctly show employee's Dashboard · 684a85c1
      Kevin Baptiste authored
      
      Only show the leaves taken by the current employee when using the Leaves
      stat button on an employee's form.
      
      closes odoo/odoo#84553
      
      Taskid: 2764912
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      684a85c1
    • Thibault Libioulle's avatar
      [FIX] website: fix matching of search term and fuzzy term · 34362a7c
      Thibault Libioulle authored
      
      Prior to this commit, when a user searches with an upper case search
      term of more than 3 characters, the search was considered as a fuzzy
      search even if the result was an exact match.
      
      Since the search is always lowered when there are more than 3
      characters, the search is considered as fuzzy only when the search and
      fuzzy term are case insensitively distinct.
      
      closes odoo/odoo#84433
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      34362a7c
    • Adrian Teng's avatar
      Create AdrianTeng.md · b80220a6
      Adrian Teng authored
      
      closes odoo/odoo#84300
      
      Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
      b80220a6
    • Adrian Teng's avatar
      Update `create` doc on allowed `vals_list` types · 1c6fc48e
      Adrian Teng authored
      Part-of: odoo/odoo#84300
      1c6fc48e
    • Pierre Masereel's avatar
      [FIX] sale_coupon: access to fields on coupon from POS · 15a896f4
      Pierre Masereel authored
      
      When a pos launched by a user having no access rights on sales order
      lines is launched. It cannot have access to the coupon program because
      it tries to get the computed field order_count that needs to read the
      sale order lines.
      
      closes odoo/odoo#84544
      
      Task-id: 2742528
      Signed-off-by: default avatarMasereel Pierre <pim@odoo.com>
      15a896f4
    • Pierre Masereel's avatar
      [FIX] pos_coupon: allow coupon creation when generated from POS · 2faefd5d
      Pierre Masereel authored
      When a coupon is generated from POS order, you get a traceback saying
      you don't have access rights on "coupon.coupon" when you are only a pos
      user.
      
      So when we need to create the coupons and write on it, we are doing it
      in sudo, to let the pos process generate the coupon.
      
      Task-id: 2742528
      Part-of: odoo/odoo#84544
      2faefd5d
    • Brice bib Bartoletti's avatar
      [FIX]purchase_stock,stock_account:partner on aml · c4dc6e7a
      Brice bib Bartoletti authored
      The aim of this commit is to set partner on anglosaxon
      aml in order to help our client in their stock
      reconciliation process in case it hasn't been done automatically.
      
      Before this commit:
      anglosaxon line were created without partner
      
      After this commit:
      A partner is set when anglosaxon line are created
      
      closes odoo/odoo#84525
      
      Ticket: 2692308
      Community-pr: https://github.com/odoo/odoo/pull/84468
      
      
      X-original-commit: abfe37fc
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      c4dc6e7a
    • Touati Djamel (otd)'s avatar
      [FIX] mrp: prevent traceback when choosing a BOM of a product without a variant · 5a313e0f
      Touati Djamel (otd) authored
      Steps to reproduce the bug:
      - Go to inventory > configuration > Products > Attributes
      - Create a new Dynamic Attributes > add two attribute values
      - Create a storable Product “Test”:
          - Add the two attributes
          - Save
          - Create a BOM related to this product
      - Create a new manufacturing order:
          - Do not choose a product
          - Select the BOM related to the product “test”
      
      Problem:
      Traceback is triggered because as the product template only has dynamic variants, there is not a `product.product` record created yet.
      but we try to access it in the onchange: https://github.com/odoo/odoo/blob/14.0/addons/mrp/models/mrp_production.py#L598
      
      
      
      Solution:
      do not set the product when a BOM of a product_tmpl without a variant was chosen
      opw-2732254
      
      closes odoo/odoo#84522
      
      X-original-commit: 50b538e7
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      5a313e0f
    • roen-odoo's avatar
      [FIX] pos_gift_card: Access error gift card · 37d21782
      roen-odoo authored
      
      Current behavior:
      When trying to open the gift card list you get an access error if one of the cards has been used in another company.
      This error appears because you cannot access SO from another company and the used gift cards were linked to a SO.
      So shouldn't be able to use a gift card that was created in another company.
      
      Steps to reproduce:
      -Create a gift card in company A
      -Use it in company B
      -Try to access it from company A
      opw-2732973
      
      closes odoo/odoo#83901
      
      Signed-off-by: default avatarMasereel Pierre <pim@odoo.com>
      37d21782
    • Yannick Tivisse's avatar
      [FIX] pos_hr: Allow HR officer to unlink an employee · 5cab5c11
      Yannick Tivisse authored
      
      closes odoo/odoo#84509
      
      Related: odoo/enterprise#24302
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      5cab5c11
    • Nasreddin Boulif (bon)'s avatar
      [FIX] web: display correct favicon depending company · fa2cc58e
      Nasreddin Boulif (bon) authored
      Steps to reproduce:
      
       - Activate Debug mode
       - Go to Settings -> Companies
       - Create company A and B and set a different favicon for each company
       - Refresh the page or switch company
      
      Issue:
      
        The favicon is not the right one.
      
      Cause:
      
        Code (that update favicon) removed when refractoring of owl.
        Related commit: https://github.com/odoo/odoo/commit/0573acae2306bf5da2005852da9323ddc59e5431
      
      
      
      Solution:
      
        When web client start, update in JS the favicons (desktop and mobiles)
        with current company favicon.
      
      opw-2664525
      
      closes odoo/odoo#80113
      
      Signed-off-by: default avatarJérémy Kersten <jke@odoo.com>
      fa2cc58e
    • Arthur Detroux (ard)'s avatar
      [FIX] website: use default website lang for configurator · 0eaa4c0e
      Arthur Detroux (ard) authored
      The configurator introduced at [1] uses a frontend controller to
      display its content. However this results in inconsistent language
      translation as the python code uses the users's language but the
      localization services uses the frontend's language when on a frontend
      page.
      
      Steps to reproduce:
      - Create a database with the only language being french
      - Install website
      - In the configurator, all the pages will be in french except
        "Pages and Features"
      
      With this commit, the language for the configurator will always be
      the language of the website it's configuring. A test also make sure
      that this is the current behavior.
      
      [1]: https://github.com/odoo/odoo/commit/e8a5af2e28a4724f86783746706cb59175f086bf
      
      
      
      task-2687416
      
      closes odoo/odoo#80055
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      Co-authored-by: default avatarJKE-be <jke@odoo.com>
      0eaa4c0e
Loading