Daily updates from Odoo
Monday, July 6, 2026
22 changes · 18.0
Resolved issues and error corrections
Updating quantities from the sales catalog for field service products no longer causes an error when automated message rules are active. This keeps sales order updates running smoothly while still suppressing unnecessary chatter messages.
Original PR description
Steps to reproduce: ---------------------------------------- 1. Install `industry_fsm_sale` and `base_automation` modules 2. Create a product with: * Type: Service * Create on order: Task * Project:…
Steps to reproduce:
----------------------------------------
1. Install `industry_fsm_sale` and `base_automation` modules
2. Create a product with:
* Type: Service
* Create on order: Task
* Project: Field Service
3. Create an automation rule with:
* Model: Sales order
* Trigger: Incoming message
4. Create and confirm a sale order with this product
5. Add another product to the SO via the catalog view:
* Change the quantity to 2 or more
Observation:
----------------------------------------
Traceback occurs:
```
File '/home/odoo/src/odoo/addons/base_automation/models/base_automation.py', line 871, in _message_post
message_sudo = message.sudo().with_context(active_test=False)
AttributeError: 'bool' object has no attribute 'sudo'
```
Root Cause:
----------------------------------------
* Catalog qty change calls `set_fsm_quantity()` method
* Setting `fsm_quantity` triggers its inverse `_inverse_fsm_quantity()`, which writes the new qty to the SOL, but passes `fsm_no_message_post=True` in context to suppress chatter noise
https://github.com/odoo/enterprise/blob/ac5d670832a5e0db714c0bd056e1406b50bb4c17/industry_fsm_sale/models/product_product.py#L72-L83
* `sale.order.line.write()` detects a qty change on a confirmed order and calls `_update_line_quantity()`, which posts a message on the parent sale order
* FSM's `message_post` override sees the context flag and returns `False`
* When `base_automation` has an `on_message_received` rule on `sale.order`, it wraps `message_post` at registry load time. That wrapper calls `sudo()` on whatever `message_post` returns, Which was `False`
Solution:
----------------------------------------
Return `self.env['mail.message']` (empty recordset) instead of False, it's still falsy, but it's a proper ORM object that `sudo()` can be called on
opw-6276916
Forward-Port-Of: odoo/enterprise#119542Posting to Instagram could fail with an authorization error due to a recent change in Instagram/Facebook behavior. This fix adjusts how the post container is sent and allows more time for image uploads, making Instagram publishing more reliable.
Original PR description
Bug === When posting on Instagram, we get an Authorization error. From this thread: https://developers.facebook.com/community/threads/2162512441262894 the bug seems new, and the workaround is to give the container id in the GET parameters instead of in the URL path. Task-6254983
This fixes how Hong Kong payroll calculates payment in lieu of notice when an employee has not worked a full 12 months. The calculation now considers the employee's contract start date, reducing incorrect payouts and adding tests for special cases.
Original PR description
Currently, the calculation of the payment in lieu of notice is assuming the employee worked a whole 12 months prior to it being paid. This is of course not always going the be case, and when it happens our calculation is often incorrect. We update the salary rule to calculate a more accurate total days (which is no longer based on a fixed 12-month period but takes into account the contract's start date). We also now calculate the number of months more accurately by taking, once again, the contract's start date into account. Also adding a few test cases to test a bit more some special case we didn't yet test correctly. task-6348903
GIF-style media in Facebook feed comments now displays as a still preview instead of appearing missing. Users can click the preview to open the related video on Facebook, making comment content easier to review from Odoo.
Original PR description
Bug === When opening the comments modal of the feed view, the GIF images are not visible. Technical ========= The API does not return the GIF, it only returns the MP4 and the JPG. So we show the fixed image, and when clicking on it, it opens the video on Facebook. Task-6241607 Forward-Port-Of: odoo/enterprise#122832 Forward-Port-Of: odoo/enterprise#118619
This update restores code changes that were accidentally rolled back during an automated translation update. It helps keep affected point-of-sale, payment, delivery, and social media features working as intended without introducing new functionality.
Original PR description
The regular Weblate translation update reverted some code changes. This should normally not happen. We're reverting it back to the previous state. This partially reverts commit e427355b55661df120470bf4c18fb5acd8e47ebb.
Batch payment reconciliation now correctly handles supplier payments when exchange rates have changed between payment creation and bank reconciliation. This prevents unbalanced journal entry errors and allows invoices to be reconciled as expected, including proper exchange gain or loss entries.
Original PR description
Steps to reproduce 1. install account_accountant and account_batch_payment on a US / USD company 2. enable EUR as a currency. Create an exchange rate for the 1st day of the month of 1.1 3. create a…
Steps to reproduce 1. install account_accountant and account_batch_payment on a US / USD company 2. enable EUR as a currency. Create an exchange rate for the 1st day of the month of 1.1 3. create a bank journal with currency EUR, call it “Bank EUR” 4. create 2 supplier invoices in EUR, with amounts 100€ and 200€, dated 1st and 2nd day of the month, due date today 5. confirm the supplier invoices 6. pay the supplier invoices 7. put the payments in a batch 8. Imagine it’s the night, the cron updating the exchange rates run. Manually create an exchange rate for EUR dated today with value rate = 1.2 9. On the Bank EUR journal, create a transaction of -300€ dated today 10. Open the reconciliation screen for the Bank EUR journal, select the -300€ transaction, and on the batch payment tab, select the batch payment created in step 7 11. Click on the button validate **Expected result:** the invoices are paid and everything is reconciled, same as if we had selected the 2 invoices on the first tab instead of the batch payment. A journal entry is created on the Exchange Gain/Loss journal for each invoice. **Actual result:** you get an error message saying that the account move is not balanced. The problem is caused by the exchange rate used on the payments which is different from the rate on bank transfer. We fix this issue by recomputing the exchange rates on the payments when a batch payment is added to the reconciliation widget. Related support ticket: [5164405]
This fix restores support for specific document workflows where portal users need to archive or unarchive documents through elevated system actions. It helps prevent business processes from being blocked while keeping the general access restrictions in place.
Original PR description
In #116886, we fixed the blocking of portal users to (un)archive documents, but it appears that some flows relied on it and we were lacking a way of supporting it. Backport of #123015 Task-6205627
The Twitter social module now disables the reply button when Twitter rules do not allow replying, such as when the account is not mentioned or the post does not quote the account's tweet. This helps prevent failed replies and reduces the risk of automated responses being sent where they are not permitted.
Original PR description
Purpose ======= To prevent LLM from spamming Twitter users, Twitter does not allow to reply to a tweet if we are not mentioned in it, or if the tweet does not quote one of our tweet. For that reason, we disable the reply button when needed. Task-5964524
This fixes an issue where Australian payslips could fail to compute if an employee's Income Stream Type was changed after the payslip was created. Payroll users can now recompute affected payslips without encountering an error, improving reliability during payroll processing.
Original PR description
When an employee's Income Stream Type is changed after a payslip has been created, computing the sheet for payslip will raise a traceback. Steps to reproduce the error: - Install…
When an employee's Income Stream Type is changed after a payslip has been created, computing the sheet for payslip will raise a traceback. Steps to reproduce the error: - Install ``l10n_au_hr_payroll_account`` module with demo data - Switch to ``My Australian Company`` company - Create a new payslip for ``Dennis Cactus`` Employee > Save - Go to Employees > Open the ``Dennis Cactus`` employee > In Payroll tab, Income Stream Type: Other specified payments > Save - Go back to payslip > click the compute sheet button Traceback: ```py KeyError: 'OSP' ``` https://github.com/odoo/enterprise/blob/13e64e0cb7f566cbbb46109fe1c218eb7a14eead/l10n_au_hr_payroll/models/hr_payslip.py#L175-L178 The ``l10n_au_income_stream_type`` field on the payslip is a computed field that only depends on ``employee_id``. As a result, changing the employee's Income Stream Type does not trigger a recomputation of the corresponding field on existing payslip. So, when the ``payslip_ytd_totals`` field is computed, it uses the old value of ``l10n_au_income_stream_type`` field at [1], The resulting ``payslip_ytd_totals`` is then used to build the ``totals`` dictionary, and eventually, when the employee's current ``income_stream_type`` is used to access ``totals``, the mismatch key leads to the above traceback. https://github.com/odoo/enterprise/blob/13e64e0cb7f566cbbb46109fe1c218eb7a14eead/l10n_au_hr_payroll_account/models/hr_payslip.py#L75-L88 [1]: https://github.com/odoo/enterprise/blob/13e64e0cb7f566cbbb46109fe1c218eb7a14eead/l10n_au_hr_payroll/models/hr_payslip.py#L269-L272 solution: I added ``l10n_au_income_stream_type`` to ``add_to_compute()`` in ``compute_sheet()``. This ensures that stale values of ``l10n_au_income_stream_type`` on existing payslips are recomputed when the payslip sheet is computed. sentry-7536819310
This update resolves a problem where PDF invoices generated by the Nilvera integration were not being correctly saved to the system. The previous code incorrectly handled the PDF data, resulting in a base64-encoded string instead of the actual PDF file. This fix ensures the invoices are stored as proper binary files, allowing for correct display and download in the browser.
Original PR description
`_l10n_tr_nilvera_add_pdf_to_invoice` writes the response from `client.request('GET', '.../pdf')` directly into `ir.attachment.raw`. The Nilvera client sets `Accept: application/json` on the session…
`_l10n_tr_nilvera_add_pdf_to_invoice` writes the response from `client.request('GET', '.../pdf')` directly into `ir.attachment.raw`. The Nilvera client sets `Accept: application/json` on the session and calls `response.json()` by default, so the returned value is a Python `str` holding the base64-encoded PDF body, not raw binary bytes.
The previous code wrote to the base64-aware `datas` field, which auto-decoded its input. An earlier fix switched to `raw` to work around a `binascii.Error` from Python 3.14's stricter base64 validation in the `datas` auto-decode path. That switch silently changed what ends up on disk (`datas` decodes its input, `raw` does not)
Storing that string in the binary `raw` field encodes it as UTF-8, so the file on disk ends up as the literal ASCII of the base64 text. The attachment is served as `application/pdf` but the browser receives base64 ASCII and cannot preview or download the PDF.
Call `b64decode(response)` before storing so the attachment contains the actual PDF bytes.
OPW-6302803
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#270759This update corrects a rounding issue that occurred when processing down payments on sales orders, specifically when dealing with multiple product lines. The fix involves splitting the down payment calculation into multiple lines to ensure accurate calculations and prevent discrepancies of up to one cent. This improves the reliability of financial transactions.
Original PR description
**Steps to reproduce:** - Make a quotation with 2 products - Product A with a unit price of 5503.26 with 15% taxes - Product B with a unit price of 4058.04 with 15% taxes - Order 7 of A and 2 of B,…
**Steps to reproduce:** - Make a quotation with 2 products - Product A with a unit price of 5503.26 with 15% taxes - Product B with a unit price of 4058.04 with 15% taxes - Order 7 of A and 2 of B, the total is 53634.73 - Go to the pos, make a downpayment for 100% of the price - The total is 53634.74, which is one cent more than it should **Why the fix:** When importing this order, we calculate the price again, to do it we compute the price unit and the taxes for it, then we will multiply it by the qty and add it all to a downpayment line and add it to the order. When we have multiple qty like this, we run the risk of having a rounding issue, as the price unit is rounded before being multiplied by the tax and the quantity of said line. Unfortunately in this exemple, we either have a price without the taxes of 46638.89 which gives a total of 53634.72 once multiplied or we have 46638.90 which gives a total of 53634.74 So with a decimal of 2 there is no way we could have the right amount with only one line, which is why we split it in 2 lines to get more precision when importing the sale order. The way it worked before this commit is to take the sum of all lines and to calculate the downpayment based on it. We now split it into multiple smaller lines to avoid rounding issues because that's how it's done on the Sale Order in the backend. By splitting the down payment into multiple lines we replicate the per-line rounding behavior, preventing 1-cent discrepancies. This is fixed in 18.3 onwards by using the accounting helper functions, but they are not yet implemented in 18.0 and it will be too big of a change for 18.0 so this solution is suggested. opw-6222937
This update fixes an issue where credit note imports were incorrectly processing negative values, leading to incorrect tax calculations. The fix ensures that price, quantity, and tax amounts align with standard refund line behavior, resolving a discrepancy in total calculations. This improves the accuracy of credit note processing.
Original PR description
Steps to reproduce: 1. Install l10n_be and switch to BE company 2. Upload the XML document (found in ticket chatter) into the Accounting application as a Credit Note. Issue: - The line is imported as a negative value which is corrected with a rounding line. - The 6% tax rate is applied to the negative invoice line, resulting in a negative tax amount being deducted from the total (e.g., 449.32 + (-26.96) = 422.36) instead of being added (449.32 + 26.96 = 476.28) Expected behavior: price_unit, quantity and the related tax amounts should all be positive, matching a normal in_refund/out_refund line. Why this happens: - In `_import_ubl_invoice_line_add_price_unit_quantity_discount`, `BaseQuantity` was multiplied by file_document_sign, unlike `PriceAmount` from the same node which is left untouched. This flips price_quantity to -1, which later flips price_unit to negative when `price_unit = price_subtotal / price_quantity`. opw-6310442
This update resolves an issue where XML data associated with purchase invoices received via email was being discarded due to errors. Now, even if the XML data is faulty, it's retained, ensuring complete invoice processing and preventing data loss. This improves the reliability of our purchase invoice system.
Original PR description
Issue: When receiveing an email on a purchase journal, if the XML raise an issue, it is discarded. Steps to reproduce: - Configure an incoming mail server - Set up an email alias for the Vendor Bill journal - Receive a mail with an XML (e.g. PEPPOL XML) which raise an issue Current Behavior: - XML is discarded Cause: To avoid keeping pictures,... from mail, every attachment from a mail that doesn't fill an account.move is discarded. As the XML is faulty, it doesn't fill the move and is discarded. opw-6288972 Forward-Port-Of: odoo/odoo#270347
This update corrects a visual inconsistency in the website's accordion controls. A previous change caused the accordion's color to appear differently when expanded versus collapsed. This fix ensures a consistent and correct color display for all accordion states, improving the overall user experience.
Original PR description
In commit[1] we restyled the accordion snippets, removing the background-image to use oi-icons instead. However due to selector specificty, the rule was taking priority. This :not is actually wrong since we want the color to apply as well when the accordion is collapsed (else you have 2 different colors between the collapsed uncollapsed state) task-6361379 [1]: f26a1535b96c728e4360d94c0c06de138a6b1b3f --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where the quantity displayed for kit products in the Point of Sale picking process was incorrect. The fix ensures that the correct quantity, based on the kit's components, is accurately reflected, leading to more precise inventory management. This improves order fulfillment accuracy for kit products.
Original PR description
**Steps to reproduce:** - Create a product A, tracked by lots - Create a kit product, include a component A - Change the UoM to 0.5 - Go to the PoS, order this kit product - Also order the component…
**Steps to reproduce:** - Create a product A, tracked by lots - Create a kit product, include a component A - Change the UoM to 0.5 - Go to the PoS, order this kit product - Also order the component A, with a quantity of 2 - Pay for it, ask for an invoice - Go to the created picking - The Demand column is correctly computed and is 0.5 - The Quantity column is wrong and is 2 **Why the fix:** When getting the data from https://github.com/odoo/odoo/blob/e0d84c7fbb270d0d1f82572daefa96c2978d3785/addons/point_of_sale/models/stock_picking.py#L283 we always get the component's line, as the move's product is the component, even if it used to be the kit product's move. This is because when exploding a kit's moves, it gets the kit's component as a product instead of keeping the kit product. This was introducing a weird behavior because we took the quantity from the component line, and not from the kit line, meaning the kit would always have the same quantity as the component. We now check if the move is actually a kit product's move, and if it is we adapt the qty to correct one by fetching the correct line's qty, and adapting it with the correct UoM. Changing the line in itself would not work, as the kit itself is not tracked by lots, so we would not enter https://github.com/odoo/odoo/blob/e0d84c7fbb270d0d1f82572daefa96c2978d3785/addons/point_of_sale/models/stock_picking.py#L284 and the move line would not be correctly created. opw-6153000 Forward-Port-Of: odoo/odoo#262551
This update corrects a previous error that displayed an invoice note even when the tax amount was not zero. The change allows for proper handling of invoices with varying tax rates, reflecting the Co-Contractant's fiscal position. This ensures accurate invoice generation and avoids unnecessary error messages.
Original PR description
We were raising a UserError because we were putting the note even if the tax amount was different from 0. But in fact, it can be normal to have 0% cocontractant tax and normal rate at the same time on an invoice, which would have the fiscal position Co-Contractant. So remove these UserError, but only apply the note when the tax amount is 0 opw-6302806 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268899
This update resolves an issue where tests related to account_edi_ubl_cii were failing due to an outdated VAT number. Replacing the invalid VAT with a valid one ensures consistent test results across different environments, improving the reliability of our system.
Original PR description
The previous Belgian VAT is rejected by newer versions of `python-stdnum`. Replace it with a valid VAT so the test behaves consistently across environments.
This update fixes an issue where users with access to multiple companies were only appearing as interviewers for jobs within their default company. The change ensures that users with access to multiple companies can be selected as interviewers for job positions across all their allowed companies, improving recruitment efficiency.
Original PR description
Issue: ---------------------------------------- A user allowed in multiple companies will only show as an interviewer in job positions from its default company. Steps to reproduce: ---------------------------------------- - Configure a user with multiple allowed companies (A and B) - Set the user's default company to A - Create or open a job position belonging to company B. - Try to add the user as an interviewer Cause: ---------------------------------------- To compute `allowed_user_ids` we group the users by `company_id` (i.e. the default company), so the allowed companies are ignored. Solution: ---------------------------------------- Group the users by `company_ids`, the aggregate then separates the companies in case they're a recordset. opw-6314373 Forward-Port-Of: odoo/odoo#273602
This update resolves a test failure related to certificate generation. The Odoo system relies on a specific version of the cryptography library, and an older version caused issues with X25519 keys. By skipping the X25519 issuer test when the library is outdated, the system continues to function correctly without disrupting certificate creation.
Original PR description
CertificateBuilder.public_key() rejects X25519 keys before cryptography 36.0.0, and Odoo pins 3.4.8 for python < 3.12, so test_is_issued_by errored on runbot. Skip the X25519 case when the lib can't build it. https://cryptography.io/en/latest/changelog/#v36-0-0 Runbot Error: https://runbot.odoo.com/odoo/runbot.build.error/941306 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
This update corrects a bug where the Peppol demo mode wasn't correctly applied to databases that had previously been neutralized. Previously, the system defaulted to production mode, leading to incorrect document registration. Now, the demo mode is automatically set when a neutralized database receives the account_peppol module, ensuring accurate Peppol network interactions.
Original PR description
When Peppol is installed on a database that was already neutralized (ex: a staging database where the feature is enabled after the neutralization happened), the account_peppol.edi.mode parameter is not set: data/neutralize.sql only runs at neutralization time, not when the module is installed afterwards. The demo/ data that also sets this parameter is not loaded on databases without demo data (real production/staging databases). As a result, _get_peppol_edi_mode() falls back to 'prod' and the neutralized database registers and sends documents against the live Peppol network. Steps to reproduce: - Neutralize a database on which Peppol is not installed yet - Install the account_peppol module - Open the Peppol settings / registration wizard: the mode is Production instead of Demo Force the demo mode in the pre_init_hook when the database is neutralized, mirroring data/neutralize.sql opw-6307710 Forward-Port-Of: odoo/odoo#273019
This update ensures that leave hours are calculated accurately when employees use calendars with multiple defined time slots. Previously, the system struggled to handle complex calendar schedules, leading to incorrect leave duration calculations. This fix resolves this issue, guaranteeing accurate leave tracking based on defined calendar hours.
Original PR description
Define the correct hours in the leaves if the calendar has defined dates (`date_from` and `date_to`) Use case example: - Create a calendar and define on Friday (Morning: from 08:00 to 13.00,…
Define the correct hours in the leaves if the calendar has defined dates (`date_from` and `date_to`) Use case example: - Create a calendar and define on Friday (Morning: from 08:00 to 13.00, Afternoon: from 19:00 to 21:00) with date_to=2025-01-01. - Define another specific Friday (Morning: from 09:00 to 14.00, Afternoon: from 17:00 to 20:00) in the same calendar with date_from=2025-01-01. - Create an employee and define the calendar created for him/her. - Create a leaves for the employee and select a Friday (2025-05-02). - The start hour of the leave must be 2025-05-02 09:00:00 - The end hour of the leave must be 2025-05-02 20:00:00   Please @pedrobaeza can you review it? @Tecnativa TT56218 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254249 Forward-Port-Of: odoo/odoo#208378
This update resolves a bug that caused errors when processing payments with withholding taxes in Argentina. Specifically, the system now correctly handles 0% withholding taxes and prevents the deletion of withholding lines during payment resets. This ensures accurate tax calculations and payment processing for Argentinian businesses.
Original PR description
**Steps to reproduce:** - Install Accounting and l10n_ar_withholding - Switch to an Argentinian company (e.g. (AR) Responsable Inscripto) - Create a 0% Payment Withholding tax: * Tax Type: Customer…
**Steps to reproduce:**
- Install Accounting and l10n_ar_withholding
- Switch to an Argentinian company (e.g. (AR) Responsable Inscripto)
- Create a 0% Payment Withholding tax:
* Tax Type: Customer Payment Withholding
* Amount: 0.00 %
* Add an account for the tax distribution lines
- Create an invoice with a tax
- Confirm the invoice
- Pay the invoice:
* Withholdings:
- Add a line with the created 0% Payment Withholding tax
- Add a line with another Payment Withholding tax
- Create Payment
- Go to the payment
**Issue 1:**
When clicking on the first withholding line, a JS error is raised due to a missing index (i.e. currency_id).
**Cause 1:**
One of the fields has an aggregate sum function applied on it (i.e. amount_currency).
As it is a monetary field, the corresponding currency field is required in the view.
**Issue 2:**
When resetting the payment to draft, the withholding line with the 0% tax is deleted.
As the withholding table is not editable, it is not possible to add the line again.
**Cause 2:**
When the payment is reset to draft, the state of the associated journal entry is also set to draft and a "_sync_dynamic_lines" is triggered, which remove tax lines having a zero amount during the process.
**Solution 2:**
Keep all the lines with a Customer Payment Withholding tax as it is not possible to add a withholding line in the payment afterwards.
opw-6298058
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr