Daily updates from Odoo
Monday, July 27, 2026
171 changes
33 changes
Resolved issues and error corrections
This fix ensures accounting reports correctly recognize when no report section has been opened yet. It helps prevent incorrect navigation or display behavior when users open financial reports.
Original PR description
**Root Cause:**
At [1], the condition `this.lastOpenedSectionByReport === {}` always
return `false` because JavaScript compares objects by reference
rather than by value. As a result, the code never detects when
`lastOpenedSectionByReport` is empty.
**Fix:**
This commit ensures the code correctly detects an empty
`lastOpenedSectionByReport` object.
[1]:
https://github.com/odoo/enterprise/blob/ae4b461edb1d6b49c25d4e264380e7ae4b67f10c/account_reports/static/src/components/account_report/controller.js#L50
**No task ID**
Forward-Port-Of: odoo/enterprise#125325
Forward-Port-Of: odoo/enterprise#124223The trial balance report now avoids displaying extremely small leftover amounts caused by decimal rounding when an account should balance to zero. This prevents confusing values from appearing in exported XLSX reports and improves confidence in financial reporting.
Original PR description
Steps to reproduce -------------------- - Install account_reports module; - Create a new account; - Create a miscellanous operation for the previous month using thenew account with a credit amount of $8.28; - Create a second MISC for the current month with two lines using the account : debit = 262.67 and credit = 254.39; - Open the trial balance report and filter the new account (end balance should be 0); - Export the report as XLSX; The end balance value is 2.84e-14 due to float rounding issues. opw-6369016 Forward-Port-Of: odoo/enterprise#125416 Forward-Port-Of: odoo/enterprise#123896
Automatic timesheet suggestions now correctly link time related to Discuss to the Discuss app rather than the general database. This helps keep suggested work entries categorized accurately for easier review and reporting.
Original PR description
## Previous Behavior: When generateing AW sugestions, discuss related time would be associated to the DB and not the discuss app inside the database. ## Task task-[5167914](https://www.odoo.com/odoo/project/4105/tasks/5167914/project.task/6381120/project.task/6409826) Forward-Port-Of: odoo/enterprise#125339
Philippines check printing now rounds the cents portion of written payment amounts to two decimals, even when the currency is configured with more precision. This prevents confusing or incorrect check text such as showing four decimal digits in the xx/100 amount.
Original PR description
Current behavior: --- When paying with checks, if the currency has more than 2 decimals, the decimal amount is printed with more than 2 decimals. Steps to reproduce: --- 1. Switch to PH company 2. Set setting Check Layout as "Print Check - PH" 3. In the PHP currency, change rounding factor to 0.0001 4. In Decimal accuracy > product price, set 4 digits 5. Create a new Vendor Payment, payment method Check, amount 100.1268 PHP 6. Results: One Hundred and 1268/100, should be 13/100 Expected behavior: --- The xx/100 part of amount in words text in the check should always be rounded to 2 decimals. opw-6302337 Forward-Port-Of: odoo/enterprise#124572 Forward-Port-Of: odoo/enterprise#121913
A test issue in the Knowledge app was corrected so an unrelated collaboration connection from a previous test no longer interferes. This helps keep automated validation stable and avoids false build failures without changing user-facing behavior.
Original PR description
This aims to fix Runbot build error #937788 ([1]). A collaboration error was thrown during a tour which makes no use of collaboration. This makes sure the bus from the previous test doesn't persist when running this tour so it doesn't interfere. [1]: https://runbot.odoo.com/odoo/runbot.build.error/937788 Forward-Port-Of: odoo/enterprise#125509
Uploading a document while Auto Sort is enabled no longer triggers an error when the document is automatically moved to another folder. This keeps the Documents workflow stable and avoids interrupting users after sortable uploads.
Original PR description
When Auto Sort is enabled, an uploaded document can be moved to a different folder as part of the sort. The subsequent model reload only fetches records for the current folder to select/scroll to the new record. But, the new document's is absent from `env.model.root.records`. `newRecords` ends up empty, making `newRecords[0]` undefined, which then crashes accessing record.resId. To fix this, we just return early because if the record isn't in the current folder, there's nothing to select or scroll to anyway, so returning early here doesn't change anything visible behavior, it just avoids the crash. Steps to reproudce: 1.Go to Documents. 2.Go to Company->Inbox 3.Go to the gear icon and make sure the "Auto Sort" is enabled with "Move to folder" 4.Add a new document that's sortable. 5.You'll get the error. opw-6281558 Forward-Port-Of: odoo/enterprise#121069
Users who run automatic bank reconciliation with no statement lines available will now see a warning instead of an error. This prevents a confusing crash and makes the accounting workflow clearer when there is no work to process.
Original PR description
Currently, an error occurs when user tries to reconcile when there are no bank statements to reconcile. Steps to replicate: - Install `accountant` with demo. - Open Accounting and Click `To…
Currently, an error occurs when user tries to reconcile when there are no bank statements to reconcile. Steps to replicate: - Install `accountant` with demo. - Open Accounting and Click `To Reconcile` on the Bank Journal. - Go to the list view > Select all > From the Cog menu > Reset to draft. - Again select all and delete all the statement lines. - From Cog menu click on `Run Auto Reconciliation` > Run. Error: ``` SyntaxError: syntax error at or near ')' LINE 44: WHERE st_line.id IN () ``` Cause: - Error occurs because the [search] returns no results and the method `_try_auto_reconcile_statement_lines()` is called on an empty recordset. - Later in the flow the function `_partner_mapping()` [1] is call which makes the `self.ids` as empty tuple [2] this causes the query to have a syntaxerror. Solution: - When there are no statement lines to reconcile we show a warning notification. [search]: https://github.com/odoo/enterprise/blob/ec408cb9a569f321afc99f4065a7a0f545d4faf4/account_accountant/wizard/bank_rec_auto_reconcile_wizard.py#L21-L27 [1]: https://github.com/odoo/enterprise/blob/ec408cb9a569f321afc99f4065a7a0f545d4faf4/account_accountant/models/account_bank_statement.py#L427 [2]: https://github.com/odoo/enterprise/blob/1516209ee077cda03155686d1377eb70080538f1/account_accountant/models/account_bank_statement.py#L620 sentry-7615011817
The US Profit and Loss report now continues to open even if optional summary lines, such as Gross Profit, have been removed from the report configuration. This prevents an unexpected error and lets businesses customize their financial reports more safely.
Original PR description
## Steps to Reproduce: 1. Install the Accounting module with demo data. 2. Enable developer mode. 3. Go to Reporting > Profit and Loss. 4. Click Configuration and delete the 'Gross Profit' line. 5. Return to the report. ## Error: `ValueError: External ID not found in the system: l10n_us_reports.pl_gross_profit` ## Cause: The report assumes the summary lines always exist and tries to fetch XML IDs. If any of these lines has been deleted, looking up will raises an error. ## Fix: Only apply the bold class to summary lines whose XML IDs are available. sentry-7601831925 Forward-Port-Of: odoo/enterprise#125200 Forward-Port-Of: odoo/enterprise#124011
Users with IoT access but without Point of Sale access can now enable LNA on an IoT box without encountering an access error. This helps authorized IoT users complete device setup without needing extra POS permissions.
Original PR description
Before this commit, if a user who has IoT permissions but not POS permissions tries to enable LNA on an IoT box record, they will receive an Access Error. After this commit, a `sudo` is added to the `onchange` handler fixing the issue. task-6392548 Forward-Port-Of: odoo/enterprise#124656
This fix prevents Swiss payroll processing from failing when a payroll rule has been archived. It helps keep payroll value calculations and related transmissions stable even when older rules are no longer active.
Original PR description
Forward-Port-Of: odoo/enterprise#103677
The salary attachment form now shows the refund option again, matching information that was already stored in the system. This helps payroll users correctly view and manage refund-related salary attachments without needing to use a separate wizard.
Original PR description
In an old PR (https://github.com/odoo/enterprise/pull/109195) the is_refund field was removed from the salary attachment view, although the field itself was not removed from the db. In a later PR (https://github.com/odoo/enterprise/pull/114188) the field was removed from the database but later reverted (https://github.com/odoo/enterprise/pull/123728). As it stands now, the field is in the database and is present in the view of a wizard but not in the standard form view of the salary attachment. This PR is reintroducing it. Task: 6415857 Forward-Port-Of: odoo/enterprise#125420
Fixes an issue where deleting a Knowledge article linked to an Annual Report could cause the automated cleanup process to fail. The cleanup now also removes the related annual report record, preventing background errors and keeping accounting review data consistent.
Original PR description
When a knowledge article linked to an Annual report is moved to the trash and the ``Base: Auto-vacuum internal data`` cron runs, a traceback will generate. Steps to reproduce the error: - Install…
When a knowledge article linked to an Annual report is moved to the trash and the ``Base: Auto-vacuum internal data`` cron runs, a traceback will generate. Steps to reproduce the error: - Install ``accountant_knowledge`` module - Go to Accounting > Review > Annual Report > Create a new annual report - Go to Knowledge > Open the knowledge article linked to the annual report > Send to Trash - Run the ``Base: Auto-vacuum internal data`` cron Traceback: ```py ForeignKeyViolation: update or delete on table "knowledge_article" violates foreign key constraint "audit_report_knowledge_article_id_fkey" on table "audit_report" DETAIL: Key (id)=(67) is still referenced from table "audit_report". ``` https://github.com/odoo/enterprise/blob/04cce2e400ce2e412f28aa1849078a7c40ff0e2c/knowledge/models/knowledge_article.py#L1069-L1070 The garbage collector deletes trashed knowledge articles that match its domain. Since this domain also includes articles linked to Annual Reports, the cron attempts to delete records that are still referenced by annual report, resulting in a foreign key violation error. Solution: Ensure linked audit reports are also deleted during knowledge article garbage collection. sentry-7488793071 Forward-Port-Of: odoo/enterprise#125323 Forward-Port-Of: odoo/enterprise#121189
The AI-powered SEO autofill now generates page titles and metadata in the website page's language instead of the logged-in user's language. This helps multilingual websites publish consistent, correctly localized SEO content for visitors and search engines.
Original PR description
The SEO "Fill with AI" autofill used the user's language for generation. On a website whose language differs from the user's, the generated seo metadata was therefore in the wrong language. This commit fixes this by using the page language instead. Forward-Port-Of: odoo/enterprise#123786 Forward-Port-Of: odoo/enterprise#123447
This fixes an issue that could cause equity transaction processing to fail when multiple transactions were handled at the same time. Users should experience fewer interruptions and error messages when working with cap table or equity transaction data.
Original PR description
When the ``_compute_security_price`` method is called on multiple records, a traceback will appear. Traceback: ```py ValueError: Expected singleton: equity.transaction(1, 2) ``` https://github.com/odoo/enterprise/blob/314a79b774f30dc9377b2971492576c4b84483e1/equity/models/equity_transaction.py#L218 The method filters newly created records using ``self._origin.id``. Since ``self`` is the whole recordset, accessing ``self._origin.id`` on multiple records raises a singleton error. sentry-7626410485 Forward-Port-Of: odoo/enterprise#125307
Fixes an issue where the Trial Balance report could fail when loading more partner-grouped lines for Colombian accounting reports. Users can now expand accounts and load additional lines reliably, even when some report data has empty column details.
Original PR description
…umn dict Steps to reproduce: - Install l10n_co_reports and select CO company - Open the trial balance grouped by partner variant - Set the load more limit to 2 - Go back to report, unfold an account, and press load-more line -> Traceback because it's expected the column dict to contain a column group. The report engine, however, accepts lines with empty dicts. Therefore, the trial balance should handle this case. task-6384451 Forward-Port-Of: odoo/enterprise#124506 Forward-Port-Of: odoo/enterprise#124102
#### Description of the issue this PR addresses: - Tables containing only a `<caption>` (or a `<thead>` without a `<tbody>`) could reach the editor with no `<tbody>`. - Since table width and margin are moved to the `<tbody>` during setup in 19.0–19.2, such tables caused the editor to fail. - Table operations such as resizing and adding rows or columns also expect a `<tbody>` to exist. #### Desired behavior after PR is merged: - Tables without a `<tbody>` are normalized during editor setup
Original PR description
#### Description of the issue this PR addresses: - Tables containing only a `<caption>` (or a `<thead>` without a `<tbody>`) could reach the editor with no `<tbody>`. - Since table width and margin are moved to the `<tbody>` during setup in 19.0–19.2, such tables caused the editor to fail. - Table operations such as resizing and adding rows or columns also expect a `<tbody>` to exist. #### Desired behavior after PR is merged: - Tables without a `<tbody>` are normalized during editor setup. - `<thead>` is converted or merged into `<tbody>`. - A missing `<tbody>` is created when necessary, preventing the editor from crashing. task-6391354 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#278114 Forward-Port-Of: odoo/odoo#276588
Steps to reproduce: ==== - Disable `Group Products in POS` on the product's UoM. - Create a sale order containing that product. - Settle the sale order in POS. Issue: ==== - Order lines are grouped even though grouping is disabled for the product's UoM. Cause: ==== - During the refactoring of `pos_stock`, the order line splitting logic was moved to `pos_sale_stock`. As a result, when `pos_sale_stock` is not installed, sale order lines are no longer split when settling a sale order.
Original PR description
Steps to reproduce: ==== - Disable `Group Products in POS` on the product's UoM. - Create a sale order containing that product. - Settle the sale order in POS. Issue: ==== - Order lines are grouped even though grouping is disabled for the product's UoM. Cause: ==== - During the refactoring of `pos_stock`, the order line splitting logic was moved to `pos_sale_stock`. As a result, when `pos_sale_stock` is not installed, sale order lines are no longer split when settling a sale order. Fix: ==== - Move the shared order line splitting logic to `pos_sale` so it is always applied when settling sale orders, regardless of whether `pos_sale_stock` is installed. task-6401619 Forward-Port-Of: odoo/odoo#277695
Steps to reproduce: - Install Argentina(l10n_ar) localization > Change Company - Accounting > Customers > Invoices > Select an invoice > Click "Pay" - In "Journal" select "Third Party Checks" > In "Payment Method" select "New Third Party Checks" > Fill the rest of the check info (Number, Bank Account, Issuer Vat, Payment Date and Amount) > Click on "Create Payment" - Repeat the payment process for another invoice with same info > Validation Error A change in [PR] caused the check uniquene
Original PR description
Steps to reproduce: - Install Argentina(l10n_ar) localization > Change Company - Accounting > Customers > Invoices > Select an invoice > Click "Pay" - In "Journal" select "Third Party Checks" > In…
Steps to reproduce: - Install Argentina(l10n_ar) localization > Change Company - Accounting > Customers > Invoices > Select an invoice > Click "Pay" - In "Journal" select "Third Party Checks" > In "Payment Method" select "New Third Party Checks" > Fill the rest of the check info (Number, Bank Account, Issuer Vat, Payment Date and Amount) > Click on "Create Payment" - Repeat the payment process for another invoice with same info > Validation Error A change in [PR] caused the check uniqueness constraint apply to all checks. Because of this, using the same check number with the "New Third Party Checks" payment method now raises a validation error. This is not the intended behavior. The uniqueness constraint should only apply to "Own Checks" when using a "Bank" journal for Vendor Bills. It should not apply to "Third Party Checks" with the "New Third Party Checks" payment method in Customer Invoice. Avoid linking `l10n_latam_check_ids` on liquidity lines for outbound "Own Checks" payments so that the uniqueness constraint is enforced only for the "Vendor Bills". [PR]: https://github.com/odoo/odoo/pull/243509/changes opw-6334965 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#275261
#### Description of the issue this PR addresses: - Blockquotes currently display their border on the left side. #### Desired behavior after PR is merged: - Update the styling so the border is displayed on the right side for RTL content. task-6296519 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#277057 Forward-Port-Of: odoo/odoo#269529
Original PR description
#### Description of the issue this PR addresses: - Blockquotes currently display their border on the left side. #### Desired behavior after PR is merged: - Update the styling so the border is displayed on the right side for RTL content. task-6296519 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#277057 Forward-Port-Of: odoo/odoo#269529
When installing the module document_account_peppol, the user has the choice to import his Peppol invoices into the Documents app directly, but also to block the import in Accounting, by removing the Peppol import journal. In that last case, the Peppol application response flow is broken, the document model does not contain the necessary information to handle responses as the imported invoices do. (In stable) We took the decision to remove the ApplicationResponse service from users that bl
Original PR description
When installing the module document_account_peppol, the user has the choice to import his Peppol invoices into the Documents app directly, but also to block the import in Accounting, by removing the Peppol import journal. In that last case, the Peppol application response flow is broken, the document model does not contain the necessary information to handle responses as the imported invoices do. (In stable) We took the decision to remove the ApplicationResponse service from users that block the invoice import flow by removing the import journal. For PDP, the responses are required, but as the block is completely replaced in the view, and reuses the basic account_peppol condition for the required attribute, the account peppol purchase journal will always be required if the company is registered on Peppol/PDP. Nothing to do in 18.0. task-6191644 Forward-Port-Of: odoo/odoo#270096 Forward-Port-Of: odoo/odoo#270091
For a logged-in user, some form fields are automatically prefilled from their profile, such as a "Phone" field with their phone number. **Issue:** The prefill configuration is always preserved when we change options of a field. While this is correct when updating few options, but it also happens after the field is repurposed, causing it to inherit a prefill value intended for a different field. **Steps to reproduce:** - Edit the /contactus page's form. - Change the "Name" field's ty
Original PR description
For a logged-in user, some form fields are automatically prefilled from their profile, such as a "Phone" field with their phone number. **Issue:** The prefill configuration is always preserved when…
For a logged-in user, some form fields are automatically prefilled from their profile, such as a "Phone" field with their phone number. **Issue:** The prefill configuration is always preserved when we change options of a field. While this is correct when updating few options, but it also happens after the field is repurposed, causing it to inherit a prefill value intended for a different field. **Steps to reproduce:** - Edit the /contactus page's form. - Change the "Name" field's type to a "URL" or "CC" field. - Save the changes. - The "URL/CC" field is prefilled with the user's name. A field is considered repurposed when: - its type is changed (e.g. from "Phone" to "URL"); - a custom field is converted into an existing field. **Fix:** This commit preserves the prefill only when the field keeps the same name and type. Otherwise, it clears the stale prefill so repurposed fields no longer inherit incorrect values. task-[5976747](https://www.odoo.com/odoo/project/974/tasks/5976747) Forward-Port-Of: odoo/odoo#278426 Forward-Port-Of: odoo/odoo#275812
Version: -------- - 18.0+ Steps to reproduce: ------------------- - Install `stock` module - Configure a multi-company environment with a `Main Company` and a `Secondary Company` - Go to the setting enable Lots & Serial Numbers and switch into `Secondary Company` - Create a warehouse for the Secondary Company - In the Secondary Company, create a lot-tracked storable product - Create and validate a delivery for that product - Open the Traceability Report - Print the report Is
Original PR description
Version: -------- - 18.0+ Steps to reproduce: ------------------- - Install `stock` module - Configure a multi-company environment with a `Main Company` and a `Secondary Company` - Go to the setting…
Version:
--------
- 18.0+
Steps to reproduce:
-------------------
- Install `stock` module
- Configure a multi-company environment with a `Main Company`
and a `Secondary Company`
- Go to the setting enable Lots & Serial Numbers and switch into
`Secondary Company`
- Create a warehouse for the Secondary Company
- In the Secondary Company, create a lot-tracked storable product
- Create and validate a delivery for that product
- Open the Traceability Report
- Print the report
Issue:
------
The report header always displays the Main Company, even though the
traceability report belongs entirely to the Secondary Company.
Cause:
------
https://github.com/odoo/odoo/blob/2d54db3ac0b6d807e580315e2633f3e2b10a700c/addons/stock/static/src/client_actions/stock_traceability_report_backend.xml#L9
Clicking Print calls onClickPrint(), which builds the PDF URL and
downloads it with download() (a plain XMLHttpRequest POST), landing on
the `type='http'` route `/stock/<output_format>/<report_name>`
https://github.com/odoo/odoo/blob/3bd6b10c3f9ad8d93062b6b46490500edb8c9697/addons/stock/static/src/client_actions/stock_traceability_report_backend.js#L125-L134
That controller calls stock.traceability.report.get_pdf() without ever setting
`company_id` in the rendering context.
https://github.com/odoo/odoo/blob/3bd6b10c3f9ad8d93062b6b46490500edb8c9697/addons/stock/controllers/main.py#L23
Inside `get_pdf()`, the report header is rendered by passing an `rcontext`
dict to `web.internal_layout`.
That template resolves the company to display using the following priority:
https://github.com/odoo/odoo/blob/3bd6b10c3f9ad8d93062b6b46490500edb8c9697/addons/web/views/report_templates.xml#L805-L816
1. `company_id` — an explicit company record in the render context
2. `o.company_id` — the company of the document object `o`
3. `res_company` — the fallback, injected by `_render_template()` as
`self.env.company`
Because `get_pdf()` never sets `company_id` or `o` in `rcontext`, the
template always falls through to `res_company`.
https://github.com/odoo/odoo/blob/3bd6b10c3f9ad8d93062b6b46490500edb8c9697/odoo/addons/base/models/ir_actions_report.py#L770
This is populated by `ir.actions.report._render_template()`
as `self.env.company`, which resolves to the first company in
the user's `allowed_company_ids` list — typically the main company
regardless of which company owns the lot,
picking, or stock moves being printed.
As a result, the report content belongs to the secondary company while the
header always shows the main company.
Fix:
----
Resolve the company from the record on which the traceability report is
opened (using `active_model` and `active_id`) and pass it explicitly as
`company_id` when rendering the report.
`web.internal_layout` already gives precedence to an explicit
`company_id` over the default `res_company`, ensuring the report header
always displays the company that owns the traced record.
When the record has no company set, the header falls back to
`res_company`. Since the print request is a raw `type='http'` download
that never receives the company switcher's context, `user.context`
(holding `allowed_company_ids`) is now forwarded in the download POST
and merged into the environment by the controller - as done in
`web/controllers/report.py` - so the fallback resolves to the currently
active company instead of the user's default one.
<details>
<summary>Click here to see the results:</summary>
<p><strong>Before:</strong></p>
<div class="image-row">
<img src="https://github.com/user-attachments/assets/7e3a5d65-9114-4bce-9139-a88cff7c261f" />
</div>
<p><strong>After:</strong></p>
<div class="image-row">
<img src="https://github.com/user-attachments/assets/0a105f80-b6ae-400d-a787-fb8706d5f519" />
</div>
</details>
---
opw-6345446
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#273595### Steps to reproduce: - Ensure `sale_stock_renting` is installed - Enable Multi-Steps Routes > Unarchive MTO - Create a product P with a BoM and the routes MTO + manufacture - Create anc confirm a sale order for A unit of P - Log in with an other user with with mrp User rights and sales User: Own Documents Only (he should not have access to the SO) - Open the MO, add a component line and save #### > Access Error: Blame the following rule: - Personal Order ### Cause of the issue:
Original PR description
### Steps to reproduce: - Ensure `sale_stock_renting` is installed - Enable Multi-Steps Routes > Unarchive MTO - Create a product P with a BoM and the routes MTO + manufacture - Create anc confirm a…
### Steps to reproduce: - Ensure `sale_stock_renting` is installed - Enable Multi-Steps Routes > Unarchive MTO - Create a product P with a BoM and the routes MTO + manufacture - Create anc confirm a sale order for A unit of P - Log in with an other user with with mrp User rights and sales User: Own Documents Only (he should not have access to the SO) - Open the MO, add a component line and save #### > Access Error: Blame the following rule: - Personal Order ### Cause of the issue: Writing on the `move_raw_ids` will trigger a call of the `_autoconfirm_production` in order to confirm the newly created move: https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/mrp/models/mrp_production.py#L990-L991 https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/mrp/models/mrp_production.py#L1422-L1423 During this confirmation process, one calls the `_merge_moves` method in order to merge this new move (if relevant) to any already existing one. https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/stock/models/stock_move.py#L1575-L1576 Now, the issue is that, `sale_stock_renting` modeule overrides the method `_prepare_merge_moves_distinct_fields` determining the fields relevant to the merge by requiring a read access to the `is_rental_order` compute field of the `sale_order` linked to the MO: https://github.com/odoo/enterprise/blob/b66097122ba3a758734ac6fb2b26579c35cb72c2/sale_stock_renting/models/stock_move.py#L34-L40 However, due to the 'Personal Orders' ir.rule, the user does not have a read access to this record: https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/sale/security/ir_rules.xml#L44-L49 Enterprise: https://github.com/odoo/enterprise/pull/121135 opw-6275658 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#272256 Forward-Port-Of: odoo/odoo#271017
**Problem:** On a job position whose company is left empty ("Visible to all"), the Recruiter dropdown does not propose any user anymore: only the "Create" option is offered. The same happens on applicants without a company. Only saas-19.2 is affected: 19.0/19.1 still use the res.users-based recruiter field, and on saas-19.3 the company became mandatory on job positions. **Steps to reproduce:** 1. Install Recruitment 2. Open a job position whose Company is "Visible to all" (e.g. any demo jo
Original PR description
**Problem:** On a job position whose company is left empty ("Visible to all"), the Recruiter dropdown does not propose any user anymore: only the "Create" option is offered. The same happens on…
**Problem:**
On a job position whose company is left empty ("Visible to all"), the Recruiter dropdown does not propose any user anymore: only the "Create" option is offered. The same happens on applicants without a company. Only saas-19.2 is affected: 19.0/19.1 still use the res.users-based recruiter field, and on saas-19.3 the company became mandatory on job positions.
**Steps to reproduce:**
1. Install Recruitment
2. Open a job position whose Company is "Visible to all" (e.g. any demo job position)
3. Edit the Recruiter field
**Current behavior:**
The dropdown shows no user, only the "Create" option.
**Expected behavior:**
The dropdown lists the recruiters of all companies, as it does (per company) when a company is set.
**Cause of the issue:**
Commit 05e22346050d replaced the res.users-based `user_id` recruiter field with the hr.employee-based `recruiter_id`, declared with `check_company=True`. For check_company fields, `_description_domain()` sends the client `company_id and [('company_id', 'in', [company_id, False])] or [('company_id', '=', False)]`. When the record has no company, the domain falls back to `[('company_id', '=', False)]`, and since `hr.employee.company_id` is required, no employee can ever match. This reintroduces the issue previously fixed by 5dfe494e62af for the old user_id field: the `allowed_user_ids` mechanism introduced there was dropped by the field replacement.
**Fix:**
`check_company=True` brings nothing to these models server-side (neither `hr.job` nor `hr.applicant` has `_check_company_auto`): its only effect is that client-side domain. Folding the company condition directly into the recruiter domain with `('company_id', '=?', company_id)` keeps the per-company filtering when a company is set and degrades to no filtering when it is not, mirroring what is already done for `interviewer_ids` on the job position. The domains become strings so the client keeps evaluating `company_id` per record.
opw-6290312
Forward-Port-Of: odoo/odoo#276079
Forward-Port-Of: odoo/odoo#270529Problem: When a table (or banner, or columns block) is placed inside a toggle block, deleting the last paragraph in a table cell creates a new block after the toggle block and moves the selection outside the table. Cause: `handleDeleteBackwardContentEnd` assumes the deleted block is always a direct child of the toggle content. However, the deleted block may be nested inside a table, banner, or columns block. Solution: Only create a new block after the toggle block when the selected bloc
Original PR description
Problem: When a table (or banner, or columns block) is placed inside a toggle block, deleting the last paragraph in a table cell creates a new block after the toggle block and moves the selection outside the table. Cause: `handleDeleteBackwardContentEnd` assumes the deleted block is always a direct child of the toggle content. However, the deleted block may be nested inside a table, banner, or columns block. Solution: Only create a new block after the toggle block when the selected block is a direct child of the toggle content. Steps to reproduce: - Add a toggle block. - Insert a table inside its content. - Add two paragraphs to a table cell. - Delete the last paragraph. - Observe that a new block is created after the toggle block and the selection moves outside the table. opw-6382058 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#278119 Forward-Port-Of: odoo/odoo#277194
Steps to reproduce: 1. Drop the Website Form snippet. 2. Add a checkbox field. 3. Change the label position to Top. > The Default Value option disappears. Cause: The `applyTo` selector relied on the `.col-sm` wrapper, which is only present for left/right label positions. As a result, it did not match checkbox fields with Top or None labels. This commit fix the applyTo selector so the Default Value option is displayed for checkbox fields regardless of the selected label position.
Original PR description
Steps to reproduce: 1. Drop the Website Form snippet. 2. Add a checkbox field. 3. Change the label position to Top. > The Default Value option disappears. Cause: The `applyTo` selector relied on the `.col-sm` wrapper, which is only present for left/right label positions. As a result, it did not match checkbox fields with Top or None labels. This commit fix the applyTo selector so the Default Value option is displayed for checkbox fields regardless of the selected label position. task-6373796 Forward-Port-Of: odoo/odoo#277754 Forward-Port-Of: odoo/odoo#275823
Steps to reproduce: - activate location - create a tracked product A - create a PO with qty=10 with product A - receive them (8 in WH/Stock, 2 in WH/Stock/Shelf 1) - In Reporting/stock filter with "wh/stock" Issue: On hand value will be 0 Cause: "wh/stock did not match _rec_names = 'name' -> WH location is different than "stock" location (who's parent is "WH"). We need to match it with _rec_names_search (1) to match the right location. We fall back on _rec_names in case _rec_name
Original PR description
Steps to reproduce: - activate location - create a tracked product A - create a PO with qty=10 with product A - receive them (8 in WH/Stock, 2 in WH/Stock/Shelf 1) - In Reporting/stock filter with "wh/stock" Issue: On hand value will be 0 Cause: "wh/stock did not match _rec_names = 'name' -> WH location is different than "stock" location (who's parent is "WH"). We need to match it with _rec_names_search (1) to match the right location. We fall back on _rec_names in case _rec_names_search would not be defined (not really necessary in here but meh why not be conservative) (1) https://github.com/odoo/odoo/blob/2bb7493b72b400ed76cc6460c94867fb86de9f3a/addons/stock/models/stock_location.py#L19 opw-6312702 Forward-Port-Of: odoo/odoo#277059 Forward-Port-Of: odoo/odoo#271552
**Steps to reproduce:** - Enable 2FA - Change user language - Log in in another private window / device - Check the notification email of a login with another device - Email body/subject are not properly adapted to user language **Issue:** View manual rendering doesn't pass the user language. **Fix:** Add it to the context before `_render_template` and subject translation (reapply similar fix [1]). [1] https://github.com/odoo/odoo/commit/4d8d1736ca03a3d6b4e86cbc7463a79a284d1f3c
Original PR description
**Steps to reproduce:** - Enable 2FA - Change user language - Log in in another private window / device - Check the notification email of a login with another device - Email body/subject are not properly adapted to user language **Issue:** View manual rendering doesn't pass the user language. **Fix:** Add it to the context before `_render_template` and subject translation (reapply similar fix [1]). [1] https://github.com/odoo/odoo/commit/4d8d1736ca03a3d6b4e86cbc7463a79a284d1f3c opw-6042550 Forward-Port-Of: odoo/odoo#275705 Forward-Port-Of: odoo/odoo#261468
Steps: - Install sale app. - Create SO for portal user. - Login with portal user. - Vat field is not editable and warning is wrong. Issue: - Before https://github.com/odoo/odoo/pull/211043 and recent fix https://github.com/odoo/odoo/pull/275207 portal user can edit their Vat number even if they have confirmed documents (invoice or SO) if Vat field is not set. Since `is_company` refactoring having set parent_name on address create related company and making `is_commercial_address` False a
Original PR description
Steps: - Install sale app. - Create SO for portal user. - Login with portal user. - Vat field is not editable and warning is wrong. Issue: - Before https://github.com/odoo/odoo/pull/211043 and recent fix https://github.com/odoo/odoo/pull/275207 portal user can edit their Vat number even if they have confirmed documents (invoice or SO) if Vat field is not set. Since `is_company` refactoring having set parent_name on address create related company and making `is_commercial_address` False and because that `Vat` field became reaonly and after recent fix `is_commercial_address` was set from `can_edit_vat` and validation done based on `can_edit_vat` before that `Vat` was editable if they have confirmed documents Fix: - Only make `Vat` readonly if Vat is set and is not individual address Forward-Port-Of: odoo/odoo#278233 Forward-Port-Of: odoo/odoo#277459
# How to reproduce - In Settings, enable Variants & Product Reference Price - Create a published Product with a Sales Price - Add 2 variants to the Product - In the product's variant list, select the first one & set Base Unit Count to 0, - Set the second variant's Base Unit Count to a value > 0 - Go to the Product's page - Select the second variant # The issue The Reference Price is not displayed for the second variant, even though it should since it has a Base Unit Count > 0. Refresh
Original PR description
# How to reproduce - In Settings, enable Variants & Product Reference Price - Create a published Product with a Sales Price - Add 2 variants to the Product - In the product's variant list, select the…
# How to reproduce
- In Settings, enable Variants & Product Reference Price
- Create a published Product with a Sales Price
- Add 2 variants to the Product
- In the product's variant list, select the first one & set Base Unit Count to 0,
- Set the second variant's Base Unit Count to a value > 0
- Go to the Product's page
- Select the second variant
# The issue
The Reference Price is not displayed for the second variant, even though it should since it has a Base Unit Count > 0. Refreshing the page while being on the second variant will prevent the bug from happening.
# Cause
When loading the product's info, we call `_onChangeCombination`. This method is responsible for, among other things, updating the reference price and hiding it if Base Unit Count = 0 :
https://github.com/odoo/odoo/blob/68f258e99f42693131a5309b3606c3b95f93d824/addons/website_sale/static/src/js/variant_mixin.js#L277-L289
To do that, it will search for an html element with the `.o_base_unit_price` css class. If it does not find it, the reference price will not be updated. The issue is that this element is behind a condition in the template :
https://github.com/odoo/odoo/blob/68f258e99f42693131a5309b3606c3b95f93d824/addons/website_sale/views/templates.xml#L2083
When the first time the template is loaded, if
`combination_info.get('base_unit_price')` is False, then the Reference Price will never be added to the view and will never be found by `_onChangeCombination`.
Since our first variant has Base Unit Count = 0, then `base_unit_price` will equal 0, so `combination_info.get('base_unit_price')` will be evaluated to false.
opw-6367289
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#276713
Forward-Port-Of: odoo/odoo#274722**STEP TO REPRODUCE** 1. Install l10n_fr_pdp and select the french company. 2. Go on a contact form, under invoicing, select 'by Approved Platform' for invoice sending. 3. Click on the eInvoice format selection, and notice the format 'France E-invoicing (UBL 2.1)' is not there. Note: with other invoice sending values, it shows up. **CAUSE** In the `_get_ubl_cii_formats_info()` override in `l10n_fr_pdp`, we declare the ubl_21_fr format as not being usable with the peppol invoice sending me
Original PR description
**STEP TO REPRODUCE** 1. Install l10n_fr_pdp and select the french company. 2. Go on a contact form, under invoicing, select 'by Approved Platform' for invoice sending. 3. Click on the eInvoice format selection, and notice the format 'France E-invoicing (UBL 2.1)' is not there. Note: with other invoice sending values, it shows up. **CAUSE** In the `_get_ubl_cii_formats_info()` override in `l10n_fr_pdp`, we declare the ubl_21_fr format as not being usable with the peppol invoice sending method. However, the Approved Platform invoice sending (used to send ubl_21_fr) *is* the peppol invoice sending method in disguise. (we reused the peppol invoice sending method because pdp and peppol are very similar). opw-6387796 Forward-Port-Of: odoo/odoo#276276
This PR fixes the issue of the Cancel button floating on the last row when the buttons wrap and other overflowing issues. Before this PR, we were targetting the screen's orientation and max-height, which worked in general but still let a few layout issues through. On tablets the buttons are large and squarish for better touch usability (which has the double function of leaving plenty of space for translations), this makes fitting them within the modal container without overflowing a bit more c
Original PR description
This PR fixes the issue of the Cancel button floating on the last row when the buttons wrap and other overflowing issues. Before this PR, we were targetting the screen's orientation and max-height,…
This PR fixes the issue of the Cancel button floating on the last row when the buttons wrap and other overflowing issues. Before this PR, we were targetting the screen's orientation and max-height, which worked in general but still let a few layout issues through. On tablets the buttons are large and squarish for better touch usability (which has the double function of leaving plenty of space for translations), this makes fitting them within the modal container without overflowing a bit more complex. Instead, we target ranges of the aspect-ratio of the screen and adjust the buttons squarish aspect-ratio and the number of grid columns accordingly. By controlling the grid's columns we're able to tell the last button (the Cancel button) to stretch to full width when needed as well as having a more balanced layout in both landscape and portrait views. task-6235164 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265711
When inserting nodes, they are run through `node_to_insert_processors` to possibly handle some conversions - e.g. turning paragraphs into further list items within a list. However the `insertedNodes` returned by the `insert` method are actually the nodes that were initially requested to be added. This commit puts the nodes among the `insertedNodes` after they were potentially converted. task-6364282 Forward-Port-Of: odoo/odoo#277789
Original PR description
When inserting nodes, they are run through `node_to_insert_processors` to possibly handle some conversions - e.g. turning paragraphs into further list items within a list. However the `insertedNodes` returned by the `insert` method are actually the nodes that were initially requested to be added. This commit puts the nodes among the `insertedNodes` after they were potentially converted. task-6364282 Forward-Port-Of: odoo/odoo#277789
10 changes
Resolved issues and error corrections
Deleting a Knowledge article linked to an Annual Report no longer causes the automated cleanup process to fail. The fix keeps related Annual Report data consistent during cleanup, avoiding unexpected errors for accounting teams.
Original PR description
When a knowledge article linked to an Annual report is moved to the trash and the ``Base: Auto-vacuum internal data`` cron runs, a traceback will generate. Steps to reproduce the error: - Install…
When a knowledge article linked to an Annual report is moved to the trash and the ``Base: Auto-vacuum internal data`` cron runs, a traceback will generate. Steps to reproduce the error: - Install ``accountant_knowledge`` module - Go to Accounting > Review > Annual Report > Create a new annual report - Go to Knowledge > Open the knowledge article linked to the annual report > Send to Trash - Run the ``Base: Auto-vacuum internal data`` cron Traceback: ```py ForeignKeyViolation: update or delete on table "knowledge_article" violates foreign key constraint "audit_report_knowledge_article_id_fkey" on table "audit_report" DETAIL: Key (id)=(67) is still referenced from table "audit_report". ``` https://github.com/odoo/enterprise/blob/04cce2e400ce2e412f28aa1849078a7c40ff0e2c/knowledge/models/knowledge_article.py#L1069-L1070 The garbage collector deletes trashed knowledge articles that match its domain. Since this domain also includes articles linked to Annual Reports, the cron attempts to delete records that are still referenced by annual report, resulting in a foreign key violation error. Solution: Ensure linked audit reports are also deleted during knowledge article garbage collection. sentry-7488793071 Forward-Port-Of: odoo/enterprise#125323 Forward-Port-Of: odoo/enterprise#121189
Philippines check printing now rounds the cents portion of written amounts to two decimals, even when the currency is configured with more precision. This prevents confusing or incorrect check text such as showing four decimal digits in the cents field.
Original PR description
Current behavior: --- When paying with checks, if the currency has more than 2 decimals, the decimal amount is printed with more than 2 decimals. Steps to reproduce: --- 1. Switch to PH company 2. Set setting Check Layout as "Print Check - PH" 3. In the PHP currency, change rounding factor to 0.0001 4. In Decimal accuracy > product price, set 4 digits 5. Create a new Vendor Payment, payment method Check, amount 100.1268 PHP 6. Results: One Hundred and 1268/100, should be 13/100 Expected behavior: --- The xx/100 part of amount in words text in the check should always be rounded to 2 decimals. opw-6302337 Forward-Port-Of: odoo/enterprise#124572 Forward-Port-Of: odoo/enterprise#121913
The timesheet timer now automatically returns the cursor to the description field after users save or reset an entry. This removes an extra click when entering multiple timesheets and makes the workflow smoother.
Original PR description
Steps to reproduce: - Install the timesheets application. - Open the timesheet timer menu from the systray. - Fill out the new timesheet entry. - Click the 'Save' or 'Reset' button (or use the keyboard hotkey). - Notice that the cursor focus is lost and the user must manually click back into the description field to start a new entry. Cause: - When a user clicks save or reset, the existing form is cleared via a DOM patch. Because the component is not remounted, the initial onMounted focus logic does not execute again. Fix: - Use onPatched to check if the save or discard button is the active element, and automatically re-focus the description input. task-6357438 Forward-Port-Of: odoo/enterprise#123697
The trial balance report now treats near-zero calculation differences as zero, preventing tiny floating-point amounts from appearing in XLSX exports. This avoids confusion when accounts that should balance to zero are reviewed or shared.
Original PR description
Steps to reproduce -------------------- - Install account_reports module; - Create a new account; - Create a miscellanous operation for the previous month using thenew account with a credit amount of $8.28; - Create a second MISC for the current month with two lines using the account : debit = 262.67 and credit = 254.39; - Open the trial balance report and filter the new account (end balance should be 0); - Export the report as XLSX; The end balance value is 2.84e-14 due to float rounding issues. opw-6369016 Forward-Port-Of: odoo/enterprise#125416 Forward-Port-Of: odoo/enterprise#123896
Automated work suggestions now correctly classify Discuss-related time under the Discuss app instead of the database. This helps keep timesheet suggestions and reporting more accurate for users reviewing their activity.
Original PR description
## Previous Behavior: When generateing AW sugestions, discuss related time would be associated to the DB and not the discuss app inside the database. ## Task task-[5167914](https://www.odoo.com/odoo/project/4105/tasks/5167914/project.task/6381120/project.task/6409826) Forward-Port-Of: odoo/enterprise#125339
This fixes an issue where the US Profit and Loss report could crash if a configurable summary line, such as Gross Profit, had been deleted. The report now skips missing summary lines when applying formatting, allowing users to continue viewing the report normally.
Original PR description
## Steps to Reproduce: 1. Install the Accounting module with demo data. 2. Enable developer mode. 3. Go to Reporting > Profit and Loss. 4. Click Configuration and delete the 'Gross Profit' line. 5. Return to the report. ## Error: `ValueError: External ID not found in the system: l10n_us_reports.pl_gross_profit` ## Cause: The report assumes the summary lines always exist and tries to fetch XML IDs. If any of these lines has been deleted, looking up will raises an error. ## Fix: Only apply the bold class to summary lines whose XML IDs are available. sentry-7601831925 Forward-Port-Of: odoo/enterprise#125200 Forward-Port-Of: odoo/enterprise#124011
This fix updates the Field Service planning module to use the latest internal mail tracking method name. It helps ensure planning changes continue to generate the correct activity or log messages after related platform updates.
Original PR description
Rename `_track_subtype` to `_track_log_get_default_subtype` to align with the updated mail tracking. Related Commit https://github.com/odoo/odoo/pull/248505/changes/9c1ce65cdd924b50df3eeef5c69cac110d1eb26b
Users with IoT access but without Point of Sale permissions can now enable LNA on IoT box records without hitting an access error. This removes an unnecessary blocker for teams managing IoT devices separately from POS operations.
Original PR description
Before this commit, if a user who has IoT permissions but not POS permissions tries to enable LNA on an IoT box record, they will receive an Access Error. After this commit, a `sudo` is added to the `onchange` handler fixing the issue. task-6392548 Forward-Port-Of: odoo/enterprise#124656
Steps to reproduce: - Install Argentina(l10n_ar) localization > Change Company - Accounting > Customers > Invoices > Select an invoice > Click "Pay" - In "Journal" select "Third Party Checks" > In "Payment Method" select "New Third Party Checks" > Fill the rest of the check info (Number, Bank Account, Issuer Vat, Payment Date and Amount) > Click on "Create Payment" - Repeat the payment process for another invoice with same info > Validation Error A change in [PR] caused the check uniquene
Original PR description
Steps to reproduce: - Install Argentina(l10n_ar) localization > Change Company - Accounting > Customers > Invoices > Select an invoice > Click "Pay" - In "Journal" select "Third Party Checks" > In…
Steps to reproduce: - Install Argentina(l10n_ar) localization > Change Company - Accounting > Customers > Invoices > Select an invoice > Click "Pay" - In "Journal" select "Third Party Checks" > In "Payment Method" select "New Third Party Checks" > Fill the rest of the check info (Number, Bank Account, Issuer Vat, Payment Date and Amount) > Click on "Create Payment" - Repeat the payment process for another invoice with same info > Validation Error A change in [PR] caused the check uniqueness constraint apply to all checks. Because of this, using the same check number with the "New Third Party Checks" payment method now raises a validation error. This is not the intended behavior. The uniqueness constraint should only apply to "Own Checks" when using a "Bank" journal for Vendor Bills. It should not apply to "Third Party Checks" with the "New Third Party Checks" payment method in Customer Invoice. Avoid linking `l10n_latam_check_ids` on liquidity lines for outbound "Own Checks" payments so that the uniqueness constraint is enforced only for the "Vendor Bills". [PR]: https://github.com/odoo/odoo/pull/243509/changes opw-6334965 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#275261
For a logged-in user, some form fields are automatically prefilled from their profile, such as a "Phone" field with their phone number. **Issue:** The prefill configuration is always preserved when we change options of a field. While this is correct when updating few options, but it also happens after the field is repurposed, causing it to inherit a prefill value intended for a different field. **Steps to reproduce:** - Edit the /contactus page's form. - Change the "Name" field's ty
Original PR description
For a logged-in user, some form fields are automatically prefilled from their profile, such as a "Phone" field with their phone number. **Issue:** The prefill configuration is always preserved when…
For a logged-in user, some form fields are automatically prefilled from their profile, such as a "Phone" field with their phone number. **Issue:** The prefill configuration is always preserved when we change options of a field. While this is correct when updating few options, but it also happens after the field is repurposed, causing it to inherit a prefill value intended for a different field. **Steps to reproduce:** - Edit the /contactus page's form. - Change the "Name" field's type to a "URL" or "CC" field. - Save the changes. - The "URL/CC" field is prefilled with the user's name. A field is considered repurposed when: - its type is changed (e.g. from "Phone" to "URL"); - a custom field is converted into an existing field. **Fix:** This commit preserves the prefill only when the field keeps the same name and type. Otherwise, it clears the stale prefill so repurposed fields no longer inherit incorrect values. task-[5976747](https://www.odoo.com/odoo/project/974/tasks/5976747) Forward-Port-Of: odoo/odoo#278426 Forward-Port-Of: odoo/odoo#275812
12 changes
Resolved issues and error corrections
This fix prevents scheduled cleanup from failing when a Knowledge article linked to an Annual Report has been moved to the trash. Linked annual report records are now cleaned up together, avoiding system errors during automatic maintenance.
Original PR description
When a knowledge article linked to an Annual report is moved to the trash and the ``Base: Auto-vacuum internal data`` cron runs, a traceback will generate. Steps to reproduce the error: - Install…
When a knowledge article linked to an Annual report is moved to the trash and the ``Base: Auto-vacuum internal data`` cron runs, a traceback will generate. Steps to reproduce the error: - Install ``accountant_knowledge`` module - Go to Accounting > Review > Annual Report > Create a new annual report - Go to Knowledge > Open the knowledge article linked to the annual report > Send to Trash - Run the ``Base: Auto-vacuum internal data`` cron Traceback: ```py ForeignKeyViolation: update or delete on table "knowledge_article" violates foreign key constraint "audit_report_knowledge_article_id_fkey" on table "audit_report" DETAIL: Key (id)=(67) is still referenced from table "audit_report". ``` https://github.com/odoo/enterprise/blob/04cce2e400ce2e412f28aa1849078a7c40ff0e2c/knowledge/models/knowledge_article.py#L1069-L1070 The garbage collector deletes trashed knowledge articles that match its domain. Since this domain also includes articles linked to Annual Reports, the cron attempts to delete records that are still referenced by annual report, resulting in a foreign key violation error. Solution: Ensure linked audit reports are also deleted during knowledge article garbage collection. sentry-7488793071 Forward-Port-Of: odoo/enterprise#125323 Forward-Port-Of: odoo/enterprise#121189
This update fixes how Belgian payroll notification files are analyzed. It helps ensure payroll declarations are processed more reliably and reduces the risk of errors when handling official notification files.
Uploading a document while Auto Sort is enabled no longer causes an error when the document is automatically moved to another folder. This keeps the Documents workflow stable and avoids interrupting users after sortable uploads.
Original PR description
When Auto Sort is enabled, an uploaded document can be moved to a different folder as part of the sort. The subsequent model reload only fetches records for the current folder to select/scroll to the new record. But, the new document's is absent from `env.model.root.records`. `newRecords` ends up empty, making `newRecords[0]` undefined, which then crashes accessing record.resId. To fix this, we just return early because if the record isn't in the current folder, there's nothing to select or scroll to anyway, so returning early here doesn't change anything visible behavior, it just avoids the crash. Steps to reproudce: 1.Go to Documents. 2.Go to Company->Inbox 3.Go to the gear icon and make sure the "Auto Sort" is enabled with "Move to folder" 4.Add a new document that's sortable. 5.You'll get the error. opw-6281558 Forward-Port-Of: odoo/enterprise#121069
This fix prevents Swiss payroll processing from failing when a related payroll rule has been archived. It helps keep monthly payroll data handling stable and avoids unexpected interruptions for HR teams.
Original PR description
Forward-Port-Of: odoo/enterprise#103677
This fix prevents an error that could occur when the system calculates security prices for multiple equity transactions at once. It helps keep equity transaction processing stable and avoids interruptions for users working with capitalization table data.
Original PR description
When the ``_compute_security_price`` method is called on multiple records, a traceback will appear. Traceback: ```py ValueError: Expected singleton: equity.transaction(1, 2) ``` https://github.com/odoo/enterprise/blob/314a79b774f30dc9377b2971492576c4b84483e1/equity/models/equity_transaction.py#L218 The method filters newly created records using ``self._origin.id``. Since ``self`` is the whole recordset, accessing ``self._origin.id`` on multiple records raises a singleton error. sentry-7626410485 Forward-Port-Of: odoo/enterprise#125307
Draft invoices no longer show clickable vehicle links on invoice lines. This keeps vehicle navigation consistent with product links, which only become available once the invoice is posted.
Original PR description
The vehicle under account on the invoice lines should not be clickable when the invoice is in draft. Only when it is posted, like the product. task-6385436
[*] = html_builder Steps to reproduce: 1. Go to the Website app and drop any snippet. 2. Apply a background or image shape. 3. If a background shape is applied, click the **Flip Shape** option. 4. Go to the **Theme** tab and change the color palette. Issue: The shape color is not updated after changing the color palette. Reason: In the [commit](https://github.com/odoo/odoo/commit/aec8918018b92cbb5cb3dd761824d4), an edge case was left uncovered where applied background/image shap
Original PR description
[*] = html_builder Steps to reproduce: 1. Go to the Website app and drop any snippet. 2. Apply a background or image shape. 3. If a background shape is applied, click the **Flip Shape** option. 4. Go to the **Theme** tab and change the color palette. Issue: The shape color is not updated after changing the color palette. Reason: In the [commit](https://github.com/odoo/odoo/commit/aec8918018b92cbb5cb3dd761824d4), an edge case was left uncovered where applied background/image shapes were not re-rendered after changing the theme color palette, so its color was not refreshed to match newly selected palette. Forward-Port-Of: odoo/odoo#277860 Forward-Port-Of: odoo/odoo#273337
#### Description of the issue this PR addresses: - Blockquotes currently display their border on the left side. #### Desired behavior after PR is merged: - Update the styling so the border is displayed on the right side for RTL content. task-6296519 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#277057 Forward-Port-Of: odoo/odoo#269529
Original PR description
#### Description of the issue this PR addresses: - Blockquotes currently display their border on the left side. #### Desired behavior after PR is merged: - Update the styling so the border is displayed on the right side for RTL content. task-6296519 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#277057 Forward-Port-Of: odoo/odoo#269529
For a logged-in user, some form fields are automatically prefilled from their profile, such as a "Phone" field with their phone number. **Issue:** The prefill configuration is always preserved when we change options of a field. While this is correct when updating few options, but it also happens after the field is repurposed, causing it to inherit a prefill value intended for a different field. **Steps to reproduce:** - Edit the /contactus page's form. - Change the "Name" field's ty
Original PR description
For a logged-in user, some form fields are automatically prefilled from their profile, such as a "Phone" field with their phone number. **Issue:** The prefill configuration is always preserved when…
For a logged-in user, some form fields are automatically prefilled from their profile, such as a "Phone" field with their phone number. **Issue:** The prefill configuration is always preserved when we change options of a field. While this is correct when updating few options, but it also happens after the field is repurposed, causing it to inherit a prefill value intended for a different field. **Steps to reproduce:** - Edit the /contactus page's form. - Change the "Name" field's type to a "URL" or "CC" field. - Save the changes. - The "URL/CC" field is prefilled with the user's name. A field is considered repurposed when: - its type is changed (e.g. from "Phone" to "URL"); - a custom field is converted into an existing field. **Fix:** This commit preserves the prefill only when the field keeps the same name and type. Otherwise, it clears the stale prefill so repurposed fields no longer inherit incorrect values. task-[5976747](https://www.odoo.com/odoo/project/974/tasks/5976747) Forward-Port-Of: odoo/odoo#278426 Forward-Port-Of: odoo/odoo#275812
Version: -------- - 18.0+ Steps to reproduce: ------------------- - Install `stock` module - Configure a multi-company environment with a `Main Company` and a `Secondary Company` - Go to the setting enable Lots & Serial Numbers and switch into `Secondary Company` - Create a warehouse for the Secondary Company - In the Secondary Company, create a lot-tracked storable product - Create and validate a delivery for that product - Open the Traceability Report - Print the report Is
Original PR description
Version: -------- - 18.0+ Steps to reproduce: ------------------- - Install `stock` module - Configure a multi-company environment with a `Main Company` and a `Secondary Company` - Go to the setting…
Version:
--------
- 18.0+
Steps to reproduce:
-------------------
- Install `stock` module
- Configure a multi-company environment with a `Main Company`
and a `Secondary Company`
- Go to the setting enable Lots & Serial Numbers and switch into
`Secondary Company`
- Create a warehouse for the Secondary Company
- In the Secondary Company, create a lot-tracked storable product
- Create and validate a delivery for that product
- Open the Traceability Report
- Print the report
Issue:
------
The report header always displays the Main Company, even though the
traceability report belongs entirely to the Secondary Company.
Cause:
------
https://github.com/odoo/odoo/blob/2d54db3ac0b6d807e580315e2633f3e2b10a700c/addons/stock/static/src/client_actions/stock_traceability_report_backend.xml#L9
Clicking Print calls onClickPrint(), which builds the PDF URL and
downloads it with download() (a plain XMLHttpRequest POST), landing on
the `type='http'` route `/stock/<output_format>/<report_name>`
https://github.com/odoo/odoo/blob/3bd6b10c3f9ad8d93062b6b46490500edb8c9697/addons/stock/static/src/client_actions/stock_traceability_report_backend.js#L125-L134
That controller calls stock.traceability.report.get_pdf() without ever setting
`company_id` in the rendering context.
https://github.com/odoo/odoo/blob/3bd6b10c3f9ad8d93062b6b46490500edb8c9697/addons/stock/controllers/main.py#L23
Inside `get_pdf()`, the report header is rendered by passing an `rcontext`
dict to `web.internal_layout`.
That template resolves the company to display using the following priority:
https://github.com/odoo/odoo/blob/3bd6b10c3f9ad8d93062b6b46490500edb8c9697/addons/web/views/report_templates.xml#L805-L816
1. `company_id` — an explicit company record in the render context
2. `o.company_id` — the company of the document object `o`
3. `res_company` — the fallback, injected by `_render_template()` as
`self.env.company`
Because `get_pdf()` never sets `company_id` or `o` in `rcontext`, the
template always falls through to `res_company`.
https://github.com/odoo/odoo/blob/3bd6b10c3f9ad8d93062b6b46490500edb8c9697/odoo/addons/base/models/ir_actions_report.py#L770
This is populated by `ir.actions.report._render_template()`
as `self.env.company`, which resolves to the first company in
the user's `allowed_company_ids` list — typically the main company
regardless of which company owns the lot,
picking, or stock moves being printed.
As a result, the report content belongs to the secondary company while the
header always shows the main company.
Fix:
----
Resolve the company from the record on which the traceability report is
opened (using `active_model` and `active_id`) and pass it explicitly as
`company_id` when rendering the report.
`web.internal_layout` already gives precedence to an explicit
`company_id` over the default `res_company`, ensuring the report header
always displays the company that owns the traced record.
When the record has no company set, the header falls back to
`res_company`. Since the print request is a raw `type='http'` download
that never receives the company switcher's context, `user.context`
(holding `allowed_company_ids`) is now forwarded in the download POST
and merged into the environment by the controller - as done in
`web/controllers/report.py` - so the fallback resolves to the currently
active company instead of the user's default one.
<details>
<summary>Click here to see the results:</summary>
<p><strong>Before:</strong></p>
<div class="image-row">
<img src="https://github.com/user-attachments/assets/7e3a5d65-9114-4bce-9139-a88cff7c261f" />
</div>
<p><strong>After:</strong></p>
<div class="image-row">
<img src="https://github.com/user-attachments/assets/0a105f80-b6ae-400d-a787-fb8706d5f519" />
</div>
</details>
---
opw-6345446
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#273595### Steps to reproduce: - Ensure `sale_stock_renting` is installed - Enable Multi-Steps Routes > Unarchive MTO - Create a product P with a BoM and the routes MTO + manufacture - Create anc confirm a sale order for A unit of P - Log in with an other user with with mrp User rights and sales User: Own Documents Only (he should not have access to the SO) - Open the MO, add a component line and save #### > Access Error: Blame the following rule: - Personal Order ### Cause of the issue:
Original PR description
### Steps to reproduce: - Ensure `sale_stock_renting` is installed - Enable Multi-Steps Routes > Unarchive MTO - Create a product P with a BoM and the routes MTO + manufacture - Create anc confirm a…
### Steps to reproduce: - Ensure `sale_stock_renting` is installed - Enable Multi-Steps Routes > Unarchive MTO - Create a product P with a BoM and the routes MTO + manufacture - Create anc confirm a sale order for A unit of P - Log in with an other user with with mrp User rights and sales User: Own Documents Only (he should not have access to the SO) - Open the MO, add a component line and save #### > Access Error: Blame the following rule: - Personal Order ### Cause of the issue: Writing on the `move_raw_ids` will trigger a call of the `_autoconfirm_production` in order to confirm the newly created move: https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/mrp/models/mrp_production.py#L990-L991 https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/mrp/models/mrp_production.py#L1422-L1423 During this confirmation process, one calls the `_merge_moves` method in order to merge this new move (if relevant) to any already existing one. https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/stock/models/stock_move.py#L1575-L1576 Now, the issue is that, `sale_stock_renting` modeule overrides the method `_prepare_merge_moves_distinct_fields` determining the fields relevant to the merge by requiring a read access to the `is_rental_order` compute field of the `sale_order` linked to the MO: https://github.com/odoo/enterprise/blob/b66097122ba3a758734ac6fb2b26579c35cb72c2/sale_stock_renting/models/stock_move.py#L34-L40 However, due to the 'Personal Orders' ir.rule, the user does not have a read access to this record: https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/sale/security/ir_rules.xml#L44-L49 Enterprise: https://github.com/odoo/enterprise/pull/121135 opw-6275658 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#272256 Forward-Port-Of: odoo/odoo#271017
Problem: When a table (or banner, or columns block) is placed inside a toggle block, deleting the last paragraph in a table cell creates a new block after the toggle block and moves the selection outside the table. Cause: `handleDeleteBackwardContentEnd` assumes the deleted block is always a direct child of the toggle content. However, the deleted block may be nested inside a table, banner, or columns block. Solution: Only create a new block after the toggle block when the selected bloc
Original PR description
Problem: When a table (or banner, or columns block) is placed inside a toggle block, deleting the last paragraph in a table cell creates a new block after the toggle block and moves the selection outside the table. Cause: `handleDeleteBackwardContentEnd` assumes the deleted block is always a direct child of the toggle content. However, the deleted block may be nested inside a table, banner, or columns block. Solution: Only create a new block after the toggle block when the selected block is a direct child of the toggle content. Steps to reproduce: - Add a toggle block. - Insert a table inside its content. - Add two paragraphs to a table cell. - Delete the last paragraph. - Observe that a new block is created after the toggle block and the selection moves outside the table. opw-6382058 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#278119 Forward-Port-Of: odoo/odoo#277194
15 changes
Resolved issues and error corrections
The Peppol settings now correctly decide when a purchase journal is required, avoiding unnecessary mandatory setup for non-French companies using Documents. Choosing Documents for invoice import now routes imports only to Documents instead of duplicating them in Invoicing.
Original PR description
Fixes the settings view for the account_peppol_purchase_journal_id. account_peppol, documents_account_peppol and l10n_fr_pdp all wants to use a specific condition for the required attribute of the view. With PDP especially, once l10n_fr_pdp is installed, the view forces the base condition, even if documents_account_peppol is installed, and even if the company is not even French. On a non-French company registered/registering on Peppol, the journal shouldn't be mandatory if documents_account_peppol_folder_id is set up. To ease things up, it is now using a computed field. task-6304479 Forward-Port-Of: odoo/enterprise#120721
This fix keeps a clipboard-related test change limited to the exact step where it is needed, preventing leftover test state from affecting later checks. It helps maintain reliable automated testing for appointment-to-CRM flows without changing user-facing behavior.
Original PR description
Capturing `oldWriteText` at module import and relying on a subsequent tour step to restore it can cause state leakage if the subsequent step doesn't exactly target a resulting effect of the mocked `writeText` call. Refactor the tour step to capture `writeText` dynamically and restore the original method on first call. runbot-241004 Forward-Port-Of: odoo/enterprise#125290
This fix prevents an unexpected error during Swiss payroll processing when a related salary rule has been archived. It helps payroll users continue their work without interruptions caused by inactive rule records.
Original PR description
Forward-Port-Of: odoo/enterprise#103677
Uploading a document while Auto Sort is enabled no longer causes an error if the document is automatically moved to another folder. This keeps the Documents app stable and avoids disrupting users during document uploads.
Original PR description
When Auto Sort is enabled, an uploaded document can be moved to a different folder as part of the sort. The subsequent model reload only fetches records for the current folder to select/scroll to the new record. But, the new document's is absent from `env.model.root.records`. `newRecords` ends up empty, making `newRecords[0]` undefined, which then crashes accessing record.resId. To fix this, we just return early because if the record isn't in the current folder, there's nothing to select or scroll to anyway, so returning early here doesn't change anything visible behavior, it just avoids the crash. Steps to reproudce: 1.Go to Documents. 2.Go to Company->Inbox 3.Go to the gear icon and make sure the "Auto Sort" is enabled with "Move to folder" 4.Add a new document that's sortable. 5.You'll get the error. opw-6281558 Forward-Port-Of: odoo/enterprise#121069
Fixed an issue that could cause an error when multiple equity transactions were processed at the same time. This improves reliability for equity workflows and helps users avoid interruptions when working with cap table transactions.
Original PR description
When the ``_compute_security_price`` method is called on multiple records, a traceback will appear. Traceback: ```py ValueError: Expected singleton: equity.transaction(1, 2) ``` https://github.com/odoo/enterprise/blob/314a79b774f30dc9377b2971492576c4b84483e1/equity/models/equity_transaction.py#L218 The method filters newly created records using ``self._origin.id``. Since ``self`` is the whole recordset, accessing ``self._origin.id`` on multiple records raises a singleton error. sentry-7626410485 Forward-Port-Of: odoo/enterprise#125307
This change adds a validation test to ensure currency translation calculations handle changing domestic exchange rates correctly. It helps prevent accounting reports from overstating or understating values when exchange rates fluctuate during a reporting period.
Original PR description
Following the fix made in community branch, this adds a test veryfing the expected behavior in case of a fluctuating rate for the domestic currency. Scenario 2: fluctuating domestic (USD) rate USD…
Following the fix made in community branch, this adds a test veryfing the expected behavior in case of a fluctuating rate for the domestic currency. Scenario 2: fluctuating domestic (USD) rate USD rate=1 from Jan 1 to Jun 30, USD rate=3 from Jul 1 to Dec 31 EUR rates unchanged: 2 from Jan 1, 4 from Jul 1 Correct conversion factors (= USD_rate / EUR_rate): Jan 1 – Jun 30 (182 days): 1/2 = 0.50 Jul 1 – Dec 31 (184 days): 3/4 = 0.75 Current rate at 2020-12-31: 3/4 = 0.75 Correct average rate: (0.50 * 182 + 0.75 * 184) / 366 = 229/366 ≈ 0.62568 Previsouly bugged average rate (USD fixed at current=3): (1.50 * 182 + 0.75 * 184) / 366 = 411/366 ≈ 1.12295 Historical equity rates (correct vs previously bugged): Mar 1 (USD=1, EUR=2): correct = 1/2 = 0.50; buggy = 3/2 = 1.50 → 40 * 0.50 = 20 vs 40 * 1.50 = 60 Oct 1 (USD=3, EUR=4): correct = 3/4 = 0.75; buggy = 3/4 = 0.75 → 60 * 0.75 = 45 (same by coincidence) task-5953104 Forward-Port-Of: odoo/enterprise#123055
Issue: The `shape_color_sync_with_theme_color` tour failed randomly at its last step i.e after changing a theme preset color, the image shapes of the saved (custom) snippet sometimes still had the old color. This happened because `updateContent` called its callback without awaiting it, so the re-processing of the custom snippet images ran in the background after the color change operation had already completed. At normal flow this operation finishes before the previews are looked at, but
Original PR description
Issue: The `shape_color_sync_with_theme_color` tour failed randomly at its last step i.e after changing a theme preset color, the image shapes of the saved (custom) snippet sometimes still had the old color. This happened because `updateContent` called its callback without awaiting it, so the re-processing of the custom snippet images ran in the background after the color change operation had already completed. At normal flow this operation finishes before the previews are looked at, but the tour reaches the `Custom` snippets category within milliseconds and could assert the colors before the re-processing was done - making the outcome depend purely on timing. Fix: Awaiting the callback ensures the custom snippets content is fully updated before the operation completes, so by the time the loading indicator disappears the previews are guaranteed to be in sync. runbot-[944175](https://runbot.odoo.com/odoo/error/944175) Forward-Port-Of: odoo/odoo#276862
When installing the module document_account_peppol, the user has the choice to import his Peppol invoices into the Documents app directly, but also to block the import in Accounting, by removing the Peppol import journal. In that last case, the Peppol application response flow is broken, the document model does not contain the necessary information to handle responses as the imported invoices do. (In stable) We took the decision to remove the ApplicationResponse service from users that bl
Original PR description
When installing the module document_account_peppol, the user has the choice to import his Peppol invoices into the Documents app directly, but also to block the import in Accounting, by removing the Peppol import journal. In that last case, the Peppol application response flow is broken, the document model does not contain the necessary information to handle responses as the imported invoices do. (In stable) We took the decision to remove the ApplicationResponse service from users that block the invoice import flow by removing the import journal. For PDP, the responses are required, but as the block is completely replaced in the view, and reuses the basic account_peppol condition for the required attribute, the account peppol purchase journal will always be required if the company is registered on Peppol/PDP. Nothing to do in 18.0. task-6191644 Forward-Port-Of: odoo/odoo#270091
#### Description of the issue this PR addresses: - Blockquotes currently display their border on the left side. #### Desired behavior after PR is merged: - Update the styling so the border is displayed on the right side for RTL content. task-6296519 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#277057 Forward-Port-Of: odoo/odoo#269529
Original PR description
#### Description of the issue this PR addresses: - Blockquotes currently display their border on the left side. #### Desired behavior after PR is merged: - Update the styling so the border is displayed on the right side for RTL content. task-6296519 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#277057 Forward-Port-Of: odoo/odoo#269529
For a logged-in user, some form fields are automatically prefilled from their profile, such as a "Phone" field with their phone number. **Issue:** The prefill configuration is always preserved when we change options of a field. While this is correct when updating few options, but it also happens after the field is repurposed, causing it to inherit a prefill value intended for a different field. **Steps to reproduce:** - Edit the /contactus page's form. - Change the "Name" field's ty
Original PR description
For a logged-in user, some form fields are automatically prefilled from their profile, such as a "Phone" field with their phone number. **Issue:** The prefill configuration is always preserved when…
For a logged-in user, some form fields are automatically prefilled from their profile, such as a "Phone" field with their phone number. **Issue:** The prefill configuration is always preserved when we change options of a field. While this is correct when updating few options, but it also happens after the field is repurposed, causing it to inherit a prefill value intended for a different field. **Steps to reproduce:** - Edit the /contactus page's form. - Change the "Name" field's type to a "URL" or "CC" field. - Save the changes. - The "URL/CC" field is prefilled with the user's name. A field is considered repurposed when: - its type is changed (e.g. from "Phone" to "URL"); - a custom field is converted into an existing field. **Fix:** This commit preserves the prefill only when the field keeps the same name and type. Otherwise, it clears the stale prefill so repurposed fields no longer inherit incorrect values. task-[5976747](https://www.odoo.com/odoo/project/974/tasks/5976747) Forward-Port-Of: odoo/odoo#278426 Forward-Port-Of: odoo/odoo#275812
Version: -------- - 18.0+ Steps to reproduce: ------------------- - Install `stock` module - Configure a multi-company environment with a `Main Company` and a `Secondary Company` - Go to the setting enable Lots & Serial Numbers and switch into `Secondary Company` - Create a warehouse for the Secondary Company - In the Secondary Company, create a lot-tracked storable product - Create and validate a delivery for that product - Open the Traceability Report - Print the report Is
Original PR description
Version: -------- - 18.0+ Steps to reproduce: ------------------- - Install `stock` module - Configure a multi-company environment with a `Main Company` and a `Secondary Company` - Go to the setting…
Version:
--------
- 18.0+
Steps to reproduce:
-------------------
- Install `stock` module
- Configure a multi-company environment with a `Main Company`
and a `Secondary Company`
- Go to the setting enable Lots & Serial Numbers and switch into
`Secondary Company`
- Create a warehouse for the Secondary Company
- In the Secondary Company, create a lot-tracked storable product
- Create and validate a delivery for that product
- Open the Traceability Report
- Print the report
Issue:
------
The report header always displays the Main Company, even though the
traceability report belongs entirely to the Secondary Company.
Cause:
------
https://github.com/odoo/odoo/blob/2d54db3ac0b6d807e580315e2633f3e2b10a700c/addons/stock/static/src/client_actions/stock_traceability_report_backend.xml#L9
Clicking Print calls onClickPrint(), which builds the PDF URL and
downloads it with download() (a plain XMLHttpRequest POST), landing on
the `type='http'` route `/stock/<output_format>/<report_name>`
https://github.com/odoo/odoo/blob/3bd6b10c3f9ad8d93062b6b46490500edb8c9697/addons/stock/static/src/client_actions/stock_traceability_report_backend.js#L125-L134
That controller calls stock.traceability.report.get_pdf() without ever setting
`company_id` in the rendering context.
https://github.com/odoo/odoo/blob/3bd6b10c3f9ad8d93062b6b46490500edb8c9697/addons/stock/controllers/main.py#L23
Inside `get_pdf()`, the report header is rendered by passing an `rcontext`
dict to `web.internal_layout`.
That template resolves the company to display using the following priority:
https://github.com/odoo/odoo/blob/3bd6b10c3f9ad8d93062b6b46490500edb8c9697/addons/web/views/report_templates.xml#L805-L816
1. `company_id` — an explicit company record in the render context
2. `o.company_id` — the company of the document object `o`
3. `res_company` — the fallback, injected by `_render_template()` as
`self.env.company`
Because `get_pdf()` never sets `company_id` or `o` in `rcontext`, the
template always falls through to `res_company`.
https://github.com/odoo/odoo/blob/3bd6b10c3f9ad8d93062b6b46490500edb8c9697/odoo/addons/base/models/ir_actions_report.py#L770
This is populated by `ir.actions.report._render_template()`
as `self.env.company`, which resolves to the first company in
the user's `allowed_company_ids` list — typically the main company
regardless of which company owns the lot,
picking, or stock moves being printed.
As a result, the report content belongs to the secondary company while the
header always shows the main company.
Fix:
----
Resolve the company from the record on which the traceability report is
opened (using `active_model` and `active_id`) and pass it explicitly as
`company_id` when rendering the report.
`web.internal_layout` already gives precedence to an explicit
`company_id` over the default `res_company`, ensuring the report header
always displays the company that owns the traced record.
When the record has no company set, the header falls back to
`res_company`. Since the print request is a raw `type='http'` download
that never receives the company switcher's context, `user.context`
(holding `allowed_company_ids`) is now forwarded in the download POST
and merged into the environment by the controller - as done in
`web/controllers/report.py` - so the fallback resolves to the currently
active company instead of the user's default one.
<details>
<summary>Click here to see the results:</summary>
<p><strong>Before:</strong></p>
<div class="image-row">
<img src="https://github.com/user-attachments/assets/7e3a5d65-9114-4bce-9139-a88cff7c261f" />
</div>
<p><strong>After:</strong></p>
<div class="image-row">
<img src="https://github.com/user-attachments/assets/0a105f80-b6ae-400d-a787-fb8706d5f519" />
</div>
</details>
---
opw-6345446
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#273595### Steps to reproduce: - Ensure `sale_stock_renting` is installed - Enable Multi-Steps Routes > Unarchive MTO - Create a product P with a BoM and the routes MTO + manufacture - Create anc confirm a sale order for A unit of P - Log in with an other user with with mrp User rights and sales User: Own Documents Only (he should not have access to the SO) - Open the MO, add a component line and save #### > Access Error: Blame the following rule: - Personal Order ### Cause of the issue:
Original PR description
### Steps to reproduce: - Ensure `sale_stock_renting` is installed - Enable Multi-Steps Routes > Unarchive MTO - Create a product P with a BoM and the routes MTO + manufacture - Create anc confirm a…
### Steps to reproduce: - Ensure `sale_stock_renting` is installed - Enable Multi-Steps Routes > Unarchive MTO - Create a product P with a BoM and the routes MTO + manufacture - Create anc confirm a sale order for A unit of P - Log in with an other user with with mrp User rights and sales User: Own Documents Only (he should not have access to the SO) - Open the MO, add a component line and save #### > Access Error: Blame the following rule: - Personal Order ### Cause of the issue: Writing on the `move_raw_ids` will trigger a call of the `_autoconfirm_production` in order to confirm the newly created move: https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/mrp/models/mrp_production.py#L990-L991 https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/mrp/models/mrp_production.py#L1422-L1423 During this confirmation process, one calls the `_merge_moves` method in order to merge this new move (if relevant) to any already existing one. https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/stock/models/stock_move.py#L1575-L1576 Now, the issue is that, `sale_stock_renting` modeule overrides the method `_prepare_merge_moves_distinct_fields` determining the fields relevant to the merge by requiring a read access to the `is_rental_order` compute field of the `sale_order` linked to the MO: https://github.com/odoo/enterprise/blob/b66097122ba3a758734ac6fb2b26579c35cb72c2/sale_stock_renting/models/stock_move.py#L34-L40 However, due to the 'Personal Orders' ir.rule, the user does not have a read access to this record: https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/sale/security/ir_rules.xml#L44-L49 Enterprise: https://github.com/odoo/enterprise/pull/121135 opw-6275658 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#272256 Forward-Port-Of: odoo/odoo#271017
The daily/monthly Inventory Valuation Closing cron currently skips companies using the Perpetual (real_time) valuation method, so the Periodic Valuation frequency setting has no effect for them. The intent of the feature is to keep the inventory valuation continuously updated (e.g. goods received not yet invoiced) whatever the valuation method, so the cron should also post the closing entries for perpetual companies. Remove the real_time exclusion from the cron domain so the configured frequency
Original PR description
The daily/monthly Inventory Valuation Closing cron currently skips companies using the Perpetual (real_time) valuation method, so the Periodic Valuation frequency setting has no effect for them. The intent of the feature is to keep the inventory valuation continuously updated (e.g. goods received not yet invoiced) whatever the valuation method, so the cron should also post the closing entries for perpetual companies. Remove the real_time exclusion from the cron domain so the configured frequency applies to all companies, and skip companies where the closing raises a UserError (e.g. missing valuation journal or account) so one misconfigured company cannot block the cron. Forward-Port-Of: odoo/odoo#276990
Problem: When a table (or banner, or columns block) is placed inside a toggle block, deleting the last paragraph in a table cell creates a new block after the toggle block and moves the selection outside the table. Cause: `handleDeleteBackwardContentEnd` assumes the deleted block is always a direct child of the toggle content. However, the deleted block may be nested inside a table, banner, or columns block. Solution: Only create a new block after the toggle block when the selected bloc
Original PR description
Problem: When a table (or banner, or columns block) is placed inside a toggle block, deleting the last paragraph in a table cell creates a new block after the toggle block and moves the selection outside the table. Cause: `handleDeleteBackwardContentEnd` assumes the deleted block is always a direct child of the toggle content. However, the deleted block may be nested inside a table, banner, or columns block. Solution: Only create a new block after the toggle block when the selected block is a direct child of the toggle content. Steps to reproduce: - Add a toggle block. - Insert a table inside its content. - Add two paragraphs to a table cell. - Delete the last paragraph. - Observe that a new block is created after the toggle block and the selection moves outside the table. opw-6382058 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#278119 Forward-Port-Of: odoo/odoo#277194
Currently, sending a simplified invoice (`TD07`) to the Italian Tax Agency fails when an invoice line contains multiple taxes. **Steps to reproduce:** - Install the `l10n_it_edi_withholding` module and switch to an IT Company. - Create a new customer and set only the country to Italy and the Tax ID. - Create a new invoice for that customer. - Add a line with `22%` and `4% INPS` taxes. - Go to the `Electronic Invoicing` tab, set the `Document Type` to `TD07 - Simplified invoice`, and c
Original PR description
Currently, sending a simplified invoice (`TD07`) to the Italian Tax Agency fails when an invoice line contains multiple taxes. **Steps to reproduce:** - Install the `l10n_it_edi_withholding` module…
Currently, sending a simplified invoice (`TD07`) to the Italian Tax Agency fails when an invoice line contains multiple taxes. **Steps to reproduce:** - Install the `l10n_it_edi_withholding` module and switch to an IT Company. - Create a new customer and set only the country to Italy and the Tax ID. - Create a new invoice for that customer. - Add a line with `22%` and `4% INPS` taxes. - Go to the `Electronic Invoicing` tab, set the `Document Type` to `TD07 - Simplified invoice`, and confirm the invoice. - Try to `Send To Tax Agency`. **Error:** `Node: <Natura t-if="line.tax_ids.l10n_it_exempt_reason" t-out="line.tax_ids.l10n_it_exempt_reason"/>` `ValueError: Expected singleton: account.tax(102, 3)` **Root Cause:** At [1], the code accesses `line.tax_ids.l10n_it_exempt_reason`, but when an invoice contains multiple taxes, causing an error. **Fix:** This commit prevents the error and ensures the user can send a simplified invoice by applying a fix similar to [2]. [1]: https://github.com/odoo/odoo/blob/230483ffd7d8674cd6bf98a4ffb6591f755422e0/addons/l10n_it_edi/data/invoice_it_simplified_template.xml#L14 [2]: https://github.com/odoo/odoo/blob/230483ffd7d8674cd6bf98a4ffb6591f755422e0/addons/l10n_it_edi/data/invoice_it_template.xml#L28-L181 Ticket [link](https://www.odoo.com/odoo/project.task/6354138) Ticket [link](https://www.odoo.com/odoo/project.task/6379377) opw-6354138 opw-6379377 Forward-Port-Of: odoo/odoo#278307 Forward-Port-Of: odoo/odoo#273823
1 change
Resolved issues and error corrections
This fix prevents Swiss payroll processing from failing when a related salary rule has been archived. It helps payroll teams avoid interruptions and ensures historical or inactive rules do not cause unexpected errors during ELM transmission workflows.
Original PR description
Forward-Port-Of: odoo/enterprise#103677
6 changes
Enhancements to existing features
With this update: - For UBL imports, bank details are also used to help identify the partner by matching the bank account number. The retrieval logic has also been improved: 1. If VAT exists in the XML: - If a partner found with no VAT then enrich that partner by filing VAT from xml - If a partner found with a different VAT than the one in the XML, then a new partner will be created Task [link](https://www.odoo.com/odoo/project.task/5485563) task-5485563
Original PR description
With this update: - For UBL imports, bank details are also used to help identify the partner by matching the bank account number. The retrieval logic has also been improved: 1. If VAT exists in the XML: - If a partner found with no VAT then enrich that partner by filing VAT from xml - If a partner found with a different VAT than the one in the XML, then a new partner will be created Task [link](https://www.odoo.com/odoo/project.task/5485563) task-5485563
Resolved issues and error corrections
This fix prevents an error from interrupting Swiss payroll ELM transmission when a related payroll rule has been archived. It helps payroll users continue processing employee monthly values reliably, even when old rules are no longer active.
Original PR description
Forward-Port-Of: odoo/enterprise#103677
In commit 611ed3c430026d5fbeac0e565c379ae57a2a30bc `NOT IN ...` was converted to `!= ANY(...) but it should have been `!= ALL(...). task-None Forward-Port-Of: odoo/odoo#278445
Original PR description
In commit 611ed3c430026d5fbeac0e565c379ae57a2a30bc `NOT IN ...` was converted to `!= ANY(...) but it should have been `!= ALL(...). task-None Forward-Port-Of: odoo/odoo#278445
Steps to reproduce: ------------------- 1. Install sale_timesheet. 2. Create a service product with: - Invoicing Policy: Prepaid/Fixed Price - Create on Order: Project & Task 3. Create a sales order with this product. 4. Open the generated project > dashboard and verify that "To Invoice" shows $1. 5. Create a project update and observe that "To Invoice" also shows $1. 6. Return to the sales order, create and post the invoice. 7. Open the project dashboard again and verify that "T
Original PR description
Steps to reproduce: ------------------- 1. Install sale_timesheet. 2. Create a service product with: - Invoicing Policy: Prepaid/Fixed Price - Create on Order: Project & Task 3. Create a sales order…
Steps to reproduce: ------------------- 1. Install sale_timesheet. 2. Create a service product with: - Invoicing Policy: Prepaid/Fixed Price - Create on Order: Project & Task 3. Create a sales order with this product. 4. Open the generated project > dashboard and verify that "To Invoice" shows $1. 5. Create a project update and observe that "To Invoice" also shows $1. 6. Return to the sales order, create and post the invoice. 7. Open the project dashboard again and verify that "To Invoice" is now $0. 8. Create another project update. Issue: ------ The project update margin still displays $1 under "To Invoice" even though the sales order has already been fully invoiced. Cause: ------ The project update template displays the aggregated profitability totals (`profitability['total']['revenues']` and `profitability['total']['costs']`) instead of the dedicated `to_bill_to_invoice` and `billed_invoiced` values, causing stale "to invoice" amounts to persist after invoicing. Solution: --------- Use the `to_bill_to_invoice` and `billed_invoiced` values when rendering the project update profitability report. opw-6323869 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#273605
`ref` already gives back a recordset if it found the reference. There is no need to research using the id on the same model, as `ref` calls `exists`, which already does the "same" query that's present here. Closes #137826 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#276554
Original PR description
`ref` already gives back a recordset if it found the reference. There is no need to research using the id on the same model, as `ref` calls `exists`, which already does the "same" query that's present here. Closes #137826 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#276554
Miscellaneous changes
When a bus process restarts, every client on every database it serves loses its websocket at the same instant and immediately schedules a reconnection. Each database that comes back triggers a registry recompute server-side, so a tight reconnection window makes all of those recomputes land together and pile up on the freshly started process. The jitter added to each reconnection delay was only one second, far too narrow to break up that wave. Widen it to thirty seconds so the retries of the m
Original PR description
When a bus process restarts, every client on every database it serves loses its websocket at the same instant and immediately schedules a reconnection. Each database that comes back triggers a…
When a bus process restarts, every client on every database it serves loses its websocket at the same instant and immediately schedules a reconnection. Each database that comes back triggers a registry recompute server-side, so a tight reconnection window makes all of those recomputes land together and pile up on the freshly started process. The jitter added to each reconnection delay was only one second, far too narrow to break up that wave. Widen it to thirty seconds so the retries of the many clients fan out over a much wider window and the registry recomputes spread over time instead of colliding. Raise the ceiling on the retry delay to two minutes to match that wider spread, and drop the exponential growth factor: with a thirty-second jitter accumulating on every attempt, the delay already climbs on its own, so scaling it further only pushed clients toward the ceiling sooner without spreading them any better. 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#276869
5 changes
Enhancements to existing features
When employees or administrators try to create an expense card before Stripe is connected, they are now directed to the settings page to complete the connection. This makes the next step clearer and reduces confusion during card setup.
Original PR description
When a user tries to create a card but the configuration is not connected, redirect the user towards the settings to do the connection. task-6272805
Resolved issues and error corrections
This fix ensures generated timesheet suggestions for Discuss activity are associated with the Discuss app rather than the database record itself. This helps keep suggested work time categorized correctly for users reviewing or entering timesheets.
Original PR description
## Previous Behavior: When generateing AW sugestions, discuss related time would be associated to the DB and not the discuss app inside the database. ## Task task-[5167914](https://www.odoo.com/odoo/project/4105/tasks/5167914/project.task/6381120/project.task/6409826) Forward-Port-Of: odoo/enterprise#125339
Philippine check printing now rounds the cents portion of written amounts to two decimals, even when the currency is configured with more precision. This prevents checks from showing incorrect fractional text such as 1268/100 instead of 13/100, reducing confusion and payment errors.
Original PR description
Current behavior: --- When paying with checks, if the currency has more than 2 decimals, the decimal amount is printed with more than 2 decimals. Steps to reproduce: --- 1. Switch to PH company 2. Set setting Check Layout as "Print Check - PH" 3. In the PHP currency, change rounding factor to 0.0001 4. In Decimal accuracy > product price, set 4 digits 5. Create a new Vendor Payment, payment method Check, amount 100.1268 PHP 6. Results: One Hundred and 1268/100, should be 13/100 Expected behavior: --- The xx/100 part of amount in words text in the check should always be rounded to 2 decimals. opw-6302337 Forward-Port-Of: odoo/enterprise#124572 Forward-Port-Of: odoo/enterprise#121913
Trial balance reports now avoid showing negligible rounding leftovers as balances when exported to Excel. This prevents accounts that should balance to zero from displaying confusing tiny scientific-notation values, improving report accuracy and clarity for finance users.
Original PR description
Steps to reproduce -------------------- - Install account_reports module; - Create a new account; - Create a miscellanous operation for the previous month using thenew account with a credit amount of $8.28; - Create a second MISC for the current month with two lines using the account : debit = 262.67 and credit = 254.39; - Open the trial balance report and filter the new account (end balance should be 0); - Export the report as XLSX; The end balance value is 2.84e-14 due to float rounding issues. opw-6369016 Forward-Port-Of: odoo/enterprise#125416 Forward-Port-Of: odoo/enterprise#123896
The portal now accurately reduces a user’s pending signature count after they sign their assigned document. This prevents users from seeing completed signing tasks as still outstanding and improves trust in the portal status display.
Original PR description
Version: master Steps to reproduce: - Create a sign request with two signers. - Assign the first signature to a portal user. - Log in as the portal user and sign the document. Issue: After signing, the to-sign count in the portal does not decrease. This is because the query only checks the overall sign request state instead of the individual signer's item state, so the count remains unchanged Fix: Added an item level state check to the count query so it only counts items that are still pending for that specific user. Task ID: 6412976
5 changes
Enhancements to existing features
Users who try to create an expense card before Stripe is connected are now directed to the settings page to complete the connection. This makes setup clearer and helps users resolve the issue without needing technical support.
Original PR description
When a user tries to create a card but the configuration is not connected, redirect the user towards the settings to do the connection. task-6272805
Resolved issues and error corrections
The AI tool descriptions were cleaned up to remove misleading labels that could cause agents to request a tool that does not exist. This reduces avoidable AI workflow failures and helps automated actions run more reliably.
Original PR description
Purpose: -------- Agents occasionally fail by trying to call a `search` tool that does not exist. This seems to come from the `Tool Name: search` header in the tool description, which can be confused with the actual tool name used by the LLM, i.e. the tool xmlid. This commit removes these headers from the search and read group tool descriptions. They were missed in [this commit](https://github.com/odoo/enterprise/commit/912bce43a98d45e90dbd24328fa2f46caba4c887 ), which removed the same headers from the other tools. Task-6401285
The French accounting report tests were updated to match the latest fallback behavior for FEC export labels. This helps ensure the export validation remains reliable after the related core accounting change, with no expected change for day-to-day users.
Original PR description
Adjust the FEC export test expectations to match the updated `EcritureLib` fallback logic introduced in the related community change. Related: https://github.com/odoo/odoo/pull/257242 task-5346068
The rental order form now displays the duration and pricing update button correctly when translated button labels are longer. This prevents overlapping text, making rental durations easier to read across languages and screen sizes.
Original PR description
**Steps to reproduce:** 1. Set the UI language to Spanish (or any language with a long "Update Rental Prices" translation) 2. Create a rental order with a rental period that has both days and hours…
**Steps to reproduce:** 1. Set the UI language to Spanish (or any language with a long "Update Rental Prices" translation) 2. Create a rental order with a rental period that has both days and hours (e.g. July 15 10:00 → July 25 14:00 = 10 days 4 hours) 3. Observe the "Duration" field in the form after zooming (depends on screen resolution) **Issue:** The duration row displays overlapping text **Why this happens:** The "Update Rental Prices" button and the duration text share the same o_row flex container. In translated UIs the button text can be significantly wider than in English, pushing the total row width past the form value-cell boundary. When the row overflows, only spans and the button shrink, the integer field widgets do not. The threshold at which this triggers is zoom dependent based on screen resolution. **Fix:** Add `.flex-wrap` utility class to the duration `o_row` so the button wraps to the next line when space is insufficient, keeping the duration text intact on a single line. opw-6389526
This fix prevents Swiss payroll processing from failing when a related payroll rule has been archived. It helps payroll teams continue monthly value handling without unexpected interruptions caused by inactive rules.
Original PR description
Forward-Port-Of: odoo/enterprise#103677
9 changes
Enhancements to existing features
Current behavior before PR: Threads couldn't be recognized by reading messages in the chat but only in the channel list. Desired behavior after PR is merged: As in 19.0, when a thread (sub-channel) has been created from a message in a channel, the originating message displays a preview card below it showing the thread name, last message preview, author prefix, and timestamp. This backports that feature to 18.0 by: - Adding an 'after-reactions' extension slot to the mail.Message template
Original PR description
Current behavior before PR: Threads couldn't be recognized by reading messages in the chat but only in the channel list. Desired behavior after PR is merged: As in 19.0, when a thread (sub-channel) has been created from a message in a channel, the originating message displays a preview card below it showing the thread name, last message preview, author prefix, and timestamp. This backports that feature to 18.0 by: - Adding an 'after-reactions' extension slot to the mail.Message template - Adding a new SubChannelPreview component that renders the thread preview card (sub_channel_preview.js/xml/scss) - Patching the Message component to render SubChannelPreview after reactions when message.linkedSubChannel exists and is not the current thread (message_patch.js/xml/scss) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This PR replaces the "ting" notification sound with a more pleasant and common notification sound. If Odoo's Discuss is used as a main communication method within an organization, the notification sound is important. It should be a pleasant sound so that users don't receive it as unpleasant and may disable it eventually. At the same time the sound should be clear and not too low so that it doesn't get overlooked easily. The "ting" sound can received as too rough. In future Odoo versions "t
Original PR description
This PR replaces the "ting" notification sound with a more pleasant and common notification sound. If Odoo's Discuss is used as a main communication method within an organization, the notification sound is important. It should be a pleasant sound so that users don't receive it as unpleasant and may disable it eventually. At the same time the sound should be clear and not too low so that it doesn't get overlooked easily. The "ting" sound can received as too rough. In future Odoo versions "ting" has been replaced by "dm_02" in #186944 which is not clear enough and could be overlooked. The sound introduced by this PR aligns more with other messenger and chat systems and has a pleasant, short and clear sound. Alternatively to replacing the sound file we could add it as a new sound file and use it as the default for Discuss. Let me know if you prefer that. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This fix prevents Swiss payroll ELM transmission from failing when a related payroll rule has been archived. It helps HR teams continue payroll reporting without unexpected errors caused by inactive configuration records.
Original PR description
Forward-Port-Of: odoo/enterprise#103677
Before this commit, the down payments line of the project profitability panel had no drill down action for salespersons and billing users without accounting access, because the group references were written with a trailing comma inside the XML id, making the two checks silently fail for everyone. Only the accounting read group check, written correctly, was effective. Steps to reproduce: - create a service product with "Create on Order: Project & Task", sell it on a sale order and confirm it
Original PR description
Before this commit, the down payments line of the project profitability panel had no drill down action for salespersons and billing users without accounting access, because the group references were…
Before this commit, the down payments line of the project profitability panel had no drill down action for salespersons and billing users without accounting access, because the group references were written with a trailing comma inside the XML id, making the two checks silently fail for everyone. Only the accounting read group check, written correctly, was effective. Steps to reproduce: - create a service product with "Create on Order: Project & Task", sell it on a sale order and confirm it - create a down payment invoice from the sale order and post it - create a user with Sales "User: All Documents" access, Project "User" access and no accounting access - as that user, open the dashboard of the generated project and look at the Down Payments line of the profitability panel The Down Payments amount is displayed as plain text, while a user with accounting access can click it to open the related invoices, as intended for the salesperson too. Solution: Move the commas out of the group references. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
When running `ŧest_free_reservation`, it could happen on very rare occasions that both moves would be created at a different second. In such cases, the test would fail. Since we want to test the case with *exact* same dates, we can't use `assertAlmostEqual` which is usually better for dates. Instead, we freeze the time for the duration of the creation / assignation. runbot-944453 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of:
Original PR description
When running `ŧest_free_reservation`, it could happen on very rare occasions that both moves would be created at a different second. In such cases, the test would fail. Since we want to test the case with *exact* same dates, we can't use `assertAlmostEqual` which is usually better for dates. Instead, we freeze the time for the duration of the creation / assignation. runbot-944453 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#278103
Steps to reproduce: - Install `l10n_cl` module - Create one branch of the CL company - Give user(not admin) access to company branch and login with user - Go to Accounting > Customers > Invoices - Click New > AccessError Cause: This error occurs because the user is working within a branch of the main company. The code tries to access the journal’s company, which is set to the parent company. As the user does not have access to the parent company, fetching the country code fails. Solu
Original PR description
Steps to reproduce: - Install `l10n_cl` module - Create one branch of the CL company - Give user(not admin) access to company branch and login with user - Go to Accounting > Customers > Invoices - Click New > AccessError Cause: This error occurs because the user is working within a branch of the main company. The code tries to access the journal’s company, which is set to the parent company. As the user does not have access to the parent company, fetching the country code fails. Solution: In some cases, strict company access rules cause `AccessError` and block normal flows, especially with parent–child company setups where a child needs data from the parent. To ensure smooth processing, temporary `sudo()` usage is required in specific places. opw-6087460
Seven entries of the Mexican chart of accounts template carry a name belonging to a **different** group, copied from a neighbouring entry. Each record's XML ID still states the intended name, which is what this restores. | Code | Field | Before | After | |---|---|---|---| | `6` | `name@es` | Gastos generales | Gastos | | `252.07` | `name@es` | `account_subgroup_hipotecas_por_pagar_a_largo_plazo_nacional` | Hipotecas por pagar a largo plazo nacional | | `602` | `name`, `name@es` | Cost of sales
Original PR description
Seven entries of the Mexican chart of accounts template carry a name belonging to a **different** group, copied from a neighbouring entry. Each record's XML ID still states the intended name, which…
Seven entries of the Mexican chart of accounts template carry a name belonging
to a **different** group, copied from a neighbouring entry. Each record's XML ID
still states the intended name, which is what this restores.
| Code | Field | Before | After |
|---|---|---|---|
| `6` | `name@es` | Gastos generales | Gastos |
| `252.07` | `name@es` | `account_subgroup_hipotecas_por_pagar_a_largo_plazo_nacional` | Hipotecas por pagar a largo plazo nacional |
| `602` | `name`, `name@es` | Cost of sales / Costo de venta | Selling expenses / Gastos de venta |
| `613` | `name@es` | Amortización contable | Depreciación contable |
| `614` | `name` | Accounting depreciation | Accounting amortisation |
| `701.06` | `name`, `name@es` | Interest on foreign bank charges / Intereses a cargo bancario extranjero | Interest payable by national natural persons / Intereses a cargo de personas físicas nacional |
| `702` | `name@es` | Utilidad cambiaria | Productos financieros |
### Why it is not cosmetic
The electronic accounting Chart of Accounts XML takes the `Desc` attribute of
every `<Ctas>` element from the *account group name* — `cfdicoa.xml`
(`t-att-Desc="account.get('name')"`), fed by `trial_balance.py`
`_l10n_mx_get_coa_values()`. Any `es_*` database therefore declares:
```xml
<catalogocuentas:Ctas CodAgrup="702" NumCta="702" Desc="Utilidad cambiaria" Nivel="1" Natur="A"/>
```
whereas the SAT catalogue (Anexo 24) publishes `702` as *Productos financieros*,
with `702.01 Utilidad cambiaria` … `702.10 Otros productos financieros` beneath
it. `CodAgrup` comes from `code_prefix_start` and stays correct, so the file
still validates against the XSD, but the declared description does not match the
official nomenclature. Trial Balance and Pólizas are unaffected — neither
exports group names.
### Evidence
- `252.07` contains its own XML ID as the Spanish name.
- `602` duplicates `501.01`, yet its children are `Sueldos y Salarios`,
`Compensaciones`, `Tiempos extras`.
- `613` and `614` are swapped in one language each: `613`'s children are
depreciations, `614`'s are amortisations.
- `701.06` duplicates `701.05` in both languages; the correct name is symmetric
to `701.07` and to `702.06`.
- `6` is the only single-digit root group whose Spanish name does not match its
XML ID (`account_group_gastos`).
### Notes
Introduced in d782b8b92557; correct in 15.0, where the names lived in
`account.account.tag.csv`. Still present in 18.0, 19.0 and master, hence
targeting 17.0. Template data only — existing databases are unaffected until the
chart is (re)installed, and renaming a group moves no balance.
Forward-Port-Of: odoo/odoo#277426`ref` already gives back a recordset if it found the reference. There is no need to research using the id on the same model, as `ref` calls `exists`, which already does the "same" query that's present here. Closes #137826 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#276554
Original PR description
`ref` already gives back a recordset if it found the reference. There is no need to research using the id on the same model, as `ref` calls `exists`, which already does the "same" query that's present here. Closes #137826 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#276554
Miscellaneous changes
Steps to reproduce the problem: * Create a SO line by code setting a specific unit price. * Modify afterwards the quantity. Result: The unit price is reset. Expected behavior: The unit price is kept. You can exercise it with this code in the shell: ```python from odoo import Command partner = env["res.partner"].create({"name": "Test partner"}) product = env["product.product"].create({"name": "Test product", "list_price": 60.0}) order = env["sale.order"].create( {
Original PR description
Steps to reproduce the problem: * Create a SO line by code setting a specific unit price. * Modify afterwards the quantity. Result: The unit price is reset. Expected behavior: The unit price is kept.…
Steps to reproduce the problem:
* Create a SO line by code setting a specific unit price.
* Modify afterwards the quantity.
Result: The unit price is reset.
Expected behavior: The unit price is kept.
You can exercise it with this code in the shell:
```python
from odoo import Command
partner = env["res.partner"].create({"name": "Test partner"})
product = env["product.product"].create({"name": "Test product", "list_price": 60.0})
order = env["sale.order"].create(
{
"partner_id": cls.partner.id,
"order_line": [Command.create({"product_id": cls.product.id, "price_unit": 100})],
}
)
print(order.order_line.price_unit) # It's 100
order.order_line.product_uom_qty = 2
print(order.order_line.price_unit) # It's 60!
```
This is because when the technical price is not set on SO line creation, the value is set on precompute as the unit price, thus being considered non manually modified, and consequently being reset.
It can be fixed setting a different value from the unit price. For not conflicting with any of the creation possible values, a high negative number is set.
@Tecnativa4 changes
Enhancements to existing features
Password managers and browsers rely on the standardized `/.well-known/change-password` URL to automatically locate a site's password change form, instead of relying on unreliable heuristics to detect it inside the page. Without this endpoint, users depending on password manager integrations (Chrome, Safari, 1Password, Bitwarden, etc) have no reliable way to be redirected to the actual reset form, resulting in a degraded UX and inconsistent behavior across browsers. This implements the Chan
Original PR description
Password managers and browsers rely on the standardized `/.well-known/change-password` URL to automatically locate a site's password change form, instead of relying on unreliable heuristics to detect it inside the page. Without this endpoint, users depending on password manager integrations (Chrome, Safari, 1Password, Bitwarden, etc) have no reliable way to be redirected to the actual reset form, resulting in a degraded UX and inconsistent behavior across browsers. This implements the Change Password URL specification by exposing a public route that redirects to `/web/reset_password`. Reference: https://wicg.github.io/change-password-url/ --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This fix prevents Swiss payroll ELM transmission from failing when a related salary rule has been archived. It helps payroll users continue processing monthly employee values without unexpected interruptions caused by archived configuration records.
This commit fixes an issue with the campaign_id field on mailing.mailing so that we can only use actual utm.campaign for it. Before this commit, when enabled it was possible to select any type of campaign even one created by marketing automation. As those creates a utm campaign linked to them. Difference being they are marked as auto campaigns. So when selecting those, they aren't shown in the campaigns' menu's views. To fix this we add a domain to the campaign_id field so that the user ca
Original PR description
This commit fixes an issue with the campaign_id field on mailing.mailing so that we can only use actual utm.campaign for it. Before this commit, when enabled it was possible to select any type of campaign even one created by marketing automation. As those creates a utm campaign linked to them. Difference being they are marked as auto campaigns. So when selecting those, they aren't shown in the campaigns' menu's views. To fix this we add a domain to the campaign_id field so that the user can only select actual campaigns. Disabling the previously mentioned behavior. task-6290440
When an employee has many validated accrual allocations on the same leave type and at least one approved future leave on that leave type, opening the time off dashboard, the employee form, "My Profile" or validating a new allocation becomes very slow. The slowdown gets worse with each extra allocation. ### Steps to reproduce 1. Install Time Off. 2. Time Off > Configuration > Accrual Plans: create a plan. 3. Time Off > Management > Allocations: create and validate an Accrual Allocation fo
Original PR description
When an employee has many validated accrual allocations on the same leave type and at least one approved future leave on that leave type, opening the time off dashboard, the employee form, "My…
When an employee has many validated accrual allocations on the same leave type and at least one approved future leave on that leave type, opening the time off dashboard, the employee form, "My Profile" or validating a new allocation becomes very slow. The slowdown gets worse with each extra allocation.
### Steps to reproduce
1. Install Time Off.
2. Time Off > Configuration > Accrual Plans: create a plan.
3. Time Off > Management > Allocations: create and validate an Accrual Allocation for an employee (e.g., Paid Time Off).
4. Time Off > Management > Time Off: create and approve a request for the same employee starting a few months in the future.
5. Create and validate several more accrual allocations of the same type for the same employee. Each validation gets progressively slower.
6. Open the dashboard or employee form; Odoo hangs for several seconds.
### Cause
The reason is that `hr.employee._get_consumed_leaves` and `hr.leave.allocation._process_accrual_plans` call each other in a loop:
```text
_get_consumed_leaves
_get_future_leaves_on
_process_accrual_plans
_get_leaves_taken
_get_consumed_leaves
...
```
The existing `precomputed_allocations` guard only stops re-entry for the single allocation being simulated. All sibling allocations on the same employee and leave type still trigger a full nested simulation, so the work grows very fast with the number of allocations.
On top of that, `_process_accrual_plans` walks the timeline one tick at a time (one day for daily plans). On every tick it calls `_get_leaves_taken`, which calls `_get_consumed_leaves` again. For most of those ticks nothing has changed: no leave has entered the window, the allocation has not hit its capacity, and the `leaves_taken` value is the same as the previous tick. But the heavy work runs anyway.
### Fix
1. Memoize `_get_future_leaves_on` by `(allocation.id, accrual_date)` on a per-request dict carried through `env.context`.
2. In `_process_accrual_plans`, fetch the relevant leave `date_from` values once before the `while` loop and only recompute `leaves_taken` when it can actually have changed: a new leave date entered the window, or the allocation was at full capacity in the previous iteration. When the employee has no relevant leaves on this leave type, `leaves_taken` stays `0` for the whole loop and the heavy call is skipped entirely.
opw-5975939