Wednesday, July 30, 2025
34 changes · saas-18.4
Enhancements to existing features
Invoices and bills now show bank transactions from the same partner, making it easier to identify possible payments directly from the document. This improves reconciliation visibility by bringing relevant bank lines closer to the accounting documents they may settle.
Original PR description
Bank transactions from the same partner will be visible under the invoice or bill, similar to how credit notes are currently displayed. Task ID: 4564203 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#197751
Users can now resend corrected vendor bills to Bizkaia's Batuz system without cancelling and recreating the accounting entry. This simplifies corrections for customers and auditors when a vendor bill was rejected or needs adjustment before acceptance.
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#205946
Point of Sale payments in Argentina, Peru, and Uruguay now request an invoice by default. This helps businesses in these countries comply with requirements to generate electronic sales documents automatically.
Original PR description
[IMP] l10n_*: set default invoice true in pos modules: l10n_pe_pos, l10n_ar_pos, l10n_uy_pos In the POS, in the payment screen, the button to request an invoice is set to true by default. This is done because a sale in these countries must generate an electronic document. task-4612192 Forward-Port-Of: odoo/odoo#220915 Forward-Port-Of: odoo/odoo#216003
Indian POS reversal journal entries now retain HSN codes, helping businesses keep tax reporting accurate when POS orders are reversed after a session is closed. This improves consistency between normal and reversal entries for GSTR reporting.
Original PR description
This commit ensures that the `l10n_in_hsn_code` is also included in the accounting move lines are generated for reversal entries of POS orders when the The company’s fiscal country is India. Key changes: * Introduced the method `_prepare_product_aml_dict` in `point_of_sale` to centralize journal line creation logic. * Overridden the method in `l10n_in_pos` to append the `l10n_in_hsn_code` from the base values for Indian companies. * Ensured this applies consistently for both regular and reversal entries. This enhancement is essential for maintaining accurate HSN-wise reporting in GSTR filings, even when entries are reversed after session closure. OPW: 4931360 Forward-Port-Of: odoo/odoo#220938 Forward-Port-Of: odoo/odoo#219038
When users choose an account while reconciling bank statement lines, Odoo now automatically applies the default tax configured on that account. This reduces manual entry and helps keep reconciled transactions consistent with accounting setup.
Original PR description
In this PR: - When setting the account from the bank reconciliation widget (using 'Set Account'), the default tax set on that account will now be automatically applied to the bank statement line. task-4930945 Forward-Port-Of: odoo/odoo#218382
Peruvian electronic invoices now export down payments in the format required by SUNAT instead of using negative invoice lines. This helps businesses issue compliant final invoices when advance payments have already been made.
Original PR description
By default, the UBL module represents prepayments / downpayments as a InvoiceLine in the final invoice with a negative quantity and amount. However, SUNAT and the Peru Government does not allow negative quantities, and instead require this information to be stored within the PrepaidPayments node and referred to via AdditionalDocumentsReference. task-4605204
The French tax report now shows a warning when key VAT declaration totals do not balance. This helps users spot possible reporting errors before submitting or reviewing their tax figures.
Original PR description
This commit will add a warning banner when the sum of field 08+09+9B+10+11+T1->T7 is not equal to sum of field A1+A2+A3+B2+B3+B4 Task-4933787 Forward-Port-Of: odoo/enterprise#91157 Forward-Port-Of: odoo/enterprise#89956
When users assign an account to a bank statement line during reconciliation, any default tax configured on that account is now applied automatically. This reduces manual entry, improves consistency, and helps accounting teams avoid missed tax details.
Original PR description
In this PR: - When setting the account from the bank reconciliation widget (using 'set_account'), the default tax set on that account will now be automatically applied to the bank statement line. task-4930945 Forward-Port-Of: odoo/enterprise#89966
Resolved issues and error corrections
The Spanish Modelo 390 VAT report now avoids counting vendor refunds twice and includes all relevant manual adjustment lines in line 64. This improves the accuracy of annual VAT reporting and reduces the risk of incorrect tax declarations.
Original PR description
This commit addresses two issues in the Mod 390 report:
---
1. Vendor refunds were being reported twice:
- Once correctly via the tax grid.
- And again incorrectly through the cross-formula on lines 639 and 62, which are meant for special manual adjustments only.
➤ Fix: Lines 639 and 62 are now treated as external values, making them
editable and excluding them from automatic computation.
2. Line 64 was missing part of the total:
- It did not include balances from lines 661 and 62, resulting in an incomplete total.
➤ Fix: Updated the computation of line 64 to sum all relevant manual lines.
---
task-4972473
Forward-Port-Of: odoo/odoo#221112
Forward-Port-Of: odoo/odoo#220730Point of Sale loyalty rules now treat a combo product as a single item instead of counting each included option separately. This prevents customers from receiving extra discounts or rewards when buying combo products, keeping loyalty promotions accurate.
Original PR description
Combo lines where counted as products in the loyalty program rules, but they are part of only one product, the combo product. So when you add a combo product to the cart, it should count as one product no matter how many items are in the combo. Steps to reproduce: ------------------- * Create a combo product with 3 products options in it * Create a loyalty program that give 1 point with a minimum quantity of 2. And 100% discount on the cheapest product in exchange of 1 point * Open PoS session * Add the combo product to the cart > Observation: You get 2 discount of 100%. Why the fix: ------------ We ignore combo lines in the loyalty program rules. This way, no matter how many products are in the combo, it will only count as one product for the loyalty program rules. opw-4783013 Forward-Port-Of: odoo/odoo#220828 Forward-Port-Of: odoo/odoo#213002
Italian vendor bills imported from XML now ignore a product's default tax when the XML already provides the tax details. This prevents duplicated tax amounts and improves accuracy when matching imported bill lines to existing products.
Original PR description
**Issue**: Importing a vendor bill from XML may lead to two taxes being applied to the same product if: - The product exists in the database. - It matches a product reference in the XML. - The…
**Issue**: Importing a vendor bill from XML may lead to two taxes being applied to the same product if: - The product exists in the database. - It matches a product reference in the XML. - The product has a default service tax (e.g. 22% S). **Steps to reproduce**: - Create a product with a service tax (22% S). - Ensure you have a test XML referencing that product (see tests for an example). - Go to Accounting > Vendors > Bills. - Upload the XML file. - Observe that the product line has two taxes: 22% G (from XML) and 22% S (from product). **Cause**: Two taxes are applied because: - The tax defined in the product: [Line 875 in `account_move_line.py`](https://github.com/odoo/odoo/blob/767341d4ec6aaa4fbd379827da4baf04e561eb32/addons/account/models/account_move_line.py#L875) which is triggered by [L1285C1-L1288C30 in `account_move.py`](https://github.com/odoo/odoo/blob/e705690d2340245a0d18b7e76347575dde9ea2be/addons/l10n_it_edi/models/account_move.py#L1285C1-L1288C30) - Then, the XML tax is also added: [L1012C1-L1016C44 in `account_move.py`](https://github.com/odoo/odoo/blob/e705690d2340245a0d18b7e76347575dde9ea2be/addons/l10n_it_edi/models/account_move.py#L1012C1-L1016C44) An attempt to reset the `tax_ids` after setting the product is already present: [Line 1319](https://github.com/odoo/odoo/blob/e705690d2340245a0d18b7e76347575dde9ea2be/addons/l10n_it_edi/models/account_move.py#L1319), but it is ineffective because the original `tax_ids` are re-applied afterward, dues to side effects. **Solution**: There are two possible ways to fix this: - Make sure `move_line.tax_ids = []` works as intended - Clean the `move_line.tax_ids` recordset. Chose the second option as it's simpler and avoids modifying unrelated code **Additional Notes**: The tax extracted from the XML does not take into account whether the product is a good or a service. For example, if the tax rate is 22%, the logic return taxes[0] if taxes else taxes will always return 22% G, even if the product should be taxed as 22% S. To solve this, an extra domain filter is added based on the product type to ensure only applicable taxes are considered. opw-4844469 Forward-Port-Of: odoo/odoo#220261 Forward-Port-Of: odoo/odoo#218309
This update brings the spreadsheet component to the latest version and fixes issues that could affect user work. It prevents conditional formatting edits from being overwritten when cancelling changes, and improves pivot table calculations for date and time fields using sum or average.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/b14de14f5 [REL] 18.4.4 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/b14de14f5 [REL] 18.4.4 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/4d3e2cedf [FIX] cf: do not override changes on cancel [Task: 4609695](https://www.odoo.com/odoo/2328/tasks/4609695) https://github.com/odoo/o-spreadsheet/commit/497461899 [FIX] pivot: support SUM and AVG aggregators for datetime fields [Task: 4945217](https://www.odoo.com/odoo/2328/tasks/4945217) Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Ronak Mukeshbhai Bharadiya <rmbh@odoo.com> Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
The Philippine BIR 2307 spreadsheet export now includes partner ZIP codes and uses the correct tax description for the payment nature. It also formats company and individual taxpayer names more accurately, helping businesses submit cleaner tax reports with fewer manual corrections.
Original PR description
The BIR 2307 XLS export was missing the `ZIP_code` and incorrectly showing the `nature` of payment from the invoice line instead of the tax description. In this commit: --- - Added a new column `zip_code` to show the ZIP from the `partner`. - Changed the `nature` column to use the `tax-description` instead of `product-name`. - Displaying `companyName` only when the commercial partner is a company. - Displaying `surName`, `firstName`, and `middleName` only when the commercial partner is an individual. enterprise-PR- odoo/enterprise#91120 task-4880921 Forward-Port-Of: odoo/odoo#220946 Forward-Port-Of: odoo/odoo#214940
Invoice emails generated after online purchases now use the proper salesperson as the sender instead of incorrectly involving the portal customer or system administrator. This prevents confusing duplicate or self-addressed invoice emails and keeps customer communications clear and professional.
Original PR description
**Steps to reproduce**: 1. Enable automatic invoicing `Settings -> Sales -> Invoicing -> Automatic Invoice` 2. Configure a payment provider like `Stripe` (not demo) 3. Open the website in an…
**Steps to reproduce**: 1. Enable automatic invoicing `Settings -> Sales -> Invoicing -> Automatic Invoice` 2. Configure a payment provider like `Stripe` (not demo) 3. Open the website in an incognito browser and log in as a portal user 4. Add a product to cart and checkout with the portal user's delivery address 5. Complete payment using test card credentials 6. Navigate to the created invoice in Sales **Observed behavior:** The invoice email is sent to both the portal user (customer) and the system admin, appearing as if the email is sent "from admin to admin" instead of from the assigned salesperson. **Root cause:** When automatic invoicing is enabled and a portal user completes a website purchase, the `_send_invoice()` method uses `self.env['account.move.send']` which runs in the portal user context. The portal user is selected as author, and the email template uses `partner_to` so it is also selected as partner. While sending mail, this triggers the `mail_notify_author` context. Additionally, due to the portal user not having proper email sending permissions, the system adds admin as fallback. As a result, emails are sent by admin, and because of `mail_notify_author`, mail is also sent to admin. **Solution:** Changed `self.env['account.move.send']` to `tx.env['account.move.send']` in the `_send_invoice()` method. Since `tx` is created with `SUPERUSER_ID` context, this ensures the invoice sending runs with proper system permissions and uses the transaction's context instead of the portal user's context. This ensures emails are authored by the correct salesperson, not the portal user. opw-4760568 Forward-Port-Of: odoo/odoo#221064 Forward-Port-Of: odoo/odoo#220504
This update restores missing product code information in UBL electronic invoices and corrects bank branch data for BIS3 compliance. It helps ensure generated invoices validate properly against Peppol/UBL rules and reduces the risk of rejected e-invoices.
Original PR description
### [FIX] account_edi_ubl_cii: Add SellerItemIdentification and add tests Before the UBL refactor, the `SellerItemIdentification` node was populated with the product code. We restore this behaviour. In addition, the refactor added the `StandardItemIdentification` node without specifying the `schemeID` (which is required by the schematron), then commit f46c10f03e59e8 added `schemeID="0160"` This commit adds tests to enforce this behaviour. task-none ### [FIX] account_edi_ubl_cii: BIS3 rm FinancialInstitutionBranch/schemeID In BIS3, the `FinancialInstitutionBranch` node should not specify the `schemeID` property. https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-tc434/UBL-CR-655/ This was correct before the UBL refactor but was messed up by the refactor. task-none Forward-Port-Of: odoo/odoo#219924
This update fixes how editable website content is marked in the editor, including during translation workflows. It helps ensure website text and snippets remain properly editable after recent editor changes, reducing editing issues for users managing website pages.
Original PR description
[FIX] html_builder, *: backport the ContentEditable plugin *: test_website, website This commit backports [this one] in 18.4. Related to task-4367641 [this one]:…
[FIX] html_builder, *: backport the ContentEditable plugin *: test_website, website This commit backports [this one] in 18.4. Related to task-4367641 [this one]: https://github.com/odoo/odoo/commit/e4b720d3a8748151b0bd146b1dbed41adf1483af ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [MOV] html_builder, *: move the ContentEditablePlugin in html_editor *: html_editor The goal of this commit is to move the `ContentEditablePlugin` plugin in `html_editor` as it is responsible of the `contenteditable` attribute. Related to task-4367641 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [FIX] html_builder, *: correctly set contenteditable attribute *: html_editor, website The goal of this commit is to correctly handle the `contenteditable` attribute. This attribute was not handled correctly since the [website refactoring]. The `contenteditable` attributes have also been removed from the xml in `website` tests as this attribute is handled by the editor. Related to task-4367641 [website refactoring]: https://github.com/odoo/odoo/commit/9fe45e2b7ddbbfd0445ffe25a859e67a316d02b2
Odoo now better recognizes older Word, Excel, and PowerPoint files, plus newer Excel spreadsheets that could previously be mistaken for generic file types. This helps prevent uploaded Office documents from being renamed with the wrong extension in the Documents app, reducing confusion for portal users and staff.
Original PR description
## [FIX] core: python3-magic vs .doc/.xls/.ppt [python3-magic](https://packages.ubuntu.com/noble/python3-magic)/[python-magic](pypi.org/project/python-magic) (apt/pip) is a frontend for…
## [FIX] core: python3-magic vs .doc/.xls/.ppt [python3-magic](https://packages.ubuntu.com/noble/python3-magic)/[python-magic](pypi.org/project/python-magic) (apt/pip) is a frontend for [libmagic](https://manned.org/man/ubuntu-noble/magic) the library that can introspect files to determine their types. The Documents app makes heavy usage of our mimetypes utilities to scan and fix the extensions of files uploaded by portal users. Everytime a portal user uploads a `.doc`/`.xls`/`.ppt` file, python3-magic is gonna guess the mimetypes `application/x-ole-storage` or `application/CDFV2` which are the mimetypes of the generic file format that Microsoft Office was using until 2006. The problem is that there is no specific extension for those two mimetypes as Microsoft was using the same file format for many of its office applications. In this work we enrich python3-magic's detection with our own, which is able to tell different `application/x-ole-storage` and `application/CDFV2` files apart. **Please note**: Excel files are detected only when the entire file is present. Excel files uploaded via the Documents app are not detected because Documents only `guess_mimetype` on the first 1kiB of the document. We also added a condition to keep the .doc/.xls/.ppt extension in case the generic `application/x-ole-storage` or `application/CDFV2` mimetype is guessed. Before it was emitting a warning due to the unknown extension. ## [FIX] core: python3-magic vs new (2025) .xlsx files [python3-magic](https://packages.ubuntu.com/noble/python3-magic)/[python-magic](pypi.org/project/python-magic) (apt/pip) is a frontend for [libmagic](https://manned.org/man/ubuntu-noble/magic) the library that can introspect files to determine their types. The Documents app makes heavy usage of our mimetypes utilities to scan and fix the extensions of files uploaded by portal users. Sometypes when portal user uploads a `.xlsx` file, python3-magic fails to detect the Microsoft Excel 2007+ (OOXML) mimetype and instead guesses a generic `application/zip`. Technically this is not wrong, OOXML files (like Java JAR and Python Weels) are using the zip format. This is quite strange because python3-magic is able to work with `.xlsx` files. I'm guessing that Microsoft deployed a new version of Excel and that magic doesn't correctly guess the new (2025) `.xlsx` files. Using a hex editor, the old (from our unittests) and new (from a 2025 support ticket) seem similar: OOXML files, deflate compression, same files present. They are a bit different, in the old the `[Content_Types.xml]` file comes last, in the new it comes first. The zip headers are different too, the old uses zip Data Descriptors, the new doesn't. The problem is that the Documents app uses the guessed mimetype to "fix" the extension of the uploaded file. So the portal-user's `file.xlsx` gets wrongly rewritten to `file.zip`. We first used an approach similar to the previous commit[^1], to use our own detection of OOXML files. It works great in base where we run the detection on whole files. However it doesn't work for the Documents app because it attempts to guess the mimetype only reading the first 1kiB of the uploaded file. A first PR odoo#213647 suggested to change Documents to load the whole file first, and then run `guess_mimetype`, but was rejected. In this work, we made so we don't fix the extension of zip-like files should the guessed mimetype be application/zip. [^1]: [FIX] core: python3-magic vs .doc/.xls/.ppt opw-4607156 opw-4753670 Forward-Port-Of: odoo/odoo#220644
This fixes an issue where upgraded websites could show an error when shoppers opened the optional extra checkout step. The checkout step is now kept published when the feature was enabled before migration, helping customers complete purchases without disruption.
Original PR description
Traceback: --------- ``` Error while render the template KeyError: 'current_step' Template: website.step_wizard Path: /t/div/div[1]/div/div/a/span ``` Ensure `is_published` is set to True for…
Traceback: --------- ``` Error while render the template KeyError: 'current_step' Template: website.step_wizard Path: /t/div/div[1]/div/div/a/span ``` Ensure `is_published` is set to True for '/shop/extra_info' if the `extra step` feature is enabled during migration. Cause of the issue: ----------------------- The issue occurs because the is_published field is set to False, resulting in an empty value for [`current_step`](https://github.com/odoo/odoo/blob/saas-18.3/addons/website_sale/models/website.py#L799). This happens because the [`allowed_steps_domain`](https://github.com/odoo/odoo/blob/saas-18.3/addons/website_sale/models/website.py#L780-L783) fails to include the step when the condition is_published=True is not satisfied. During migration while creation of `website.checkout.step` records, the standard logic `is_published = bool(step.step_href != '/shop/extra_info')` sets `is_published=False` for the [/shop/extra_info](https://github.com/odoo/odoo/blob/saas-18.3/addons/website_sale/models/website.py#L771) step, even if the extra step feature was enabled in v18.2. This leads to a KeyError when accessing `/shop/extra_info` after migration. This fix ensures `is_published` is correctly set based on whether the extra info feature is enabled. Steps to reproduce: ------------------------ 1) In Odoo v18.2, go to Website > Configuration > Settings, and enable Extra Step During Checkout 2) Migrate the database to v18.3. 3) Navigate to /shop/extra_info on the website. Current behavior before PR: ------------ ``` v_18.3=# select id,name,key,website_id,active from ir_ui_view where key = 'website_sale.extra_info'; id | name | key | website_id | active ------+---------------------+-------------------------+------------+-------- 2100 | Checkout Extra Info | website_sale.extra_info | | f 2218 | Checkout Extra Info | website_sale.extra_info | 1 | t (2 rows) v_18.3=# select id,website_id,is_published,step_href from website_checkout_step where step_href = '/shop/extra_info' and website_id is not null; id | website_id | is_published | step_href ----+------------+--------------+------------------ 7 | 1 | f | /shop/extra_info 11 | 2 | f | /shop/extra_info (2 rows) ``` Desired behavior after PR is merged: ------------ ``` v_18.3=# select id,website_id,is_published,step_href from website_checkout_step where step_href = '/shop/extra_info' and website_id is not null; id | website_id | is_published | step_href ----+------------+--------------+------------------ 7 | 1 | t | /shop/extra_info 11 | 2 | f | /shop/extra_info (2 rows) v_18.3=# select id,name,key,website_id,active from ir_ui_view where key = 'website_sale.extra_info'; id | name | key | website_id | active ------+---------------------+-------------------------+------------+-------- 2100 | Checkout Extra Info | website_sale.extra_info | | f 2218 | Checkout Extra Info | website_sale.extra_info | 1 | t (2 rows) ``` upg-2992540 opw-4867915 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#216779
This fixes issues in the website editor where removing a parallax background image could leave a color overlay behind, and where parallax effects could fail on parent blocks containing nested content. Website editors now get more predictable visual results when using background images and scroll effects.
Original PR description
**[FIX] website: remove background color filter when removing bg image** Since the `html_builder`, when a block has a parallax background image and the image is removed, any applied color filter…
**[FIX] website: remove background color filter when removing bg image** Since the `html_builder`, when a block has a parallax background image and the image is removed, any applied color filter remains applied. This happens because the `editingElement` of the image toggle is the parallax span instead of the actual section - and therefore the color filter element is not properly located. This commit finds out about that situation and removes the filter from the right element. Steps to reproduce: - Drop a "Cover" block - Remove its background image => Its color filter remained present in the DOM. ------- **[FIX] website: fix parallax in nested block** Steps to reproduce: - In Website edit mode. - Drag and drop a "Tabs" block. - Drag and drop a "Cover" block inside the "Tabs". - Add a background image to the "Tabs" block. - Add a scroll effect (Parallax) to the "Tabs" block. - Bug: The scroll effect is not applied. This bug happened because the code checked for a parallax effect in the whole block structure, not just on the block itself. It wrongly detected a parallax because a child block had one, even if the parent didn’t. task-4367641
Restaurant self-ordering from a table QR code now keeps the table already identified by the link. Customers no longer have to choose the same table again at payment, reducing confusion and friction during checkout.
Original PR description
Before this commit, when you made a self order at Table, the table selector was trigger and you had to pick one, even if the tableIndicator was there. In practice, the `selectedTable` in `selfOrder`…
Before this commit, when you made a self order at Table, the table selector was trigger and you had to pick one, even if the tableIndicator was there.
In practice, the `selectedTable` in `selfOrder` was removed by the `selectPreset()` function of `EatingLocationPage`
```js
selectPreset(preset) {
this.selfOrder.currentOrder.setPreset(preset);
this.selfOrder.currentTable = null;
this.router.navigate("product_list");
}
```
That was fixed in 18.2 by this commit : https://github.com/odoo/odoo/commit/5e01d444cfd0594dd88a420129375ae1a6fdfc62
The test `self_mobile_auto_table_selection_takeaway_in` as been added.
Steps to reproduce (in runbot 18.1) :
- Go in Point of Sale > Configuration > Settings
- Select the Restaurant
- Set the Self Ordering Method to QR menu + Ordering
- Save
- Get the code using Print QR Codes
- Open the Table: 1 URL in incognito window
- Make sure the Restaurant is Open and the table 1 have no remaining order
- Select Eat In as eating location and make an order
- When you click pay, the table selection displayed
opw-4641352
Forward-Port-Of: odoo/odoo#220879
Forward-Port-Of: odoo/odoo#214300Updating account codes in chart of accounts mappings now avoids unnecessary background data loading that could exhaust server memory. This makes large accounting databases more reliable when saving account code changes, reducing peak memory usage significantly.
Original PR description
Description ----------- Writing a new code for an account in the mappings of a COA will retrigger expensive recomputations for all moves linked to the accounts via its lines. This can lead to quick…
Description ----------- Writing a new code for an account in the mappings of a COA will retrigger expensive recomputations for all moves linked to the accounts via its lines. This can lead to quick exhaustion of the memory budget for the processing of the request (2 GiB by default). The commit odoo/odoo@8c5bfff4667ac2f8ec349278dda77d980242aae1 was supposed to address this issue by disabling the fields prefetcher when either 'code' or 'account_type' are being written to, but there is a logical oversight in the condition. ```py prefetch_fields=any(field in vals for field in ['code', 'account_type']) ``` Means "activate prefetch if it exists a field 'code' or 'account_type' in the vals". This is the opposite of what was intended, if the fields *do not* exist, only then we prefetch. So we can just negate the condition. Benchmark --------- For a database where updating the code of an account in the COA mapping, which impacts ~370K account.move and their related ~1.56M account.move.line, saving the new code memory took: | | Before | After | |-------------------|----------|---------| | Peak Memory Usage | 2.78 GiB | 879 MiB | Reference --------- opw-4951670 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#220849
This update fixes several issues in the website editor when adding elements in grid mode. Newly added items now show their editing options correctly, images are placed properly, and the image picker shows only relevant image choices, making page editing smoother and less confusing.
Original PR description
This commit fixes several issues happening when using the "Add Element" grid mode option: - When the new grid item was added, its options were not activated. => This commit fixes that by explicitely…
This commit fixes several issues happening when using the "Add Element" grid mode option: - When the new grid item was added, its options were not activated. => This commit fixes that by explicitely activating them (like it was done before the refactoring. - When adding an image, the image was strangely shifted to the left, inside the column. This is because the image wrongly had the `row` and `o_grid_mode` classes, because the row was passed as the node to replace in the media dialog (the `node` parameter), and the row classes were therefore added on the image, causing their CSS rules to apply on it and shift it. => This commit removes the `node` parameter in the call to open the media dialog. - When adding an image, the dialog which is supposed to only have the "Images" tab also had the "Documents" tab displayed. It happens because the `onlyImages` parameter only disables the "Icons" and "Videos" so, in order to disable the documents, `noDocuments` must also be specified. => This commit adds this parameter when opening the media dialog. This commit also cleans the code, by adding back some missing comments, renaming the variables to follow the convention and give them more correct names, and adding/fixing some docstring. A major change to note is that the three actions `AddElTextAction`, `AddElImageAction` and `AddElButtonAction`, were merged back into one single `AddGridElementAction`. Indeed, there was no need to define three of them, as only one is needed, with an `actionParam` telling in which case we are (like before the refactoring). task-4367641
Warnings related to Indian e-invoicing are now shown correctly in the Send & Print wizard. This helps users see important issues before sending invoices, reducing the risk of missed compliance or processing problems.
Original PR description
Before this PR, warnings that should be displayed while sending e-invoices through the Send & Print wizard was not shown because the `_group_by_error_code` method always returned False. With this PR, the method has been corrected to return the appropriate key based on the warning, ensuring that relevant messages are now properly displayed Forward-Port-Of: odoo/odoo#220881 Forward-Port-Of: odoo/odoo#220036
When a Point of Sale user without administrator rights tries to load sample data, the system now shows a clear Access Denied message instead of failing with a technical error. This helps store staff understand why the action cannot continue and avoids confusing error screens during POS setup.
Original PR description
Currently, an error is encountered when trying to load sample data in POS session if the **Administrator** is assigned the **User role** for the Point of Sale app. **Steps to reproduce:** - Install…
Currently, an error is encountered when trying to load sample data in POS session if the **Administrator** is assigned the **User role** for the Point of Sale app.
**Steps to reproduce:**
- Install the `point_of_sale` module (without demo data).
- Create a new POS session (from list view).
- Change the POS rights of the **Administrator** user from _Administrator_ to _User_.
- Open the pos sessions and on the product screen, click **Load Sample**.
**Error:**
```
while parsing /home/odoo/src/odoo/saas-18.3/addons/point_of_sale/data/scenarios/furniture_category_data.xml:5, somewhere inside
<record id="pos_category_miscellaneous" model="pos.category">
<field name="name">Misc</field>
<field name="image_128" type="base64" file="point_of_sale/static/img/misc_category.png"/>
<field name="sequence">1</field>
</record>
```
This commit will prevent the error by displaying an **Access Denied** pop-up for users without admin rights, when attempting to load the POS sample data.
Sentry - 6672207110
Forward-Port-Of: odoo/odoo#219103
Forward-Port-Of: odoo/odoo#213813This update prepares Odoo to run reliably on Python 3.13 and Debian Trixie by updating dependency requirements and cleaning up test behavior around newer Python error messages. It reduces upgrade risk for future platform deployments while keeping the changes mostly internal and compatibility-focused.
Original PR description
Forward-Port-Of: odoo/odoo#220640 Forward-Port-Of: odoo/odoo#219270
Pivot tables in spreadsheets now display meaningful labels when data is grouped by an ID field, instead of leaving row or column headers blank. This makes spreadsheet reports easier to read and aligns test behavior with the real application.
Original PR description
**Description of the issue/feature this PR addresses:** When inserting a pivot table in a spreadsheet and grouping by an `id` field, the pivot column or row headers appear blank instead of showing…
**Description of the issue/feature this PR addresses:** When inserting a pivot table in a spreadsheet and grouping by an `id` field, the pivot column or row headers appear blank instead of showing the expected label. This issue stems from two inconsistencies: 1. The `_sanitizeLabel` logic used to normalize pivot headers did not properly handle groupby values for `id` fields that are returned as `[id, label]` arrays. It treated them as truthy values but didn't extract the label. 2. The mock `read_group` implementation did not follow backend logic for `id` fields. It returned raw integers instead of `[id, display_name]`, breaking the label extraction expected by the pivot UI. **Current behavior before PR:** - Pivot headers for grouped `id` fields are blank in spreadsheets - Mock data returns raw IDs, causing the display logic to fail **Desired behavior after PR is merged:** - The pivot UI correctly extracts and displays labels for `id` groupings - The mock `read_group` aligns with backend by returning `[id, label]` for `id` fields, matching the behavior of relational fields Task: 4878685 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#220880 Forward-Port-Of: odoo/odoo#219206
Employees can now place or update lunch orders when the cost is covered by their wallet balance plus the configured overdraft allowance. This prevents valid orders from being blocked and keeps the Lunch app behavior aligned with company settings.
Original PR description
**Current Behavior:** The overdraft amount (`lunch_minimum_threshold`) is configured in Lunch settings is ignored when employees create or update lunch orders. As a result, even if the total order…
**Current Behavior:** The overdraft amount (`lunch_minimum_threshold`) is configured in Lunch settings is ignored when employees create or update lunch orders. As a result, even if the total order amount is within the allowed overdraft limit, the system blocks the action. **Steps to Reproduce:** 1) Install the Lunch module. 2) Set an overdraft amount in the Lunch settings. 3) Ensure an employee's wallet balance is less than a desired order total. 4) Attempt to create a lunch order or increase product quantity such that the total is more than the wallet balance but within the wallet + overdraft amount. **Issue:** - In both the product view (`_compute_display_add_button`) and the dashboard (`canAdd` logic), the wallet balance is calculated using `get_wallet_balance(include_config=False)`. - This call excludes the overdraft threshold, causing incorrect warnings and hiding of the `Add to Cart` or `+` buttons. **Solution:** - Remove the explicit `include_config=False` argument so the default True is used, ensuring the overdraft is included. - In the dashboard logic, enhance _make_info() to return a wallet_with_config key using get_wallet_balance(include_config=True) and update the canAdd check to use this value. opw-4782564 Forward-Port-Of: odoo/odoo#217532
Malaysia e-invoices now place prepaid amounts in the format expected by the MyInvois platform. This helps prevent invoice submission issues for businesses using Malaysian electronic invoicing, including invoices, credit notes, refunds, imports, and point-of-sale consolidated invoices.
Original PR description
Before: Prepaid Amount was submitted under LegalMonetaryTotal node, which follows UBL format but not supported for MyInvois. After: Introduced separate PrepaidAmount node used specific to Malaysia to support MyInvois. taskID-4947994 Forward-Port-Of: odoo/odoo#220612 Forward-Port-Of: odoo/odoo#219419
Barcode scans for warehouse locations now only look within the active company. This prevents users from being sent to the wrong internal location when different companies use the same barcode.
Original PR description
Description of the issue/feature this PR addresses: When scanning a location by barcode, the system may return the wrong location if multiple companies have internal locations with the same barcode. This is because the search does not currently filter by company. Current behavior before PR: The system searches for a location using only the barcode and usage='internal', without restricting by company. If multiple companies use the same barcode for different locations, the first match (regardless of company) is returned. Desired behavior after PR is merged: The location search is now restricted to the active company. Forward-Port-Of: odoo/enterprise#89286
Mobile self-service orders are now sent to the preparation display as soon as the customer proceeds to payment, instead of waiting until cashier payment is completed. This helps kitchen or preparation teams see incoming mobile orders earlier and avoid delays.
Original PR description
When doing a self order from a mobile device, the order was not sent to the preparation display until it was paid at the cashier. Steps to reproduce: ------------------- * Setup a PoS with self-ordering mode set to 'mobile'. * Setup a preparation display to show orders from this PoS. * Place an order from a mobile device. * Click on "Pay" > Observation: The order does not appear on the preparation display. Why the fix: ------------ Instead of just sending the order from the kiosk, we also need to send it from the mobile device. opw-4819732 Forward-Port-Of: odoo/enterprise#90288 Forward-Port-Of: odoo/enterprise#90169
This fixes a problem in the Australian payroll termination process where an outdated contract method could cause termination payments to be handled incorrectly. A new test covers the full termination flow, helping ensure payroll teams can process employee departures reliably.
Original PR description
Termination flow used an old method from contracts. This fixes the issue and adds a test for the full termination flow.
Bank statement imports started from the accounting dashboard now continue through all batches instead of stopping after the first batch. The import screen also shows the correct uploaded file name, reducing confusion for users handling large bank statement files.
Original PR description
**PROBLEM** When importing bank statements from the dashboard, it only imports the first batch (by default the first 2000 lines) instead of importing the whole file. This is inconsistent with the…
**PROBLEM** When importing bank statements from the dashboard, it only imports the first batch (by default the first 2000 lines) instead of importing the whole file. This is inconsistent with the behavior of the import done from the reconcilation page. Also, on the import page, the file name is incorrect (it's always `bank_statement_import.csv`) **STEP TO REPRODUCE** file to reproduce the issue : [MP 2280260435_movements_-2025-04-01-191536.xlsx](https://github.com/user-attachments/files/20880784/MP.2280260435_movements_-2025-04-01-191536.xlsx) 1. install the accounting module 2. goes on the dashboard, click on the 3-dot button on the kanban for the bank account, and import a file. 3. make sure the file will be imported in multiple batches (reduced the batch size to 200) and click on import. 4. notice how only the first batch was imported. **CAUSE** In python, The `AccountBankStmtImportCSV` class override the execute_import method of the `base_import.import`. In this override, we add a entry in the `messages` list. (see `enterprise/account_bank_statement_import_csv/models/account_bank_statement_import_csv.py`) In JS, all entry in messages are treated as errors, and the import is interrupted. (see `odoo/addons/base_import/static/src/import_model.js`) https://github.com/odoo/odoo/blob/389b355e7ec761fe8dc2908ac5aec540b0345c48/addons/base_import/static/src/import_model.js#L410-L417 The message entry added in the python was used in the past to automatically open the reconcillation page with the statement lines added. This feature was removed, but not the message. **FIX** - Remove the problematic message entry. - Fix the name of the file in the import action. opw-4823808 Forward-Port-Of: odoo/enterprise#91241 Forward-Port-Of: odoo/enterprise#88343
Spreadsheet pivot tables grouped by record ID now display the proper record names instead of blank or confusing headers. This makes pivot reports easier to read and keeps spreadsheet behavior aligned with the underlying server data.
Original PR description
Steps to reproduce: - Insert a pivot in a spreadsheet - Add a groupby on id - Insert the spilled formula - Headers are empty Before this commit: - _sanitizeLabel treated integer id values as raw, skipping the label in [id, label] - The mock read_group returned plain numbers for id, unlike the server - Enterprise tests still expected FALSE/ids in PIVOT.HEADER and tooltips After this commit: - _sanitizeLabel returns the label for [id, label] without numbering id - The mock read_group now returns [id, display_name] for id - Enterprise pivot tests updated to expect labels and adjusted ranges Task: 4878685 Forward-Port-Of: odoo/enterprise#91166 Forward-Port-Of: odoo/enterprise#90656
HSN reports now include reversed point-of-sale orders that are processed after a session is closed. This helps ensure Indian GST reporting captures the correct product and tax details for these reversal transactions.
Original PR description
Before this change, HSN summary generation skipped POS reversal journal entries, which could lead to missing product and tax data for reversed orders made After the session closure. This commit improves the `_get_gstr1_hsn_json` method by: * Including reversed POS orders (`reversed_pos_order_id`) in the POS order list. * Ensuring their corresponding order lines are considered during HSN data aggregation. This ensures accurate HSN reporting even for POS reversals processed as standalone entries. OPW: 4931360 Forward-Port-Of: odoo/enterprise#91196 Forward-Port-Of: odoo/enterprise#90248