Daily updates from Odoo
Friday, May 29, 2026
4 changes · 17.0
Resolved issues and error corrections
This update corrects an error in the Peru Accounting Reports (l10n_pe_reports) module that caused the SUNAT/SIRE system to reject DAM reports. The fix ensures that only the required 3-digit customs dependency code is used in field 8 of the report, aligning with SUNAT regulations. This prevents report rejections and ensures accurate data submission.
Original PR description
**Steps to reproduce:** * Install Peru - Accounting Reports (l10n_pe_reports). * Create a vendor bill with Document Type 50 (Declaración Aduanera de Mercancías - DAM) and a document number in the…
**Steps to reproduce:** * Install Peru - Accounting Reports (l10n_pe_reports). * Create a vendor bill with Document Type 50 (Declaración Aduanera de Mercancías - DAM) and a document number in the standard pediment format (e.g. C235202610-38047). * Go to Accounting > Reporting > Purchase Electronic Record (RCE 8.4). * Export the TXT file and open it. **Observed behavior:** * Field 8 contains the full first numeric block of the document name including the year and sequence digits (e.g. 235202610) instead of only the 3-digit customs dependency code. * SUNAT/SIRE rejects the file immediately because 235202610 does not exist in Table 4 (RS 040-2022), which only defines 3-digit codes. **Cause:** * `_get_serie_folio()` splits the document name by taking everything before the last digit group as the serie. For a name like C235202610-38047 this produces serie = "C235202610", and the existing `serie[1:]` logic strips only the leading letter, leaving "235202610" in field 8 instead of the 3-digit customs dependency code "235". * The same incorrect value was also written to field 28 (aduana_code). * ref : https://www.sunat.gob.pe/legislacion/superin/2022/anexo-040-2022.pdf **Fix:** * For document types 50 and 52, extract the first numeric group from the document name using `re.search(r'\d+', move_name)` and slice the first 3 characters to obtain the customs dependency code as defined in SUNAT Table 4 (always a 3-digit value). * Apply the same logic to field 28 (aduana_code) for consistency. opw-6157662
This update resolves an issue where the Profitability report's Cost of Goods Sold dashboard didn't display correctly when multiple invoices were associated with a project. The fix ensures that all related journal entries are accurately reflected, regardless of the number of invoices generated.
Original PR description
Steps to reproduce: ------------------- 1. Install `sale_project_stock` and Accounting. 2. Create a storable product with **Real-time valuation** and configure the COGS account in the product…
Steps to reproduce: ------------------- 1. Install `sale_project_stock` and Accounting. 2. Create a storable product with **Real-time valuation** and configure the COGS account in the product category expense account. (Ensure you have enabled automatic & analytic accounting from accounting>config.) 3. Create a project with a specific analytic account and ensure the project is billable. 4. Create a sale order with the created product and set the same analytic account in the analytic distribution. 5. Confirm the order, deliver the product, generate the invoice, and post it. 6. Open the project and go to the *Profitability* report. 7. Click on the **Cost of Goods Sold** dashboard item. 8. Repeat steps 4–7 with multiple invoices. Issue: ------ When there is only one invoice, clicking the COGS dashboard item correctly displays the related move lines. However, when there are multiple invoices, the action opens with empty results. Cause: ------ `_get_action_for_profitability_section` sets `res_id` only when a single record exists. When multiple records are present, `res_id` becomes `False`, which causes the action to open without results. https://github.com/odoo/odoo/blob/8f79d407724f40ba8e48f1747b2e87311b7fb49e/addons/project_account/models/project_project.py#L78-L83 Solution: --------- When `res_id` is not set, search `account.move` records using the domain to retrieve the relevant move IDs, then apply a proper domain to display all related COGS journal items. opw-5949261 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where importing Peppol/UBL XML files with multiple embedded PDFs resulted in PDFs being split into separate invoices. The fix adjusts the system's sorting logic to ensure all embedded PDFs are correctly included within the primary invoice. This improves the accuracy of invoice data during import.
Original PR description
When importing a Peppol/UBL XML file containing multiple embedded PDFs the first PDFs is extracted in the same invoice, all the other in separate documents. Steps to reproduce: - Set up a BE Company - Import a Peppol XML with multiple embedded PDF - Check the created Bills Issue: First embedded PDF is extracted in the bill along with the source XML. Other documents are expanded in separate Bills. This occurs because the sort weight of the additional embedded document is the same, causing the system to separate them from the main invoice. opw-6231265
This update fixes an issue where taxes weren't correctly applied when using amount discounts on sales orders. The fix backports a previous resolution, ensuring that taxes are now accurately calculated and reflected on discounts, improving sales reporting and financial accuracy. This resolves a reported problem (opw-6219611) impacting sales order processing.
Original PR description
Issue: --- Tax is not mapped on amount discount line. To reproduce: 1- Create a SO. 2- Add a SOL with a tax. 3- Add a Fixed-Amount discount. As you see, no tax is mapped. This fix is a backport of the 4ea8e9f7d4755107df9a31b66ef09a75e9593b16. opw-6219611