Daily updates from Odoo
Wednesday, May 27, 2026
51 changes · saas-19.2
Resolved issues and error corrections
This update replaces instances of 'VAT' with 'Tax ID' across key Odoo modules. This change ensures greater clarity and understanding for users worldwide, particularly in regions where 'VAT' is not commonly used, leading to more accurate reporting and data management.
Original PR description
Similar changes were made before but were incomplete [1]. In the US and many other countries the term VAT is not understood. Use the universally understood Tax ID instead. [1] https://github.com/odoo/odoo/pull/239362 task-6231891
This update replaces the term 'VAT' with 'Tax ID' across Odoo Enterprise, ensuring clarity and accuracy for users worldwide. This change addresses a previous incomplete effort to align with international tax reporting standards, particularly in the US where 'VAT' is not commonly understood. It improves the user experience and data integrity for international clients.
Original PR description
Similar changes were made before but were incomplete [1]. In the US and many other countries the term VAT is not understood. Use the universally understood Tax ID instead. [1] https://github.com/odoo/odoo/pull/239362 task-6231891
This update resolves a problem preventing the correct loading of icon assets (like .woff2 files). The fix ensures consistent handling of asset versions, preventing errors and improving the display of icons on the website. This improves the user experience by ensuring all icons are correctly rendered.
Original PR description
Currently, an exception is raised while loading icon content assets such as `.woff` or `.woff2`, due to a mismatch between the requested asset version and the latest available version. Steps to…
Currently, an exception is raised while loading icon content assets such as `.woff` or `.woff2`, due to a mismatch between the requested asset version and the latest available version. Steps to produce: - Install website - Open page `/web/assets/1/6a783c3/web.odoo_ui_icons.min.woff2` Error: `UnboundLocalError: cannot access local variable 'assets' where it is not associated with a value` This issue occurs because the code at [1] compares `binary.extension` with `asset_type`, causing the condition to fail because `binary.extension` contains values such as `woff` or `woff2`, while `asset_type` is set to `'binary'`. The root cause is that `asset_type` with value `'binary'` is being passed as a parameter to the `bundle.get_link` method (see [2]). The `asset_type` value comes from the `_parse_bundle_name` method (see [3]), where it is set to `'binary'` whenever the file extension belongs to `BINARY_EXTENSIONS`, such as `woff` or `woff2` (see [4]). This commit fixes the inconsistency between `bundle.get_version()` and `bundle.get_link()` when `binary` is `True`. Currently, `bundle.get_version()` used `extension if binary else asset_type`, while `bundle.get_link()` always received `asset_type`. This could lead to an incorrect redirect when handling binary assets. The fix normalizes the value by updating `asset_type` beforehand and reusing it consistently in both `bundle.get_version()` and `bundle.get_link()`. This also improves readability by removing the inline conditional expression. [1]: https://github.com/odoo/odoo/blob/8a2e001cffd381a89ab192f2e391ccc0843108c4/odoo/addons/base/models/assetsbundle.py#L166 [2]: https://github.com/odoo/odoo/blob/8a2e001cffd381a89ab192f2e391ccc0843108c4/addons/web/controllers/binary.py#L146 [3]: https://github.com/odoo/odoo/blob/8a2e001cffd381a89ab192f2e391ccc0843108c4/odoo/addons/base/models/ir_asset.py#L93-L94 [4]: https://github.com/odoo/odoo/blob/8a2e001cffd381a89ab192f2e391ccc0843108c4/odoo/tools/constants.py#L6-L7 Sentry-7441025709 Forward-Port-Of: odoo/odoo#263506
This update resolves an issue where creating a new bank account with a blank or empty proxy value (CPF/CNPJ or Random Key) would cause an error. The fix ensures that the system correctly handles these cases, preventing the creation process from failing and improving data integrity. This ensures users can consistently create bank accounts within the BR module.
Original PR description
Creating a bank account with a falsy proxy value generates a traceback. Steps to reproduce the error: - Install ``l10n_br`` module with demo data - Switch to BR Company - Go to Contacts >…
Creating a bank account with a falsy proxy value generates a traceback. Steps to reproduce the error: - Install ``l10n_br`` module with demo data - Switch to BR Company - Go to Contacts > Configuration > Bank Accounts > Create a new bank account > Add any value as Account Number > Account Holder: BR Company > Proxy Type: CPF/CNPJ(BR) or Random Key (BR) > Save Traceback: ```py InvalidFormat: The number has an invalid format. ``` ```py TypeError: 'bool' object is not iterable ``` https://github.com/odoo/odoo/blob/132f042ca14012877f608783b57a0ca9c4e565f3/addons/l10n_br/models/res_partner_bank.py#L38-L45 For ``CPF/CNPJ`` validation, calling ``check_vat_br`` with a falsy proxy value raises a traceback. https://github.com/odoo/odoo/blob/132f042ca14012877f608783b57a0ca9c4e565f3/addons/l10n_br/models/res_partner_bank.py#L56-L61 For ``Random Key`` validation, ``re.fullmatch`` expects a string value, but receives ``False``, leading to a traceback. sentry-7488238698 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266243 Forward-Port-Of: odoo/odoo#264995
This update fixes an issue where the Table of Contents in the HTML editor wouldn't update after editing headings. Specifically, deleting a heading caused the ToC to stop refreshing. The fix ensures the ToC always updates correctly, regardless of edits made to the content.
Original PR description
Steps to Reproduce : - Go to To-Do → Create New and add a Table of Content block - Type text → in new line create /h1 → it appears in ToC - Place cursor before /h1 and press Backspace → it merges with paragraph Description of the issue: Table of Content block does not update accordingly Cause: After the heading is merged with the previous paragraph, `delayedUpdateTableOfContents` is triggered, but at that time no heading is available in the editable area. As a result, instead of updating the Table of Contents, it returns without making any changes. Solution: If Table of content already contains heading, then update regardless of whether editable contains heading elements or not. task-6150579 Forward-Port-Of: odoo/odoo#264161 Forward-Port-Of: odoo/odoo#261675
This update resolves a bug in the HTML Editor where resizing the table would cause a crash when a table was deleted. The fix restricts resizing to the primary mouse button and prevents the resize logic from running when there's no valid target, ensuring a smoother and more stable user experience.
Original PR description
#### Description of the issue this PR addresses: - Table resize listeners are not cleaned when the table is removed while resizing - Next mousemove runs resize logic with a null target and throws traceback #### Desired behavior after PR is merged: - Restrict resize start to primary mouse button only - Prevent resize logic execution on null targets #### Steps to reproduce: - Open the todo app - Insert a table and select whole table - Move cursor on a table cell border to see resize cursor - Right click and choose Cut from browser context menu - Move the mouse again - Resize logic crashes with null target traceback task-6212279 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266274 Forward-Port-Of: odoo/odoo#264065
This update resolves an error that occurred when users checked the details of eMPF contribution reports. The fix ensures that the system prompts users to correctly identify the employee before generating the report, preventing a technical error. This improves report accuracy and usability.
Original PR description
Currently, an error occurs when the user checks the report line errors. **Steps to Reproduce:** - Install the `l10n_hk_hr_payroll_empf` module with demo data. - Switch to the `Hong Kong` company. -…
Currently, an error occurs when the user checks the report line errors. **Steps to Reproduce:** - Install the `l10n_hk_hr_payroll_empf` module with demo data. - Switch to the `Hong Kong` company. - Go to `Payroll` > `Reporting` > `Hong Kong` > `eMPF Contributions`. - Create a record by setting the `Scheme` and adding a `contribution line`. - Ensure that the employee and payslip fields are empty in the contribution line. - Click on `Validate`, then click on the `error icon` on the report line. `ValueError: Expected singleton: hr.version()` This error occurs when the user manually adds a line and checks the errors on it.. The system attempts to open the employee record from the version [1], but the version is not set [2] on the line because there is no employee. And it raise the error [3]. This commit ensures that when checking errors, if the version is not set on the line, a UserError is raised, prompting the user to set the employee on the line. It also corrects a typo in the status message. [1]- https://github.com/odoo/enterprise/blob/7889b2b0b3d13b32e6e36e616e20379d8c8f8812/l10n_hk_hr_payroll_empf/model/l10n_hk_empf_contribution_report_line.py#L219 [2]- https://github.com/odoo/enterprise/blob/7889b2b0b3d13b32e6e36e616e20379d8c8f8812/l10n_hk_hr_payroll_empf/model/l10n_hk_empf_contribution_report_line.py#L142-L156 [3]: https://github.com/odoo/odoo/blob/98855c6b70df24500babe6027109aa9e17431ec1/addons/hr/models/hr_version.py#L609-L611 Forward-Port-Of: odoo/enterprise#116607
This update fixes an issue where the template name wasn't correctly displayed after selecting a template using the 'Search More' feature in the employee form. The fix ensures that the correct template label is shown, improving the user experience when loading templates. This prevents confusion and ensures accurate template selection.
Original PR description
Version: - saas-19.1 Steps to reproduce: - Open an employee form. - Click "Load a Template". - Use "Search More" and select a template. Issue: - The selected template label is displayed as "Unnamed" after selecting a template from the search view. Cause: - When selecting a record through "Search More", the returned value only contains the record `id` and does not include `display_name`. As a result, the many2one field cannot render the correct label and falls back to "Unnamed". Fix: - Perform an ORM read to fetch the missing `display_name` using the selected record id, then update `selectedTemplate` with the complete value so the correct template name is displayed. Task-6186635 Forward-Port-Of: odoo/odoo#264556
A rare error causing tracebacks when hovering shape options in website snippets was fixed. The issue stemmed from missing slashes in image source URLs, which prevented a key function from correctly processing the images. This update restores the necessary slashes, ensuring stable operation and preventing these tracebacks.
Original PR description
**Description of the problem** A traceback is generated when hovering shape options in the snippets `s_cta_mobile` and `s_cta_mockups`. **How to reproduce** Drop `s_cta_mockups` -> click one of the two images -> open the shape selector -> hover a shape -> Traceback **Why the problem happens** The "source" attribute of `img` elements in the affected snippets is missing a trailing slash. After PR [1], the regular expression in `loadImageInfo` (html_editor/static/src/utils/image_processing.js) does not match anymore the source, thus the variable that should contain the source string remains empty and a traceback is generated. **Fix** All missing trailing slashes are restored. [1]: https://github.com/odoo/odoo/pull/151858 task-6103616
This update fixes a performance issue that slowed down rendering in Odoo's large reports, particularly when navigating tables like Accounting Balances Sheets. By simplifying the CSS rules, the system now recalculates styles faster, leading to a smoother user experience.
Original PR description
Avoid using `:has` selector with using a class on body to replace the has behavior. This change made a gain of in the `(re)calculate style` step when we hover a node on large table like a `report selector` on `Accounting`. The recalculation time during actions like window resize, heavy scrolling, or table sorting. Replacing it with using the specific class reduces those global checks and improves rendering performance. Forward-Port-Of: odoo/enterprise#118362
This update ensures that account reconciliation displays accurately after a reconciliation record is removed. Previously, leftover data caused the system to incorrectly show reconciled accounts, even when the reconciliation was no longer active. This fix cleans up the data and corrects the display in the user interface.
Original PR description
### Description `account.full.reconcile` has no `unlink()` override, so when the record is removed PostgreSQL nulls `full_reconcile_id` on the linked `account.move.line` rows via the default…
### Description
`account.full.reconcile` has no `unlink()` override, so when the record is removed PostgreSQL nulls `full_reconcile_id` on the linked `account.move.line` rows via the default `ondelete='set null'` FK rule, but `matching_number` is a plain `fields.Char` that nobody recomputes. The line ends up with a decimal `matching_number` (the id of the deleted full) while `full_reconcile_id` is `False`, no partials point to it and `amount_residual` is the full open amount. The line is rendered as reconciled in the UI even though the reconciliation is gone.
This PR mirrors `account.full.reconcile.create()`'s contract on the unlink path: invoke `_update_matching_number(amls)` after the records are removed, so every previously-linked line is cleaned. The integrity check `_constrains_matching_number` is also extended with `full_reconcile_id` in its `@api.constrains` tuple, so future ORM writes that desync the field surface the inconsistency immediately.
### Steps to reproduce
A single-call reproducer on a vanilla `19.0-all` runbot, no third-party modules:
```python
company = env.ref('base.main_company') # USD company
partner = env['res.partner'].create({'name': 'demo'})
# Foreign currency rates with a sharp move so the payment generates an FX diff
env['res.currency.rate'].create([
{'currency_id': env.ref('base.EUR').id, 'name': '2026-01-15', 'rate': 0.90, 'company_id': company.id},
{'currency_id': env.ref('base.EUR').id, 'name': '2026-03-15', 'rate': 1.20, 'company_id': company.id},
])
inv = env['account.move'].create({
'move_type': 'out_invoice', 'partner_id': partner.id,
'currency_id': env.ref('base.EUR').id,
'invoice_date': '2026-01-15', 'date': '2026-01-15',
'journal_id': env['account.journal'].search([('type','=','sale')], limit=1).id,
'invoice_line_ids': [(0,0,{'name':'x','quantity':1,'price_unit':1000.0})],
})
inv.action_post()
env['account.payment.register'].with_context(
active_model='account.move', active_ids=inv.ids
).create({'payment_date': '2026-03-15'}).action_create_payments()
recv = inv.line_ids.filtered(lambda l: l.display_type == 'payment_term')
full = recv.full_reconcile_id
assert full and recv.matching_number == str(full.id)
full.unlink() # the bug detonator
recv.invalidate_recordset()
assert recv.matching_number is False # FAILS without this PR
assert not recv.full_reconcile_id
```
Before the PR `recv.matching_number` keeps the decimal id of the deleted `account.full.reconcile`. After the PR it is cleared together with `full_reconcile_id`.
### Diagnostic query
```python
env['account.move.line'].search([
('matching_number', '!=', False),
('matching_number', 'not like', 'P%'),
('matching_number', 'not like', 'I%'),
('full_reconcile_id', '=', False),
])
```
Returns lines in the orphan state on any database.
### Impact
Observed on a real production database: 142 `account.move.line` records in this orphan state accumulated over ~13 days of normal accounting activity, on receivable, payable and bank accounts. All those lines display as reconciled in the UI while the underlying reconciliation is gone. Empty `account.full.reconcile` rows are also left behind.
### Tests
`addons/account/tests/test_account_move_reconcile.py::TestAccountMoveReconcile::test_full_reconcile_unlink_clears_matching_number`
### Linked
* Bug report: closes #264790
The change is a single-file 13-line `unlink()` override plus a one-character extension to an existing `@api.constrains` tuple. No data migration is needed for new databases; existing orphans on databases that hit the bug before the fix lands can be cleaned with a one-off:
```python
env['account.move.line'].search([
('matching_number', '!=', False),
('matching_number', 'not like', 'P%'),
('matching_number', 'not like', 'I%'),
('full_reconcile_id', '=', False),
]).write({'matching_number': False})
env['account.full.reconcile'].search([
('reconciled_line_ids', '=', False),
('partial_reconcile_ids', '=', False),
]).unlink()
```
Forward-Port-Of: odoo/odoo#264805This update ensures that button text colors within the HTML builder align with the overall button styles, creating a more visually consistent and professional design. Previously, the text colors were noticeably different, leading to a less polished user experience. This change improves the builder's usability and aesthetic appeal.
Original PR description
In the html builder, we use strong, neon colors especially for the `btn-success` and `btn-danger`. However, the tint for `text-succes` / `text-danger` was duller, with a bad contrast against the background. This commit simply uses the same color, within builder buttons, for the text classes accent colors as for the btn classes. Forward-Port-Of: odoo/odoo#262277
This update fixes an issue where extra prices on combo products weren't correctly converted to the sale order's currency, leading to inaccurate totals. The change ensures that extra prices are properly converted, resulting in accurate pricing calculations for combo products in different currencies. This improves the reliability of sales order pricing.
Original PR description
The total of a sale order containing a combo product that has an extra price is not correclty converted to the sale order's pricelist currency Steps to reproduce: 1. Install Sales 2. Go to Invoicing…
The total of a sale order containing a combo product that has an extra price is not correclty converted to the sale order's pricelist currency Steps to reproduce: 1. Install Sales 2. Go to Invoicing > Configuration > Accounting > Currencies and activate currency MXN 3. Go to Sales > Products > Pricelists and create a new pricelist for currency MXN 4. Go to Sales > Products and create a new combo product "test" 5. Create a combo choice "combo" with options "Large Cabinet" and extra price 10000$ 6. Go to Sales and create a new quotation for customer Acme Corporation with product "test" (total is $10,001) 7. Change the pricelist to MXN and update prices 8. The total is ~MX$10,018 (it should be ~MX$186,682) Issue: The extra price of a combo product is not converted to the sale order's pricelist currency, so we end up adding the price of the product in the order's currency with the extra price not converted Solution: Convert the extra price of the combo product to the sale order's pricelist currency opw-6192935 Forward-Port-Of: odoo/odoo#266172 Forward-Port-Of: odoo/odoo#265008
This update fixes a technical error that prevented Odoo from correctly handling email server settings. Previously, missing or invalid configurations would cause errors, now records without email settings are handled smoothly, ensuring reliable email functionality.
Original PR description
Description of the issue/feature this PR addresses: The compute method for `smtp_authentication_info` did not properly handle cases where no `smtp_authentication` value was set. Current behavior before PR: * When `smtp_authentication` was empty or had an unsupported value, `smtp_authentication_info` was never assigned. * This caused the compute method to fail with: `ValueError: Compute method failed to assign ir.mail_server(...).smtp_authentication_info` * As a result, reading or displaying the record could raise an exception. Desired behavior after PR is merged: * The fallback branch explicitly resets `smtp_authentication_info`. * `smtp_authentication_info` is always assigned during computation. * Records without an authentication method no longer raise compute errors and are handled correctly. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266411
This update ensures Knowledge articles always load correctly when printed, regardless of the printing method. Previously, printing through various channels could cause blank pages. Now, CSS rules have been adjusted to prevent unintended styling issues in other Odoo modules, improving the overall printing experience.
Original PR description
Previously, the file containing the Knowledge print assets was lazy-loaded when the user triggered a print action through the UI. However, printing can also be initiated through other mechanisms…
Previously, the file containing the Knowledge print assets was lazy-loaded when the user triggered a print action through the UI. However, printing can also be initiated through other mechanisms (keyboard shortcuts, contextual menu, etc.), which prevented us from consistently detecting when to load the assets. In those cases, the assets were not loaded and the article appeared blank (see: odoo/enterprise#70243). To ensure the assets are always loaded regardless of how printing is triggered, we moved them to the common print bundle and adopted the standard asset-loading approach. This change also simplifies the codebase by removing JavaScript workarounds previously used to load the assets dynamically. However, some CSS rules in the Knowledge print stylesheet target global elements such as the web client container. Since the stylesheet is now included in a global asset bundle and always loaded, these rules apply to all modules and may cause rendering issues when printing views outside of Knowledge. To prevent such side effects, the CSS rules in `knowledge_print.scss` will be updated to use more specific selectors. The rules will be scoped so they only apply when the container includes the Knowledge view (using the `:has`). This PR also refactors the stylesheet by removing outdated rules that no longer match any elements. Several of these rules predate the major UI refactoring introduced in Odoo 16. Task-5999878 Forward-Port-Of: odoo/enterprise#109379
This update corrects a restriction in the Recruitment app where Interviewer users could view talent pools but lacked the ability to manage applicants or create new pools. The fix addresses a security rule preventing access to applicants within pools, aligning with the intended role limitations.
Original PR description
## Issue In the Recruitment app, users with the *Interviewer* role have access to the Talent Pool action menu, can see the different talent pools, but don't have any read/write access to the…
## Issue
In the Recruitment app, users with the *Interviewer* role have access to the Talent Pool action menu, can see the different talent pools, but don't have any read/write access to the applicants within the pools, and cannot create new pools either.
## Steps to reproduce
1. Install *Recruitment* (`hr_recruitment`) with demo data
2. Set Marc Demo's *Recruitment* role to *Interviewer*
3. As Marc Demo, navigate to Recruitment > Applications > By Talent Pools
4. **We can see the existing pools, but they all appear empty ("0 Talents"), and we cannot add talents to a pool, nor create new pools.**
## Cause
Interviewer do not see any applicants in the talent pools because of the following rule:
https://github.com/odoo/odoo/blob/e751fa1e010dbda63903d598048ef415709b4af4/addons/hr_recruitment/security/hr_recruitment_security.xml#L48-L60
In fact, applicants in talent pools do not have a job_id set:
```sql
190=# SELECT a.partner_name, a.job_id FROM hr_applicant a
190-# JOIN hr_applicant_hr_talent_pool_rel tpr
190-# ON (tpr.hr_applicant_id=a.id);
partner_name | job_id
---------------+--------
Cameron Ellis |
Ethan Carter |
Noah Bennett |
Test Talent |
(4 rows)
```
This leads to no applicants being shown to the interviewers in the talent pools.
## Justification
Interviewers by default only have access to applications who they are interviewer for, it is not intended for them to see entire pools of potential candidates. Letting interviewers access the talent pools view is counter-intuitive, as they have nothing they can do from there.
opw-6187187
Forward-Port-Of: odoo/odoo#265812This update enables payment providers to be duplicated when a branch company is created, aligning with how journals are currently handled in branches. Previously, this was restricted due to accounting preferences, but now it's a more practical approach for branch operations. This simplifies payment setup for businesses with multiple locations.
Original PR description
This PR will allow payment providers to be duplicated into branch companies when a branch company is created. Previously this was prevented because in accounting it's preferred not to use journals in branches. However, there it is still possible to setup a journal in branches. So it makes sense to allow it also in payment providers. opw-6013978 Forward-Port-Of: odoo/odoo#265831
This update optimizes the process of exporting large datasets in Odoo, addressing potential memory issues that could cause slowdowns. By batching export calls and invalidating recordsets, the system now handles larger exports more efficiently, reducing memory usage and improving export speeds. This results in faster data exports for users.
Original PR description
When exporting a number N of records as XLSX or CSV file, we call the export_data() method for the N records at the same time. This method prefetches the selected fields for all the records which can lead to memory limit errors when N is too large. We propose to batch this call and invalidate the recordsets between batches. Benchmarks ----------- Execution time: | No records | Before PR | After PR | |------------|-----------|----------| | 70 260 | 3.82 s | 3.94 s | | 228 116 | 18.71 s | 19.36 s | | 394 381 | 31.02 s | 32.67 s | Memory usage: | No records | Before PR | After PR | |------------|-----------|----------| | 70 260 | 316.0 MB | 273.5 MB | | 228 116 | 796.9 MB | 620.8 MB | | 394 381 | 1.3 GB | 947.7 MB | opw-5881026 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266078 Forward-Port-Of: odoo/odoo#257333
This update fixes a potential issue during Odoo deployments by logging missing module dependencies as warnings. This provides clearer alerts for administrators, making it easier to identify and resolve deployment problems. Ultimately, this improves the reliability and manageability of Odoo installations.
Original PR description
Log the issue as a warning, and add the missing module dependencies. This should ease managing such deployment issue. Forward-Port-Of: odoo/odoo#266030
This update fixes a bug that prevented accurate IT tax closing validation, particularly when dealing with quarterly VAT reporting. The changes ensure correct handling of year-end gaps and utilize debit/credit columns in VAT reports, preventing errors and improving the reliability of tax closing processes.
Original PR description
Description of the issue this commit addresses: The IT tax closing validation compared month numbers only, which broke across year boundaries and could reject valid quarterly progressions. It also assumed a balance column existed in monthly VAT report lines, but this report uses debit/credit columns, which could trigger a traceback. --- Desired behavior after this commit is merged: This commit computes the period gap with year-aware month deltas and aligns the allowed gap with periodicity (monthly or quarterly). It also checks VP lines using balance when present, or debit/credit as fallback, preventing crashes and ensuring consistent tax closing validation. --- opw-6131080 Forward-Port-Of: odoo/enterprise#117428
This update fixes a bug where Preparation Displays (PDIS) weren't correctly updated during table actions like transferring or merging orders. Previously, new PDIS were created instead of reusing existing ones, leading to inconsistencies. Now, PDIS are synchronized across all table actions, ensuring accurate order information on both the POS and kitchen screens.
Original PR description
Task: [#5005179](https://www.odoo.com/odoo/1737/tasks/5005179) --- When executing table actions such as transfer, merge, link, or unlink, the related Preparation Displays (PDIS) were not being updated. This caused inconsistencies between the POS orders and the kitchen screens. Also, when merging or linking orders and cancelling some lines, a new `pdis_order` was created instead of reusing the existing one. This fix ensures that PDIS are correctly synchronized and notified on any table actions. Forward-Port-Of: odoo/enterprise#102623 Forward-Port-Of: odoo/enterprise#98374
This update fixes a problem where preparation displays (PDIS) weren't correctly updated when transferring, merging, or linking POS orders. Previously, new PDIS were created instead of reusing existing ones, leading to inconsistencies between the POS and kitchen screens. This ensures accurate order information is displayed on kitchen screens.
Original PR description
Task: [#5005179](https://www.odoo.com/odoo/1737/tasks/5005179) --- When executing table actions such as transfer, merge, link, or unlink, the related Preparation Displays (PDIS) were not being updated. This caused inconsistencies between the POS orders and the kitchen screens. Also, when merging or linking orders and cancelling some lines, a new `pdis_order` was created instead of reusing the existing one. This fix ensures that PDIS are correctly synchronized and notified on any table actions. Forward-Port-Of: odoo/odoo#240878 Forward-Port-Of: odoo/odoo#233630
This update resolves a startup error in Odoo caused by a missing dependency. The system was unable to find the 'clean' module within the lxml library, which is required for core functionality. This fix ensures Odoo can start correctly.
Original PR description
still ``lxml.html.clean`` import is needed because ``lxml.html`` init file don't have clean file. So, it will be not loaded For reference :-…
still ``lxml.html.clean`` import is needed because ``lxml.html`` init file don't have clean file. So, it
will be not loaded
For reference :- https://github.com/lxml/lxml/blob/lxml-4.9/src/lxml/html/__init__.py
```
Traceback (most recent call last):
File "/tmp/tmpj23nirpw/odoo/19.0/./odoo-bin", line 3, in <module>
import odoo.cli
File "/tmp/tmpj23nirpw/odoo/19.0/odoo/cli/__init__.py", line 2, in <module>
from .command import Command, main # noqa: F401
File "/tmp/tmpj23nirpw/odoo/19.0/odoo/cli/command.py", line 8, in <module>
import odoo.init # import first for core setup
File "/tmp/tmpj23nirpw/odoo/19.0/odoo/init.py", line 28, in <module>
from .tools.gc import gc_set_timing
File "/tmp/tmpj23nirpw/odoo/19.0/odoo/tools/__init__.py", line 11, in <module>
from .i18n import format_list, py_to_js_locale
File "/tmp/tmpj23nirpw/odoo/19.0/odoo/tools/i18n.py", line 8, in <module>
from odoo.tools.misc import babel_locale_parse, get_lang
File "/tmp/tmpj23nirpw/odoo/19.0/odoo/tools/misc.py", line 40, in <module>
from lxml import etree, objectify
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "/tmp/tmpj23nirpw/odoo/19.0/odoo/_monkeypatches/__init__.py", line 45, in exec_module
patch_module(module.__name__)
File "/tmp/tmpj23nirpw/odoo/19.0/odoo/_monkeypatches/__init__.py", line 67, in patch_module
module.patch_module()
File "/tmp/tmpj23nirpw/odoo/19.0/odoo/_monkeypatches/lxml.py", line 14, in patch_module
lxml.html.clean._find_image_dataurls = re.compile(r'data:image/(.+?);base64,').findall
AttributeError: module 'lxml.html' has no attribute 'clean'
```
https://upgradeci.odoo.com/upgradeci/run/301804
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#266591This update corrects a bug where refund actions were incorrectly triggering the cancellation of original invoices. The fix adds a check to ensure the automatic cancellation process only applies to legitimate invoice replacements, preventing unintended credit note cancellations. This ensures accurate accounting and reporting for Mexican VAT (CFDI) transactions.
Original PR description
Issue: Implementation of automatic CFDI cancel flow of an invoice substituted by a new one accidentally resulted in sending credit notes created from an invoice also triggering cancellation of the original. Solution: adding a check to only apply to invoice replacements and not refunds. ticket-6245456 Forward-Port-Of: odoo/enterprise#118327
This update resolves a potential issue during Odoo upgrades related to temporary configuration records. By directly applying group settings, the update eliminates the need for a complex workaround and ensures a smoother, more reliable upgrade process. This improves the overall stability of the Enterprise version.
Original PR description
Replace the `res.config.settings transient record + execute()` hack with a direct group implication on `group_field_service_allow_material` to avoid orphan transient records during upgrade. see: https://github.com/odoo/upgrade/pull/10310#issuecomment-4518235969
This update corrects a recent issue where the 'Send Report' action was inadvertently removed from the planning slot views. The fix restores this functionality, ensuring users can easily generate reports directly from the planning interface. This ensures consistent functionality across key workflows.
Original PR description
Issue: ---------------------------------------- Some actions that were in Field Service task form view app aren't anymore in planning slot form view. Steps to reproduce: ---------------------------------------- - Go to the list view of planning view and select some slots - In the cog the action "Send Report" is there - Go in the slot's form view - In the cog, the action is not there Cause: ---------------------------------------- During the merge of Field Srevice in Planning. The action was removed from the form view. Solution: ---------------------------------------- Like in [saas-19.1](https://github.com/odoo/enterprise/blob/62b11599d08afa93cb9391f0b5aee3c610a754c8/industry_fsm_report/views/project_task_views.xml#L135-L146) we add "Send report" to the cog menu in list view. opw-6227745
This update to the odoo spreadsheet component addresses several technical issues related to data export and pivot table functionality. Specifically, it improves how formulas handle errors and correctly manages ranges, enhancing the reliability of spreadsheet reports. This update also includes new features and improvements to the Claude skill.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/96730cde0f [REL] 19.2.14 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/96730cde0f [REL] 19.2.14 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/28ee06827e [FIX] formulas: add IFERROR second argument when exporting data [Task: 5993405](https://www.odoo.com/odoo/2328/tasks/5993405) https://github.com/odoo/o-spreadsheet/commit/678ec266bb [FIX] range: correctly handle unbounded ranges on row/col changes [Task: 6167358](https://www.odoo.com/odoo/2328/tasks/6167358) https://github.com/odoo/o-spreadsheet/commit/1c0c884d4c [FIX] pivot: unused pivot detection with composed formula [Task: 6105894](https://www.odoo.com/odoo/2328/tasks/6105894) https://github.com/odoo/o-spreadsheet/commit/ae67cd345d [FIX] pivot: unused pivot detection with calculated measure [Task: 6105894](https://www.odoo.com/odoo/2328/tasks/6105894) https://github.com/odoo/o-spreadsheet/commit/6b043bb023 [IMP] claude: add review skill [Task: 6223095](https://www.odoo.com/odoo/2328/tasks/6223095) https://github.com/odoo/o-spreadsheet/commit/67d2c05b68 [IMP] claude: add testing skill [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/1c38e43a90 [IMP] claude: add CLAUDE.md file [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Ronak Mukeshbhai Bharadiya (rmbh) <rmbh@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com> Co-authored-by: Marceline Thomas (matho) <matho@odoo.com>
A recent issue causing the 'project_task_history_tour' to intermittently fail has been resolved. This fix ensures the tour consistently runs, improving the reliability of the project task history feature for users. This prevents potential disruptions and maintains a smooth user experience.
Original PR description
Since #237531 the tour `project_task_history_tour` seems to sometimes fail. runbot-238566 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a potential issue where users could repeatedly click the 'release table' button while an order was being processed, leading to unintended actions. The change now blocks the UI during table unbooking and ensures a proper redirect, improving the user experience and preventing data inconsistencies.
Original PR description
When unbooking a table, the UI was not blocked, allowing the user to potentially spam the button or perform other actions while the order was being deleted. It also lacked a proper redirection. task-id: 5859460 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#246741
This update fixes an issue where invoices imported from UBL files were incorrectly calculating prices due to a missing discount application. The change ensures that discounts from AllowanceCharges are accurately added to the PriceAmount, resulting in correct invoice pricing. This resolves a problem that could lead to inaccurate financial reporting.
Original PR description
**PROBLEM** When importing a ubl bis3 file, with only the amount in the AllowanceCharge on PriceAmount it doesn't add the discount to PriceAmount to get the undiscounted price. Which means we create an invoice with the wrong price. This PR fixes that. opw-6102962 Forward-Port-Of: odoo/odoo#258964
This update optimizes how Odoo renders large pages, like account reports, by streamlining the styling process. The change avoids a slow styling technique that triggered unnecessary recalculations, leading to faster page loading and smoother performance during common actions. This results in a better user experience for all users.
Original PR description
Avoid using the attribute substring selector (`*=`), which forces a broad match and can be slower than class selectors. Target the correct node directly using the `o-we-hint` class instead. On very large pages (thousands of DOM elements like account_report) `*=` can increase style recalculation time during actions like window resize, heavy scrolling, or table sorting. Replacing it with using the specific class reduces those global checks and improves rendering performance. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266381
This fix resolves an issue where confirming a sales order with multiple event registrations would cause a system error. The update now correctly creates multiple leads when multiple event registrations are associated with a single order, ensuring accurate lead tracking for events with multiple attendees. This improves the reliability of the event registration process.
Original PR description
# How to reproduce - Install the Events, Porject & CRM apps - Create two event A & B with tickets that can be purchased - Go to Events > Configuration > Lead Generation - Create a Lead Generation…
# How to reproduce - Install the Events, Porject & CRM apps - Create two event A & B with tickets that can be purchased - Go to Events > Configuration > Lead Generation - Create a Lead Generation Rule with : - Create : Per Order - When : Attendees are created - Event : None - Create a new quotation with two lines : - Product : Even Registration for event A 1st, then B - Confirm the SO # The problem A traceback will appear # Cause of the issue When confirming the SO, we create `event.registrations`s that will check for lead generation rules and create or update `crm.lead`s accordingly : https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/event_crm/models/event_registration.py#L35 We will then group the registrations by leads & grouping model : https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/event_crm/models/event_lead_rule.py#L166 For all groups, if the lead does not exist, we create one : https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/event_crm/models/event_lead_rule.py#L184-L187 `_get_lead_values()` works fine with multiple `event.registrations`s, but crashes when those registrations does not have all the same event, which is our case : https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/event_crm/models/event_registration.py#L170 # Proposed solution Since we have multiple events and leads are associated to a single event : https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/event_crm/models/crm_lead.py#L11 We group the registrations by event and create multiple leads accordingly opw-6167518 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265017
This update fixes a technical issue within the Odoo Enterprise software that impacted the generation of GSTR2B reports for non-GST supplies in Vietnam. The change ensures accurate reporting by correcting a misidentified section key, improving data accuracy for tax compliance.
Original PR description
Before this commit, the domain of the non-GST supplies report line in GSTR2B used the GSTR section `purchase_nongst`, while the actual section key is `purchase_non_gst_supplies`. This commit fixes the domain by using the correct GSTR section key. task-6239820 Forward-Port-Of: odoo/enterprise#118313
This update resolves a memory issue that could cause invoice imports to fail with large product catalogs. The fix uses a more efficient batch processing method to reduce unnecessary calculations and memory consumption, preventing performance bottlenecks.
Original PR description
Before this commit, for DBs with a very large number of products it was possible for the thread to run out of memory when importing an invoice or a bill. The reason is that the name on…
Before this commit, for DBs with a very large number of products it was possible for the thread to run out of memory when importing an invoice or a bill. The reason is that the name on product.product is non stored and computed. This leads to tons of recomputes, which in turn leads to reads and stores in cache of the underlying `product.product`, which down the line uses up all of the available memory for the thread. The proposed method uses batches instead of a `search_fetch` as the latter would not solve the recompute problem and hence the underlying memory problem. Another alternative approach could be going straight for the `product.template.name`, but that approach might introduce a loss of precision or functionality when searching for products at invoice import. Here is the memory graph from memray before the fix: <img width="1106" height="450" alt="opw-6168737-memray-pre-fix" src="https://github.com/user-attachments/assets/f971dc4d-aa09-41e3-a8c5-e5ca53f9786d" /> And here is the same graph after the fix: <img width="1106" height="450" alt="opw-6168737-memray-post-fix" src="https://github.com/user-attachments/assets/0a784cdc-9b40-498b-bbcb-89114eec1ec9" /> We can see a much lower peak memory usage after the fix. We an also observe that the memory complexity shifts from `O(n)` to `O(1)`, with `n` being the number of `product.product` records stored in the DB. For both presented graphs, the same, unaltered database was tested. The database contains 389 467 `product.product` records. opw-6168737 Forward-Port-Of: odoo/odoo#265639 Forward-Port-Of: odoo/odoo#262591
This update corrects a bug where payments received from providers were sometimes partially reconciled, leading to inaccurate accounting records. Now, all payments from providers are fully reconciled, ensuring accurate financial reporting. This change improves the reliability of our accounting system.
Original PR description
When we receive a payment from a provider, we allow partial reconciliations to be done on this move, but we shouldn't. Payments coming from providers are always either fully paid, or not paid at all. task-5893189 Forward-Port-Of: odoo/odoo#254597
This update corrects a bug where invoice PDFs generated before sending didn't display the correct 'Proforma' header. The fix ensures that invoices are initially generated as 'Proforma' until sent to the customer, then switch to the standard invoice header. This prevents confusion for customers receiving invoices.
Original PR description
***Steps to reproduce*:** - Create and confirm an invoice. - Open the invoice preview and use the Print option to generate the PDF. - Send the invoice to the customer. ***Observed behavior*:** - In…
***Steps to reproduce*:** - Create and confirm an invoice. - Open the invoice preview and use the Print option to generate the PDF. - Send the invoice to the customer. ***Observed behavior*:** - In the preview, the header is displayed as *Proforma*. - Before sending the invoice, the downloaded PDF from the Print option does not contain the *Proforma* header. - After sending the invoice, the preview correctly no longer shows the *Proforma* header, but the Print PDF output also continues without the expected behavior. ***Cause*:** - The *Proforma* header should be displayed when a confirmed invoice has not yet been sent to the customer. - Once the invoice is sent, the document should display the normal invoice header instead. - The PDF generation flow from `action_print_pdf` did not correctly pass the proforma context based on whether the invoice had already been sent. ***Fix*:** - Update the functional logic in `action_print_pdf` to use: `with_context(proforma_invoice=not self.invoice_pdf_report_id)` - This ensures that invoices not yet sent to the customer are generated as *Proforma* invoices. - Once the invoice has been sent, the PDF is generated with the normal invoice header instead. opw-6169132 Forward-Port-Of: odoo/odoo#265825
This update resolves an issue where payroll warnings weren't easily adjustable. The change allows for more flexible and accurate updates to payroll warning data, ensuring compliance and better reporting for Swiss businesses using the Enterprise module. This improves the reliability of payroll calculations.
Original PR description
Forward-Port-Of: odoo/enterprise#107792
This update fixes an issue where COGS calculations were inaccurate due to incorrect unit of measure conversions and a bug related to customer returns. Specifically, the system now correctly handles different unit of measure conversions for COGS lines and prevents incorrect monetary values from being applied to intermediate stock moves during return processing, ensuring accurate financial reporting.
Original PR description
[FIX] sale_stock: convert quantity using correct UoM The quantity unit conversion was applied to an already summed value, ignoring the fact that individual COGS lines may have different UoMs. --- [FIX] stock_account: Do not copy field 'value' of StockMove When a customer return is split into multiple steps (e.g., Customer -> Input -> Stock), the `value` field of the stock move was being copied from the first step to the second. This caused the second step (which should not be valued) to inherit the monetary value, leading to incorrect COGS entries when the invoice was posted. The value should only be set when the move is Done, not during a copy. --- OPW-6076350 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#260495 Forward-Port-Of: odoo/odoo#257543
This update fixes a reporting issue where weekly subscription revenue wasn't accurately reflected in the project dashboard. The change ensures that revenue from weekly subscriptions is now correctly calculated and displayed, improving the accuracy of financial reporting for projects with this subscription type.
Original PR description
…plan Before this commit, the #113918 corrects the project dashboard revenue when a yearly subscription is linked to that project. The problem is the fix does not take into account the weekly subscription. This commit handles the subscriptions with plan unit set to week and linked to the project to correclty set the right revenue in to invoice column. opw-5916688 Forward-Port-Of: odoo/enterprise#118254 Forward-Port-Of: odoo/enterprise#118163
This update prevents a user without sign admin rights from encountering an access error when viewing records with sign request activities. The change uses 'sudo' to ensure visibility and disables actions to avoid errors, while also creating activities directly linked to the request creator. This improves the sign request workflow for all users.
Original PR description
**Steps to reproduce** - Have user A with Sign admin rights and user B without Sign rights. - With user A, create a sign request activity on a record that user B can access. Send the signature…
**Steps to reproduce** - Have user A with Sign admin rights and user B without Sign rights. - With user A, create a sign request activity on a record that user B can access. Send the signature request. - With user B, try to access the record. -> AccessError when trying to fetch the chatter. **Cause** By default, users get access to all the activities associated to records they have access to (see `_search` of `mail.activity`). This is an issue since some of the fields added in `_store_activity_fields` for the sign request activity display might not be accessible for a user with access to the activity. **Change** Use `sudo` to be able to display the activity, even if the user doesn't have access to the sign request. Also, in that case, `can_write` should be `False` in order to hide the action buttons of the activity, which trigger access errors when trying to make operations on the sign request. Another related change is to create the activity for the user creating the sign request, this avoids falling back on the `user_id` of the record associated with the activity and makes sure the activity's user has access to the sign request. opw-6157455
This update fixes an issue where the product catalog snippet would reset to the first items after scrolling on mobile devices. This was caused by automatic rerendering triggered by viewport size changes. The fix reintroduces a mechanism to only update the snippet when the screen size changes, ensuring a smoother and more reliable display of the product catalog.
Original PR description
Scenario: - drop product catalog snippet and save - go to the second page of product - on some mobile scroll, or just change window size Result: we are reset to the first items of the gallery. Cause: in some mobile (eg. iOS safari) scrolling up or down make the address bar appear, that makes the viewport size change. Since 18.4 refactor of website, we rerender dynamic widget at any size change, so scrolling rerender the snippet. Fix: reintroduce saas-18.2 listenSizeChange that only trigger throttled change of media breakpoint and was removed from dynamic_snippet.js in 9fe45e2b7ddbbfd0445ffe25a859e67a316d02b2. opw-6137005 Forward-Port-Of: odoo/odoo#260623
This update corrects a rounding issue that previously caused the withholding base amount on invoices to exceed the total invoice amount. The fix ensures accurate calculations by limiting the withholding base amount to prevent over-reporting. This improves invoice data integrity and compliance.
Original PR description
**PROBLEM** In some case, because of rounding issues, the withholding base amount can be bigger than the total amount of the invoice, which should not be the case. **STEP TO REPRODUCE** 1. Install…
**PROBLEM** In some case, because of rounding issues, the withholding base amount can be bigger than the total amount of the invoice, which should not be the case. **STEP TO REPRODUCE** 1. Install l10n_pe_edi 2. Create an invoice with those 2 lines: qty: 300, unit_price: 0.481936, tax: VAT 18% + 3% IGV Withholding qty: 300, unit_price: 0.747376, tax: VAT 18% + 3% IGV Withholding 3. Confirm the invoice, and send the xml (if this fail, you may have to change the name of the invoice, using odoo inspector or other means). 4. Open the xml, and notice the base amount for the allowance on the document level is 435.18 which is bigger than the invoice payable amount. **CAUSE** We exclude the withholding taxes to compute the invoice taxInclusiveAmount. When computing this amount, we round the line base and the tax total of the VAT 18% tax leading to the result of 435.17. When creating the allowance node for the Withholding taxes, the base used for the withholding taxes is the sum of the line base, and the tax total of previous tax NOT rounded. There is no easy way to change the withholding tax computation, so we just limit the base to not be bigger than the invoice total when there is rounding issues. opw-6010388 Forward-Port-Of: odoo/enterprise#113689
A technical issue preventing a test from properly updating was resolved. This fix ensures that the l10n_be_coda module's test suite functions correctly, maintaining the stability and reliability of the Belgian accounting features within Odoo Enterprise. This change was part of a larger effort to improve test coverage.
Original PR description
Test was commented instead of updated in this commit https://github.com/odoo/enterprise/commit/f1fafe0060c221e4a268c897af30455cc3d029ef task-none Forward-Port-Of: odoo/enterprise#118344 Forward-Port-Of: odoo/enterprise#117924
This update fixes an issue where payments weren't automatically linked to invoices when invoices were created after payment processing. Previously, this caused reconciliation problems with automated payment records. Now, payments are correctly linked to the invoice, ensuring accurate financial reporting.
Original PR description
Steps to reproduce: - Ensure Automatic Invoice setting is on - Create sales order for product with ordered quantites invoicing policy - Generate a Payment Link - Pay with the ACH Direct Debit method via a provider (e.g. Stripe) - While the payment is processing, confirm the sales order, create an invoice, confirm the invoice Current Behavior: When the payment is finished processing, the payment is not automatically linked to the corresponding invoice Expected Behavior: When the payment is finished processing, the payment should be linked to the invoice despite it being created by a user Explanation: The payment transaction's link to invoice_id is severed in PaymentTransaction._invoice_sale_orders if an invoice is created before the payment is cleared. This will eventually lead to the account.payment created automatically later on not being reconciled with the invoice. opw-6087656 Forward-Port-Of: odoo/odoo#264800
This update resolves minor issues within the core POS test suite. Specifically, it corrects how tests handle empty data results and prevents unexpected type conversions, ensuring the reliability of our POS testing process. This contributes to overall product stability and reduces the risk of future issues.
Original PR description
..., l10n_es_pos, l10n_jo_edi_pos, l10n_br_edi_pos
---
Fix two bugs in the checkTicketData() test helper:
- Replace falsy check `!statement` with `!statement.length` to
correctly handle empty NodeList results from querySelectorAll,
as an empty NodeList is still truthy.
- Replace loose equality `ruleFound == rule.negation` with strict
equality `ruleFound === (rule.negation || false)` to avoid
unintended type coercion when `rule.negation` is undefined.
---
Task: https://www.odoo.com/odoo/project/1737/tasks/6147566
Forward-Port-Of: odoo/odoo#260431This update fixes minor bugs in the core tests for our Point of Sale system. Specifically, it corrects how the system handles empty data results and prevents unexpected behavior when comparing values. These changes ensure the tests run reliably and contribute to the overall stability of the POS functionality.
Original PR description
..., l10n_es_pos, l10n_jo_edi_pos, l10n_br_edi_pos
---
Fix two bugs in the checkTicketData() test helper:
- Replace falsy check `!statement` with `!statement.length` to
correctly handle empty NodeList results from querySelectorAll,
as an empty NodeList is still truthy.
- Replace loose equality `ruleFound == rule.negation` with strict
equality `ruleFound === (rule.negation || false)` to avoid
unintended type coercion when `rule.negation` is undefined.
---
Task: https://www.odoo.com/odoo/project/1737/tasks/6147566
Forward-Port-Of: odoo/enterprise#114581This update resolves a test failure related to GS1 barcode scanning in the Point of Sale module. The fix ensures that barcodes are correctly interpreted by adding a leading zero to the test data, aligning it with the expected GTIN-14 format. This prevents issues with product addition to orders during scanning.
Original PR description
The test_GS1_pos_barcodes_scan was failing because the "GS1 Variant Product" barcode was defined as a 13-digit string, while the tour scans it using the GS1 AI 01 (GTIN), which expects a 14-digit GTIN-14. By adding a leading zero to the barcode in the test setup, we align it with the GTIN-14 format parsed by the POS barcode parser during the scan, ensuring the product is correctly added to the order. runbot-error: 242323 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#258089
This update resolves an issue where production orders created from sale orders (using multi-step routes) didn't always correctly update delivery quantities. The fix ensures that the `move_dest_ids` are properly propagated across all production orders created from a single sale order, particularly when using batch sizes. This guarantees accurate inventory tracking and order fulfillment.
Original PR description
### Steps to reproduce: - In the settings enable: Multi-steps routes - Inventory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a storable product P with a bom using the MTO…
### Steps to reproduce: - In the settings enable: Multi-steps routes - Inventory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a storable product P with a bom using the MTO Route - In the Miscellaneous tab of the bom tick Batch Size and set it to 2 - Create and confirm a sale order for 6 units of P #### > Three MO's are created but only the last one will update the quantities of the delivery at validation of the production. ### Cause of the issue: The `move_dest_ids` of the `move_finished_ids` is only set on the last of the three productions. That is only the last MO is properly chained to the delivery via an MTO chain. This happens because the `move_dest_ids` field of the `mrp.production` model is a `One2Many` field: https://github.com/odoo/odoo/blob/a2f072fe99a03aaf521bba1965e7f29a1c99e325/addons/mrp/models/mrp_production.py#L223-L224 Which implies that each move can be linked to at most one mrp.production via the `created_production_id` field. However, if you have set a batch size on your bom, it is expected for a single move to create multiple mo's. While the `move_dest_ids` of each of these MO is appropriately set in the create vals to be the mto `stock.move` of the delivery, due to the nature of the `created_production_id` field only the *last* mo will created with a set `move_dest_ids` as this is the only record that will be set as `created_production_id`. However, after the creation of these MO's, the related `move_finished_ids` will be recomputed: https://github.com/odoo/odoo/blob/a2f072fe99a03aaf521bba1965e7f29a1c99e325/addons/mrp/models/mrp_production.py#L1089-L1093 However, the `move_dest_ids` of the created moves will be set to be either the `move_dest_ids` of their production (which is unset for all but the last one) or these of the first production of the same `production_group` that is these generated by a common production split: https://github.com/odoo/odoo/blob/a2f072fe99a03aaf521bba1965e7f29a1c99e325/addons/mrp/models/mrp_production.py#L1263-L1267 Now, since neither are set in our use case, the `move_dest_ids` will not be set on the `move_finished_ids` which implies in particular that the mto link between our productions (but the last one) and the delivery is lost. Fix: Since we can not change the nature of the `move_dest_ids` and `created_production_id` in stable to become Many2Many fields, we need to find a way to propagate the `move_dest_ids` on moves without relying on the probably inaccurate value provided by the production. And, since the compute of the `move_finished_ids` could be launched at many other points than during a create process (because of the many dependencies), we can not solely rely on the creation context but rather new to provide a way to recreate the link from relations at any given point. We therefore rely on the `stock.reference`'s similar to what was done prior to 19.0 via the `procurement_group_ids`: https://github.com/odoo/odoo/blob/132f042ca14012877f608783b57a0ca9c4e565f3/addons/mrp/models/mrp_production.py#L1198-L1202 opw-6188069 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264951
This update resolves an issue where setting Intrastat information on product templates without associated products would trigger an error. The fix ensures that the system correctly handles product templates without variants, preventing unexpected errors and improving data integrity. This ensures consistent reporting for Intrastat data.
Original PR description
Problem: The Intrastat fields on product.template are computed without being stored. They are stored in product.product and the same values are used when computing the values on product.template. When trying to set the Intrastat fields on a product template without any product, an RPC error is raised without specifying the reason. Steps to reproduce: 1. Create a new product (product.template) 2. Add an attribute to the product with Variant Creation set to Dynamic, this will set no product variants (product.product) for the product template. 3. Try to set the Intrastat Commodity Code on the product template 4. Save the product template 5. Notice the RPC error raised without any explanation opw-6179705 Forward-Port-Of: odoo/enterprise#117856
This update fixes a bug where adding serial numbers to outgoing stock picks (when the quantity is zero) would incorrectly add additional serial numbers, leading to quantity mismatches. The change ensures that only the manually added serial numbers are applied, maintaining accurate stock counts. This improves the reliability of our inventory tracking.
Original PR description
**Problem**: When we set the quantity of a move to zero, then add serial numbers manually, if the serial numbers are not the first ones in the list of available serial numbers, The first few…
**Problem**: When we set the quantity of a move to zero, then add serial numbers manually, if the serial numbers are not the first ones in the list of available serial numbers, The first few available serial numbers will be added to the move, which causes a mismatch of quantity and the number of serial numbers. **Before this commit:** If we have three serial number SN-001, SN-002, SN-003 created in order, and we set the quantity of the move to zero, then add SN-002 and SN-003 manually, SN-001 will be added automatically while saving. **After this commit:** Only SN-002 and SN-003 will be added to the move, which matches the quantity. **Steps to reproduce:** 1. Create a product with tracking by unique serial number, and create 3 lots SN-001, SN-002, SN-003 for this product. 2. Create a picking and add a move for this product, set the demand to 3 and quantity to 0. 3. Set the quantity to 2, and add SN-002 and SN-003 to the move, then save the picking. 4. SN-001 will be added to the move automatically, but the quantity stays at 2. opw-6121208 Forward-Port-Of: odoo/odoo#266259 Forward-Port-Of: odoo/odoo#263080
This update resolves an issue where product variant prices didn't automatically update when the cost price changed. Previously, users had to manually switch price lists to trigger the update. The fix adds a direct update mechanism to ensure on-sale prices reflect cost changes immediately, improving pricing accuracy and reducing manual intervention.
Original PR description
When we create a product variant and have a pricelist which is based on the cost price, and change the cost price, the on_sale_price doesn't update. You have the change the price list to other and…
When we create a product variant and have a pricelist which is based on the cost price, and change the cost price, the on_sale_price doesn't update. You have the change the price list to other and back to the one you want for it to trigger change because the _onchange_compute_pricing only gets triggered if there's change on pricelist (pricer_sale_pricelist_id), and sales price (lst_price). Steps to Reproduce: 1.Create a pricelist and add a line with "formula" price type, and based on "cost", 2.Create a product variant, and add the pricelist just created. 3.Change the "Cost". The "On Sale Price" doesn't update. 4.You have to change the price list to some other and back to the one you want for the "On Sale Price" to update. To fix the issue, we add the field Cost (standard_price) on api.onchange, so when we change the cost it'll update the "On Sale Price" right away. opw-5947995 Forward-Port-Of: odoo/enterprise#117806 Forward-Port-Of: odoo/enterprise#111892