Wednesday, September 23, 2026
42 changes · master
New functionality added to Odoo
Businesses can now reconcile payments and invoices across selected intercompany records. This reduces manual accounting work by automatically creating the needed entries in each company to clear invoices and match bank statement lines.
Original PR description
This commit will allow to add the interco reconciliation. To make it work few things where done: - Changing the domain of the reconcile button to be able to see the move lines of the interco companies that are selected - Changing the domain of the suggestion pill for the same purpose - Extending the set_line_bank_statement_line function. When clicking on a line that is from another company, we will create an entry on that company to clear the invoice. Then we will create a new entry on the company of the statement line that will be reconciled with the new entry line. task-6569962 Forward-Port-Of: odoo/enterprise#131502
Enhancements to existing features
Accounting test setup now refreshes database statistics after loading test charts so the system chooses faster queries. This prevents long delays in localization test builds and makes internal validation more reliable without changing user-facing accounting behavior.
Original PR description
The default order of account.account joins an aggregate over the ancestor paths of every account. A company created in a test only exists in the test transaction, so the planner assumes it has a…
The default order of account.account joins an aggregate over the ancestor paths of every account. A company created in a test only exists in the test transaction, so the planner assumes it has a single account and reruns that aggregate for each of its accounts, including the dead rows left by earlier test classes. On runbot this turned 5s L10n class setups into minutes and got buckets killed. Analyzing the account tables after the chart load gives the planner the real counts, as test_balance_sheet_balanced already does. Order changes alone are not enough, and rewriting the query slows down production searches. The journal default account lookup only needs a code length, so it now uses the id order. | Benchmark | without | with | |--------------------------------------------|----------|----------| | Peru TestSequence, 25k dead rows (local) | 120-132s | 4.3-7.2s | | L10n build, slow account path queries | 94 | 0 | | L10n build, TestPosAR setup | 145s | 15s | | L10n build, TestCIIFR setup | 109s | 8s | Forward-Port-Of: odoo/odoo#289782
Resolved issues and error corrections
The Odoo Gmail plugin was updated to use the correct system setting lookup for newer Odoo versions. This prevents an error that could block users from authenticating with Odoo through Gmail.
Original PR description
In version 19.1+, the ir.config_parameter model no longer has the function get_param. Instead you use get_int, get_str, etc. This was causing a traceback in auth_access_token when a user tries to authenticate with Odoo via the Odoo gmail plugin. Forward-Port-Of: odoo/odoo#289957
Recall emails for stock items now use information from the specific affected stock movement line, rather than only the overall transfer. This lets the email include clearer product and lot or serial details, helping recipients identify the recalled items more accurately.
Original PR description
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#288882
Back-office users can now find survey certifications using the certification number shown on generated certificates. This makes it easier to locate and verify completed certification records without relying on other participant details.
Original PR description
Purpose ======= Add the possibility to search by certification number in the back-end. Specification ============= A certification number is displayed on the certification when generated, but there's no way to use it to search for that certification in the back-end. Making a new "certification_number" field only available for user inputs that have succeeded a certification survey. Adding it as a column in the user_input list view and adding a search method so that we can search on it without storing it. Using this new field in the certification templates as well. Task-6344097 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Large reports that reuse the same barcodes or QR codes will generate much faster because identical images are reused during the report run instead of being recreated each time. This reduces waiting time for high-volume documents without changing the report output.
Original PR description
### Description of the issue/feature this PR addresses: Reports with hundreds of pages and repeated barcodes or QR codes (same document number, same lot code on every page) re-run reportlab's…
### Description of the issue/feature this PR addresses: Reports with hundreds of pages and repeated barcodes or QR codes (same document number, same lot code on every page) re-run reportlab's createBarcodeDrawing and PNG encoding on every occurrence, even when type, value and options are identical. ### Current behavior before PR: Every call to ir.actions.report.barcode() re-renders the barcode/QR from scratch, regardless of whether an identical (type, value, options) combination was already rendered earlier in the same report. On a 900-page report with 4 barcodes/page, this dominates generation time. Benchmark, 900 pages x 4 barcodes/page, 4 distinct combos, 3600 calls: 19.131s. ### Desired behavior after PR is merged: The pure rendering step (createBarcodeDrawing + mask + PNG encoding) is extracted to a module-level function keyed on (barcode_type, value, options, mask) and wrapped with functools.lru_cache. Repeated barcodes reuse the cached PNG instead of re-rendering. Same benchmark after the fix: 0.020s (946.7x speedup, cache_info hits=3596 misses=4). --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#289979 Forward-Port-Of: odoo/odoo#289135
Improves the mail module's internal handling of record lists so common lookups and updates avoid unnecessary copying. This should reduce overhead in mail-related screens, especially where many records are involved, while preserving existing behavior.
Original PR description
Before this commit, relation reads such as map, filter and some copied the entire relation into an array of proxies before starting. Even a search matching the first record paid that cost. This…
Before this commit, relation reads such as map, filter and some copied the entire relation into an array of proxies before starting. Even a search matching the first record paid that cost. This commit fixes the issue by implementing these common methods directly on RecordList and centralize the lazy relation computation. On read this accesses the backing array and exposes record proxies as needed, while preserving the callback arguments the inherited array methods accept, including thisArg. The read snapshots the array, so that any mutation during a traversal never skips or repeats a record: the read finishes on the records the relation held when it started. Add regression coverage for traversal during mutations, completed mutation visibility to immediate observers, and callback binding. Chrome 153, median across 18 batches in two runs, in µs per operation (lower is better): | Operation | Records | Before | This commit | | --- | ---: | ---: | ---: | | `some()`, first match | 5 | 0.597 | 0.204 | | `some()`, first match | 500 | 40.02 | 0.203 | | `map()` | 50 | 6.10 | 5.58 | | `map()` | 500 | 63.35 | 62.45 | | `shift()` + `push()` | 500 | 142.38 | 49.65 | | `pop()` + `unshift()` | 500 | 185.11 | 98.95 | | Indexed replacement (`list[i] = record`) | 500 | 1.13 | 47.13 | These are isolated RecordList/Owl microbenchmarks, not end-to-end Discuss UI timings. Forward-Port-Of: odoo/odoo#287994
Planning now warns users when they try to send a schedule but none of the selected employees have a valid work email address. This prevents users from thinking schedules were sent successfully when no employee could actually receive them.
Original PR description
Before: when all employees in the send wizard lacked a work email, clicking 'Save & Send Schedule' sent the schedule to no one without informing the user. After: a warning notification is shown explaining that the planning cannot be sent until at least one employee has a valid work email address. task-5092438
Point of sale users can now add money to a customer's account even when that customer still has unpaid invoices. This makes it easier to accept deposits without forcing staff to settle existing dues first.
Original PR description
"Deposit money" was only offered in the partner list when the customer had no due, so a customer with open invoices could not put money on their account without settling those invoices. Always offer it when a customer account payment method exists. opw-6514079 Forward-Port-Of: odoo/enterprise#132065 Forward-Port-Of: odoo/enterprise#131268
Deleting a starting activity in a marketing automation flow no longer removes all connected child activities by default. The system now keeps valid follow-up steps and only removes trigger steps that cannot stand alone, reducing the risk of accidental campaign data loss.
Original PR description
When a user deletes a root marketing activity, the system currently performs a cascading delete, removing all of its child marketing activities as well. This behavior can be disruptive and may result in unintended data loss. This PR refines the deletion logic to remove only trigger nodes (e.g., "wait for value" or "mail interaction") that are not allowed at the root of the flow. Other nodes that are valid at the root level will be preserved. Task-6559148 Forward-Port-Of: odoo/enterprise#131453
The Marketing Automation editor has been visually refreshed with more consistent spacing, icons, step labels, and layout details. This makes campaign setup and review easier to use, while also improving the mobile experience for creating steps and removing unused trace view elements.
Original PR description
Improve the editor UI with consistent spacing, icons, step names, and other visual elements across the application. This gives the interface a more modern and cohesive look and improves the overall user experience. It also removes unused templates from the trace view and improve the responsiveness of the creation helper on mobile devices. Task-6559148 Co-authored-by: Chrysanthe <chgo@odoo.com> Forward-Port-Of: odoo/enterprise#131772
The AI website assistant can now allow generated JavaScript for only the current chat session instead of enabling it for the whole website. Generated scripts also wait until the page is ready before running, reducing broken interactions and making AI-created website behavior more reliable.
Original PR description
[IMP] ai_website: propose to allow javascript session-wise Commit [1] added an option to add javascript and to allow it for the whole website. This commit adds an option to allow inserting javascript…
[IMP] ai_website: propose to allow javascript session-wise Commit [1] added an option to add javascript and to allow it for the whole website. This commit adds an option to allow inserting javascript in the current chat only. [1]: https://github.com/odoo-dev/enterprise/commit/ad87d6aac19ad4a2b0fe572fff8931c9c122723d task-6481594 --- [REF] ai_website: rename aiScriptsRuntime to aiScriptsManager aiScriptsRuntime wasn't the best name for it, so we renamed it to the aiScriptsManager. task-6481594 --- [FIX] ai_website: run ai scripts only when the dom is loaded Scripts that are generated by AI run as soon as they are parsed, which might lead to issues if it uses not yet parsed content. Steps to see the issue: - Drop a `splash_intro` snippet and some snippet after it - Ask AI to "scroll the page down to the next section when 'Impact' is hovered" => It might check for the presence of the next section immediately when it runs, exiting the script early. task-6481594 Forward-Port-Of: odoo/enterprise#129834
Customer statement and open items reports now produce clearer, better-formatted PDFs with customer addresses included. PDF exports are organized per customer in one combined file, making reports easier to review and share.
Original PR description
This commit adds the following improvements to the customer statement and open items reports: 1) Adds more space for the company bank account number in the header and avoid line breaks in it 2) When printed in PDF, it prints one PDF per customer concatenated together in a single PDF 3) It includes the customer address in the generated report 4) They have better styling task-6476236
Custom AI agents can now guide users through making the agent available by default on relevant business forms, such as leads or tasks. This makes tailored AI assistance easier to deploy without requiring a separate technical setup or custom server action.
Original PR description
Users create custom AI agents and want them to appear automatically as the default agent when they open the relevant form view (leads, tasks, etc.). Extend the "Self Update" skill instructions so that after the agent writes its own model-specific system_prompt, it walks the user through binding itself to that model's form via the existing generic tools — no dedicated server action needed: 1. Resolve the target ir.model via ai_tool_search. 2. Check for an existing (agent, chatter_ai_button, model) rule and propose to update it rather than duplicate. 3. Ask (in plain text) for 2-4 typical actions. 4. Create/update the ai.composer with interface_key='chatter_ai_button' and ai_agent_id pointing back at the current agent. 5. Create the matching ai.prompt.button rows linked via composer_id. task-6578312 Forward-Port-Of: odoo/enterprise#131952
Subcontracting manufacturing orders now show key actions and status details directly on the form, reducing the need to navigate through inventory menus. The overview also shows component availability at the subcontractor location, helping users better understand shortages and replenishment needs for subcontracted work.
Original PR description
*: mrp_subcontracting_purchase Currently, when a subcontracting MO is opened from the picking view, only limited information is displayed. Users need to navigate to the corresponding MO via…
*: mrp_subcontracting_purchase Currently, when a subcontracting MO is opened from the picking view, only limited information is displayed. Users need to navigate to the corresponding MO via Manufacturing Operations in Inventory to access additional details. In addition, the MO overview displays component information based on the warehouse instead of the subcontracting location, making it difficult to review the actual component availability for the subcontracting process. This commit improves the subcontracting MO by: - Adding Overview and Transfers smart buttons, along with the start date and component status, directly on the subcontracting MO form. - Adding a `Free to Use / On Hand (Subcontractor Location)` column to display the quantities available at the subcontractor location for each component in the MO overview. - Hide free to use/on hand and Reserved for finished product. - Computing the `receipt status and reserved quantities` using the subcontractor location instead of the warehouse. - Allow replenishment of components at the warehouse from subcontracting MO overview. - Show the Source PO smart button only in the resupply picking view. - Renamed the `Subcontracting Productions` smart button to `Subcontracted Productions`. TaskId-6234816 Forward-Port-Of: odoo/odoo#267733
Invoice amount due now updates immediately while editing, reducing confusion from totals temporarily appearing out of sync. Applying outstanding credit also saves the invoice first, preventing newly added invoice lines from being lost.
Original PR description
Before this commit, the account.move amount due field would only update on record saving (as it depended on line_ids). This caused a temporary out of sync situation between the total and the amount due on the move form view. This commit ensures that the amount due is computed even before saving the record so that out-of-sync situation is avoided. It also solves the following bug: Repro steps: 1) Create a new invoice 2) Add a customer and save the record 3) Add some invoice lines 4) without saving, add a payment from the outstanding credit Issue: The added (unsaved) invoice lines are removed Solution: This commit forces a record save before assigning outstanding credit task-6534794
Website editors can now insert videos hosted on their own server or a CDN through the media dialog, instead of being limited to supported third-party platforms. This gives businesses more flexibility and control over video content while keeping the feature enabled only where intended, such as the website builder.
Original PR description
Description of the feature this PR addresses: The video tab of the media dialog only accepted urls from the eight supported third party platforms, so a self-hosted video, or one served from a CDN, could not be inserted at all. Add a `VideoFile` provider, tried once no platform matches the url. A video file url has no recognizable shape, so it is probed rather than matched, it is loaded in a detached `<video>`. The feature is behind the `allowVideoFile` config flag, off by default and currently enabled by the website builder. Removes YoutubePlugin which is dead code. task-6466707 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#282438
Inventory screens were simplified by removing redundant detailed stock options and making key physical inventory and wave preparation actions easier to find. Wave transfer wording and navigation are clearer, helping users create and manage waves with fewer interruptions.
Tax return checks now focus on issues that actually need attention, reducing unnecessary warnings once company data is complete. The tax reconciliation and draft review checks also provide more accurate results by using the return period, posted entries, and relevant sales and purchase journal filters.
Original PR description
Before this commit:- - Company Data check was always created, just like other checks. - Company Data check's message was using static 'VAT' word. - Drafts & Reviews check excluded moves with type…
Before this commit:-
- Company Data check was always created, just like other
checks.
- Company Data check's message was using static 'VAT' word.
- Drafts & Reviews check excluded moves with type `entry` for common vat report.
- Tax Reconciliation check action
- Opens pivot view of move lines with row group by tax_tag_ids > account_id.
- Domain used only outgoing moves.
- There was no date filter.
After this commit:-
- Company Data check will be created only when failing, if it is passing then
don't create. Because unlike other checks, once company data is set, this check
will always pass, and creating it every time is useless.
- Company Data check's message uses dynamic vat label.
- Drafts & Reviews check now includes `entry` type moves for the common VAT
report, but only when they carry taxes.
- Tax Reconciliation check action
- Opens pivot view of move lines with row group by tax_ids > account_id.
- Remove domain and apply Sales and Purchase journals in default filters so
user can remove it and see it all if needed.
- Apply current return's date period in default filters.
- Apply only Posted moves in default filters.
- Improved names and messages of some checks.
[task-6486107](https://www.odoo.com/odoo/project/967/tasks/6486107)
Forward-Port-Of: odoo/enterprise#130750Customers who start adding a configured product to their cart will no longer lose that action if they close the configurator without explicitly confirming. When the configuration is valid, the main product and selected optional products are still added, reducing missed sales and checkout friction.
Original PR description
Previously, closing the product configurator dialog without confirming resulted in no products being added to the cart, even if the user had initiated an add-to-cart action. This change ensures that both the main product and optional products are added to the cart when the dialog is closed, provided the configuration is valid. task-6055551
Live Chat rules now reject invalid URL matching patterns when they are saved. This prevents website visitors from triggering errors when Live Chat loads and helps administrators catch configuration mistakes earlier.
Original PR description
Currently, an error occurs when a user opens the website and Live Chat is initialized with an invalid URL regex. Steps to Reproduce: - Install `website_livechat` without demo data. - Open `Live Chat`…
Currently, an error occurs when a user opens the website and Live Chat is initialized with an invalid URL regex. Steps to Reproduce: - Install `website_livechat` without demo data. - Open `Live Chat` and, in the `YourWebsite.com` channel, click the `three-dot` menu and select `Configure Channel`. - Go to the `Rules` tab. - Add a rule, select `Welcome Bot` in `Chatbot`, and set an invalid regex such as `*` in `URL Regex` and save. - Click `Join Channel`. - Open the `website`. `re.PatternError: nothing to repeat at position 0 when serializing dict item 'result' ` - when `URL Regex is '['` `re.error: unterminated character set at position 0 when serializing dict item 'result'` When a user opens the website, Live Chat is initialized by checking operator availability and finding the matching country/URL rule [1]. The rule matching checks whether `regex_url` matches the current page URL. It uses `re.search()` [2], which compiles the regex pattern before searching. If `regex_url` contains an invalid pattern such as `*`, `re.search()` raises `nothing to repeat at position 0` because `*` must follow a preceding regex element. Similarly, `[` starts a character set (`[...]`) but has no closing `]`, causing `unterminated character set at position 0`. This commit adds a constraint to validate `regex_url` and reject invalid regex patterns when creating or updating Live Chat rules. [1]- https://github.com/odoo/odoo/blob/f962f1eccecfdbc95375f795174c8f687459b521/addons/im_livechat/controllers/main.py#L87 [2]- https://github.com/odoo/odoo/blob/f962f1eccecfdbc95375f795174c8f687459b521/addons/im_livechat/models/im_livechat_channel.py#L387 sentry-7679767396 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#283545
This fixes a crash that could occur when opening an email message containing an embedded code block in the chatter. Odoo now avoids applying code syntax highlighting inside incoming email bodies, keeping those messages readable and preventing the chatter from failing to load.
Original PR description
**Steps to reproduce:** - Receive a mail with an embedded code block - Open a chatter containing this message - Error: "Cannot mount a component on a detached dom node" **Issue:** Mail message are…
**Steps to reproduce:**
- Receive a mail with an embedded code block
- Open a chatter containing this message
- Error: "Cannot mount a component on a detached dom node"
**Issue:**
Mail message are rendered with a shadow dom body and isolated from surrounding styling.
```xml
<div class="o-mail-Message-shadowBody overflow-x-auto" t-if="this.message.message_type and this.message.message_type.includes('email')" t-custom-ref="shadowBody"/>
```
Then in `useLayoutEffect` parent element is created for the shadow root and the message body is created:
```js
const bodyEl = createElementWithContent(
"span",
this.message.showTranslation
? this.message.richTranslationValue
: this.props.messageSearch?.highlight(this.message.richBody) ??
this.message.richBody
);
const roots = this.prepareMessageBody(bodyEl) ?? [];
this.shadowRoot.appendChild(bodyEl);
```
But after [1] we have `return this.renderEmbeddedCodeBlocks(bodyEl);` which calls:
```js
const { root, mountPromise } = mountComponent(...);
```
And root creation fails as the element is not on the shadow root yet (due to `validateTarget` and `isAttachedToDocument`).
```js
const root = app.createRoot(Component, { props, env });
```
But even if we have the element directly added on the `shadowRoot` the highlighting styling won't be applied properly without all the needed assets.
**Fix:**
Prevent `ReadonlySyntaxHighlightingComponent` for incoming email body.
Doesn't seem worth to try to load the needed css/style elements in the shadow root.
[1] https://github.com/odoo/odoo/commit/8fa3cc31e8b81645d40b5d09c925b57d2c0558ab
opw-6463735
Forward-Port-Of: odoo/odoo#288136
Forward-Port-Of: odoo/odoo#287977When Knowledge is turned off for a Helpdesk Team, the related article is now unlinked automatically. This prevents articles from remaining blocked as “in use” and makes any archive or unpublish warning clearer by naming the affected teams.
Original PR description
Before this commit, unchecking the "Knowledge" option on a Helpdesk Team did not remove the link to the associated article. As a result, users could not delete or archive the article later because it was still considered "in use" by the team. This commit ensures: - The linked article is automatically removed from the Helpdesk Team when the "Knowledge" option is disabled. - The validation error message displayed when archiving or unpublishing a linked article is improved to explicitly list the specific Helpdesk Team(s) involved. task-5075527
The AI website builder now prioritizes Unsplash images when credentials are available, using default images as a fallback. This avoids unnecessary AI image generation unless the user specifically asks for it, reducing delays and costs.
Original PR description
Currently we have an issue where the AI will ignore unsplash credentials because it thinks that it will be able to make better images using the generation. However, this is slow and costly. This commit fixes the prompt to tell the AI precisely what to do i.e. always use unsplash if possible otherwise fall back to default images. If the user specifically asks for ai generated images, then we will prioritise that. task-6591258 Forward-Port-Of: odoo/enterprise#132517
This fixes an issue where users could not validate subcontracted purchase receipts after partially processing them in the Barcode app. The change keeps the related manufacturing order aligned when barcode operations split quantities, preventing validation errors and reducing disruption in receiving workflows.
Original PR description
eproduction steps: - MRP subcontracting + purchase - Subcontracted product with BOM - Create PO with a qty > 1 for this product - Go into barcode - Scan > 0 and < all of the expected quantity - Back…
eproduction steps: - MRP subcontracting + purchase - Subcontracted product with BOM - Create PO with a qty > 1 for this product - Go into barcode - Scan > 0 and < all of the expected quantity - Back out of barcode - Click validate -> Error **OR** Go back into barcode, attempt to validate -> Error Added the StockMove and StockPicking classes to stock_barcode_mrp_subcontracting to extend functions `_subcontracted_produce`, `_clean_merged`, and `split_uncompleted_moves` to use a new context flag, `keep_subcontract_production`. When this flag is set, the move Barcode creates from the split keeps the MO of the move it was split from rather than splitting the MO in two, gives that link up before it is merged away so its cancellation does not cancel the MO, and the MO quantity is resynced with the merged move afterwards. Error thrown here: https://github.com/odoo/odoo/blob/f84eeb3ed1421e0cc07c906ff6444734dc01d35f/addons/mrp_subcontracting/models/stock_move.py#L248 opw-6428928 Forward-Port-Of: odoo/enterprise#131459
This update fixes how Belgian payroll calculates basic salary when an employee has multiple contract versions in the same month. Payroll now applies the 50% rule consistently, reducing the risk of incorrect salary amounts in affected payslips.
Original PR description
there is a problem that we If we have two versions in the same month, we always follow the second option of the 50% rule. This is because the theoretical hours are calculated for the whole month, but the paid amount is calculated separately for each version. We fixed this by checking If unpaid hours > paid hours, salary is calculated by multiplying the hourly rate by the total hours. Otherwise, salary is calculated as the base wage minus (unpaid hours × hourly rate). And return back the test to what exist before the task with id : 6260378 task Id: 6515980 Forward-Port-Of: odoo/enterprise#129985
This pull request mainly tidies and fixes how document records are updated, making future changes safer and easier to maintain. It also includes several payroll, reporting, translation, leave planning, and interface polish fixes that improve reliability and consistency for users.
Original PR description
* 238 lines is just too long. * Prepare adding more writing logic for 6310302. * Remove obsolete archiving methods. Task-6443853
Settings no longer crashes when a company cannot access certain WhatsApp planning templates. The update only assigns templates to companies that are allowed to use them and treats inaccessible templates as not configured, keeping multi-company settings usable.
Original PR description
Purpose: Settings crashed with an `AccessError` for a company that can't read the planning templates. Specifications: At install, the planning templates get the first WhatsApp account found, which is often allowed for one company only. The post init hook and the field defaults set these templates on every company, so the other companies couldn't read them and Settings raised. The hook now only sets a template on the companies its account allows, and the defaults only set a template without account, since a new company isn't on any account yet. The account of a template can still change later, so Settings shows a template the user can't read as not configured, and the wizard clears it. Forward-Port-Of: odoo/enterprise#131831
Resetting an expense report to draft now also clears Studio approval records for posting journal entries. This prevents old approvals from being reused, ensuring the report must be approved again before it can be posted.
Original PR description
Currently, when resetting to draft an expense sheet, approval steps added with studio are not reset, silently granting the change Steps to reproduce: - In Studio, add an approval rule on the "Post Journal Entries" button on expense sheet - Create an expense report, submit it and approve it - Click "Post Journal Entries" and approve approve it - Open the journal entry and reset it to draft - Back to the expense sheet, reset it to draft too Issue: The "Post Journal Entries" button is still approved, showing the previous approver with the same approval date. Analysis: Approval entries are dropped on state change by a base automation that Studio builds when the rule is created. However it is only done for sale order, account move and purchase order. opw-6530689 Forward-Port-Of: odoo/enterprise#130692
This update corrects missing setup details in several Odoo components that could cause screens or actions to crash after a platform compatibility change. It helps keep affected areas such as Sign, Barcode, VoIP, spreadsheets, accounting reports, AI discussions, and Peru POS invoicing working reliably.
Original PR description
Forward-Port-Of: odoo/enterprise#132379
Users can now provide the intended language for voice transcription in the AI feature. This helps prevent speech from being transcribed in the wrong language, reducing confusing or incorrect results.
Original PR description
Prior to this commit, it was not possible to specify a transcription language. This could lead to glitches when the model would transcribe the user's voice in an improper language. Forward-Port-Of: odoo/enterprise#132534
Manufacturing work order barcode sheets were updated with smaller barcodes and wider spacing to reduce scanning mistakes on the shop floor. The barcode generation setup was also streamlined so future updates can be maintained more consistently.
Original PR description
Shrink barcodes and increase their spacings to avoid mistakes when scanning. Externalize make_sheet function to avoid code duplication. Allow to insert a blank row for more spacing through `blank_middle_column` parameter. Forward-Port-Of: odoo/enterprise#132432
This fix prevents Kenyan eTIMS invoice numbering from moving backwards after certain failed submissions. It reduces the risk of two invoices sharing the same eTIMS number, helping avoid filing mismatches and incorrect receipt details.
Original PR description
Give an eTIMS invoice number back to the sequence only when the failing call is the one that took it, and only when it is still the last one handed out. When sending a customer invoice fails with anything other than a timeout, the number is given back so that it is not consumed for nothing. current issue: - send an invoice, let it time out, so it keeps number N - send other invoices, so the sequence moves past N - send the first one again and let it fail with a non-timeout error - the sequence drops by one and the next invoice sent reuses a number Both documents then sit under the same number. On its next attempt the one that was never accepted finds the other one's filing through selectInvoiceDetails and copies its receipt details. opw-6502563 Forward-Port-Of: odoo/enterprise#131790 Forward-Port-Of: odoo/enterprise#129994
Ecuadorian point-of-sale orders now keep the user's choice when they uncheck "Invoice" during payment. This prevents unwanted invoices from being created and sent to the tax authority after order validation, especially when orders are reloaded through kitchen printer flows or feedback screen navigation.
Original PR description
Steps to reproduce: - Ecuadorian company, PoS with a preparation printer (or use the "Back" button on the feedback screen) - Open a session, add a product, go to the payment screen - Select a…
Steps to reproduce: - Ecuadorian company, PoS with a preparation printer (or use the "Back" button on the feedback screen) - Open a session, add a product, go to the payment screen - Select a customer, uncheck "Invoice", pay in cash and validate Issue: An invoice is created and sent to the SRI although "Invoice" was unchecked. Cause: l10n_ec_edi_pos patches PosOrder.setup() to force to_invoice = true. setup() runs not only on creation but every time the record is reloaded from the server, so the sync done at validation flips the flag back to true in the browser. Since the paid order can now be re-synced after validation (kitchen printer, "Back" on the feedback screen), the server processes it in process_saved_payments, writes to_invoice = True and generates the invoice. Fix: Only apply the Ecuadorian default when the loaded values carry no to_invoice, i.e. for a newly created order. Reloaded records keep the value the user chose. opw-6572987 Forward-Port-Of: odoo/enterprise#131612
The AI website builder now saves custom styling to the correct website and better checks style code before saving. This prevents broken pages and errors when users ask the AI to apply visual changes such as button colors or background images.
Original PR description
[FIX] ai_website: save custom css scoped Before this commit, if you had multiple websites, AI wouldn't save custom css in the correct website's bundles, which caused the following broken flow: - open…
[FIX] ai_website: save custom css scoped
Before this commit, if you had multiple websites, AI wouldn't save
custom css in the correct website's bundles, which caused the following
broken flow:
- open css editor, make any changes, and save it
- open the AI website builder agent and ask it to make all buttons red,
writing a custom css for that
=> you get a traceback, and after reloading your website is broken.
Note that this isn't an issue in 20.0 as this behavior has been changed.
Related to task-6578231
---
[FIX] ai_website: validate custom SCSS with bundle url rewriting
When AI used url($var) in scss, it would break the style compilation and
display an error. This happened because compiling replaced relative urls
with the absolute path. It wasn't caught before saving the custom css,
because we preprocessed css content inline, which doesn't rewrite
relative url()s.
To directly check it, you can just ask it to save this custom css:
`'$img: "a.png"; #test { background: url($img); }'`
=> Style compilation will fail.
Also, this commit updates some already present nested `with` statements
in tests to remove Ruff warnings.
task-6578231
Forward-Port-Of: odoo/enterprise#132463
Forward-Port-Of: odoo/enterprise#131954This fix ensures remaining monthly pay balances are applied to the correct worked day line in Belgian payroll. It improves payroll amount distribution accuracy, especially when multiple worked day entries are present.
Original PR description
For monthly pay, the amount regularization (remaining balance) was incorrectly applied to the worked day line with the maximum hours. It must be applied to the first worked day line instead to ensure proper amount distribution. This commit: - Modifies `_l10n_be_get_paid_work_days` to sort `paid_worked_days` by `code` first, and `number_of_hours` (descending) second. This ensures the correct code is targeted while safely handling multiple lines with the same code. - Updates test assertions to match the newly expected distribution. Task: 6512884 Forward-Port-Of: odoo/enterprise#131884
This fix prevents shared appointment resources from being overbooked when bookings are created from the backend Gantt view. It avoids invalid capacity calculations that could block customers from completing website appointments, improving booking reliability.
Original PR description
**Steps to reproduce:** - Install Appointment app - Create an appointment type based on resources, auto-assigned, with two shareable resources linked together - Set the first resource's capacity to 3…
**Steps to reproduce:**
- Install Appointment app
- Create an appointment type based on resources, auto-assigned, with two shareable resources linked together
- Set the first resource's capacity to 3 and the second resource's capacity to 4
- From the backend Gantt view, create a booking for 2 people on the first resource
- Create a second booking for 2 people on the same resource, at the same date and time
- First resource is now overbooked with reserved capacity of 4 out of 3
- Try to create an appointment from the website
- Error: "The capacity reserved should be positive."
**Issue:**
When bookings are created from the backend gantt view, the selected resource can be overbooked even if another linked resource still has available capacity.
Then when trying to book an appointment the new booking lines will trigger this constraint:
```py
_check_capacity_reserved = models.Constraint(
'CHECK(capacity_reserved >= 0)',
"The capacity reserved should be positive.",
)
```
This is caused by the negative values in:
```py
booking_line_values = []
if appointment_type.schedule_based_on == 'resources':
capacity_to_assign = asked_capacity
for resource in resources:
resource_remaining_capacity = resources_remaining_capacity.get(resource)
new_capacity_reserved = min(resource_remaining_capacity, capacity_to_assign, resource.capacity)
capacity_to_assign -= new_capacity_reserved
booking_line_values.append({
'appointment_resource_id': resource.id,
'capacity_reserved': new_capacity_reserved,
'capacity_used': new_capacity_reserved if resource.shareable and appointment_type.resource_manage_capacity else resource.capacity,
})
```
**Fix:**
Avoid negative remaining value in resource booking when computing available slots.
Note: Tried to take the capacity already used by overlapping bookings into account when assigning resource booking lines from the backend gantt view. And also force linked_resources booking when trying to book more
than the total capacity to properly dispatch as many slots as possible. But it was breaking `appointment_google_reserve` tests.
opw-6503147
Forward-Port-Of: odoo/enterprise#132484
Forward-Port-Of: odoo/enterprise#130520Vendor bill lines now only allow users to choose purchase order lines from confirmed purchase orders. This prevents draft or unconfirmed RFQs from being accidentally linked to bills, improving purchasing and billing accuracy.
Original PR description
Issue Before This Commit: ========================= Currently, the Purchase Order Line field on the vendor bill line allows users to select purchase order lines regardless of the purchase order…
Issue Before This Commit: ========================= Currently, the Purchase Order Line field on the vendor bill line allows users to select purchase order lines regardless of the purchase order state. As a result, lines from purchase orders that are not confirmed can also be selected and linked to vendor bill lines. Steps to Reproduce: =================== - Install Purchase and create an RFQ. - Create a vendor bill for the same vendor. - Add a bill line and enable the Purchase Order column. - Open the dropdown of the Purchase Order Line field. - Observe that lines from unconfirmed purchase orders are available for selection. Cause of the Issue: ==================== This [PR](https://github.com/odoo/odoo/pull/266003) made Purchase Order lines selectable directly on bill lines, but the selection domain did not restrict the lines to confirmed purchase orders. Therefore, lines from unconfirmed purchase orders remained available for selection. After This Commit: ================== Only Purchase Order lines from confirmed purchase orders are selectable on vendor bill lines. Forward-Port-Of: odoo/odoo#288858
This fixes a crash that could occur when creating multiple records from popovers that include translatable fields, such as in calendar views. Translation controls are now hidden where they do not apply, making the popover more reliable for users.
Original PR description
When a translatable field is displayed in the multi create popover (e.g. in a calendar view with a `multi_create_view`), the rendering of the popover crashes when the props are validated (in debug…
When a translatable field is displayed in the multi create popover (e.g. in a calendar view with a `multi_create_view`), the rendering of the popover crashes when the props are validated (in debug mode) with "Invalid component props (TranslationButton)", `resId` being reported as a missing key of the `record` prop. The `TranslationButton` indeed requires a `resId` on the record it receives, which must be `false` when the record doesn't exist yet. The record of the popover is produced by the `Record` component (`@web/model/record`), which forwards its `resId` prop as is to the config of the standalone model. As no `resId` is given for that new record, the datapoint ends up with an `undefined` `resId`, which is considered as a missing prop by the props validation. Normalize the `resId` in the model, such that a mono record config always has a `resId`, which is `false` when the record is new, as the `FormController` and the datapoints created by the lists already do. `_getNextConfig` is the single entry point of every load, so every root datapoint is covered, whatever the caller. The next props are normalized as well in the `Record` component, otherwise each re-render of the parent would trigger a useless reload (`undefined !== false`). 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#289585
The stock app now correctly loads the information needed for the rescheduling warning popover. This prevents a page crash when users click the warning icon on delivery orders with delayed related receipts, keeping warehouse scheduling workflows usable.
Original PR description
Issue Before this Commit: ===================== Clicking on the rescheduling popover widget on the picking form leads to a page crash. Steps to Reproduce: ===================== 1. Install the `stock`…
Issue Before this Commit: ===================== Clicking on the rescheduling popover widget on the picking form leads to a page crash. Steps to Reproduce: ===================== 1. Install the `stock` module. 2. Create a storable product, then create a delivery order for it 3. Create a receipt for the same product, and `set its Scheduled Date to a date later than the delivery order's Scheduled Date`. 4. Open the Allocation Report from the receipt and assign the received quantity to the delivery order. 5. Open the delivery order and click the Danger icon next to the Scheduled Date. Observe that the page crashes with the following error: `Uncaught Promise > Invalid loop expression: "undefined" is not iterable` Cause of the Issue: ===================== The `late_elements` is not defined in `useProps` of `StockRescheculingPopoverComponent`, even though it was used by the `stock.PopoverStockRescheduling` template. As a result, the template tried to iterate over `undefined`, leading to a page crash. After this Commit: ===================== This commit defines the `late_elements` and `delay_alert_date` in useProps so that the values are correctly available in the component and the rescheduling popover renders without crashing. Forward-Port-Of: odoo/odoo#288895
Fixes an error that could stop payment validation in Point of Sale when settling a sale order for a made-to-order manufactured product. This ensures staff can complete those POS transactions reliably without interruption.
Original PR description
Step to reproduce: ------------------ - Install `pos_sale_stock` and `mrp` module. - Go to the setting enable "Replenish on Order (MTO)" - Create a storable product with the MTO route - Create a Bill…
Step to reproduce:
------------------
- Install `pos_sale_stock` and `mrp` module.
- Go to the setting enable "Replenish on Order (MTO)"
- Create a storable product with the MTO route
- Create a Bill of Materials for the product with a storable component
- Now Create Sale order for the Product and confirm it.
- Open POS Store and settel Created sale order.
- Process toward payment and try to validate it.
Issue:
------
`AssertionError: Invalid falsy real id`
Cause:
------
When an MTO product with a manufacturing Bill of Materials is added to a Sale Order and the SO is confirmed, Odoo creates two distinct sets of stock.move records that share the same stock.reference group:
1. **Delivery moves** (picking_id → stock.picking) Created by the outgoing stock rule triggered by the MTO route. These moves are assigned to a delivery picking and have a valid picking_id.
2. **Manufacturing component moves** (picking_id = False) Created by the Manufacture route's procurement rule, which spawns an mrp.production. The raw-material moves inside an MO belong to the production order, not to any stock.picking. Their picking_id field is intentionally False by design.
Both sets of moves are linked to the same stock.reference record through the stock_reference_move_rel many2many table. This means that traversing:
so_line.move_ids → delivery move(s)
.reference_ids → shared stock.reference
.move_ids → ALL moves in the group (delivery + MRP)
every move in the reference group, including MRP component moves whose picking_id is False.
- Then In PosOrder.sync_from_ui(), the code collected the IDs of all related pickings into a set for later cancellation:
https://github.com/odoo/odoo/blob/a0cdf9c33ed464b4ec8bd520e4d0523afb8dbd28/addons/pos_sale/models/pos_order.py#L111
https://github.com/odoo/odoo/blob/a0cdf9c33ed464b4ec8bd520e4d0523afb8dbd28/addons/pos_sale/models/pos_order.py#L130-L133
waiting_picking_ids.add(move.picking_id.id) # ← adds False for MRP moves
Because MRP moves pass the state filter ('confirmed') but have picking_id = False, `move.picking_id.id` evaluates to False (the empty recordset's falsy id), which was silently added to the waiting_picking_ids set.
Issue occur from this [commit](https://github.com/odoo/odoo/commit/515eb5ba0892a759dde32a9b2923d8ecc1e4bf74?debug=1), the ORM assertion in browse() rejects falsy IDs:
https://github.com/odoo/odoo/blob/a0cdf9c33ed464b4ec8bd520e4d0523afb8dbd28/addons/pos_sale/models/pos_order.py#L139
https://github.com/odoo/odoo/blob/9e02922f821a3b4e891e90bf9bd18448a08e66fa/odoo/orm/models.py#L5297
Fix:
---
Add guards in `sync_from_ui()`
*Inner filtered() guard* — add `m.picking_id` as the first condition so
that MRP component moves (picking_id = False) are never iterated, preventing
`False` from ever entering the set
---
opw-6486681
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#289890
Forward-Port-Of: odoo/odoo#284103Customers who sign in during an active live chat will no longer lose the chat window or chat button. This keeps the conversation available after login, reducing interruptions and failed handoffs during customer support interactions.
Original PR description
Before this commit, a visitor signing in during a live chat session sometimes landed on a page with neither the chat window nor the live chat button, which fails website_livechat.chatbot_continue_after_login_tour on its "Your email is validated, thank you!" step. This happens because the login moves the live chat sessions of the guest to the partner of the user, and unlinking a member tells the bus channel of that member to close the chat window of the channel. The browser that just signed in still listens on the bus channel of its guest, so that order closes the conversation the visitor is taking over. An order arriving before the page restores its chat windows changes nothing, which is why the tour fails only under load. This commit fixes the issue by unlinking the guest members with close_chat_window=False, so that nothing tells the visitor to close the session they keep. https://runbot.odoo.com/odoo/error/947173 Forward-Port-Of: odoo/odoo#289993