Wednesday, September 17, 2025
10 changes · 18.0
New functionality added to Odoo
Adds the base capability to create Croatian e-invoices in preparation for upcoming Peppol/eRacun network support. This helps Odoo prepare Croatian businesses for future B2B electronic invoicing requirements, though end users cannot generate or send these invoices yet until the network integration is available.
Original PR description
Adding e-invoice generation base functionality for Croatia in preparation for the Peppol integration. Implemented as an extension of account_edi_ubl_cii, similar to other localisations using such documents. Currently, this doesn't include any way for a user to generate an e-invoice as there is no Peppol network available for Croatia yet. XSD validation included in the tests for the moment as Peppol integration is likely going to require arjustments and rechecking. task-4925745
Resolved issues and error corrections
This fix changes how default supplier taxes are applied to products so large databases no longer run out of memory during setup or migration. Businesses with many products can update accounting settings more reliably and avoid failed upgrades caused by this issue.
Original PR description
As I mentioned in the query below, multiple grouped product.template records with the same supplier_taxes_id are being modified with the default purchase tax (account_purchase_tax_id),which leads to…
As I mentioned in the query below, multiple grouped product.template records with the same supplier_taxes_id are being modified with the default purchase tax (account_purchase_tax_id),which leads to a memory error. To prevent this, I have used an INSERT query.
```sql
SELECT tax_id, COUNT(*) AS product_count
FROM product_supplier_taxes_rel
GROUP BY tax_id
ORDER BY product_count DESC;
tax_id | product_count
--------+---------------
15 | 1262126
156 | 343332
114 | 36363
47 | 10132
23 | 202
546 | 11
474 | 5
782 | 2
666 | 2
1188 | 2
1318 | 1
3 | 1
(12 rows)
```
- Traceback
```python
Traceback (most recent call last):
File "/home/odoo/src/odoo/17.0/odoo/service/server.py", line 1314, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "<decorator-gen-16>", line 2, in new
File "/home/odoo/src/odoo/17.0/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/17.0/odoo/modules/registry.py", line 110, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/src/odoo/17.0/odoo/modules/loading.py", line 515, in load_modules
migrations.migrate_module(package, 'end')
File "/home/odoo/src/odoo/17.0/odoo/modules/migration.py", line 240, in migrate_module
migrate(self.cr, installed_version)
File "/home/odoo/src/odoo/17.0/addons/l10n_ch/migrations/11.3/end-migrate.py", line 8, in migrate
env["account.chart.template"].try_loading("ch", company)
File "/home/odoo/src/odoo/17.0/addons/account/models/chart_template.py", line 155, in try_loading
return self._load(template_code, company, install_demo)
File "/home/odoo/src/odoo/17.0/addons/point_of_sale/models/chart_template.py", line 22, in _load
result = super()._load(template_code, company, install_demo)
File "/home/odoo/src/odoo/17.0/addons/account/models/chart_template.py", line 214, in _load
self._post_load_data(template_code, company, template_data)
File "/home/odoo/src/enterprise/17.0/account_reports/models/chart_template.py", line 10, in _post_load_data
super()._post_load_data(template_code, company, template_data)
File "/home/odoo/src/odoo/17.0/addons/stock_account/models/account_chart_template.py", line 12, in _post_load_data
super()._post_load_data(template_code, company, template_data)
File "/home/odoo/src/odoo/17.0/addons/account/models/chart_template.py", line 669, in _post_load_data
sudoed_products_purchase._force_default_purchase_tax(company)
File "/home/odoo/src/odoo/17.0/addons/account/models/product.py", line 130, in _force_default_purchase_tax
product_grouped_by_tax.supplier_taxes_id += default_supplier_taxes
File "/home/odoo/src/odoo/17.0/odoo/fields.py", line 1322, in __set__
records.write({self.name: write_value})
File "/home/odoo/src/odoo/17.0/addons/website_sale/models/product_template.py", line 176, in write
return super().write(vals)
File "/home/odoo/src/odoo/17.0/addons/rating/models/rating_mixin.py", line 100, in write
result = super(RatingMixin, self).write(values)
File "/home/odoo/src/odoo/17.0/addons/stock_account/models/product.py", line 55, in write
res = super(ProductTemplate, self).write(vals)
File "/home/odoo/src/odoo/17.0/addons/mrp/models/product.py", line 74, in write
return super().write(values)
File "/home/odoo/src/odoo/17.0/addons/stock/models/product.py", line 921, in write
return super(ProductTemplate, self).write(vals)
File "/home/odoo/src/odoo/17.0/addons/product/models/product_template.py", line 502, in write
res = super(ProductTemplate, self).write(vals)
File "/home/odoo/src/odoo/17.0/addons/mail/models/mail_thread.py", line 311, in write
return super(MailThread, self).write(values)
File "/home/odoo/src/odoo/17.0/addons/mail/models/mail_activity_mixin.py", line 250, in write
return super(MailActivityMixin, self).write(vals)
File "/home/odoo/src/odoo/17.0/addons/website/models/mixins.py", line 218, in write
return super(WebsitePublishedMixin, self).write(values)
File "/home/odoo/src/odoo/17.0/odoo/models.py", line 4444, in write
field.write(self, value)
File "/home/odoo/src/odoo/17.0/odoo/fields.py", line 4337, in write
self.write_batch([(records, value)])
File "/home/odoo/src/odoo/17.0/odoo/fields.py", line 4358, in write_batch
self.write_real(records_commands_list, create)
File "/home/odoo/src/odoo/17.0/odoo/fields.py", line 4957, in write_real
y_to_xs[y].add(x)
File "/home/odoo/src/odoo/17.0/odoo/tools/misc.py", line 1136, in add
self._map[elem] = None
MemoryError
```
opw - 4544050
upg - 2459515
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#204931This update fixes several customer-facing issues across subscriptions, accounting reconciliation, shipping, helpdesk, and ESG workflows. It also makes Adam scale support optional in Point of Sale IoT settings to prevent incorrect device detection for customers who do not use that hardware.
This fixes an Accounting issue where taxes entered during bank reconciliation could be counted twice in cash basis tax reports. Tax reports will now show the correct amount when invoices are partially settled and adjusted through bank or cash journals.
Original PR description
**Steps to reproduce:** - Install Accounting - In Accounting settings, activate "Cash Basis" - Create/modify a tax with "Tax Exigibility" set to "Based on Payment" - Set an account as "Cash Basis…
**Steps to reproduce:**
- Install Accounting
- In Accounting settings, activate "Cash Basis"
- Create/modify a tax with "Tax Exigibility" set to "Based on Payment"
- Set an account as "Cash Basis Transition Account"
- Create an invoice:
* Customer: [any]
* Invoice Lines:
- [Price] 200.0
- [Taxes] The cash basis tax (e.g. 15%)
- Confirm the invoice
- Go to "Bank" journal
- Create a bank statement for a lower amount than the invoice (e.g. $200)
- Match the statement with the invoice from the "Match Existing Entries" tab
- Select the added line and click on "fully paid" link
=> A new line with the amount difference should be added
- On the new line, select an expense account and the cash basis tax
=> A new tax line should be added (e.g. $3.91)
- Validate
- Go to "Accounting / Reporting / Statement Reports / Tax Report"
**Issue:**
The amount of the Tax is equal to:
[Tax amount of the invoice] - 2 * [Tax amount of the difference line] = $30 - 2 * $3.91 = $22.18
which is not correct.
The tax amount of the difference line (coming from the bank reconciliation widget) is taken twice into account.
**Cause:**
A cash basis move is created for the tax line created in the bank reconciliation widget.
This move is using the same tax account as debit and credit account and is directly reversed using the same account.
No cash basis move should be created for that line because the tax line is added while reconciling a bank statement, which means the tax should have been received.
**Solution:**
Do not create a cash basis move for journal entries made in a bank or cash journal.
opw-4663059
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#227419
Forward-Port-Of: odoo/odoo#225151This fixes an Accounting issue where cash basis taxes entered during bank reconciliation could be counted twice in tax reports. Businesses using cash basis taxation will now see more accurate tax amounts when partially paid invoices are reconciled through bank statements.
Original PR description
**Steps to reproduce:** - Install Accounting - In Accounting settings, activate "Cash Basis" - Create/modify a tax with "Tax Exigibility" set to "Based on Payment" - Set an account as "Cash Basis…
**Steps to reproduce:**
- Install Accounting
- In Accounting settings, activate "Cash Basis"
- Create/modify a tax with "Tax Exigibility" set to "Based on Payment"
- Set an account as "Cash Basis Transition Account"
- Create an invoice:
* Customer: [any]
* Invoice Lines:
- [Price] 200.0
- [Taxes] The cash basis tax (e.g. 15%)
- Confirm the invoice
- Go to "Bank" journal
- Create a bank statement for a lower amount than the invoice (e.g. $200)
- Match the statement with the invoice from the "Match Existing Entries" tab
- Select the added line and click on "fully paid" link
=> A new line with the amount difference should be added
- On the new line, select an expense account and the cash basis tax
=> A new tax line should be added (e.g. $3.91)
- Validate
- Go to "Accounting / Reporting / Statement Reports / Tax Report"
**Issue:**
The amount of the Tax is equal to:
[Tax amount of the invoice] - 2 * [Tax amount of the difference line] = $30 - 2 * $3.91 = $22.18
which is not correct.
The tax amount of the difference line (coming from the bank reconciliation widget) is taken twice into account.
**Cause:**
A cash basis move is created for the tax line created in the bank reconciliation widget.
This move is using the same tax account as debit and credit account and is directly reversed using the same account.
No cash basis move should be created for that line because the tax line is added while reconciling a bank statement, which means the tax should have been received.
**Solution:**
Do not create a cash basis move for journal entries made in a bank journal.
opw-4663059
Forward-Port-Of: odoo/enterprise#94899
Forward-Port-Of: odoo/enterprise#93735Sales orders using the make-to-stock-or-order route now keep their correct link to related purchase orders, even when multiple similar sales create purchases. This restores the smart button visibility and helps users trace each sale to its purchasing documents reliably.
Original PR description
When selling a product that use the mtso procurements, It will only link one SO to the PO, if several SO need to be linked to the same PO it will only keep the first one. which break the smart…
When selling a product that use the mtso procurements, It will only link one SO to the PO, if several SO need to be linked to the same PO it will only keep the first one. which break the smart button. ### Steps to reproduce: * Activate Multi-step routes in inventory settings * Unarchive MTO route * Set "Take from stock, if unavailable, trigger an other route" on mto (mtso) * create product with: buy and mtso routes, set up vendors. * create and confirm a quotation for this products (smart button and link works) * recreate and confirm a new quotation for this product * smart button doesn't appears and the link don't exist. ### Observation: This solution is a follow up on those pr: MTSO behavior change: https://github.com/odoo/odoo/pull/177185 First fix: https://github.com/odoo/odoo/pull/180997 During the MTSO behavior change the link between po <-> so was broken, the first fix recreated a link between the two but only for one so. The problem is that the field create (inside pol) to link po <-> so is a m2o. We can not use it to link more than one so per pol. https://github.com/odoo/odoo/commit/73e34cc6fa77fbdb6b40232d99c140c2e5770650#diff-c3231f0c5829f511c10589fc2c2298fe1c03d59f59a04a1ba8a60c85383ffa42R33 #### The proposition for the fix: Is to create different pol for each so that originate form a mtso, which allow to link one so per pol. opw-5026734
The manufacturing order overview now calculates bill of materials costs correctly when products use packaged or converted units of measure. This prevents overstated component costs, helping users rely on accurate production cost information.
Original PR description
Backport of:
https://github.com/odoo/odoo/pull/223730/commits/b32c0ac7a7a29f9d185d5291edd3e3abe259510b
Steps to reproduce:
- Create a storable product “P1”:
- UoM: Unit
- BoM:
- Pack of 6 of P1
- Components:
- C1: 6 units (price = $5)
- C2: 6 units (price = $10)
- Create a manufacturing order:
- 1 Pack of 6 of P1
- Confirm the MO
- Go to the MO overview
Issue:
- MO cost = $90 → ($5 * 6) + ($10 * 6) → correct
- BoM cost = $540 → ($5 * 36) + ($10 * 36) → wrong
Cause:
The BoM cost calculation uses `product_uom_qty` (6 units) of the production instead of computing the real quantity needed with the correct UoM.
As a result, component quantities are multiplied twice.
opw-4954953Trial balance period comparisons now calculate ending balances correctly for Profit and Loss accounts. This prevents prior-year results from being incorrectly added into ending balance columns and ensures they appear in the proper earnings account, improving financial report accuracy.
Original PR description
When activating the period comparison with the trial balance, the end balance columns used to sum the values of the displayed periods, which should not be the case for Profit and Loss accounts. Indeed, only the last displayed year should be used in the end balance, while the previous years' amount must be displayed in the unaffected earnings account. We used to optimize the query by computing in python the end balance on some conditions (for example analytic groupby filter). This wasn't actually totally working, for example the end balance columns used to display amounts in both debit and credit columns. This optimization is no longer possible since the P&L accounts of the previous fiscal years need to be displayed in the unaffected earnings account. task-4728887
This fix prevents manufacturing components that are not tied to a specific operation from being incorrectly assigned to the final work order. It helps ensure component consumption is handled consistently and avoids confusion or incorrect processing during production.
Original PR description
*: mrp_account, project_mrp_account ### Steps to reproduce: - In the setting enable: "Work Orders" - Create a bill of material for a final prodcut (FP): - 2 operations: op1, op2 - Raw moves: - 1 x…
*: mrp_account, project_mrp_account ### Steps to reproduce: - In the setting enable: "Work Orders" - Create a bill of material for a final prodcut (FP): - 2 operations: op1, op2 - Raw moves: - 1 x COMP1 consumed in op1 - 1 x COMP2 bot consumed in any operation - Put 10 units of COMP1 and COMP2 in stock - Create and confirm an MO for FP ### Issue: Opening the details of the second operation one realizes that the COMP2 component move has been associated with op2. This is somewhat inconsistent as this component is linked to that last operation in the sense that marking it as done directly will set its quantity and consume COMP2 (even without operation dependency) but yet, the move is not flagged as `manual_consumption` while moves supposed to be processed but operations are: commit 479a9eb0f16af28bf2ee2ff34da3437278ba61fa Hence, setting the qty of the MO will automatically mark these moves as `consumed` (as expected): https://github.com/odoo/odoo/blob/35ea3dcb2eeb379c8b1127f0c7b42191853c0bd2/addons/mrp/models/mrp_production.py#L1291-L1294 ### Fix: We backport commit 22a19557eab82cf9ca276f6b75f8172673927cda even if technically the component moves are not displayed in the shopfloor. opw-5024779 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Saudi Arabia invoice PDFs now correctly include the company logo when used alongside Latin American invoice document features. This prevents customer-facing invoices from being printed or shared without the expected company branding.
Original PR description
steps to reproduce: ------------------- 1. Install `l10n_sa_edi` and `l10n_latam_invoice_document` 2. Create and confirm an invoice. 3. Print the invoice PDF issue: ------ The company logo is not…
steps to reproduce:
-------------------
1. Install `l10n_sa_edi` and `l10n_latam_invoice_document`
2. Create and confirm an invoice.
3. Print the invoice PDF
issue:
------
The company logo is not printed on the invoice PDF.
cause of the issue:
-------------------
The `l10n_latam_invoice_document` hides the standard company logo if
`company_header` is set to true:
https://github.com/odoo/odoo/blob/0f6cb037e05db86e808682659a12442464b2cdd2/addons/l10n_latam_invoice_document/views/report_templates.xml#L6-L8
In the case of `l10n_sa`, the custom_header value is set because of this condition:
https://github.com/odoo/odoo/blob/0f6cb037e05db86e808682659a12442464b2cdd2/addons/l10n_sa/views/report_invoice.xml#L23
However, the condition in `l10n_latam_invoice_documnet` expects
a callable record instead of static XML data, which is incorrect:
https://github.com/odoo/odoo/blob/022fcbcf40a28afa56010f6130c26bb0503d5467/addons/l10n_latam_invoice_document/views/report_templates.xml#L9-L14
solution:
---------
Renaming the variable to `custom_header_sa` resolves the issue.
<details>
<summary>Click here to see:</summary>
Before:
<img src="https://github.com/user-attachments/assets/f4606a44-10ce-4038-92a3-2c8ec2a69edf"/>
After:
<img src="https://github.com/user-attachments/assets/70055155-63f2-4fec-aaf6-3bf5587f5591"/>
</details>
opw-4977422