Skip to content
Snippets Groups Projects
  1. Dec 15, 2022
  2. Dec 14, 2022
    • roen-odoo's avatar
      [FIX] pos_coupon: correctly filter out global discount · db459b33
      roen-odoo authored
      
      Current behavior:
      When a global discount is applied, it is considered as a regular
      orderline when computing the order discounts. Because of this if you
      applied a coupon and a global discount, the pos would add a discount of
      infinity value.
      
      Steps to reproduce:
      - Create a promotion with a discount of 10%
      - Create a product with no taxes
      - Enable the global discount feature, and make sure the Discount product
        has a tax set on it.
      - Create a new order, add the product, apply the promotion, and apply
        the global discount.
      - The order will have a discount of infinity value.
      
      opw-3094784
      
      closes odoo/odoo#107833
      
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      db459b33
    • Merel Geens (mege)'s avatar
      [FIX] point_of_sale: prevent closing a POS session multiple times in a · 6b12c64e
      Merel Geens (mege) authored
      
      row
      
      When it comes to closing POS sessions, both the frontend and the backend
      currently have some way to prevent the same operations from executing
      simultaneously because of repeated clicks. `closeSession` in the
      frontend has a `closeSessionClicked` boolean that prevents the operation
       from triggering multiple times at once. `close_session_from_ui`
      in the backend checks if the session state isn't already `closed`.
      
      A flaw in the current logic is that
      `update_closing_control_state_session`, which is called by the frontend
      before `close_session_from_ui`, doesn't check the session state before
      writing it to be `closing_control`. This means that if you time things
      in such a way that the `closeSession` logic in the frontend triggers
      again right after it finishes, it will call
      `update_closing_control_state_session` and `close_session_from_ui`
      again, which will happily close the session again, duplicating stock
      moves and account moves resulting from it.
      
      This fix has `update_closing_control_state_session` check if the session
      is already closed and raises a UserError if so. This prevents the
      duplicate closings and records from happening.
      
      There were two variants in the UI I observed when the issue occurred:
      the first is when the repeated execution of
      `update_closing_control_state_session` and `close_session_from_ui`
      successfully finished. In that case the session would be closed with
      duplicate stock moves and journal entries.
      
      In the second variant, from the repeated calls only
      `update_closing_control_state_session` executed but not
      `close_session_from_ui`. This could happen if the timing of the
      frontend was such that it redirected to the POS dashboard before it was
      able to call `close_session_from_ui`. In that case, the session would
      be in the `closing_control` state, which is visible in the POS dashboard
      . If the user then closed the session, it would be closed twice and the
      duplicate records would again be created.
      
      opw-2988701
      
      closes odoo/odoo#107873
      
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      6b12c64e
  3. Dec 13, 2022
  4. Dec 12, 2022
    • Solan Delvenne (sode)'s avatar
      [FIX] snailmail: fix follow-up reports layout for snailmails · fee44f5a
      Solan Delvenne (sode) authored
      
      Follow-up reports were previously not handled by the commit fixing
      invoices. This commit aims to fix that.
      
      closes odoo/odoo#107770
      
      X-original-commit: 768cfbe0
      Signed-off-by: default avatarFlorian Daloze (fda) <fda@odoo.com>
      Signed-off-by: default avatarSolan Delvenne (sode) <sode@odoo.com>
      fee44f5a
    • Benoit Socias's avatar
      [FIX] web_editor, website: fix form custom fields starting with numbers · 7f34dd5d
      Benoit Socias authored
      Before this commit, following this flow:
      - Add a form
      - Add a selection field
      - Add an option starting with a number
      - Save
      => The created form's option value is only the number
      
      From the website_form options, the options HTMLElement of a form field
      are generated using the field's records ids for their html element value
      attribute (see FormEditor._renderField).
      
      When [1] refactored the website_form options to use a generic
      ListUserValueWidget, the list records id computation changed to use
      parseInt instead of strings.
      
      This commit changes the detection of parsable int to match only strings
      that are made only of digits, and less than 16 of them so that their
      value is not lost.
      
      [1]: https://github.com/odoo/odoo/commit/9304f8fa7bb94f21dd4caa83f9679ffd1642691b
      
      
      
      opw-2980760
      
      closes odoo/odoo#103825
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      Co-authored-by: default avatarYounn Olivier <yol@odoo.com>
      7f34dd5d
    • niyasraphy's avatar
      [FIX] base: profiling qweb field visibility · e0f2e0b5
      niyasraphy authored
      
      closes odoo/odoo#107051
      
      Signed-off-by: default avatarJulien Castiaux <juc@odoo.com>
      e0f2e0b5
    • Ivan Yelizariev's avatar
      [FIX] website_sale: add noFuzzy when it's active · 1df3b14f
      Ivan Yelizariev authored
      
      `website_sale` module has custom handler for form submit event. That handler
      ignores `noFuzzy` attribute. As result, adding `data-no-fuzzy="1"` to
      `input[name=search]` works everywhere, but not on shop product list pages.
      
      STEPS:
      
      1. Settings > Technical > Views > website_search_box_input & website_search_box > Code in data-no-fuzzy="1" into the <input> tag
      2. Go to Website >.Shop > Customize > Enable ecommerce categories
      3. Search for a product on the main shopping page and enter > Observe the URL > There is no noFuzzy param
      4. Go to any product's page on the website > search for a product through the search bar and enter > Observe the URL > there is a noFuzzy param passed
      
      opw-3051319
      
      closes odoo/odoo#106674
      
      Signed-off-by: default avatarWilliam Braeckman (wbr) <wbr@odoo.com>
      1df3b14f
    • Ayman Adil's avatar
      [FIX] convert.py: skip the creation of a `forcecreate=0` record when a reference is missing · 2e4f0667
      Ayman Adil authored
      When a record is `forcecreate=0` and a reference of one of its fields is missing, the update of the corresponding module fails. In this case, we can skip the creation of this record.
      
      An example of this issue is this [record](https://github.com/odoo/enterprise/blob/6411ae071ace980834befeb8040c94b1a05c8034/documents_account/data/data.xml#L17) in `documents_account` module (enterprise) when the reference of this [field](https://github.com/odoo/enterprise/blob/6411ae071ace980834befeb8040c94b1a05c8034/documents_account/data/data.xml#L20
      
      ) is missing.
      
      This can be reproduced as follows:
      1. Create a DB with `documents_account` module
      2. Uninstall `documents_account` module
      3. Remove `documents.documents_finance_status`
      4. Reinstall `documents_account`
      
      ```
      Traceback (most recent call last):
        File "/home/ayman/src/odoo/15.0/odoo/tools/convert.py", line 680, in _tag_root
          f(rec)
        File "/home/ayman/src/odoo/15.0/odoo/tools/convert.py", line 567, in _tag_record
          f_val = self.id_get(f_ref)
        File "/home/ayman/src/odoo/15.0/odoo/tools/convert.py", line 663, in id_get
          res = self.model_id_get(id_str, raise_if_not_found)
        File "/home/ayman/src/odoo/15.0/odoo/tools/convert.py", line 669, in model_id_get
          return self.env['ir.model.data']._xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
        File "/home/ayman/src/odoo/15.0/odoo/addons/base/models/ir_model.py", line 1943, in _xmlid_to_res_model_res_id
          return self._xmlid_lookup(xmlid)[1:3]
        File "<decorator-gen-35>", line 2, in _xmlid_lookup
        File "/home/ayman/src/odoo/15.0/odoo/tools/cache.py", line 90, in lookup
          value = d[key] = self.method(*args, **kwargs)
        File "/home/ayman/src/odoo/15.0/odoo/addons/base/models/ir_model.py", line 1936, in _xmlid_lookup
          raise ValueError('External ID not found in the system: %s' % xmlid)
      ValueError: External ID not found in the system: documents.documents_finance_status
      ```
      
      closes odoo/odoo#105673
      
      Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
      2e4f0667
    • Romain Derie's avatar
      [FIX] website: authorize again the trailing slash in SEO name field · fd88813d
      Romain Derie authored
      Commit [1] improved the "sanitation" of this field for special
      character. For instance, when copy pasting the following terms:
      
      |      Input      |      Before      |       After     |
      |-----------------|------------------|-----------------|
      | fée d'été à 40€ |    f-e-d-t-40-   |  fee-dete-a-40  |
      | Nội dung có Dấu |  n-i-dung-c-d-u  | noi-dung-co-dau |
      
      But it actually came with a bad behavior which was not noticed: it
      prevents to type `-` at the end of the input, which sounds good but is
      not.
      Indeed, when typing `a-word`, you will type `a` then try to type `-`
      which won't work as considering a (forbidden) trailing slash, even if
      you actually want to type something after.
      
      This commit allows trailing slashes again, it's not a big deal and one
      can remove it if he wants to.
      
      [1]: https://github.com/odoo/odoo/commit/bb43d4dbb5745be84f0f9462e768989e50607bea
      
      
      
      opw-3075419
      
      closes odoo/odoo#107672
      
      X-original-commit: 427ce767
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      fd88813d
  5. Dec 11, 2022
  6. Dec 09, 2022
    • Louis (loco)'s avatar
      [FIX] web_editor: enable the switch between the tabs of a custom tabs · 300f3590
      Louis (loco) authored
      
      This commit enables the switch between the different tabs of a custom
      tabs even in the editor mode.
      
      Steps to reproduce the bug:
      - Drag & drop a tabs snippet on the website.
      - Save it ("save the block to use it elsewhere") as a custom block.
      - When the editor mode is "on", it is impossible to switch between the
      different tabs of the custom tabs.
      
      The goal of this commit is to differentiate the ID's of the tab panes
      located on the website and the ones of the corresponding custom model
      located on the edit bar. In the case of the tabs snippet, it is
      important in order to link the anchors of the tabs to their correct
      tab pane. Indeed, before this commit, two tab panes (the one on the
      website and the custom model on the edit bar) had the same ID's. The
      anchors of the tabs on the website were linked to the tab pane located
      on the edit bar.
      
      opw-2988215
      
      closes odoo/odoo#107657
      
      X-original-commit: 5569fbf9
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      300f3590
    • dbkosky's avatar
      [FIX] l10n_ke_edi_tremol: fix QR code render in invoice template · 8108bd0e
      dbkosky authored
      
      A bug prevented the QR code for the KRA ITAX portal being rendered
      properly on the invoice. This resulted in a small, empty box in the
      place where the QR code should be.
      
      This fix adapts the code in the template so that it correctly renders
      the QR code.
      
      closes odoo/odoo#107641
      
      Task-id: 2950308
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      8108bd0e
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] account: allow tax edit in purchase receipts · 4eec3460
      Andrea Grazioso (agr-odoo) authored
      
      Activate 'Purchase Receipt' in Account Settings
      Accounting>Vendors>Receipts
      Create a new receipts
      Add a line with tax
      
      Computed tax dictionary is not editable via widget (it is in Vendor Bills)
      
      opw-3080972
      
      closes odoo/odoo#107483
      
      Signed-off-by: default avatarOlivier Colson (oco) <oco@odoo.com>
      4eec3460
    • Romain Derie's avatar
      [FIX] website: make sidebar menu visible on safari on mac · 693092f2
      Romain Derie authored
      
      For some reason, safari on mac is not showing the sidebar menu content
      at all. It remains a white div without content.
      
      Seems like a bad implementation of that browser for this case, or at
      least an implementation which is not shared by all other browsers.
      
      Note that removing `z-index`, `position:absolute` or `overflow` css
      property from the `wrapwrap` will make the menu appear.
      !!! Also note that having a non scrollable page (not enough content),
      like an empty homepage, will make the menu appear too. !!!
      
      As this issue is quite critical:
      - All mac/safari users are not seeing your website menu..
      - And the admin don't event know it most of the time (as not on mac)
      And since:
      - It's been going for months without someone finding a proper fix
      - It's hard to investigate as devs generally don't have mac to
        investigate and have to use browserstack which is really bad for such
        work
      This commit is a fix attempt using `calc` which is probably not ideal.
      
      Step to reproduce:
      - Select the sidebar header template
      - Visit the website on safari
      -> The menu will be invisible, like if the navbar was empty
      
      opw-2984536
      opw-2896939
      
      closes odoo/odoo#107581
      
      X-original-commit: ffa34d84
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      693092f2
    • Arthur Detroux (ard)'s avatar
      [FIX] website: prevent tb when using a background video as cover · 46ce4345
      Arthur Detroux (ard) authored
      Prior to this commit, when using a background video on the cover of the
      website_slides homepage (/slides), after saving, a traceback would
      occur and the video would not be displayed.
      
      Steps to reproduce:
      - Install website_slide
      - Go to /slides
      - Enter edit mode
      - Change the cover of the page by a video
      - Save
      - Traceback
      
      The reason for that is that the cover snippet used on the homepage of
      elearning is the root of an XPath instead of its own oe_structure. (This
      was changed in 16.0)
      [1] made it so that the style and class attributes are saved but did not
      save any data attributes needed for the background-video widget to work.
      
      This commit adds those data attributes.
      
      [1]: https://github.com/odoo/odoo/commit/5b252215dc375526af87c31a32256dd1a9582f02
      
      
      
      opw-3063043
      
      closes odoo/odoo#107547
      
      X-original-commit: 86dc4d43
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      46ce4345
    • Touati Djamel (otd)'s avatar
      [FIX] mrp: display warning when archiving component product · 0aebb5af
      Touati Djamel (otd) authored
      
      Steps to reproduce the bug:
      - Create a BoM with components
      - Archive one of the components
      
      Problem:
      No warning is displayed for the user to inform that the product is
      used as a component in a BoM
      
      opw-3089104
      
      closes odoo/odoo#107555
      
      X-original-commit: 92fc5f61
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      0aebb5af
    • Nshimiyimana Séna's avatar
      [FIX] web: make list view table borders visible in Firefox · 28a408a8
      Nshimiyimana Séna authored
      
      ## Steps to reproduce
      * Using Firefox, Go to Accounting > Invoices > create a new invoice.
      * Add a line to the invoice and remove the label.
      
      You should see that there's no indication that the label field is
      required. (It works well in Chrome)
      
      ## Cause
      This is happening because the table borders (that become red when a
      field fails validation) are not displayed in Firefox.
      
      opw-3040299
      
      closes odoo/odoo#107523
      
      X-original-commit: 74726c64
      Signed-off-by: default avatarPierre Paridans (app) <app@odoo.com>
      Signed-off-by: default avatarNshimiyimana Serge Séna (sesn) <sesn@odoo.com>
      28a408a8
  7. Dec 08, 2022
Loading