Daily updates from Odoo
Friday, November 28, 2025
6 changes · 17.0
Enhancements to existing features
This update enhances user privacy by permanently providing access to the Cookie Policy page and allowing users to update their consent choices at any time, regardless of whether cookies are initially accepted. Previously, users could only access the policy through a popup that disappeared after acceptance, and the option to change preferences was hidden once cookies were enabled.
Original PR description
This improvement enhances user control over cookie preferences by making the Cookie Policy page (/cookie-policy) more accessible and allowing users to modify their consent at any time. **Issue:** -…
This improvement enhances user control over cookie preferences by making the Cookie Policy page (/cookie-policy) more accessible and allowing users to modify their consent at any time. **Issue:** - Previously, the only way to access the Cookie Policy page was through the link in the cookie consent popup. However, once users accepted cookies, the popup was no longer displayed, making it impossible to navigate to the policy page later. - Additionally, the Cookie Policy page had a button to reopen the cookie consent popup, but it was only visible if cookies were not accepted. Once cookies were accepted, the button was hidden, preventing users from changing their preferences. **Improvements:** - Added a permanent link to the Cookie Policy page in the copyright footer, ensuring it remains accessible at all times. - The cookie consent toggle button now remains visible even after a user has accepted cookies, allowing them to update their preferences at any time. task-[4502416](https://www.odoo.com/odoo/project/974/tasks/4502416)
This update ensures Odoo's Swissdec ELM Certification is compatible with the latest version 5.3. It includes key enhancements for reporting, specifically addressing new regulations regarding telework and retirement benefits, as well as automating allowance calculations.
Original PR description
This Pull request extends the Odoo Swissdec ELM Certification to the minor version 5.3. By doing so we add the following features : - Telework Percentage declaration for French-crossborder comuters - Adapting to AVS21 regulation, where retired employees can refuse their right to retirement - Adding automatic Child and education allowance calculation - Add the calculation of LPP in % - Allowing the specification of custom employer parts for LAAC and IJM
Resolved issues and error corrections
This update resolves a bug where changing the quantity of a combo product in Point of Sale (PoS) didn't correctly update the quantities of its child items. The fix ensures that when a combo's parent quantity is adjusted, the child items are also updated accordingly, preventing incorrect order totals. This improves the accuracy of PoS transactions.
Original PR description
When changing the quantity of a combo parent product in a PoS that doesn't allow changing quantity (like when using blackbox), the children of the combo would not be updated correctly. Steps to reproduce: ------------------- * Open any PoS and use this command to change the behavior of changing quantity : `posmodel.disallowLineQuantityChange = () => true;` * Add any combo product to the order. * Change the quantity of the combo parent product to 0 > Observation: The children of the combo are still there. Why the fix: ------------ We make sure to adapt the quantity of the combo children when the parent quantity is changed. opw-4876979
Incoming Peppol invoices were incorrectly assigned to the current user's company instead of the receiving company. This fix ensures that invoices are now automatically created in the correct company’s purchase journal, streamlining the accounting process for multi-company Peppol setups.
Original PR description
### **Summary** In a real multi-company setup with multiple Belgian companies registered on Peppol, incoming Peppol invoices are systematically created in the **current user’s company**, instead of…
### **Summary**
In a real multi-company setup with multiple Belgian companies registered on Peppol, incoming Peppol invoices are systematically created in the **current user’s company**, instead of the company that actually received the document.
The problem occurs even though the correct journal is identified in `account_edi_proxy_client.user` and used to call `_create_document_from_attachment()`.
### **How to reproduce**
#### **Environment**
* Two Belgian companies: e.g. **Company A** and **Company B**
* Both registered and active on Peppol
* Each company has its own **Peppol purchase journal** (`company.peppol_purchase_journal_id`)
* An accountant with access to both companies
#### **Steps**
1. Trigger Peppol incoming document retrieval (`_peppol_get_new_documents`)
2. Odoo resolves the correct receiving company and journal:
```python
company = edi_user.company_id
journal = company.peppol_purchase_journal_id
```
3. The code uses this journal to import the invoice:
```python
move = journal\
.with_context(
default_move_type='in_invoice',
default_peppol_move_state=content['state'],
default_peppol_message_uuid=uuid,
)\
._create_document_from_attachment(attachment.id)
```
4. **Actual result**:
The `account.move` is created in **the company of the current user**, *not* in `journal.company_id`.
5. **Expected result**:
The vendor bill must belong to the company that received the Peppol document (i.e. `journal.company_id`).
This behaviour is reproducible 100% of the time when a user has multiple companies enabled.
---
### **Root Cause**
The selected journal is **never propagated** to the EDI XML decoder.
#### 1. The call in the Peppol module *looks* correct:
```python
journal.with_context(...)._create_document_from_attachment(...)
```
…but `_create_document_from_attachment()` in `account.journal` does *not* use `self` to determine the journal:
```python
invoices = self.env['account.move']
# `self` (journal) is not used at all during decoding
decoders = self.env['account.move']._get_create_document_from_attachment_decoders()
```
So the journal passed to `.with_context()` is effectively **ignored** inside the decoder chain.
#### 2. The XML decoder in `account.edi.format` explicitly uses the *environment company*:
```python
res = edi_format.with_company(self.env.company)._create_invoice_from_xml_tree(...)
```
Thus:
* The company used during invoice creation is **self.env.company**
* That is the **current user’s company**
* Not the Peppol recipient’s company
* Not the journal’s company
* Not the company associated with the Peppol identifier
#### 3. `_create_invoice_from_xml_tree()` supports a journal, but it is never provided
```python
if not journal:
journal = self.env['account.journal'].browse(self._context.get("default_journal_id"))
```
Since `default_journal_id` is **never set**, the fallback is always used.
---
### **Why the fix requires passing `default_journal_id` explicitly**
Even if it **feels redundant**, it is necessary.
* We *are* calling the decoder through `journal.with_context(...)`
* But `_create_document_from_attachment()` does **not** use `self`
* The decoder receives **no reference to the journal**
* And is executed in a context where `self.env.company` = current user’s company
Because Odoo intentionally allows calling `_create_document_from_attachment()` on an **empty journal recordset**, the decoder cannot deduce the journal from `self.id`.
Therefore, the only reliable way to pass the journal down the stack is through the context key `default_journal_id`.
---
### **Proposed Fix**
Add `default_journal_id=journal.id` in the context at the point where the journal is still known:
```diff
--- a/addons/account_peppol/models/account_edi_proxy_user.py
+++ b/addons/account_peppol/models/account_edi_proxy_user.py
@@
move = journal\
.with_context(
default_move_type='in_invoice',
default_peppol_move_state=content['state'],
default_peppol_message_uuid=uuid,
+ default_journal_id=journal.id, # ensure correct company is used
)\
._create_document_from_attachment(attachment.id)
```
This allows the EDI decoder to resolve:
```python
journal = self.env['account.journal'].browse(self._context.get("default_journal_id"))
```
Which in turn ensures:
* the invoice is created in `journal.company_id`
* the correct taxes, accounts, fiscal settings, and partner mapping are applied
* multi-company Peppol setups behave as designed
---
### **Impact**
Without this fix:
* All incoming Peppol invoices are created in the wrong company in multi-company environments.
* This leads to:
* wrong journal assignment
* wrong fiscal configuration
* partner mismatches
* tax errors
* reconciliation issues
With this fix:
* Each Peppol invoice is correctly routed to the receiving company’s journal
* Behaviour is stable and consistent with Odoo’s EDI design
---
### ✔️ This is a minimal, safe and backward-compatible fix
* It changes only the Peppol integration behavior
* It does not modify EDI core internals
* It uses an existing mechanism (`default_journal_id`) already expected by Odoo
* It matches the intended API contract
* It prevents silent cross-company data corruption
Forward-Port-Of: odoo/odoo#237904This update corrects a bug where credit notes weren't automatically generating deferred revenue entries. The system incorrectly relied on expense entry settings. Now, credit notes will correctly create deferred revenue entries when configured to 'On bill validation', aligning with how invoices are handled.
Original PR description
The system incorrectly uses the `Deferred Expense Entries` configuration to determine whether to create deferrals for credit notes, while it should follow the `Deferred Revenue Entries` setting, as invoices do. As a result, deferred entries for credit notes are not created when expected. Steps to reproduce: - Go to Accounting → Configuration → Settings. - In the Deferred Expense Entries section, set Generate entries to: Manually & Grouped - In the Deferred Revenue Entries section, set Generate entries to: On bill validation - Navigate to Accounting → Customers → Credit Notes. - Create a credit note with at least one line containing Date From and Date To (i.e., deferrable line). - Validate the credit note. - No deferred revenue entries are created. Ticket [link](https://www.odoo.com/odoo/project.task/5187051) opw-5187051
This update resolves an issue where scanning items during a delivery didn't always correctly associate the new line with the original package. The change ensures that when splitting a delivery, the new line automatically pulls from the same package as the initial quantity, improving order fulfillment accuracy. This prevents errors and ensures correct stock tracking.
Original PR description
Backport of 9685a42 Steps to reproduce ----- - Enable packages - Create a stored Product "Prod" - Add a quantity of 5 "Prod" in stock, in package "PACK1" - Create a delivery for 3 units of "Prod" (so as to not move the whole package) - Open the delivery in Barcode - Scan "Prod" - Put in pack > The new line created for the remainder of the delivery is not taken from PACK1 ----- Ticket: opw-5081496