Thursday, October 9, 2025
2 changes · 17.0
Resolved issues and error corrections
Inventory barcode scanning now correctly accepts different products that happen to use the same serial number in GS1 barcodes. This prevents an error that previously stopped the second product from being added to an inventory count.
Original PR description
**PROBLEM** When scanning two gs1 barcode with the same serial number, but for different products there is an error and the 2nd product is not added to the inventory count. **STEP TO REPRODUCE** 1. install stock_barcode 2. activate the gs1 barcode and select the default gs1 nomenclature. 3. scan the following barcode - 01000000000001232180085 (product barcode: 0000000000123, serial: 80085). - 01000000000000482180085 (product barcode: 0000000000048, serial: 80085). 4. there is an unexpected error notification, and the 2nd product line isn't added. **CAUSE** In _processBarcode (barcode_model.py), we only check if: - there is already a line with serial tracking with a non-null qty - this line serial number is the same serial number that we are scanning **FIX** We should also verify if the product from the lines we are checking, and the line we want to create are the same. [opw-5076045](https://www.odoo.com/odoo/project/49/tasks/5076045)
This fixes a validation error that could block confirmation of sales orders for made-to-order manufactured products when mandatory analytic plans are enabled. The system now carries the analytic distribution from the sales order line into the related manufacturing order, preserving required accounting details and allowing the order flow to continue.
Original PR description
## Issue: Confirming a Sale Order for a product with MTO + Manufacturing routes fails (Validation Error) when Analytic Accounting is enabled and an Analytic Plan is mandatory ## Cause: The…
## Issue:
Confirming a Sale Order for a product with MTO + Manufacturing routes fails (Validation Error) when Analytic Accounting is enabled and an Analytic Plan is mandatory
## Cause:
The analytic_distribution is first validated one time for the Sale Order line
When the MO will is created later, the `_compute_analytic_distribution()` function in `mrp_account` is triggered
Since no `account.analytic.distribution.model` is defined, the analytic_distribution field is recomputed as {}
This trigger a second validation, which fails because `{}` is invalid when an analytic plan is mandatory
## Steps to reproduce:
- Enable Analytic Accounting and Multi-Step Routes in Settings
- In Accounting > Configuration > Analytic Accounting > Analytic Plans set Projects as Mandatory
- Unarchive the MTO route
- Create a Product with MTO + Manufacturing routes
- Create a Sale Order for this product and set an Analytic Distribution for Projects
- Confirm the SO to get the Validation Error
opw-4863498