Skip to content
Snippets Groups Projects
  1. May 26, 2023
    • jorv's avatar
      [FIX] google_gmail, microsoft_outlook : move UserError to ir_mail_server · 68b76c2f
      jorv authored
      The orginal PR and it's forward ports https://github.com/odoo/odoo/pull/121048
      
      
      intorduced an unexpected AttributeError when using OAuth for incoming
      mail servers (fetchmail.server). Since `smtp_user` is not a defined field
      in fetchmail.server (it uses the field `user` instead), we had to change
      the approach.
      
      To prevent this error, we move the UserError call into the respective
      ir_mail_server models, which should check the contrains at that level.
      This means that before the form gets saved, trying to connect using an
      OAuth account, should prompt the user to first specify an smtp_user before
      proceeding.
      
      X-original-commit: fcfd72a5
      Original author: niyasraphy <niyasraphyk@gmail.com>
      Conflict resolution for saas-15.2, 16.0
      
      closes odoo/odoo#122613
      
      X-original-commit: 3de5e2a1a0238b3edc5537aa5e3842ad5430a186
      Signed-off-by: default avatarStéphane Debauche (std) <std@odoo.com>
      68b76c2f
    • Đào Nam's avatar
      [REF] account: Create function _get_aml_default_display_map to allow other... · 98cda20c
      Đào Nam authored
      [REF] account: Create function _get_aml_default_display_map to allow other modules to inherit and add new key pairs
      
      closes odoo/odoo#122426
      
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      98cda20c
    • Saran440's avatar
      [FIX] purchase_requisition: default representative from Agreement tto RFQ · ccae0aa4
      Saran440 authored
      
      closes odoo/odoo#122334
      
      X-original-commit: 479a3354
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      ccae0aa4
    • mky-odoo's avatar
      [FIX] account: prevent traceback while remove currency and company · 0d4097f3
      mky-odoo authored
      
      Expected singleton: res.currency() when currency not provided
      also when remove company in invoice.
      
      Steps to Produce:-
      - While go to invoice and click on `REGISTER PAYMENT`
      - Remove currency from wizard
      
      Traceback will be generated.
      
      Applying this changes will resolve this issue.
      
      sentry - 4149615534
      
      closes odoo/odoo#121625
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      0d4097f3
    • PNO's avatar
      [FIX] mrp: compute interval duration with multiple loss_id · d9fa0d15
      PNO authored
      
      When working on an operation in workcenter that requires login, we can add multiple timers.
      However, if multiple timers do not have an `end_date` and have different `loss_id`, we will get a traceback (expected singleton) when computing the interval duration.
      After this fix, `_convert_to_duration` can be called with multiple productivity loss.
      
      OPW-3292374
      
      closes odoo/odoo#121112
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      d9fa0d15
    • Asta's avatar
      [I18N] l10n_din5008: add missing translations · c8020619
      Asta authored
      
      And resynchronise terms based on pot
      
      closes odoo/odoo#120331
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      c8020619
    • sergio-teruel's avatar
      [FIX] sale: Uom field readonly for new sale order lines · 2e5c8b4e
      sergio-teruel authored
      
      closes odoo/odoo#122537
      
      X-original-commit: 18e03c73
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      2e5c8b4e
    • Ivan Yelizariev's avatar
      [FIX] core: fix infinite loops with child_of/parent_of · a7e45879
      Ivan Yelizariev authored
      
      1.
      
      Infinite loop may happen on using `parent_of`\`child_of` when there is a
      recursion in the tree (e.g. a record is marked as a parent of itself). Fix it by
      excluding seen records from the next iteration.
      
      2.
      
      Another problem with `child_of` is `parent_id` that references to another model.
      For example, the `parent_id` may come from inherited model. It's the case with
      `res.users` and `res.partner` models. It may lead to a random search results.
      Avoid that by raising exception in case of wrong usage of the `child_of`
      operator.
      
      STEPS:
      
      In demo data, there is a partner called "Wood Corner" that is `res.partner(9,)`
      that has 3 sub-contacts. If we give Portal access to two of them, we end up with
      a database, where we have a `res.users(9,)` record that has a partner, which has a
      `parent_id` to "Wood corner". So this way, the user id is the same as the user's
      partner's parent contact id.
      
      After that open a shell and type:
      
      ```
      env['res.partner'].search([["user_ids", "child_of", 9]])
      ```
      
      BEFORE: infinite loop (without change n.1) or random search results (when change
      n.1 is applied)
      AFTER: ValueError exception
      
      ---
      
      opw-2729740
      
      closes odoo/odoo#122524
      
      X-original-commit: a7352c644f5f12ca075546bd57912f849f9e20f2
      Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
      Signed-off-by: default avatarIvan Elizaryev (iel) <iel@odoo.com>
      a7e45879
    • Saurabh Mishra's avatar
      [FIX] website_sale: preventing list index out of range · 9a01721a
      Saurabh Mishra authored
      
      When user enters empty space in name field instead of entering an
      actual name and confirm their billing, shipping address then when
      they click on paynow to confirm order they will face the issue
      'list index out of range'.
      
      Note : Do the paypal configuration before following below steps.
      
      Steps to produce:
      1) Vist the website as a public user.
      2) Create a sale order by adding some products to the cart.
      3) While entering shipping and billing address, in the name field enter
      some space.
      4) Click on next button.
      5) Now a sale order is created.
      6) Go to orders through 'website' module.
      7) Open the order created and generate a payment link.
      8) Paste that payment link in another tab or browser .
      9) Click on pay
      10) By following above steps you will encounter the error.
      
      This commit will prevent the above error.
      
      sentry - 4177783431
      
      closes odoo/odoo#122521
      
      X-original-commit: 46f7bc3cdd80313290b4b72b9a9da49a09e548a4
      Signed-off-by: default avatarSaurabh Mishra (sami) <sami@odoo.com>
      9a01721a
    • Louis (loco)'s avatar
      [FIX] web_editor, *: reorder invisible elements panel at snippet move · 9634ff8d
      Louis (loco) authored
      *website
      
      Steps to reproduce the bug:
      - Add a Cover and a Picture snippet on the website.
      - Change their visibility to "Conditionally".
      - Change the order of the two snippets on the page either with the drag
      and drop tool or with the "move up" or "move down" option.
      => Their order on the "Invisible Elements" panel has not been updated.
      
      The problem is fixed by calling `_updateInvisibleDOM()` at the end of
      `moveSnippet()` and `_onSnippetDragAndDropStop()`. Note that before this
      commit, all the snippets with a conditional visibility were hidden at
      the call of `_onSnippetDragAndDropStop()`. This is due to the call of
      `cleanForSave()` from `_destroyEditors()`. `_onSnippetDragAndDropStop()`
      has been adapted in order to, as for the "move" option, do not change
      the visibility of those elements.
      
      task-3203914
      
      closes odoo/odoo#122454
      
      X-original-commit: https://github.com/odoo/odoo/commit/e8ff70b1b85dc104750ca8a81833444a17a2e9bb
      
      
      Signed-off-by: default avatarDieleman Guillaume (gdi) <gdi@odoo.com>
      9634ff8d
    • Louis (loco)'s avatar
      [FIX] *: display the correct eye icon of the invisible elements · 37205288
      Louis (loco) authored
      *web_editor, website
      
      Steps to reproduce the bug:
      - Add a Text-Image snippet.
      - Change its visibility to "Conditionally".
      - Save.
      - Edit again.
      => The eye icon indicates that the snippet is not visible but the
      snippet is displayed.
      
      Note that [1] introduced a mechanism to solve this problem (the
      `cleanForSave()` of the `ConditionalVisibility` option) but the code was
      not working correctly since [2].
      
      Let's first remember that when calling `toggleTargetVisibility()`, two
      main actions are performed:
      - The addition or suppression of the `data-invisible` attribute from the
      dataset of an invisible element. This attribute is responsible for the
      crossed or not of the eye icon in the "Invisible Elements" panel.
      - The call to `onTargetHide()` or `onTargetShow()` that performs among
      other things the addition or the suppression of the
      `o_conditional_hidden` class on an invisible element. This class is
      responsible for the visibility of the element on the page in edit mode.
      
      This being said, here is what happened at the "Save" before this commit:
      - `cleanForSave()` of `snippetEditor` is called. If the related element
      has the `o_snippet_invisible` class, `toggleTargetVisibility(false)` is
      called (meaning that the `o_conditional_hidden` class and the
      `data-invisible` attribute are added to the element).
      
      - `cleanForSave()` of the `ConditionalVisibility` option is called and
      before [2], the `data-invisible` attribute was removed from the
      corresponding element.
      
      - At the `DOMContentLoaded`, the `o_conditional_hidden` class is removed
      from all the elements that have a conditional visibility. The visibility
      of those elements on the page now depends on the rule set by the user.
      
      The goal of this commit is to restore the mechansim of the remove of the
      `data-invisible` attribute from the conditionnal elements at the
      `cleanForSave()`.
      
      [1]: https://github.com/odoo/odoo/commit/1c442782f887a8c16bae05a43fae13a310ac05df
      [2]: https://github.com/odoo/odoo/commit/de3c29fab2bc5349da8a9418f9d0086d76e6f7de
      
      task-3203914
      
      X-original-commit: https://github.com/odoo/odoo/commit/aae9053cbab6e0d3eda256a67fce98aced183ee7
      Part-of: odoo/odoo#122454
      37205288
    • Louis (loco)'s avatar
      [FIX] web_editor: reorder the elements of the invisible elements panel · 6c9ec26d
      Louis (loco) authored
      Steps to reproduce the bug:
      - Add a form snippet on the footer of the website page.
      - Change the visibility of the form snippet to "conditionally".
      - On the footer settings, deactivate the "Page Visibility".
      => The form snippet is still present on the "Invisible Elements" panel
      but clicking on it has no effects. Indeed, it is inside the footer which
      is hidden.
      
      The goal of this commit is to reorganize the "Invisible Elements" panel
      in order to better visualize the hierarchy between the different
      invisible elements. To do so, the list of the invisible snippet elements
      (`[...$invisibleSnippets]`) is scanned. Each invisible snippet that is
      the descendant of another is discarded of the list (to only keep the
      "root" ones) and a map is created with its `keys` set to invisible
      snippets that have invisible descendants. The `value` corresponding to
      an invisible snippet element is a list filled with all its descendant
      invisible snippets except those that have a closer invisible snippet
      ancestor. The list of the root snippets is then scanned. Each root
      snippet is inserted in the DOM as well as their descendant snippets
      found thanks to the newly created map.
      
      Note that thanks to this commit, another problem is solved:
      - Add a cookie bar on the website.
      - Add a Text-Image snippet and change its visibility to "conditionally".
      - Save and edit again. Note that the "Cookies Bar" is above the "Text-
      Image" on the "Invisible Elements" panel.
      - Click to display the cookie bar.
      => The order of the "Cookies Bar" and the "Text-Image" is switched on
      the "Invisible Elements" panel.
      Indeed, before this commit, the order of the snippets was influenced by
      the order of their snippet editor creation. Because this order was not
      always the same from one call to `_updateInvisibleDOM()` to another, a
      glitch could happen when toggling a snippet visibility.
      This is now fixed as the order of the invisible snippets in the
      "Invisible Elements" panel is determined either by their order in the
      list `rootInvisibleSnippetEls` or their order in the lists contained as
      value in the map `descendantPerSnippet`.
      
      task-3203914
      
      X-original-commit: https://github.com/odoo/odoo/commit/3f10fc99c92176c7379ec7d460afb2feb87ecc23
      Part-of: odoo/odoo#122454
      6c9ec26d
    • Mohit Beniwal's avatar
      [FIX] uom: prevent set value of ratio as zero in uom · b79e5afe
      Mohit Beniwal authored
      
      ZeroDivsionError: float division to Zero is generated because for assigning
      value to 'factor' of uom in method '_set_ratio', it tries to divide value by
      Zero for uom_type 'Bigger'.
      
      Steps to reproduce:
      1) Install 'Inventory' module.
      2) Click on 'Configuration' > 'Settings'.
      3) Activate 'Units of Measure' > click on 'Units of Measure' button under it.
      4) Click on 'Create' button to create new uom category.
      5) Give any name > in 'Units of Measure' page, click on 'Add a line'.
      6) Enter name and select type as 'Reference unit of measure for this category'.
      7) Now, add another line and select type as 'Bigger than the the Reference unit
         of measure' and set the 'ratio' value to Zero, Error will be generated.
      
      By applying this,it will check for the value of 'ratio' to prevent division by 0
      
      sentry - 4174584503
      
      closes odoo/odoo#122333
      
      X-original-commit: afbd59e5
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      b79e5afe
    • niyasraphy's avatar
      [FIX] mrp: clear product variant onchanging product in bom · 5808fc89
      niyasraphy authored
      
      before this commit, on changing the product from bom is
      not clearing the product variant field, if the product
      variant feature is not activated in the database.
      
      * activate the product variant in the db
      * create a product and variants
      * open bill of material, and set the created
      product as product and set any variant in product
      variant field
      * now go to settings and disable product variant feature
      * come back to same bom and change the product
      * the product variant field will still have the other
      product
      
      onchange_product_tmpl_id is written to clear the
      product variant field value, but as the product
      variant field has group the onchange value is
      not getting updated.
      
      after this commit, on changing the product the product
      variant field will get cleared even if the product
      variant feature is not activated.
      
      closes odoo/odoo#121859
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      5808fc89
    • Achraf's avatar
    • Raúl's avatar
      [REF] l10n_ec: Message validation for VAT · f4ca2350
      Raúl authored
      
      - We refactored the VAT validation from a validation error to a warning that is stored in l10n_ec_vat_error
      - Remove the "-" and "EC" from the base_vat in the EC validation/example
      - Only validate the length in the base_vat
      - Add compute field with the warning message in the l10n_ec
      
      closes odoo/odoo#121099
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      f4ca2350
    • Csaba Tóth's avatar
      [CLA] OdooTech Zrt signs Odoo CCLA v1.0 · 65f6d123
      Csaba Tóth authored
      
      closes odoo/odoo#122570
      
      X-original-commit: 3e757c59
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      65f6d123
    • David (dafr)'s avatar
      [FIX] purchase: recompute qty_received_method · 243835da
      David (dafr) authored
      
      qty_received_method is not recomputed if the product type change, and can lead to issues on existing purchases when trying to generate a Vendor Bill.
      
      # HOW TO REPRODUCE:
      - Create product P, type: Service, Control Policy: 'On Received Qty'
      - Create PO for 1 unit of P (do not confirm)
      - Update type of P to Storable
      - Confirm PO, Receive Products
      => Qty Received is 0, not able to generate Bill
      
      closes odoo/odoo#122353
      
      X-original-commit: fcc1e8e3
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      Signed-off-by: default avatarFesquet David (dafr) <dafr@odoo.com>
      243835da
    • Preksha Chouhan's avatar
      [FIX] point_of_sale: prevent traceback while creating new pos category · ead65a64
      Preksha Chouhan authored
      
      When user create a pos category from 'restaurant.printer' model in
      'pos_restaurant' module. it will give an error with the
       message -
      
      'sequence item 0: expected str instance, bool found'
      
      Steps to Produce:-
      
      1. Install 'pos_restaurant' module
      2. Go to 'point_of_sale' module
      3. Go to 'Configuration' -> 'Order Printers'
      4. Click on any printer or create new
      5. Under 'Printed Product Categories' click 'Add a line'
      6. Click 'New'
      
      Trace-back will be generated.
      
      Applying these changes will resolve this issue.
      
      sentry - 4072172292
      
      closes odoo/odoo#120519
      
      Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
      ead65a64
  2. May 25, 2023
  3. Apr 13, 2023
  4. May 25, 2023
  5. May 24, 2023
Loading