Daily updates from Odoo
Wednesday, August 27, 2025
44 changes · saas-18.3
Resolved issues and error corrections
Changing the quantity on a subcontracted receipt with lot-tracked components could leave users unable to enter the required lot details and validate the receipt. This fix prevents that confusing flow by directing quantity changes through the proper component-recording process and restores access to related production details when needed.
Original PR description
Issue ----- The problem is when a subcontracted product has a component tracked by lots. Creating a receipt for the subcontractor, marking it as Todo then changing the quantity leads to the reception…
Issue
-----
The problem is when a subcontracted product has a component tracked by lots. Creating a receipt for the subcontractor, marking it as Todo then changing the quantity leads to the reception being impossible to validate because the lots for the components cannot be set from the move.
Steps to reproduce
-----
- Create a product (Comp1)
- Tracked by lots
- Create a product (Prod1)
- Add a BoM - Subcontracted - Flexible consumption - Set Comp1 as consumable
- Create a receipt for 2 Prod1
- Mark as Todo
- Set Quantity to 3
- Save
- Try to validate the receipt
Situation
-----
Before changing the quantity, the user has 2 buttons ("Record components" and the move's hamburger) which open the "Subcontract" wizard. This wizard is where they can set a lot/serial for the products.
When they change the quantity of the move, the inverse method of quantity is called
https://github.com/odoo/odoo/blob/74a8334558bf86c07c0d68090a9126911867ef42/addons/stock/models/stock_move.py#L170-L171
This method is overridden in the mrp_subcontracting module
https://github.com/odoo/odoo/blob/74a8334558bf86c07c0d68090a9126911867ef42/addons/mrp_subcontracting/models/stock_move.py#L75
The part that's important to our use case is
https://github.com/odoo/odoo/blob/74a8334558bf86c07c0d68090a9126911867ef42/addons/mrp_subcontracting/models/stock_move.py#L81-L82
Recording components leads us to create a backorder production
https://github.com/odoo/odoo/blob/74a8334558bf86c07c0d68090a9126911867ef42/addons/mrp_subcontracting/models/mrp_production.py#L90-L91
In our specific use case, this is problematic because the subcontract wizard loads the form of the last production
https://github.com/odoo/odoo/blob/74a8334558bf86c07c0d68090a9126911867ef42/addons/mrp_subcontracting/models/stock_move.py#L245
The user has no way to access the previous production which lacks lot/serial (other than opening the MO itself). Obviously, we don't want to mess with this flow, but there are 2 things we can do:
1. Avoiding weird cases such as this one by forcing the user to change the quantity through the appropriate wizard
2. Providing a link to the mrp.production once some production has been recorded
For the first point, the stock.move model already has a field we can use
https://github.com/odoo/odoo/blob/8c8449f51d5e327ccd2e4bb7c3c4868d51c6d619/addons/stock/models/stock_move.py#L180
We can just override the compute to fit our use case.
For the second point, there is already a button for this. The problem is that its display condition was changed in 9ca1064 to only show once the move is picked. This fix was a bit of an over correction because we also want to show the button for unpicked moves for which a production has been recorded.
-----
Ticket:
opw-4751896
Forward-Port-Of: odoo/odoo#219268Odoo now avoids reusing archived supplier bank accounts when importing electronic vendor bills with bank details. This prevents duplicate bank account errors that could block bill creation, making incoming invoice processing more reliable.
Original PR description
### Issue When receiving vendor bills that include bank details, if the partner has archived bank accounts, Odoo may attempt to update them. This leads to a duplicate key violation on…
### Issue
When receiving vendor bills that include bank details, if the partner has archived bank accounts, Odoo may attempt to update them. This leads to a duplicate key violation on `res_partner_bank` when the same account number already exists for the partner.
#### Affected versions
16.0 and later
#### Error example
```bash
2025-07-08 13:36:52,942 204 INFO server-dummy odoo.addons.mail.models.mail_thread: Routing mail from "Client Name" <erp@odoo.com> to "M7- Odoo V17" <purchases@test.odoo.com>,purchases@test.odoo.com with Message-Id <*****.****.*****-****-*****-****.****@******>: direct alias match: ('account.move', 0, {'company_id': 1, 'move_type': 'in_invoice', 'journal_id': 10}, 1, mail.alias(6,))
2025-07-08 13:36:52,946 204 INFO server-dummy odoo.addons.mail.models.mail_thread: Primary email missing on account.move
2025-07-08 13:36:53,576 204 ERROR server-dummy odoo.sql_db: bad query: UPDATE "res_partner_bank" SET "acc_holder_name" = 'M7 GROUP INC.', "company_id" = NULL, "has_iban_warning" = false, "has_money_transfer_warning" = false, "sanitized_acc_number" = '1234567', "write_date" = '2025-07-08T13:36:52.897826'::timestamp, "write_uid" = 1 WHERE id IN (63)
ERROR: duplicate key value violates unique constraint "res_partner_bank_unique_number"
DETAIL: Key (sanitized_acc_number, partner_id)=(1234567, 3524) already exists.
2025-07-08 13:36:53,576 204 ERROR server-dummy odoo.addons.account.models.account_move: Error importing attachment 'factur-x.xml' as invoice (decoder=_import_invoice_ubl_cii)
Traceback (most recent call last):
File "/home/odoo/src/odoo/addons/account/models/account_move.py", line 3219, in _extend_with_attachments
with self.env.cr.savepoint():
File "/home/odoo/src/odoo/odoo/sql_db.py", line 85, in __exit__
self.close(rollback=exc_type is not None)
File "/home/odoo/src/odoo/odoo/sql_db.py", line 89, in close
self._close(rollback)
File "/home/odoo/src/odoo/odoo/sql_db.py", line 113, in _close
self._cr.flush()
File "/home/odoo/src/odoo/odoo/sql_db.py", line 137, in flush
self.transaction.flush()
File "/home/odoo/src/odoo/odoo/api.py", line 879, in flush
env_to_flush.flush_all()
File "/home/odoo/src/odoo/odoo/api.py", line 739, in flush_all
self[model_name].flush_model()
File "/home/odoo/src/odoo/odoo/models.py", line 6362, in flush_model
self._flush(fnames)
File "/home/odoo/src/odoo/odoo/models.py", line 6464, in _flush
model.browse(ids)._write(vals)
File "/home/odoo/src/odoo/odoo/models.py", line 4548, in _write
cr.execute(SQL(
File "/home/odoo/src/odoo/odoo/sql_db.py", line 332, in execute
res = self._obj.execute(query, params)
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "res_partner_bank_unique_number"
DETAIL: Key (sanitized_acc_number, partner_id)=(1234567, 3524) already exists.
```
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#224248
Forward-Port-Of: odoo/odoo#223873The Italian localization now uses the updated €100 threshold for the VP7 line in the monthly tax report, replacing the previous €25.82 amount. This keeps Italian tax reporting aligned with current requirements and helps avoid incorrect report calculations or exports.
Original PR description
While implementing the modulo tag of the tax report xml export, it came to light that the vp7 line of that report which previously used a 25,82€ threshold has been changed for one at 100,00€. This commit adapts the amount across the module. --- Enterprise PR: https://github.com/odoo/enterprise/pull/86642 task-4826511 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#224073 Forward-Port-Of: odoo/odoo#216887
Point of Sale now follows the normal post-payment flow even when the register is offline, so automatic receipt printing still runs. This helps stores keep serving customers during internet outages without needing manual receipt steps.
Original PR description
Steps to reproduce: 1. Configure a POS to use a receipt printer with automatic receipt printing. 2. Confirm that the receipt is printed automatically after a order is made as expected. 3. Disconnect from the internet so that POS continues in Offline mode (but ensure you still have access to the receipt printer on the local network). 4. Make an order in offline mode. EXPECTED: The receipt is printed automatically as before ACTUAL: The receipt is not printed. The fix is to still run the `afterOrderValidation` method in offline mode, as previously it was being bypassed and the receipt screen being shown directly. task-4946305 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#224211 Forward-Port-Of: odoo/odoo#224021
Duplicated journal entries no longer keep the original partner displayed when users change the partner on the copied entry lines. This prevents confusion in accounting lists and helps ensure duplicated bank journal entries show the correct customer or vendor information.
Original PR description
When changing `partner_id` on the `account.move.line`s of a duplicated journal entry if this journal entry already had a partner_id, it will stay the same (possible to see from list view) but the…
When changing `partner_id` on the `account.move.line`s of a duplicated journal entry if this journal entry already had a partner_id, it will stay the same (possible to see from list view) but the move line will be correctly changed. Step to reproduce: - Select a journal entry of type PBNK - Duplicate the journal entry - Change the partner on the journal items and save - Go back to the list view, the partner name displayed is from the original journal entry When clicking on duplicate it will call the function copy and super.copy() will call copy_data from account_move; This line allow to copy the partner_id (which is needed since invoices revert goes through copy) Since there is no condition on the type of entry, it will also copy the partner_id in our case: https://github.com/odoo/odoo/blob/22c333d0ed7eba1165f6462e668998d37fcabb73/addons/account/models/account_move.py#L2424-L2426 The introduction of this change introduced our issue, It allow for all duplication to copy the partner_id. Original fix : https://github.com/odoo/odoo/commit/e1d18960b57b36b8bf69bc787ef6078dcba8c855 opw-4907648 Forward-Port-Of: odoo/odoo#223959 Forward-Port-Of: odoo/odoo#217755
This corrects an invalid label-ending command in stock product label templates. It helps ensure ZPL barcode labels are generated in a format printers can understand, avoiding failed or malformed label output.
Original PR description
In the ZPL, the `^XZ` command indicates the end of a label. For an unknown reason (a typo ?), the PR [1] replaces some of them by `^XZj` which is not a valid ZPL command. [1]: https://github.com/odoo/odoo/pull/187225 Forward-Port-Of: odoo/odoo#220518
Odoo now applies early payment discounts based on the discount deadline saved on the posted invoice, rather than recalculating it from payment terms that may have changed later. This ensures customers receive the discount terms originally communicated to them and prevents incorrect missed discounts during payment or reconciliation.
Original PR description
When a payment term with early payment discount is used on invoice the discount date is set on the payment term line based on the actual configuration of the payment term. When the invoice is posted,…
When a payment term with early payment discount is used on invoice the discount date is set on the payment term line based on the actual configuration of the payment term. When the invoice is posted, this date must not change anymore as it usually is what is communicated to the partner in order to apply EPD. However, if the payment term's delay for discount is modified, the discount date from the move line was not taken into account by the payment register wizard or by the reconciliation widget, as it was instead recalculating a discount limit date, based on the configuration of the payment term at the time the payment is registered on Odoo. Make sure it is the discount date that is stored on payment terms' account move line that is used to define if an early payment discount has to be applied. OPW-4895365 Description of the issue/feature this PR addresses: On runbot, create a new payment term with an early payment discount (eg 10% at 15 days, balance at 30 days). Create a customer invoice with a invoice line (eg 100 USD) for any customer with this payment term and set the date to 10 days before today. Post the invoice, you can see on the payment term line that the discount is valid until 5 days after today. Modify the payment term to set 10% at 5 days. If you go back to the invoice, you'll notice the discount date is still 5 days after today which is fine since this is what was communicated to the customer Current behavior before PR: Register a payment on this invoice and you'll notice the EPD is not applied because it gets the date from the actual configuration of the payment term instead of the date stored on the invoice's payment term line. Desired behavior after PR is merged: Register a payment on this invoice must apply the EPD as it is still valid based on the invoice's payment term line. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#220295 Forward-Port-Of: odoo/odoo#215615
This update stabilizes an internal time off accrual test by making it use a fixed date. It helps prevent future date-related test failures, improving confidence in payroll and leave management quality checks without changing user-facing behavior.
Original PR description
The test is failing when run one year in the future as it depends on the date but we don't freeze the time. runbot-error-230721 Forward-Port-Of: odoo/odoo#224240
This fixes an issue where meeting information, such as the title copied from a task, could disappear when users expanded a calendar form dialog. Users can now switch to the larger form view without losing the details already prepared in the pop-up.
Original PR description
### Steps to reproduce: - Go to any task in project module - Create a new meeting activity - Open Calendar and drag to create a slot - Notice the name of the meeting in the pop-up is the same as the…
### Steps to reproduce: - Go to any task in project module - Create a new meeting activity - Open Calendar and drag to create a slot - Notice the name of the meeting in the pop-up is the same as the task - Click on the expand button top-right of the dialog - Notice the calendar.event form opened but without a name ### Cause: When expanding the view using 'More options' button we are keeping the context in the new request. https://github.com/odoo/odoo/blob/d9c63a85955c2321bae1a705cc09b2554155f826/addons/calendar/static/src/views/attendee_calendar/attendee_calendar_controller.js#L45-L49 But when doing the same through the expand button we don't pass the current context so it will be lost. https://github.com/odoo/odoo/blob/3dde420665257c63885e891f1ec366568df5007b/addons/web/static/src/views/view_dialogs/form_view_dialog.js#L106-L116 ### Fix: Backporting the commit https://github.com/odoo/odoo/commit/4f71fbbd26b428e57943d974e8441bef295cdef1 to pass the context while expanding the form view opw-4966486 Forward-Port-Of: odoo/odoo#221422
This fixes missing rating review summaries in portal conversations, so customers can once again see the correct feedback overview. It also adjusts related portal display and test coverage to keep rating information reliable across affected website and mail flows.
Original PR description
*: portal_rating, rating, test_mail_full task-4853416 Forward-Port-Of: odoo/odoo#223438 Forward-Port-Of: odoo/odoo#216044
Fixes an issue in the Website editor where resizing a text box in a newly added floating card could cause an error. This helps users edit website content more reliably without interruptions.
Original PR description
Steps to reproduce: - In "Website" app. - Create a "Floating cards" block using website editor. - Add a new card. - Adjust the text box size. - Error occurs. It was due to the XML structure of the new card, which was incorrect and caused the resize to crash in "grid" mode. opw-5027795
A CRM interface test is now skipped when running in simulated time mode because that environment can make its date-based check fail incorrectly. This prevents false test failures and helps keep release validation stable without changing customer-facing CRM behavior.
Original PR description
When using the faketime mode for testing, the crm_rainbowman tour fails because the underlying SQL query is using `CURRENT_DATE`. Unfortunately, this SQL keyword cannot be replaced globally by a function easyly (like it was done for the NOW function in faketime mode). ~~With this commit, the SQL query is adapted to use the SQL NOW function instead.~~ With this commit, the tour will be skipped in faketime mode Forward-Port-Of: odoo/odoo#223909
This fix ensures sales orders can still be settled in Point of Sale when inventory movements were not created, including cases with tracked products. It prevents missing order lines and helps staff complete customer transactions without disruption.
Original PR description
Before this commit, if an order was not confirmed and stock moves were not created, if products are tracked, the order lines would not be added to the PoS. opw-5026892 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#223833 Forward-Port-Of: odoo/odoo#223591
Product image zoom on eCommerce pages now opens only once when product carousels are present. This restores expected keyboard navigation and Escape-to-close behavior, improving the shopping experience for customers viewing product images.
Original PR description
Versions -------- - saas-18.2+ Steps ----- 1. Have a product with extra eCommerce images; 2. enable zoom-on-click on the product page; 3. add a recently-sold product carousel to the page; 4. click on…
Versions -------- - saas-18.2+ Steps ----- 1. Have a product with extra eCommerce images; 2. enable zoom-on-click on the product page; 3. add a recently-sold product carousel to the page; 4. click on an image to zoom in; 5. attempt to use arrow keys to navigate or using esc to exit zoom. Issue ----- Keys don't appear to do anything. Cause ----- Commit b8d0ab4275b24 set `oe_website_sale` as `snippet_classes` on the `s_dynamic_snippet_products` snippet, in order to enable the `websiteSaleTracking` widget, which uses this class as `selector`. Issue is this class also gets used as the selector by the `WebsiteSale` widget which adds zoom-on-click event listeners. As there are two elements with the `oe_website_sale` class now, this widget gets called twice, and because the query selector selects all image elements on the sale page, images get duplicate event listeners assigned to them. Consequently, clicking on an image opens two lightboxes, and the keys only impact the one hidden behind the other, making it appear as if key presses aren't doing anything. Solution -------- Instead of querying all images on the sale page in each call of the widget, only query for images in `this.el`. opw-4908881 Forward-Port-Of: odoo/odoo#223231
Sales order line prices now refresh correctly when a quantity change triggers a different pricelist rule. This prevents undercharging or overcharging caused by rounding differences in price comparisons, especially for volume-based pricing.
Original PR description
> [!Note] > This PR unreverts fc6b9ed22728 with a minor modification to ensure one `res.currency` record to compare amounts. **Steps to reproduce**: 1. Install the `sale` module. 2. Enable…
> [!Note] > This PR unreverts fc6b9ed22728 with a minor modification to ensure one `res.currency` record to compare amounts. **Steps to reproduce**: 1. Install the `sale` module. 2. Enable `Pricelists` under `Settings > Sales > Pricing > Pricelists`. 3. Create two pricelists: - Pricelist A with two fixed-price rules: - 0.75 for quantity ≥ 0 - 0.50 for quantity ≥ 1000 - Pricelist B with a -10% discount applied to Pricelist A. 4. Create a Sales Order using Pricelist B. 5. Add a product to the order line. 6. Increase the quantity to 1000. **Observed behavior**: - The unit price does not update according to the pricelist rule for quantity ≥ 1000. - If you switch the pricelist to another and then back again, the `Update prices` button appears and correctly updates the price. **Root cause**: - The price is not recomputed when the quantity changes because the `price_unit` is not updated because it does not match the `technical_price_unit`. - Since e1b22257a714, `price_unit` is rounded (2 decimals), but `technical_price_unit` is not. This causes a mismatch in comparison logic due to rounding differences. **Solution**: - Replace direct float comparison with `currency_id.compare_amounts()` to ensure proper comparison with rounding precision. opw-4944644 Forward-Port-Of: odoo/odoo#223548
This fixes an issue where animated website content could extend beyond the mobile screen and let visitors scroll sideways. Pages now stay within the expected screen width during scroll animations, improving the mobile browsing experience.
Original PR description
Scenario: - add a 2 columns content widget - set the right column text to "On Scroll" animation with "Slide" effect and "From Right" direction so the content may be out of the page - save and reload…
Scenario: - add a 2 columns content widget - set the right column text to "On Scroll" animation with "Slide" effect and "From Right" direction so the content may be out of the page - save and reload the page on mobile - scroll down get in middle of animation with some content out of page - try to scroll to the right Result: we can scroll to the right and see the overflowing animated content outside of the expected page limit. History: During an animation, a fix prevent the horizontal scrollbar by setting "overflow-x: hidden" (or crop depending on version) on a given element: - in odoo/design-themes@51abb093c77993363b170b12be134c95b3009895 (14.0: 2021) it was added to $().getScrollingElement() - in 189a7c96e6e26825dc05c0c6466576fe63aa091e (18.0: 2022) the main page scroll was moved from #wrapwrap to html - in fece9cb85761e6cb3fe3642f947661464402363b (18.0: 2024) the "overflow-x: hidden" was moved to the body element Cause: the "overflow-x: hidden" is ignored by mobile browser on html and body tags ([example of report]), so in 18.0 and over the possible horizontal scrollbar caused by an animation is not hidden. Fix: apply the "overflow-x: clip/hidden" on #wrapwrap element. [example of report]: https://stackoverflow.com/questions/14270084 opw-4575726 Forward-Port-Of: odoo/odoo#213802
Point of Sale product search now returns all relevant matches when a search term matches both a product variant and a separate product. This helps cashiers find the right item faster and avoids hiding valid products from search results.
Original PR description
If you have a product template with variant, ex: Telephone case, variant name : Iphone 15 SE, Samsung Galaxy, Nokia 1999 When doing a search with more then 2 letters you will only find the Telephone…
If you have a product template with variant, ex: Telephone case, variant name : Iphone 15 SE, Samsung Galaxy, Nokia 1999 When doing a search with more then 2 letters you will only find the Telephone case, searh exemple: Iphone 15 SE, Galaxy, Samsung. ** Step to reproduce ** - Create a product called "Telephone case" and add a variant named samsung galaxy S24 ultra - Create a product called "Samsung galaxy" - Enable both products for point of sale - Go to the point of sale app and open a shop that sells both of those products. - Do a search for the product Samsung galaxy - Issue : Only the product "Telephone case" will appear. ** Cause of the issue ** Doing a search will call getProductsBySearchWord: https://github.com/odoo/odoo/blob/5a1fff2cc61bd8676049879039defa3fb2a3f13d/addons/point_of_sale/static/src/app/services/pos_store.js#L2401-L2407 During the product.exactMatch(words) we will get a hit since we will have a name of the product variant: https://github.com/odoo/odoo/blob/5a1fff2cc61bd8676049879039defa3fb2a3f13d/addons/point_of_sale/static/src/app/models/product_template.js#L265-L278 And the call for the function will finish there since the searchword lenght > 2 and we have a hit. ** Origin of the issue ** The variant search was implemented in "exactMatch()" which block more search if it find a result. https://github.com/odoo/odoo/commit/05abd586d7adcceed3dae0943526e6357b28dbb4 opw-4864976 Forward-Port-Of: odoo/odoo#217484
The Job Position form now correctly shows available recruiters and interviewers even when no company is selected. This prevents empty selection lists and helps hiring teams assign responsible users without first choosing a company.
Original PR description
In the Job Position form, the 'Recruiter' and 'Interviewers' fields were empty when no company was selected. This was due to the static domain using 'company_id' directly without taking into consideration that company_id can be False. This fix introduces computed domain fields (, ) that dynamically adapt based on the selected company. If a company is set, users belonging to that company are shown. If not, only internal users are listed regardless their companies. Related task: 4926154. 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#224114 Forward-Port-Of: odoo/odoo#217884
This update makes an internal privacy lookup test more robust when additional localization modules are installed. It prevents false test failures without changing how the product works for users.
Original PR description
The test `test_wizard_indirect_reference` failed when modules like `l10n_gt_edi` were installed. This was due to additional Many2one fields (e.g., `l10n_gt_edi_consignatory_partner` on `account.move`) referencing `res.partner`, which were picked up by the privacy lookup wizard. This commit updates the test to avoid assuming a fixed number of reference lines and instead asserts the presence of the expected ones (the partner and the company). No change in functional behavior. RB-[230449](https://runbot.odoo.com/odoo/error/230449) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#222105
Users can now duplicate several appointment bookings at once without triggering an error. This makes managing repeated or copied bookings smoother and avoids interruptions in appointment workflows.
Original PR description
This error occurs when users attempt to duplicate multiple bookings within an appointment. Steps to reproduce: --- - Install `appointment` module - Select an appointment (ie. Dental Care) - Click on New and make 2 new bookings - Go to list view > Select both records > Duplicate Traceback: --- `ValueError: Expected singleton: calendar.event(5, 8)` This occurred because we called `default_get` with a non-empty recordset at the beginning of the `create` method. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#224188
Creating a child menu in Website no longer mistakenly turns it into a main menu. This keeps website navigation organized as intended and avoids manual cleanup after saving menu changes.
Original PR description
Steps to reproduce: - Have a database with only the website module installed --> Turn on the developer mode. - Go to Configuration ---> Menus - Create a Menu (Parent) and a child menu (Child) in that. - Upon saving, the following behaviour is observed: the child menu is converted to the main menu. Issue: Before this commit, when we create a child menu for single website then it takes the website.menu_id.id as the parent_id. Which is wrong because it gives the parent_id of the websites' top menu. Solution: With this commit, we have passed the correct parent_id from vals to solve this issue. task-4231974 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#222615
This update prevents Turkish E-Archive invoices from being rejected by Nilvera when no tax office is configured by removing extra invoice data from the submitted XML. It also corrects the displayed country label for the Turkish invoice format, reducing confusion for users.
Original PR description
### Description of the issue/feature this PR addresses: Nilvera rejects E-Archive invoices if extra fields are present under `PartyTaxScheme` when no tax office is set. In addition, the…
### Description of the issue/feature this PR addresses:
Nilvera rejects E-Archive invoices if extra fields are present under
`PartyTaxScheme` when no tax office is set. In addition, the
`invoice_edi_format` selection name for TR was incorrect.
### Current behavior before PR:
When generating E-Archive invoices, Odoo includes extra nodes such as
`registration_address_vals`, `registration_name`, and `company_id`
under the `PartyTaxScheme` element. Nilvera’s validation fails if
these nodes are present while no tax office is configured. At the same
time, the TR value for `invoice_edi_format` was using the wrong name,
which caused inconsistencies. These issues result in blocking
validation errors on Nilvera’s side and prevent the invoices from
being accepted.
### Desired behavior after PR is merged:
After this fix, the `PartyTaxScheme` is cleaned up only to include the
expected XML structure:
```xml
<cac:PartyTaxScheme>
<cac:TaxScheme>
<cbc:Name>TAX OFFICE NAME</cbc:Name>
</cac:TaxScheme>
</cac:PartyTaxScheme>
```
And the invoice_edi_format selection name for TR will be corrected
to display Türkiye rather than Turkyie.
task-5017223
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#223770This fixes a website editor issue that could cause an error when users pasted multiple content blocks inside inline text areas. It improves editing reliability and adds test coverage for this hard-to-reproduce scenario.
Original PR description
Problem: When pasting two blocks inside an inline element, a traceback occurs. Cause: During `insert`, when `insertBefore` is `true` and `isEmptyBlock(right)` after `splitElement`, `currentNode` is set to `right`. But `right` may already have been deleted, leading to an invalid reference. Solution: Delete `right` if empty, but do not set `currentNode` to `right` in that case. Steps to reproduce: It is tricky to reproduce manually (you must copy two blocks and paste them in an inline element). A test has been added to cover the case. opw-4972695 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#224029 Forward-Port-Of: odoo/odoo#223229
This update fixes an unstable automated test for Point of Sale product and pricelist loading. It helps ensure quality checks run consistently, reducing false failures during development without changing the customer-facing Point of Sale experience.
Original PR description
Use expectUnloadPage key in tour to fix undeterministic behavior. 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#224176
The employee public form now uses the correct employee record when displaying organization chart information. This helps avoid showing incorrect or missing employee details in the HR organization chart view.
Original PR description
This commit retrieves the correct employee ID in the Employee Public Form view. task-5039701 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Website editor blocks with both gradient and image backgrounds now handle repeat patterns correctly. This prevents console errors and keeps gradients from repeating unexpectedly when users change image settings, remove images, or switch to parallax.
Original PR description
*=website Target: 17.0 to saas-18.3 Issue: This issue applies to any block where multiple backgrounds are present (gradient + image). Steps to Reproduce: 1. Drop a masonry snippet onto the page. 2.…
*=website Target: 17.0 to saas-18.3 Issue: This issue applies to any block where multiple backgrounds are present (gradient + image). Steps to Reproduce: 1. Drop a masonry snippet onto the page. 2. Select a block and change the background color to the gradient. 3. Add background image. 3. Change the image position from "Cover" to "Repeat Pattern." 4. Observe the traceback in the console. Reason: The issue occurred due to incorrect parsing of CSS background values when multiple background layers were applied (e.g., a gradient + image). When both are set, the element ends up with multiple background-related properties. Previously, In setValue method, Inside MultiUserValueWidget when value = "100px, 100px", the resulting values array was ['100px,', '100px'], which included an extra comma. This has now been corrected to properly handle such cases. Other edge cases fixed: 1. Gradient was repeating along with the image. 2. Switching to parallax after repeat-pattern causes gradient to repeat. 3. Removing image kept repeat class, causing gradient to repeat. Fix Summary: 1. We updated `selectStyle` and _computeWidgetState to correctly handle multi-layer background-size and repeat styles. In selectStyle, we set the height and width values from options and apply them only to the image layer (not gradient), keeping the gradient layer unchanged. In `_computeWidgetState`, we fetch the background-size from the target and, if multiple layers are present, return only the first one (image layer), since height and width options apply only to that. Now, setValue receives only single-layer values like `100px 50px`, ensuring correct behavior. Set background-size 'cover' to gradient which ensures only the image repeats while the gradient remains fixed. 2. Remove `o_bg_img_opt_repeat` and reset background-size when - Image is removed. - Switching to parallax. task-4577864 Forward-Port-Of: odoo/odoo#207757
An unavailable Vimeo video used in the website editor has been replaced with a working one. This keeps the related dialog experience intact for users and avoids broken video content in the website-building flow.
Original PR description
This commit replaces an unavailable vimeo video with a new one to maintain the dialog structure. This commit is a backport of [1], which was merged only into master, but is also necessary in the stable versions. [1]: https://github.com/odoo/odoo/commit/ad6f8716ea7e886b6dd3b657309d7cc51e5eb50f Forward-Port-Of: odoo/odoo#224054
Point of Sale receipts now consistently display the selected customer when loyalty features are used. This avoids missing or repeated customer information on receipts, improving clarity for both staff and customers.
Original PR description
**Steps to reproduce:** - With pos_loyalty installed, launch the PoS - Select a customer and make a purchase - This needs to create a new loyalty coupon (new customer or program) - The customer name…
**Steps to reproduce:** - With pos_loyalty installed, launch the PoS - Select a customer and make a purchase - This needs to create a new loyalty coupon (new customer or program) - The customer name is not displayed on the receipt **Problem:** When a customer is set for an order in pos_loyalty, it should appear on the receipt. Before this commit, sometimes it was not displayed. **Why the fix:** The customer was not displayed everytime because it was displayed inside this if statement, https://github.com/odoo/odoo/blob/033c7a63bdf3d10d9d2c5084959fd34f52011bea/addons/pos_loyalty/static/src/app/screens/receipt_screen/order_receipt/order_receipt.xml#L6 So the customer would only be displayed if there was a new coupon being created, and not if we were updating a new one. This behavior was introduced in a REF in 18.3 461359e The behavior does not make sense as it displays the customer for each new coupon we have in this order, so it might be displayed multiple times. With this commit, we display the customer all the time, as it is weird to only display it if a new coupon is created or if loyalty logic is involved, as said here 879b415 opw-4929076 opw-4976885
This update improves how automated browser tests respond when a browser connection unexpectedly closes. Instead of waiting for timeouts and reporting a secondary cleanup problem, the test now fails sooner with a clearer indication of the original connection issue, helping teams investigate test failures more efficiently.
Original PR description
As far as I can tell this can occur if the ws connection gets closed while we're in a `recv`: in that case `recv` will mark the connection as closed (`connected=False` and `sock=None`) and raise…
As far as I can tell this can occur if the ws connection gets closed while we're in a `recv`: in that case `recv` will mark the connection as closed (`connected=False` and `sock=None`) and raise `WebSocketConnectionClosedException`, then any attempt to `send` will fail with `WebSocketConnectionClosedException`. Here this likely is an issue because in `_receive` `WebSocketConnectionClosedException` goes through the generic exception handler, which sees that: - it's not a `ConnectionResetError` - the result is not set - and the ws is not connected So `_receive` just cancels the result and `return`s, and when whatever's waiting on a future finally times out it tries to cleanly shut down and hits a connection that's already closed. Handle a connection closed in that context more properly: - unset `ws` so we don't try to clean it up, as we know it's closed - set the result as being in error - cancel every future in order to immediately go to the tour failure step rather than wait for timeouts Note that this will not really *fix* any error per se, because every time this happens it means the browser abruptly closed the WS connection (possibly straight up died), so this should mostly properly attribute the error so we can investigate it. https://runbot.odoo.com/odoo/error/229793 Forward-Port-Of: odoo/odoo#224023
Dutch electronic invoices exported in the NLCIUS format now use the correct identifier type when the company Peppol address is 20 characters long. This helps ensure Peppol XML files meet Dutch invoicing requirements and reduces the risk of rejected or non-compliant invoice exchanges.
Original PR description
## Short functional explanation of the error For Dutch companies, when downloading the NLCIUS file of an invoice, the schemeID of the companyID in the XML isn't correct. ## Reproduction Steps 1. Make…
## Short functional explanation of the error For Dutch companies, when downloading the NLCIUS file of an invoice, the schemeID of the companyID in the XML isn't correct. ## Reproduction Steps 1. Make sure you use a dutch company: in apps, download the 'l10n_nl' and 'account_edi_ubl_cii' modules. Then, click on your company and select the NL Company. 2. Go to settings and type Peppol. Under Customer Invoices, check the Peppo format. Then, setup a Peppol Endpoint. Hit save. 3. Go to the Accounting app and click on the customers tab, then invoices. Click on new. 4. Select a customer. Make sure that the customer is from the Netherlands, has an email address, and in the accounting tab, an account number. Still in the accounting tab, under Electronic Invoicing, set the format at NLCIUS, set a Peppol e-address and a Peppol Endpoint that is 20 characters long. 5. Add a product, click confirm then Send & Print. Make sure that NLCIUS is well checked and click again Send & Print. 6. In the bottom right corner of the page, just under the Amount Due, there's a paper clip icon. Click on it and you'll see the XML. Download it. ### Expected behavior As the CompanyID is 20 characters long, the schemeID next to the CompanyID should have the value of 0190. ### Unexpected behavior If you scroll a bit, you'll see that the SchemeID next to the CompanyID has a number of 0106. ## Origin of the issue In the code, the SchemeID will have a value of 0190 if the CompanyID is 9 characters long. __ opw-4943262 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#219771 Forward-Port-Of: odoo/odoo#219424
The list view now shows a plus sign when a bulk selection may include more records than the displayed limit, such as "10,000+". This helps users understand the true scope of bulk actions and reduces the risk of applying actions to more records than intended.
Original PR description
Previously, when selection was made in domain mode, the system used the global `web.active_ids_limit` config parameter instead of the actual number of records selected (based on session limit). This caused unintended behavior. For example: - Open a list view of a model with 25,000 records. - The pager limit is initially set to 10,000. - When selecting all 10,000 visible records and performing an action (e.g., archive), the system would incorrectly apply the action to 20,000 records (based on the default value of `web.active_ids_limit`), not the selected 10,000. Forward-Port-Of: odoo/odoo#219639 Forward-Port-Of: odoo/odoo#217094
This fix ensures standard employee and department views remain available after a user customizes Employees with Studio. It prevents useful view options like calendar, activity, kanban, and pivot from disappearing, keeping HR navigation consistent.
Original PR description
**Steps to reproduce:** - Install `hr` and `web_studio`. - Go to Employees → click Studio icon. - Views → activate Calendar view. **Observation:** - Existing views (activity, kanban, pivot, etc.) disappear from the view types. **Issue:** - After commit https://github.com/odoo/odoo/pull/160280/commits/e67ed24320c555c0cc63d59aa4921267e10a472d, view_mode in actions was removed, so only default (list, form) and Studio-added views remain. **Solution:** - Add view_mode to the action to preserve standard views after customisation. opw-4967654 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#222485
The New Zealand tax report now counts zero-rated sales only once in the Total Sales and Income section. This prevents inflated totals for companies issuing invoices with 0% tax, improving reporting accuracy.
Original PR description
**Steps to reproduce:** - Install Accounting and l10n_nz - Switch to a New Zeland company (e.g. NZ Company) - Create an invoice with a 0% tax - Go to "Accounting / Reporting / Statement Reports / Tax Report" - Select "Tax Report (NZ)" and the period of the invoice **Issue:** The amount of the invoice with the 0% tax is included twice in `Total Sales and Income` section. Cause: The formula for `Total Sales and Income` is `BOX5 + BOX6 + BOX9`. However, the value of BOX6 is already included in BOX5 as seen in its description `[BOX 6] Zero-rated supplies in Box 5`. opw-3883198 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#224095 Forward-Port-Of: odoo/odoo#171595
The Estonian tax report XML export now combines the two 22% VAT reporting lines into a single transaction entry. This prevents duplicate transaction22 lines while preserving the correct total amount for reporting across the tax rate transition.
Original PR description
Before this pr: - There are two transactions22 entries were introduced because we are having two report lines for 22% tax computation, one with '1' tag, which is valid till 31 June 2025, and another one with '1_2' tag, which is valid from 1 July 2025. After this pr: - The balance computation during export to XML is now adding the balance of both line '1' and '1_2' into line '1' only. - So now we do not need an extra transactions22 entry in the XML tax report. - We are keeping both report lines for now, but the XML report will have only one entry with the total sum of balances in both report lines Related PR: https://github.com/odoo/enterprise/pull/91364 Forward-Port-Of: odoo/enterprise#93197 Forward-Port-Of: odoo/enterprise#92662
Point of sale receipt printing now uses the receipt printer configured for the POS instead of accidentally selecting another connected printer. This prevents customer receipts from being sent to kitchen or preparation printers when multiple IoT printers are available.
Original PR description
Steps to reproduce: 1. Configure a POS with a receipt printer and a preparation printer. 2. Ensure that the preparation printer has a higher ID than the receipt printer (you can force this by deleting it and letting the IoT redetect it.) 3. Try to print a receipt. EXPECTED: The receipt is printed on the configured receipt printer. ACTUAL: The receipt is printed on the prepation printer. This was caused by the hardware proxy code assuming that there will only be 1 printer `iot.device` model loaded, and that it will correspond to the receipt printer. The fix is to ensure the hardware proxy only chooses the printer that is configured as the receipt printer.
The Spanish SME balance sheet no longer counts certain current financial investment accounts twice. This ensures the affected report line shows accurate totals, helping businesses rely on the balance sheet for correct financial reporting.
Original PR description
**Issue**: * Amounts were exactly doubled in 'Current financial investments' (line 12500) in the Spanish Balance Sheet - SMEs report as account codes 551 and 5525 were incorrectly included in…
**Issue**: * Amounts were exactly doubled in 'Current financial investments' (line 12500) in the Spanish Balance Sheet - SMEs report as account codes 551 and 5525 were incorrectly included in balance_pymes_line_12500_sub_balances formula **Root Cause**: * Account codes 551 and 5525 were included in BOTH: 1. Line 12500 sub_balances (unfiltered account_codes expression) 2. Line 12500 sub_debits (domain expression with sum_if_pos filter) * This double-counting within the same line caused financial investment amounts to appear twice in the balance sheet **How to Reproduce**: 1. Create Spanish company with 'es_pymes' chart of accounts 2. Post journal entries to accounts 551 or 5525 (current financial investments) 3. Generate 'Balance Sheet - SMEs (ES)' report 4. Observe amounts in line 'V. Current financial investments' are exactly doubled compared to account balances 5. Click on the doubled amount - shows underlying transactions sum to half the amount **Fix**: * Removed account codes 551 and 5525 from balance_pymes_line_12500_sub_balances * These accounts are properly handled by the sub_debits expression * Each account is now counted only once within the line opw-4983300
This update fixes an automated guide used in the field service reporting area so it targets the correct action button. This helps keep product validation stable and reduces the risk of false failures during release checks.
Original PR description
In this commit, we fix the tour industry_fsm_tour by removing "body:not(.modal-open) nav.o_main_navbar" (this trigger is always true) from trigger to let only button[name="action_generate_new_template"]. Forward-Port-Of: odoo/enterprise#93169 Forward-Port-Of: odoo/enterprise#91771
This fixes how Swiss payroll accounting handles negative payslip lines for account 2050. It ensures amounts are posted to the correct side of the accounts, helping keep payroll accounting entries accurate.
Original PR description
…r 2050 Invert accounts for negative payslip line Forward-Port-Of: odoo/enterprise#93074
This fix prevents an error when refunding Point of Sale orders that include a global discount in the Mexican localization. Businesses can now process these refunds normally, reducing disruption for cashiers and back-office teams.
Original PR description
**Steps to reproduce:** ``` - Install PoS mexican localization - Activate PoS setting Global Discounts - Navigate to PoS and create an order with a discount line - Go to back end and try to refund this order - Notice an error pops-up ``` **Cause:** Bad fw-port In the original commit `json.lines` is an array and accessing index "2" of the array was not a problem (https://github.com/odoo/enterprise/pull/84331/files#diff-63a117ed6751a8aae4fcb11d867177f5d0feb78cc1e2f3461f425babc10b5016R15) From 18.0 we are accessing the record `currentOrder` itself and `currentOrder.lines` is an PosOrderline object which doesn't have a property named "2". **Fix:** Remove index access `[2]` opw-4899501 Forward-Port-Of: odoo/enterprise#93042 Forward-Port-Of: odoo/enterprise#90410
Expenses can now be saved when the selected employee is not linked to a user account. This prevents a save error in expense document processing and helps teams record expenses for all employees reliably.
Original PR description
Currently, an error occurs when creating an expense for an employee that is not linked to a user. **Steps to reproduce:** - Install the `hr_expense` module. - Create a new employee `test` (ensure…
Currently, an error occurs when creating an expense for an employee that is not linked to a user. **Steps to reproduce:** - Install the `hr_expense` module. - Create a new employee `test` (ensure this employee is not linked to a user). - Go to Expenses > upload [1] and open it. - Set the `Employee` to `test` and click `Save` (it may take up to 5 seconds). (See [2] for Steps to reproduce) **Error:** `AttributeError: 'hr.expense' object has no attribute 'uid'` **Root Cause:** At [3], the code incorrectly uses `self.uid` instead of `self.env.uid`. Since `hr.expense` records do not have a `uid` field, this leads to an `error`. **Fix:** This commit ensures that expenses can be saved correctly, even when the selected employee is not linked to a user. [1]: https://drive.google.com/file/d/1Ew2B_zMFCQbw-6nwfKctJPy1W4y2ZaIb/view?usp=sharing [2]: https://drive.google.com/file/d/1qP-9L_emaox3l9JyoNVYjqj1Ht8bJSmZ/view?usp=sharing [3]: https://github.com/odoo/enterprise/blob/804f263b80cb78884e3f246bcc7fa7ea4e0cf73a/hr_expense_extract/models/hr_expense.py#L90 sentry-6834628909
This update adds a test to confirm bank statement reconciliation works correctly when no payment account is configured. It helps prevent the same accounting issue from returning and improves reliability for affected finance workflows.
Original PR description
Add a test to previous fix: https://github.com/odoo/enterprise/commit/582e3ee22cba404ff38782534e76569bc93a44ef opw-5039931 opw-5039807
Brazilian invoices using Avalara no longer add certain exemption taxes as extra journal lines when Avalara marks them as not accounting-relevant. This prevents invoice totals from being overstated while still keeping a record of the ignored tax in the document chatter.
Original PR description
### Steps to reproduce: - Install l10n_br_edi, switch to Brazilian company - Set up Avalara - Create an invoice with the tax "ICMS Exemption Incl." which is included in price - Click "Generate taxes"…
### Steps to reproduce:
- Install l10n_br_edi, switch to Brazilian company
- Set up Avalara
- Create an invoice with the tax "ICMS Exemption Incl." which is included in price
- Click "Generate taxes" to compute the taxes with Avalara
- In "Journal Items" we can see a line for "ICMS Exemption Incl.", its value appear as excluded
### Cause:
The result from Avalara included a value for this tax:
```
'tax': 1.44,
'taxImpact': {
'accounting': 'none',
'impactOnFinalPrice': 'Included',
'impactOnNetAmount': 'Included',
},
```
But the untaxed amount is computed without this tax. Odoo keeps the untaxed amount from the response and add a line for the tax. As a result the tax is added to the amounts like an excluded tax would.
### Solution:
In the response from Avalara, we don't want to create a line for the tax `icmsDeson` when there is `'accounting': 'none'`.
We also log this tax in the chatter to keep a trace of it.
opw-4964315
Forward-Port-Of: odoo/enterprise#91940Bank reconciliation now once again matches outstanding payments even when the imported transaction memo only contains part of the original payment reference. This helps reduce missed matches for payments imported through providers such as Stripe while preserving compatibility with previous behavior.
Original PR description
Commit 4c23de148eb3689842a48df81a5ced772c214861 introduced another query to look for outstanding payments to match in the bank reco widget, aiming to reduce the number of wrong matches found by the algorithm. Doing so, limiting the match between account.payment initiated in odoo and their matching bank transaction imported (through stripe for example), on an exact match of the memo seemed like a good idea. But for obscure reasons, the memo we're sending is not guaranteed to be found back, depending on the payment provider and the import flow. Also, for backward compatibility, it now appears important to allow the match to be on a part of the memo, like we used to do. So we're back on a solution that splits the memo using ' - '.
This fix prevents an error when a user completes a scheduled activity linked to an approval rule that has since been deleted. It helps keep the Sales and Studio workflow running smoothly instead of blocking users with a database error.
Original PR description
An error occurs when a user attempts to mark a scheduled activity as done after the associated approval rule has been deleted. **Steps to Reproduce:** 1) Install Sales and Web Studio modules. 2) Log…
An error occurs when a user attempts to mark a scheduled activity as done after the associated approval rule has been deleted. **Steps to Reproduce:** 1) Install Sales and Web Studio modules. 2) Log in as Admin and use Studio to add an approval rule to the Sale Order’s Preview button. >- Set Allowed Group to Access Rights. >- Set Responsible User to Mitchell Admin. 3) In the Incognito Tab, login as Demo, open the same sale order and click on preview to create activity in chatter. 4) Delete the Approval Rule in the original tab. 5) Switch back to Demo and click Mark Done under Planned Activity in chatter. **Error:** `SyntaxError: syntax error at or near ')'` `LINE 1: SELECT id FROM studio_approval_rule WHERE id IN () FOR UPDAT. ^` **Root Cause:** The error occurs because the SQL query at [1] includes an empty tuple of rule IDs `(all_rule_ids)`. An empty `IN ()` clause in SQL results in a syntax error. [1]- https://github.com/odoo/enterprise/blob/7ea45724e7689a0df11d20ace9c562788f5d19e3/web_studio/models/studio_approval.py#L366 **Solution:** This commit avoids the error by ensuring that the SQL query only runs when `all_rule_ids` is not empty. sentry-6306636466 Forward-Port-Of: odoo/enterprise#86982