Skip to content
Snippets Groups Projects
  1. Aug 05, 2022
    • Ignacio Cainelli's avatar
      [IMP] l10n_ar: change message error · 77fce500
      Ignacio Cainelli authored
      
      The error message now shows that a VAT tax must be added to that line
      and that if it is already added, it may be misconfigured. This improves
      the functionality since previously it showed that there should only be
      one VAT tax and that could generate confusion in some cases
      
      [CLA] add new members to Adhoc CLA
      
      closes odoo/odoo#95905
      
      X-original-commit: 806961fa
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      77fce500
    • Ahmad Khanalizadeh's avatar
      [IMP] point_of_sale: better error message for identify customer failure · 06c8765d
      Ahmad Khanalizadeh authored
      
      Before this commit if Identify Customer option was enabled for a
      payment method in point of sale but no customer was set for an order,
      we get a SQL constraint error that has no hints on where the problem
      comes from.
      
      This process can be improved by a better error message that directly
      points out the problem.
      
      opw-2907152
      
      closes odoo/odoo#95754
      
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      06c8765d
  2. Aug 04, 2022
  3. Aug 03, 2022
    • Renaud Thiry's avatar
      [FIX] mass_mailing: fix traceback on picking shape · 0a49dffc
      Renaud Thiry authored
      Picking a shape for an image in mass_mailing (when in developer mode)
      would result in a sudden error due to a None
      being passed to _getCSSColorValue
      
      The shape picker is completely hidden in  the mass_mailing
      templates editor as essentially no mail
      client supports it in this version up to 15.3
      
      Feature properly reintroduced in:
      https://github.com/odoo/odoo/pull/84926
      
      
      
      Task-2937490
      
      closes odoo/odoo#97042
      
      Signed-off-by: default avatarWarnon Aurélien (awa) <awa@odoo.com>
      0a49dffc
    • Xavier BOL (xbo)'s avatar
      [FIX] web: fix autofocus when input type is 'number' · 99bcda76
      Xavier BOL (xbo) authored
      
      Before this commit, when the autofocus is used on an input with
      `type="number", the `selectionEnd` is not available because the input
      element's type ('number') does not support selection.
      
      This commit checks the input type is not a number:
      - if it is the case then the selection is used to place the cursor at
        the end of the input content,
      - otherwise the selection properties are not used and the input is
        simply focused.
      
      closes odoo/odoo#97312
      
      Signed-off-by: default avatarSamuel Degueldre <sad@odoo.com>
      99bcda76
    • qsm-odoo's avatar
      [FIX] web_editor: fix the look of the indent symbol in the editor panel · c746a828
      qsm-odoo authored
      
      As a stable fix, to not touch XML templates and break existing
      translations, the ⌙ character is automatically replaced by └ which makes
      more sense for the usecase and should work properly in all browsers. The
      ⌙ character is actually rendered mirrored on Windows 11 Chrome (and
      others) as the font used for those unicode characters is left to the
      browser. We could force a font of our own but it's probably not worth it.
      
      A better solution with a SVG or CSS solution has to be done in master.
      That would unify the look of the symbol across all browsers and
      also prevent special characters to be placed in translations.
      
      closes odoo/odoo#97349
      
      X-original-commit: bc19050d
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      c746a828
  4. Aug 02, 2022
  5. Aug 01, 2022
    • Alvaro Fuentes's avatar
      [FIX] stock: fix KeyError for archived warehouses · a4e2fa65
      Alvaro Fuentes authored
      The below line raises a KeyError when `warehouse` refers to an archived
      warehouse.
      https://github.com/odoo/odoo/blob/01cc43b0578ecc9d1fed37a12b2468ffc9d4aedd/addons/stock/models/stock_orderpoint.py#L396
      
      The reason is that the SQL view created on
      https://github.com/odoo/odoo/blob/01cc43b0578ecc9d1fed37a12b2468ffc9d4aedd/addons/stock/report/report_stock_quantity.py#L28-L37
      
      
      doesn't take into account whether the warehouses are archived or not.
      
      The solution proposed here is to fetch all warehouses to ensure the
      lookup doesn't fail. Alternatively the view could be updated but that
      will be a bigger change.
      
      This issue was detected during the upgrade 226754
      
      closes odoo/odoo#97222
      
      X-original-commit: aaa7fb8f
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      Signed-off-by: default avatarAlvaro Fuentes Suarez (afu) <afu@odoo.com>
      a4e2fa65
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] account: reconciliation of 0 balance line in automatic entry · 859dc0d9
      Andrea Grazioso (agr-odoo) authored
      
      Open Accounting>Journal Items
      Select 1+ items with 0 credit/debit
      Hit Actions>Automatic Entries
      In the wizard choose 'Change Period', select an Accrued Account with
      'reconcile' flag and confirm
      
      Error will raise 'You are trying to reconcile some entries that are
      already reconciled.'
      This occurs because new entries, with 0 balance, will be created to match
      the selected one. The flow include a reconciliation step in which the 0
      balance will raise the error.
      
      With this patch the problematic lines will be created but not reconciled
      
      opw-2909058
      
      closes odoo/odoo#97185
      
      X-original-commit: 2433d5da
      Signed-off-by: default avatarGrazioso Andrea (agr) <agr@odoo.com>
      859dc0d9
    • Adrien Widart's avatar
      [FIX] {sale_,}stock: decrease the SOL qty with MTSO rule · 7e8a038e
      Adrien Widart authored
      To reproduce the issue:
      1. In Settings, enable "Multi-Step Routes"
      2. In the Routes, unarchive the route R called "Replenish on Order
      (MTO)"
      3. Create a storable product P
      4. Update its quantity: 10
      5. Create and confirm a sale order with one line:
          - Product: P
          - Quantity: 10
          - Route: R
      6. Update the SO line:
          - Quantity: 8
      
      Error: Once the SO is saved, 2 new deliveries are created:
      - One from Customers to Stock with 2 x P (this one should be merged with
      the existing one)
      - One from Stock to Vendors with 2 x P (his one should not exist)
      
      The route R only contains one rule, which is a MTSO one. On step 5, when
      confirming the SO, `_run_pull` will be called and will create a stock
      move SM01 based on that rule. In case of a MTSO rule and because there
      are already some available P, the procure method of SM01 will be MTS
      (see [1]). Then, once SM01 is created, we will confirm it and we won't
      do anything more.
      
      The process is not the same on step 6. When saving the SO, `_run_pull`
      is called again but this time, because the needed quantity is negative
      (-2), the procurement method is set to MTO (see [1]). Therefore, when
      confirming such a stock move, two undesirable consequences occur:
      - Because its procure method is not the same than SM01, we won't merge
      the stock moves (this explains why a picking is created from Customers
      to Stock)
      - Because its procure method is MTO, we will create and run a
      procurement to get -2 x P at Stock. It will find a rule thanks to the
      route "Receive in 1 step". The rule creates a receipt from Vendors to
      fulfill the need. This explains why an unexpected picking is created.
      
      When processing a procurement with a MTSO rule and a negative quantity,
      if we want to know the procurement method of the new SM, we should try
      to find and copy the decision we took for the positive move (if it
      exists). That way, we ensure that the 'returning phase' (the quantity
      decreasing) will follow the same behavior as the initial one (when we
      confirmed the SO).
      
      [1]
      https://github.com/odoo/odoo/blob/20e0ad13afa2a0ff85d555ab57a6800d3db30341/addons/stock/models/stock_rule.py#L244-L254
      
      
      
      OPW-2885751
      
      closes odoo/odoo#96671
      
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      7e8a038e
    • Antoine Vandevenne (anv)'s avatar
      [FIX] payment: fix the condition for the "Manage payment methods" button · b301844c
      Antoine Vandevenne (anv) authored
      
      The button should only be shown if a tokenization-capable acquirer is
      enabled (or if a token already exists), but a typo made the button being
      shown regardless of that (first) condition.
      
      closes odoo/odoo#97237
      
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      b301844c
    • Tiffany Chang (tic)'s avatar
      [FIX] mrp{_subcontracting}: auto assign backorders linked moves · d3158b2a
      Tiffany Chang (tic) authored
      Previous fix: https://github.com/odoo/odoo/pull/84631 missed the case
      when raw_move_ids have already done move_orig_ids (i.e. when 2/3 step
      MOs or subcontracting w/ resupply contractor). This made it so when
      MOs are backordered, these moves would not be reserved even though they
      were in the original MO.
      
      We fix this so now we always assign backorder MOs when the reservation
      method is 'at_confirm' so we follow the previously existing (expected)
      behavior.
      
      Note that this fix is very similar to other fix
      https://github.com/odoo/odoo/pull/79873
      
      
      
      Part of Task: 2777571
      
      closes odoo/odoo#91460
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      d3158b2a
    • Tiffany Chang (tic)'s avatar
      [FIX] mrp_subcontracting{_purchase}: handle subcontract qty decrease · 885394f1
      Tiffany Chang (tic) authored
      Steps to reproduce:
      - create a subcontracted product (i.e. create subcontract BoM)
      - create and confirm PO for subcontracted product (qty > 1)
      - try to decrease PO qty for subcontracted product
      
      Expected Result:
      Since receipt is not yet validated, the qty in the receipt should
      decrease (it will in the subcontract MO as well, but this doesn't matter
      since no one should work directly with the MO)
      
      Actual Result:
      A validation error occurs saying the qty to produce must be non-negative
      
      We allow neg demand qtys to be proprogated from SOs and POs since
      https://github.com/odoo/odoo/pull/76752 . While we added in a check to
      make sure MOs are not created when a neg qty change is proprogated, we
      forgot to add a check for subcontracted created MOs, hence the
      validation error (i.e. the neg qty change is trying to create a
      subcontracted MO of a neg amount.)
      
      Task: 2777571 (issue 2 of additional issues)
      Part-of: odoo/odoo#91460
      885394f1
    • Tiffany Chang (tic)'s avatar
      [FIX] mrp_subcontracting: correct UX behavior · 0bf521fb
      Tiffany Chang (tic) authored
      Fixes a few incorrect subcontracting UX behaviors:
      - When subcontract BOM is flexible, the record burger should always show
        so user can more easily record varying quantities
      - When `show_operations=True` then `action_assign_serial` button in
        Operations tab should only show if subcontract BOM is NOT strict AND
        has no tracked components (instead of always showing regardless of BoM
        consumption and its components)
      - When a subcontract receipt is backordered, the Done moves should no
        longer return `_action_record_components`.
      - When 'show_operations=True' for receipts, we shouldn't display the
        subcontracting component lines in the Detailed Operations tab
      
      Task: 2777571
      Part-of: odoo/odoo#91460
      0bf521fb
    • Alejandro Santillan's avatar
      [IMP] website_sale_stock: facilite inheritance _cart_update behavior · cd73c860
      Alejandro Santillan authored
      It is currently impossible to modify the _cart_update behavoiur from website_sale_stock
      
      The sale.order method _cart_update() updates the lines on the e-commerce shop
      cart, some modules override the method adding new features, the module
      website_sale_stock is one of them.
      
      The specific behavior of _cart_update() in the module website_sale_stock allows
      to delete from the sale order the products whose demand is greater than the stock.
      
      If the specific behavior of the module website_sale_stock is needed to be
      expanded or totally changed, that is not possible because the method _cart_update()
      should be always super called, even if the website_sale_stock code for
      _cart_update will be totally changed.
      
      To allow inheriting just the specific behavior of website_sale_stock without
      affecting other modules. This commit creates a new method _cart_lines_stock_update()
      which have the important behavior for this module and will allow to be
      easier to inherit it.
      
      Based on: https://github.com/odoo/enterprise/commit/f5d92e70aaa472324cc1f0374ddb108d100bec59
      
      
      
      OPW#2500355
      
      closes odoo/odoo#97204
      
      X-original-commit: 1e3adbf6
      Signed-off-by: default avatarWilliam Braeckman (wbr) <wbr@odoo.com>
      cd73c860
    • Ipsita Borisagar's avatar
      [FIX] mass_mailing: should not land on top · da4fdd90
      Ipsita Borisagar authored
      
      Before this commit:
      
      When the page is expanded and try to add any block with an image, try to change
      the image using replace button. It lands the user at the top of the page instead
      of staying image place.
      
      After this commit:
      
      The user will stay at the image place after clicking on replace button.
      
      Task-2753302
      
      closes odoo/odoo#96578
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      da4fdd90
    • Sébastien Geelen (sge)'s avatar
      [FIX] web_editor: correct link behaviors · 500bc6dc
      Sébastien Geelen (sge) authored
      
      * Broaden the valid URL pool by including some URL without subdomain
       if they have a white listed TLD.
      
      * Change a link 'href' when we change the link label,
       if the new label is a valid URL.
      
      * Ensure the domain extension cannot be only digit.
      
      task-2858621
      task-2901795
      
      closes odoo/odoo#94512
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      500bc6dc
    • Sébastien Geelen (sge)'s avatar
      [FIX] web_editor: adapt link unit tests · c13ba3ec
      Sébastien Geelen (sge) authored
      Change the unit test to reflect new spec:
      
      * Some TLD are white listed to not required a subdomain to be considered a valid URL.
       => .com, .net, .org + all ccTLD
      
      * URL of a link need to be changed to equal the label, is the label is a new valid URL.
      
      * Domain Extention cannot be only digit
      
      task-2858621
      
      Part-of: odoo/odoo#94512
      c13ba3ec
    • David Monjoie's avatar
      [FIX] web_editor: fix insertText test util for multiple characters · 308a039d
      David Monjoie authored
      task-2858621
      
      Part-of: odoo/odoo#94512
      308a039d
    • Adrien Widart's avatar
      [FIX] stock: get product qty in specific location · f11d9c3e
      Adrien Widart authored
      When getting the on hand quantity of a product in a specific location,
      the result may be incorrect.
      
      To reproduce the issue:
      1. In Settings, enable "Storage Locations"
      2. Create a storable product P
      3. Update its quantity:
          - 5 x P at WH/Stock/Shelf 1
      4. Inventory > Reporting > Inventory Report
      5. Apply the following filters:
          - Product: P
          - Location: WH/Stock/Shelf 1
          - => There is a line with 5 x P at WH/Stock/Shelf 1, which is
      correct
      6. Click on Inventory at Date, set <Today>, confirm
      7. Apply the following filters:
          - Product: P
          - Location: WH/Stock/Shelf 1
      
      Error: There is a line for P but its on hand quantity is 0, which is
      incorrect (should be 5)
      
      In the first search, we let the ORM handle the domain conversion. When
      searching for `('location_id', 'ilike', 'WH/Stock/Shelf 1')`, it will
      use the `_rec_name` of the model to find the record. In case of a stock
      location, its `_rec_name` is the field `complete_name`:
      https://github.com/odoo/odoo/blob/94a8ad3fae914b046064bb7ce17572be8280f6e0/addons/stock/models/stock_location.py#L19
      
      
      
      However, for the second search, when getting the on-hand quantity of the
      product, we force the use of the field `name` to find the location.
      Because the `name` of the searched location is "Shelf 1", using
      "WH/Stock/Shelf 1" as key search will not work.
      
      OPW-2920904
      
      closes odoo/odoo#97104
      
      X-original-commit: 9a651e13
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      f11d9c3e
    • mafo-odoo's avatar
      [FIX] website_sale_comparison : error when entering number of item in product · 600e6f3c
      mafo-odoo authored
      
      Steps to reproduce:
      - Install eCommerce with product comparator
      - Open the product in </shop>
      - Change the product quantity
      - Click on the <Enter> key
      
      Current behavior:
      En error message appears.
      
      Expected behavior:
      No error message appears.
      
      Explanation:
      The productComparison widget overrided the submit with a selector
      that was not specific to the comparison so its _onFormSubmit function
      could be called from other pages creating errors. To solve the issue
      we add a specific class to the form and to the selector.
      
      opw-2936994
      
      closes odoo/odoo#97074
      
      Signed-off-by: default avatarWilliam Braeckman (wbr) <wbr@odoo.com>
      600e6f3c
    • momegahed's avatar
      [FIX] delivery: tax calculations are wrong on delivery products · 008b2347
      momegahed authored
      
      Steps to reproduce:
      
      1- install sale, accounting
      2- create a fiscal position fp that maps
      tax inc t1 to any other tax t2
      3- create a delivery product dp with t1 and mark it "can be sold"
      4- create a new delivery method with dp
      5- in a new sales order, choose fp, click on add delivery
      6- the unit_price is wrong, it hasn't mapped t1 to t2
      7- try adding the delivery as a product in a new sales order line
      8- the unit_price is correct and the taxes are correctly calculated
      
      Bug:
      
       `_create_delivery_line` is not using the same logic used
       when normally adding a sales order line although technically
       delivery product is still a product
      
      Fix:
      
      use `_get_tax_included_unit_price` to get the correct unit_price
      
      OPW-2806965
      
      closes odoo/odoo#96834
      
      X-original-commit: 03bb18d1
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      Signed-off-by: default avatarMohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
      008b2347
Loading