Thursday, April 2, 2026
17 changes · master
Resolved issues and error corrections
This update fixes an issue where refund creation from invoices with similar items would fail due to incorrect line matching. The new algorithm now prioritizes matching based on product, price, and quantity, ensuring accurate refund processing and preventing duplicate matches. This improves the reliability of refund creation for users.
Original PR description
In some cases, the users may have invoices with the same product, price unit, and discount on multiple lines. When they create refunds from such invoices, the lines ids matching algorithm would fail because it would match the first matching line over and over again. Also, lines should not match based on line label, as it can be modified in the refund. This commit solves these 2 issues by 1) Preventing matching an invoice line more than once with refund lines 2) Preventing matching based on line label The new algorithm finds the best match for a refund line from the invoice lines with the following criteria: 1) same product 2) same unit price 3) same discount 4) invoiced quantity should be at least equal to the refunded quantity 5) invoice line should not be matched before 6) from the lines that match previous criteria, we pick the one with the minium quantity task-6004207 Forward-Port-Of: odoo/odoo#257158 Forward-Port-Of: odoo/odoo#252200
This update resolves a bug that caused purchase order confirmations to fail when orders included both standard and subscription products. The fix ensures all date values are consistently converted to datetime objects, preventing type comparison errors and allowing successful order confirmation.
Original PR description
**Steps to reproduce:** * Install *sale_management*, *sale_subscription*, and *stock* modules. * Go to *Settings* and enable *Dropshipping*. * Create two products: * One *normal dropship* product. *…
**Steps to reproduce:**
* Install *sale_management*, *sale_subscription*, and *stock* modules.
* Go to *Settings* and enable *Dropshipping*.
* Create two products:
* One *normal dropship* product.
* One *dropship + subscription* product.
* Create a *Quotation*.
Add both products to the order.
* Confirm the quotation.
**Observed behavior:**
* A traceback occurs during confirmation:
File '/home/odoo/workspace/odoo19/odoo/addons/purchase_stock/models/stock_rule.py', line 159, in _run_buy
date_planned = po.date_planned or min(v['date_planned'] for v in po_line_values)
TypeError: can't compare datetime.datetime to datetime.date
**Cause:**
* In *_run_buy*, the system computes the earliest *date_planned* using:
https://github.com/odoo/odoo/blob/4056fa8036ddad11c898cd775b7fa21ba4f8a5de/addons/purchase_stock/models/stock_rule.py#L159
* Subscription products set *date_planned* as *datetime.date*,
https://github.com/odoo/enterprise/blob/a88c64a224805d95b60a20c502428897655dba53/sale_subscription_stock/models/sale_order_line.py#L153
`current_period_start = self.order_id.last_invoice_date or
self.order_id.start_date or fields.Date.today()`
* while normal products set *date_planned* as *datetime.datetime*.
https://github.com/odoo/odoo/blob/4056fa8036ddad11c898cd775b7fa21ba4f8a5de/addons/sale_stock/models/sale_order_line.py#L286
before min() It call `_prepare_purchase_order_line_from_procurement`,
the value is assigned directly from `values.get('date_planned')`, and conversion
with `fields.Datetime.to_datetime()` only happens conditionally:
https://github.com/odoo/odoo/blob/98e6e929bf8e0c34ec77fb9d07ef253e0abf681c/addons/purchase_stock/models/purchase_order_line.py#L347-L351
As a result, some values remain `date` while others are `datetime`,
* When both are present in *po_line_values*, Python cannot compare the
two types, causing the crash.
**Fix:**
So by moving the `fields.Datetime.to_datetime()` cast to the initial
assignment of `res['date_planned']`, so it is always a `datetime`
regardless of the source, and removing the now-redundant cast inside
the `if` block.
---
opw-6034079
---
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#255063This update fixes an issue preventing the successful import of orders with line-level charges (like allowances). The fix ensures quantity keys are correctly applied to both regular order lines and allowance charges, resolving an error that caused import failures. Added tests confirm the import process now works as expected.
Original PR description
When importing orders with line-level charges, the import would fail because the `quantity` key was not being renamed to correct quantity keys (`'product_uom_qty'` for sale order and `'product_qty'` for purchase order) for allowance charge lines. The issue occurred because the key renaming was only applied to the main lines_vals list after calling `_import_lines()`, but not to the `allowance_charges_line_vals` that were created separately. Also the key for taxes returned in `_get_line_vals_list` method in `purchase.order` model is `'taxes_id'` which is not aligned with the `purchase.order.line` model. This fix properly handles the quantity key renaming for both regular lines and allowance charge lines and updates `'taxes_id'` key value to `'tax_ids'`, preventing the AttributeError when accessing the quantity key during order line creation. Forward-Port-Of: odoo/odoo#256466 Forward-Port-Of: odoo/odoo#245411
This update fixes issues where the Click & Collect widget incorrectly displayed product availability, particularly for products without inventory tracking or those excluded by tags. The changes ensure accurate availability information is shown to customers, resolving a potential frustration and improving the shopping experience.
Original PR description
This PR addresses three edge cases in the Click & Collect and Delivery availability widget where incorrect availability states were being shown to the user. Before this PR: * If a product variant had…
This PR addresses three edge cases in the Click & Collect and Delivery availability widget where incorrect availability states were being shown to the user. Before this PR: * If a product variant had a tag excluding it from Click & Collect, the logic bypassed the entire stock preparation block. This resulted in the variant falsely hiding the standard Delivery option and showing C&C as unavailable. * Products that are not tracked in inventory (consumables/services) were not properly displaying the availability widget with all options open (bypassing stock checks). * If a product variant was excluded from standard delivery methods via tags, the delivery portion of the widget would still incorrectly render on the frontend. After this PR: * The C&C `excluded_tag_ids` check is moved further down so it only restricts the generation of `in_store_stock_data`. Standard `delivery_stock_data` is now evaluated independently. * *Untracked products now correctly bypass standard stock checks and display all available widget options as expected. * Standard delivery carriers are now explicitly filtered against the product's tags (`dm.excluded_tag_ids & product_tags`). If all available delivery methods are excluded, the delivery stock data is correctly omitted, hiding the section. opw-5990419
This update corrects a flaw in how timesheet statistics were calculated, ensuring accurate reporting across multiple projects. The previous method would miss calculations when multiple projects were involved, leading to incomplete data. This fix ensures all projects are correctly accounted for in timesheet reports.
Original PR description
**Description:** The issue is raised in this pr(v19.2) : https://github.com/odoo/odoo/pull/236971 The compute method used a…
**Description:**
The issue is raised in this pr(v19.2) : https://github.com/odoo/odoo/pull/236971
The compute method used a [`return`](https://github.com/odoo/odoo/pull/236971/changes#diff-4e1a18a369f7dd4de264139227676dd818c06612681c88019f43d238bd8a1490R91) statement when a `if condition` was met. While this works correctly for a single record, it causes issues when multiple records are present.
**For example**, if `self` contains records like `project.project(3, 2, 4)`, and the condition **is satisfied** for the first `record (3)`, the method exits early. As a result, the remaining `records (2 and 4)` are **not** processed.
When the compute method is [triggered](https://github.com/odoo/odoo/blob/8c3043b436f8aae295f247341e3ac427fab05474/odoo/orm/fields.py#L1746) this incomplete computation leads to
missing values for some records and can result in errors.
**Solution:**
To resolve this issue, `return` has been replaced with `continue`.
This ensures that:
Only the current record is skipped when the condition is satisfied and the loop continues processing the remaining records.
**Traceback:**
```.py
Traceback (most recent call last):
File "/tmp/tmp2cuqrnuy/migrations/testing.py", line 483, in test_check
self.check(value)
File "/tmp/tmp2cuqrnuy/migrations/base/tests/test_mock_crawl.py", line 228,
in check
self.assertFalse(diff, msg)
AssertionError: [('project.menu_projects', 391, 'Project > Projects', 593)] is
not
false : At least one menu or view working before upgrade is not working after
upgrade.
('project.menu_projects', 391, 'Project > Projects', 593):
Traceback (most recent call last):
File "/tmp/tmp2cuqrnuy/migrations/base/tests/test_mock_crawl.py", line
335, in crawl_menu
self.mock_action(action_vals)
File "/tmp/tmp2cuqrnuy/migrations/base/tests/test_mock_crawl.py", line
348, in mock_action
return self.mock_act_window(action)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/tmp2cuqrnuy/migrations/base/tests/test_mock_crawl.py", line
508, in mock_act_window
mock_method(model, view, fields_list, domain, group_by)
File "/tmp/tmp2cuqrnuy/migrations/base/tests/test_mock_crawl.py",
line 541, in mock_view_form
[data] = record.read(fields_list)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.2/odoo/orm/models.py", line 2735, in read
return self._read_format(fnames=fields, load=load)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.2/odoo/orm/models.py", line 2991, in
_read_format
vals[name] = convert(record[name], record, use_display_name)
~~~~~~^^^^^^
File "/home/odoo/src/odoo/saas-19.2/odoo/orm/models.py", line 6007, in
__getitem__
return self._fields[key].__get__(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.2/odoo/orm/fields.py", line 1805, in
__get__
raise ValueError(f"Compute method failed to assign {missing_recs}.{self.name}")
ValueError: Compute method failed to assign
project.project(2, 4).stat_timesheet_value
```
opw-6046808
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#256048This update resolves issues related to accessing records and simplifies how Odoo handles relationships between data. Specifically, it ensures previously accessible records are correctly fetched, even if permissions change, and streamlines the way lists of IDs are used in relational queries.
Original PR description
## handle relational x2m 'in' in domain Simplify the `condition_to_sql` implementation of x2many relational fields so that comparisons with a list of ids is translated into an already implemented `any` operator. (test_send_survey fails with access error) ## orm: fetch previously accessible record Given that we have a cache of read permissions, the record may be inaccessible from the query, however it was marked as accessible. In such a case, `Model.fetch` should be executed in sudo and not fail. (test_scheduled_message_model_without_post_right fails) ## mail: res_acces in mail.scheduled.message Reading and searching access is not aligned. Implement a similar logic to what is in the mail.activity module. (ok) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes issues where the table editor's menu wouldn't appear correctly when hovering over lists within table cells, and where the menu could overflow. It now ensures menus display properly and updates dynamically when the table cell changes, enhancing the user experience and stability of the table editor.
Original PR description
**Current behavior before PR:** - Table menu handlers could overflow into adjacent table areas when the targeted part of the table was only partially visible within the container. - When a table cell contained a list, hovering over the list element did not display the table UI menus, even though the mouse was inside the cell. **Desired behavior after PR is merged:** - Use a local overlay for the table menu to prevent overflow into adjacent cells. - Table UI menus are now correctly displayed when hovering over list elements inside a table cell. task-5353518 Forward-Port-Of: odoo/odoo#254802 Forward-Port-Of: odoo/odoo#240342
This update resolves an issue where field widgets in settings panels were incorrectly stretching to 100% width, causing layout problems. The fix uses a CSS technique to ensure that module-specific styling (like settings or custom views) takes precedence, restoring the intended 50% width for elements like the helpdesk email alias row.
Original PR description
**Issue:** odoo/odoo#250051 consolidated multiple `width: 100%` rules into a single broad selector: .o_form_view .o_form_sheet .o_field_widget:not(…) { width: 100% } This broadened scope from…
**Issue:**
odoo/odoo#250051 consolidated multiple `width: 100%` rules into a single broad selector:
.o_form_view .o_form_sheet .o_field_widget:not(…) { width: 100% }
This broadened scope from `.o_group/.o_inner_group` to the entire `.o_form_sheet`, which was needed for the new `o_input_box` overlay system. However, the high specificity (0,4,0) now overrides any module-specific rule with lower specificity, such as setting.scss's `width: 50%` rule (0,3,0) for `<setting>` blocks.
This broke settings panels: field widgets stretched to 100% width instead of 50%, causing overflow in layouts like the helpdesk team email alias row.
**Fix:**
wrap the field widget portion of the selector in `:where()`.
The `:where()` CSS pseudo-class works identically to `:is()` in terms of what it matches, but always contributes zero specificity.
(ref: https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity)
(ref: https://developer.mozilla.org/en-US/docs/Web/CSS/:where)
```
Before (A=0, B=4, C=0):
.o_form_view .o_form_sheet .o_field_widget:not(…)
↑(0,1,0) ↑(0,1,0) ↑(0,1,0) ↑(0,1,0)
After (A=0, B=2, C=0):
.o_form_view .o_form_sheet :where(.o_field_widget:not(…))
↑(0,1,0) ↑(0,1,0) ↑(0,0,0) ← :where zeroes this
```
The rule still matches every field widget in the form sheet, but now any component-specific override (settings, helpdesk, custom views) wins naturally without needing specificity hacks.
CSS specificity tiebreaker order:
```
A: inline styles > B: IDs > C: classes/attrs/pseudo-classes
Equal specificity → last rule in source order wins
```
task-6005002
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes an issue where POS discounts weren't being applied correctly when orders were modified. By updating the global discount automatically, the system now accurately reflects any changes to order discounts, ensuring accurate pricing and refunds for customers. This improves the reliability of the Point of Sale system.
Original PR description
This commit uses an effect to update the global discount when changing the order. Fix the refound in when global discount since it was handeling only on discoud line where there could be various (one discount line per tax). Task-5421479 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#252194 Forward-Port-Of: odoo/odoo#241605
This update streamlines the settings search by focusing only on key field information like labels and descriptions. Previously, the search was unreliable due to performance limitations, resulting in inconsistent results across different pages. This change ensures a more reliable and predictable search experience for users.
Original PR description
Before this commit, the settings search scanned the inner HTML and text of the current page, including radio widget labels, buttons, and other miscellaneous text. However, due to performance constraints, this deep scanning was not possible on subsequent pages. This led to inconsistent results depending on which page the user was on when they started the search. This commit simplifies the search behavior to ensure consistency across all pages by limiting the search scope to specific field metadata: labels, help text, title text (tooltips), and info text. task-6004912
This update resolves an issue where adding recurring prices to subscription products with multiple companies resulted in an error. It also fixed a bug preventing recurring plans set with a company from appearing in the recurring prices list. The change ensures proper company handling within the subscription product setup.
Original PR description
## Issues When adding a line in the *Recurring prices* tab (`product.pricelist.item`) of a product with a `company_id`, a "company inconsistencies" error appears. Also, recurring plans with their…
## Issues When adding a line in the *Recurring prices* tab (`product.pricelist.item`) of a product with a `company_id`, a "company inconsistencies" error appears. Also, recurring plans with their *Company* field set do not appear in the list of recurring plans when adding a line in the *Recurring prices* tab. ## Steps to reproduce 1. Install *Subscription* (`sale_subscription`) 2. Create a second company 3. Create a subscription product and set a company in the *Company* field (`company_id`). 4. In the *Recurring prices* tab, add a line (any recurring plan, any price) 5. **An _Invalid Operation_ error appears: _"Uh-oh! You’ve got some company inconsistencies here"_** For the second issue, after the same 3 first steps: 1. Create a *Recurring Plan* RP with its *Company* field set to the current company 2. On the *Recurring prices* tab of the subscription product, try to add a line with the Recurring plan RP 3. **The Recurring plan RP is missing from the list of available plans.** ## Cause When adding a line to the *Recurring prices* tab, a new `product.pricelist.item` is created, with no `pricelist_id`. The `ProductPricelistItem._compute_company_id` from `sale_subscription` filters out the items that don't have a `pricelist_id`, which is the case for the line we create. Also, the (potentially new) plan has no `company_id` in most cases. https://github.com/odoo/enterprise/blob/ccab0c261040ed995d12dca891caae9596bbe1eb/sale_subscription/models/product_pricelist_item.py#L18-L26 By filtering the items with no `pricelist_id`, nothing is passed to the `super()._compute_company_id`, even though it would also handle cases where the item has a `product_tmpl_id`: https://github.com/odoo/odoo/blob/9c8112d794af1ba84ade8af124967495c2ff8995/addons/product/models/product_pricelist_item.py#L170-L173 opw-5981629 opw-6051978 Forward-Port-Of: odoo/enterprise#109403
This update resolves an issue where confirming quantities of archived products through the barcode app would cause a crash. The fix ensures that archived products are included in search results, allowing users to accurately add and confirm quantities, maintaining consistent functionality.
Original PR description
Currently, when a user confirms the quantity of an archived product using the product selector in the barcode app, a traceback error occurs. ## Steps to replicate: - Install Inventory - Go to…
Currently, when a user confirms the quantity of an archived product using the product selector in the barcode app, a traceback error occurs. ## Steps to replicate: - Install Inventory - Go to Settings and enable Multi-Step Routes > Set Warehouse Routes. - Configure 2 steps for outgoing shipments. - Go to Inventory and create a new delivery with - **Source Location:** WH/Stock - **Product:** [E-COM10] Pedal Bin with demand 1 - Mark as Todo then Archive the Pedal Bin product. - Open that delivery in barcode app - Pencil icon > +1 > Confirm ## Observed behavior: TypeError: Cannot read properties of undefined (reading 'qty_available') ## Root cause: After this [commit], an override was added to the product selector. As a result, when [2] calls the `search_read` method, it only retrieves non-archived products Consequently, if the result is an empty array, attempting to access `qty_available` causes the type error mentioned above. ## Solution: Adding` active_test = false `to the context ensures that archived products are included in search results. This prevents empty results and avoids the error. It also allows quantities to be added and confirmed,maintaining the same behavior as when using the increment button followed by validation, ensuring consistency. [commit]: https://github.com/odoo/enterprise/commit/6aa814f59f8641d7b57af160e38b50d5bdfc8a97 [2]- https://github.com/odoo/enterprise/blob/e13b44b353e734a6533f7d627ed69b6e7b033ee2/stock_barcode/static/src/js/stock_barcode_sml_form.js#L40-L45 opw-5980428 Forward-Port-Of: odoo/enterprise#112616 Forward-Port-Of: odoo/enterprise#109204
This update ensures that installment payment terms on customer invoices generated for Peru (l10n_pe_edi) are correctly ordered by their maturity date. Previously, invoices generated with multiple installments could have a mixed-up XML format due to the order in which payment terms were created. This fix guarantees accurate and compliant UBL documents for Peru.
Original PR description
**Steps to reproduce:** * Install `l10n_pe_edi`. * Set SUNAT as the signature provider. * Create a customer invoice. * Select a payment term with multiple installments (e.g. 50% (15 days) / 30% (10…
**Steps to reproduce:**
* Install `l10n_pe_edi`.
* Set SUNAT as the signature provider.
* Create a customer invoice.
* Select a payment term with multiple installments (e.g. 50% (15 days) / 30% (10 days) / 20% (5 days)).
* Confirm the invoice and generate the EDI standard UBL document.
**Observed behavior:**
* The XML `<cac:PaymentTerms>` instalment nodes (Cuota001, Cuota002, etc.) are ordered according to the database insertion order of the receivable lines.
* If the payment term lines are created in a non-chronological order, the installments in the XML mix up the `Cuota` ID, amount, and `PaymentDueDate`.
**Cause:**
* `_add_invoice_payment_terms_nodes` iterates over `invoice.line_ids` to generate the installments, but does not sort the receivable account lines by their `date_maturity`.
**Fix:**
* Explicitly call `.sorted('date_maturity')` on the receivable lines before generating the `invoice_date_due_vals_list`.
opw-6035589
Forward-Port-Of: odoo/enterprise#112698
Forward-Port-Of: odoo/enterprise#112162This update resolves an issue where AI conversations within the Odoo Enterprise app were sometimes failing to connect properly with agents. The fix clears the AI conversation correspondent when it resolves to the current user, preventing unwanted self-chat behavior and ensuring agents receive correct communication. This improves the reliability of the AI assistant.
Original PR description
Override AI thread correspondent computation to keep the base behavior but clear the correspondent when it resolves to the current user in ai_composer/ai_chat. This avoids self-chat fallback side effects (like OOO banner) while preserving agent flows that rely on a real non-self correspondent. source of this crash: https://github.com/odoo/enterprise/pull/108217 Forward-Port-Of: odoo/enterprise#112622 Forward-Port-Of: odoo/enterprise#111736
This update fixes an issue where splitting shifts within a single day resulted in duplicated and incorrect timeframes. Previously, the system forced shifts into standard working hours, causing problems when splitting shifts on a daily basis. Now, shifts are split accurately at the requested time, ensuring correct scheduling.
Original PR description
Since odoo/enterprise#69963, splitting a shift in Gantt view snaps the resulting shifts to the standard working hours (e.g., 08:00 to 17:00). This behavior makes sense when splitting a multi-day shift across a day off, where we want to generate a full working day for the day off as well. However, when splitting a shift within a single day (day scale), this behavior is not wanted, otherwise creating two shifts as follows: 1. A shift from [Original Start] to 5pm 2. A shift from 8am to [Original End] Clearly, the shift is duplicated with the wrong timeframes and adding time outside the original shift's hours. This commits ensures that, when splitting a shift in hours (i.e., when using `day` view scale), the shift is appropriately split at the time requested. For instance: 1. A shift from [Original Start] to [Split Time] 2. A shift from [Split Time] to [Original End] task-5387243 Forward-Port-Of: odoo/enterprise#105991
This update resolves a crash issue that occurred when starting pay runs through the warning dashboard. The change replaces a problematic context variable with a more reliable structure ID, ensuring pay runs can consistently begin. This improves the overall stability and usability of the payroll system.
Original PR description
Use structure_id instead of the removed schedule_pay context to avoid crashes when starting a pay run from the warning dashboard. task: 6067447
This update resolves an issue where scanning packaging barcodes didn't correctly associate with related lots, leading to incorrect inventory tracking. The fix ensures that packaging barcodes are properly linked to lots during scanning, improving the accuracy of stock management.
Original PR description
When scaning a lot after a packaging, the lot won't recognize the packaging and will not work properly ### Steps to reproduce: * In the settings enable packagings * Create a storable product P with…
When scaning a lot after a packaging, the lot won't recognize the packaging and will not work properly ### Steps to reproduce: * In the settings enable packagings * Create a storable product P with Units as uom, a barcode and tracked by lots * Create new lots with barcode for Product P * Inventory > Configuration > Product > Units & Packagings * Click on pack of 6 > Packaging Barcodes > New * Create one for your product with a different barcode * Go to barcode > Operations > eg. internal transfer > New * Scan packaging barcode * Scan one of the lots -> Issue, the lot create a new line, and will not find the packaging ### Observation: When scanning a barcode, it will first try to find a match with existing lines, In our case, it will find a match with the line of the packaging, but since the line is considered as "completed" since there was no expected quantity since we create a new picking: https://github.com/odoo/enterprise/blob/13d815457d47846d5391c9a2dc1ed244ef64b6c4/stock_barcode/static/src/models/barcode_picking_model.js#L1497-L1501 It will erase the line, to avoid to overfill a completed line: https://github.com/odoo/enterprise/blob/13d815457d47846d5391c9a2dc1ed244ef64b6c4/stock_barcode/static/src/models/barcode_model.js#L1459-L1460 and since, it decided to ignore that line, it will not find another lines, and will create a new one : https://github.com/odoo/enterprise/blob/13d815457d47846d5391c9a2dc1ed244ef64b6c4/stock_barcode/static/src/models/barcode_model.js#L1535 Additional Issues ----------------- Issue 1 : When scaning a packaging, lot1, packaging, lot2, all the packagings will be linked to the first lot, which doesn't allow us to scan multiple lots. Issue 2 : When having sublines with different uoms, it will add the quantity without considering the differences in uoms ### Steps to reproduce: * In the settings enable packagings * Create a storable product P with Units as uom, a barcode and tracked by lots * Create new lots with barcode for Product P * Inventory > Configuration > Product > Units & Packagings * Click on pack of 6 > Packaging Barcodes > New * Create one for your product with a different barcode * Create a packaging 2 with barcode for product A * Go to barcode > Operations > eg. internal transfer > New * Scan packaging 1 barcode * Scan one of the lot 1 * Scan packaging 1 * Scan lot 2 -> Issue 1, the packaging 2 will be link to lot 1, it won't be possible to link any packaging to another lot. * Scan packaging 2 -> Issue 2, it create a subline (excpeted), but the sum that appear on the main grouped line is wrong, it doesn't considere the difference in uoms ### Observation: Issue one : When scanning a barcode, it will first try to find a match with existing lines, since the uom is the same it will not be erased by the full line check https://github.com/odoo/enterprise/blob/13d815457d47846d5391c9a2dc1ed244ef64b6c4/stock_barcode/static/src/models/barcode_model.js#L1456-L1460 and since, it found a line, it will just add it's self to the line Issue Two: When creating the group lines it will first calculate the sum of all the quantities: https://github.com/odoo/enterprise/blob/8774388a7b1b2ca2c08c752026ac1a20dbc10347/stock_barcode/static/src/models/barcode_model.js#L248-L254 And after inside of groupSublines it will choose the main line and it's uom and use the previous sum for the total quantity: https://github.com/odoo/enterprise/blob/8774388a7b1b2ca2c08c752026ac1a20dbc10347/stock_barcode/static/src/models/barcode_picking_model.js#L1456-L1461 opw-5189492 opw-5408372 Forward-Port-Of: odoo/enterprise#110847 Forward-Port-Of: odoo/enterprise#98701