Daily updates from Odoo
Wednesday, July 30, 2025
69 changes
26 changes
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
18 changes
Resolved issues and error corrections
This update brings the spreadsheet component to the latest version and fixes several user-facing issues. Users should see safer handling of cancelled formatting changes, better pivot calculations for date/time fields, and more accurate data validation suggestions.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/2a7178a06 [REL] 18.3.14 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/2a7178a06 [REL] 18.3.14 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/34fdd1eb3 [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/4a1547b56 [FIX] pivot: support SUM and AVG aggregators for datetime fields [Task: 4945217](https://www.odoo.com/odoo/2328/tasks/4945217) https://github.com/odoo/o-spreadsheet/commit/f23bfa0ca [FIX] data validation: handle cell format in auto-complete [Task: 4865661](https://www.odoo.com/odoo/2328/tasks/4865661) 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>
This fix prevents customers from completing checkout with products that have been archived or unpublished after being added to their cart. When a product is archived, it is removed from existing website carts so orders cannot be placed for unavailable items.
Original PR description
Fix issue where customers could complete purchases of products that where archived or unpublished after being added to cart but before checkout completion. => Step to reproduce bug : - Install website_sale. - Add a product to the cart. - (In an other window) archive the product. - finish the buy from the cart. (don't reload the cart or the product will be gone) => Cause: The bug originate from: https://github.com/odoo/odoo/blob/2d7bb960b00bfeae3e6ab8c0367237f3b08271cb/addons/website_sale/controllers/main.py#L1781-L1793 There is no check up during the last part of the transaction to verify if the product is still available. => Fix: Erase from the product from all cart when it's archived opw-4829872 Forward-Port-Of: odoo/odoo#220162 Forward-Port-Of: odoo/odoo#213656
This fix prevents Odoo Inventory from creating duplicate stock quantity records when validating transfers that move entire packages. It helps keep package and product quantities accurate, reducing the risk of incorrect inventory availability or fulfillment issues.
Original PR description
### Steps to reproduce: - In the settings enable "packages" and Multi-Step Routes - Create a 3 storable products: P1, P2, P3 - Put on hand quantities for each of them: - 1 x P1 in PACK001 in stock -…
### Steps to reproduce:
- In the settings enable "packages" and Multi-Step Routes
- Create a 3 storable products: P1, P2, P3
- Put on hand quantities for each of them:
- 1 x P1 in PACK001 in stock
- 1 x P2 in PACK001 in stock
- 1 x P3 in PACK002 in stock
- Create and confirm a delivery with 3 moves:
- 1 x P1
- 1 x P2
- 1 x P3
- Go to Inventory > Configuration > Warehouse Management > Operation type
- Modify internal transfers to "Move entire packages"
- Create and confirm and internal transfer for PACK001 from stock to the sublocation stock/shelf1
- Mark the package as done and validate the transfer
#### > You end up with 2 quants for PACK002 in stock
### Cause of the issue:
When validating the internal transfer for PACK001, we launch an `_action_done` on the moves lines of the internal transfer. In particular, during this action done, a `quant_cache` will be set for to fetch and use the quants for P1 and P2:
https://github.com/odoo/odoo/blob/cb1c761777e84d96f82c4f754586795509ce1b3d/addons/stock/models/stock_move_line.py#L679-L681 https://github.com/odoo/odoo/blob/cb1c761777e84d96f82c4f754586795509ce1b3d/addons/stock/models/stock_quant.py#L933-L949 This cache is correctly use in order to update our move lines during the `synchronize_quant` that will follow:
https://github.com/odoo/odoo/blob/cb1c761777e84d96f82c4f754586795509ce1b3d/addons/stock/models/stock_move_line.py#L684-L692 However, they are not in the `_free_reservation` because this call will reassign the move line and then `_check_entire_pack` for the entire picking:
https://github.com/odoo/odoo/blob/cb1c761777e84d96f82c4f754586795509ce1b3d/addons/stock/models/stock_move.py#L1980-L1981 In particular, it will update the reservation for the move related to P3. But, since the `quant_cache` is taken from the context and did not change it can not find the quants related to P3 and a new quant will be created in addition to the already existing one: https://github.com/odoo/odoo/blob/82639728f2bcb4e7786f120de2aeba3f5fbab209/addons/stock/models/stock_quant.py#L1055 https://github.com/odoo/odoo/blob/82639728f2bcb4e7786f120de2aeba3f5fbab209/addons/stock/models/stock_quant.py#L1101
opw-4922032
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#219049The Philippine BIR 2307 spreadsheet export now includes the partner ZIP code and uses the correct tax description for the nature of payment. It also formats company and individual taxpayer names more accurately, helping businesses produce cleaner and more compliant withholding tax reports.
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
Automatic invoice emails for website purchases now use the proper system context, so they are sent from the assigned salesperson instead of appearing to come from the customer or admin. This prevents confusing duplicate notifications to the administrator and improves customer-facing invoice communication.
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 fix restores missing product identification information in electronic invoices and corrects a bank-branch field to match Peppol BIS3 rules. It helps ensure generated UBL invoices validate correctly and reduces the risk of rejected electronic 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
Improves how Odoo recognizes Microsoft Office documents uploaded through the Documents flow, especially older Word, Excel, and PowerPoint files and newer Excel files. This prevents valid Office files from being renamed incorrectly, such as changing an Excel spreadsheet into a ZIP file, reducing confusion for portal users and document managers.
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
Editing existing website links with relative addresses now keeps those addresses unchanged instead of converting them into full website URLs. This prevents unintended link changes when users open and apply the link editor in the website builder.
Original PR description
This PR is backport of https://github.com/odoo/odoo/pull/216832 and https://github.com/odoo/odoo/pull/218587 Steps to reproduce: - Open website builder - Click on a link with a relative URL (there is /contactus in footer) - Bug: the url shown is an absolute url (https://.../contactus) - Click "Edit Link" (one of the icons) - Click "Apply" - Bug: the url in the dom has changed (it saved the absolute url) The link popover used HTMLAnchorElement.href to get the url. This getter returns an absolute url even if the href attribute is a relative url. task-4890293 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Spanish Modelo 390 VAT report now avoids counting vendor refunds twice and includes all relevant manual adjustment lines in the total. This improves the accuracy of annual VAT reporting for Spanish localization users.
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#220730This fix reduces memory usage when changing account codes in the Chart of Accounts. It prevents large accounting databases from running out of memory during these updates, making the process more reliable for finance teams.
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
Employees can now place or update lunch orders when the cost is within their allowed overdraft limit. This prevents valid orders from being blocked and keeps the Lunch wallet rules aligned with the company’s configured 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
Products with GST rates other than 5% now include the required packaged-good tag when syncing to Swiggy and Zomato. This helps ensure product information is classified correctly on delivery platforms and reduces sync inconsistencies.
Original PR description
*: pos_urban_piper_swiggy, pos_urban_piper_zomato Before this commit: --- - Products with GST != 5% were not receiving the `packaged-good` tag in the sync payload for Swiggy and Zomato. After this commit: --- - Now, products with GST != 5% correctly include the `packaged-good` tag in their respective provider tag list (`swiggy` or `zomato`). task-4954571 Forward-Port-Of: odoo/enterprise#90991 Forward-Port-Of: odoo/enterprise#90595
Appointments in some time zones were wrongly shown as unavailable when they overlapped the UTC date boundary before a next-day all-day calendar event. The fix checks all-day event timing using the user’s local time zone, so valid evening appointment slots remain bookable.
Original PR description
All-day calendar events were incorrectly causing unavailability for appointment slots scheduled on the previous evening, due to mismatches between local time and UTC. Previously, all-day events…
All-day calendar events were incorrectly causing unavailability for appointment slots scheduled on the previous evening, due to mismatches between local time and UTC. Previously, all-day events scheduled for Tuesday were stored with a start time of 00:00 UTC. In timezones like America/Chicago, this corresponds to 7:00 PM Monday. As a result, a valid appointment booked from 6:30 PM to 8:00 PM local time on Monday would partially fall into Tuesday in UTC (ending at 01:00 UTC), causing a false conflict with Tuesday’s all-day event. The `calendar_verify_availability` method now calls the newly added `_get_date_boundaries` which than computes naive datetime boundaries based on the user's local timezone by taking the end of the previous local day and the start of the next local day. This change resolves those edge cases where evening slots crossing the UTC boundary were falsely marked as unavailable due to timezone misalignment. opw-4614544 Forward-Port-Of: odoo/enterprise#85654
Fixed an issue where partially processing a lot-tracked receipt in the Barcode app could incorrectly increase the receipt demand after returning to it. This keeps inventory operations accurate when users complete remaining quantities across multiple barcode sessions, including batch picking flows.
Original PR description
### Steps to reproduce: - Create a storable product tracked by lot - Create and confirm a receipt for 10 units of that product - Go to the barcode app and regiter 1 unit - Exit the picking - Go back…
### Steps to reproduce: - Create a storable product tracked by lot - Create and confirm a receipt for 10 units of that product - Go to the barcode app and regiter 1 unit - Exit the picking - Go back to the picking register the 9 remaining units - Exit the picking and comeback #### > The demand of the receipt has been updated from 10 to 19. ### Cause of the issue: Exiting the picking will launch a call of the `post_barcode_process` in order to keep track of the changes you made without changing the initial demand: https://github.com/odoo/enterprise/blob/c26c21cec14a234021bb13bbc2684334bc64b70b/stock_barcode/models/stock_move.py#L50-L53 THe first time you enter the picking you have a single move with a quantity of 10. The first time you exit, since you have set a qty_done of 1 (and hence have updated the quantity of the associated move to 1), the `split_uncompleted_moves` will then create a move for a quantity of 9 in order to keep 10 units assigned. The second time you enter the picking both moves are grouped in a single line since the product is tracked by lot, however, when you update the qty_done of that grouped line you will actually only update the quantity of the first move line and its related move. Since the `_truncate_overreserved_moves` was not designed to handle these grouped lines, it does not notice that the combined reservation overcomes the actual demand. opw-4731803 Forward-Port-Of: odoo/enterprise#90497 Forward-Port-Of: odoo/enterprise#89967
Barcode scans for warehouse locations now only match locations belonging to the active company. This prevents users in multi-company setups from being sent to the wrong internal location when companies share 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
Users with access to a specific field service task can now start and stop timers even when the related project is private. This prevents access errors and ensures their timesheets are created correctly without needing broader project access.
Original PR description
Before this commit, when the project is private and the user can only access to some tasks inside that project, he can create timesheets but cannot stop timer in one of those tasks when…
Before this commit, when the project is private and the user can only access to some tasks inside that project, he can create timesheets but cannot stop timer in one of those tasks when `industry_fsm` module is installed. This commit makes sure the user can start/stop a timer on task for which he has access to even if the project is private and he does not have access to it. Steps to reproduce the issue: ---------------------------- 0. install industry_fsm module 1. Create a project A with "followers" as privacy visibility 2. Create a task A and assign it to a project user with lowest timesheet access right. 3. log in as that user 4. Start a timer on Task A 5. Stop the timer and confirm the wizard Expected Behavior: ----------------- The timesheet should be created without any issue Current Behavior: ---------------- An Access error is raised because the user has no access to the project. task-4680412 Forward-Port-Of: odoo/enterprise#91015 Forward-Port-Of: odoo/enterprise#84807
Kitchen ticket printing now works reliably when using IoT-connected printers, including cases where the system needs to fall back to websocket communication. The point of sale also loads the necessary IoT device information more consistently, preventing frontend errors when configured devices have not changed recently.
Original PR description
Due to a missing `iot_id` field when the `DeviceController` for kitchen printers is instantiated, the websocket fallback does not work. This results in kitchen tickets failing to print even when regular receipts are working correctly. The fix is to provide the full IoT device model to the `DeviceController` constructor, as is done elsewhere. To do so we now pass the `device_id` field for the preparation printer model from the backend. We also ensure IoT devices/boxes are loaded even with a 'limited' load. This is because of an issue where an IoT device is added to the PoS config, but because the device itself has not be written to recently, the PoS doesn't load it and you get a traceback in the frontend.
This fixes an issue where a payment line could get stuck if a Worldline payment terminal disconnected during payment processing. Cashiers can now remove that payment line and complete the sale with another payment method, reducing checkout disruption.
Original PR description
If the terminal disconnects for any reason while processing a payment, we need to be able to remove the payment line the pos, to allow paying using another method.
8 changes
Resolved issues and error corrections
Fixed an issue where spreadsheet pivot tables grouped by ID could show blank or raw ID headers instead of meaningful record names. This makes exported and spilled pivot results easier for users to read and aligns spreadsheet behavior with 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
Rental orders with multiple lines for the same planned service now avoid assigning overlapping shifts to the same resource. When no resource is available, the system creates an open shift instead, reducing scheduling conflicts and manual corrections.
Original PR description
Steps to Reproduce: ---------------------- - Install the sale_renting_planning module. - Create a rental service product with `Plan Services` enabled. - Create a rental order with multiple lines for the same product. - Confirm the rental order Issue: --------------------------- - You'll see that some generated shifts are assigned to same resource causing conflict. Cause: --------------------------- - Shifts are being generated at the same time for all the SOL which cause them to be assigned to the same resource and make conflict. Fix: ----------------------------- - In this commit when the shift values are generated we will check if the resources are available or not. If no resource is available then it will create open shift for that SOL. task-4829807 Forward-Port-Of: odoo/enterprise#91164 Forward-Port-Of: odoo/enterprise#88767
Users can now create a new helpdesk ticket while recording time on a helpdesk project without seeing an analytic account validation error. The timer also correctly recognizes eligible helpdesk projects even when they do not yet have existing tickets, so time is linked to tickets instead of tasks.
Original PR description
Steps to reproduce: ------------------- - Install 'helpdesk_timesheet' module - Go to Timesheets and click on `Start` to launch the timer - Select `VIP Support` as Project - Create a new ticket…
Steps to reproduce: ------------------- - Install 'helpdesk_timesheet' module - Go to Timesheets and click on `Start` to launch the timer - Select `VIP Support` as Project - Create a new ticket Issue: ------ 1. Validation error raised: `At least one analytic account must be set.` 2. When we select a helpdesk project that does not have any ticket linked to it already, the field next to it is set to `Task` (task_id) instead of `Ticket` (helpdesk_ticket_id). Cause: ------ 1. When creating the ticket, we don't provide the default project who got the analytic account linked to it. 2. The field `helpdesk_ticket_id` is hidden because we consider that we the project is not linked to any helpdesk team; this is because we retrieve the projects based on tickets already created only. Solution: --------- 1. Set the default project in the context when creating the ticket (like for a task). In the create method, if no team is provided and we have a default project (from `list_value` or the `env.context`), we set the team based on the project if the project is linked to a helpdesk team. 2. Fetch all projects that have `helpdesk_team` field set. opw-4404097 Forward-Port-Of: odoo/enterprise#91110 Forward-Port-Of: odoo/enterprise#76779
This change prevents installation failures when finance document folders have been archived or moved to the trash. It also makes document handling more intuitive by allowing document owners to move their own documents regardless of the permissions on the current folder.
Original PR description
Four things are fix(/imp)ed in this PR: 1/ We not only want the finance folders records to exist, but to be visible for documents_account to work. 2/ We weren't even moving them, the check in write error was too strict. 3/ Even if we were trying to move them, we can do it if we also set them as active again and don't expect to restore archived children. 4/ Owners should be allowed to move their documents irrespective of permission on containing folder. See details in individual commits. Task-4976579
Bank statement imports started from the accounting dashboard now process the entire file instead of stopping after the first batch. The import screen also shows the correct uploaded file name, reducing confusion for users handling large bank 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
Bank reconciliation now handles entries in different currencies more accurately, keeping foreign currency amounts separate from company-currency balances. It also prevents automatic reconciliation models from being created when using receivable or payable actions, reducing unexpected accounting setup changes.
Original PR description
Before this commit when applying a reco model with a different currency, the amount currency and the balance were equals. task-4931177 Before this commit when applying the receivable or payable button, the automatic reco models would be created. We don't want that behavior task-4930730 Forward-Port-Of: odoo/enterprise#91178 Forward-Port-Of: odoo/enterprise#89775
Barcode scans for warehouse locations now only match locations belonging to the active company. This prevents users in multi-company setups 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
AI-related action buttons such as insert, send message, and log note no longer show on a user's own messages. This makes AI-assisted conversations clearer and prevents users from seeing irrelevant actions, while also improving button placement and removing an unnecessary out-of-office alert in AI chats.
Original PR description
Before this commit, ai actions like "insert", "send message" and "log note" were appearing on both the messages sent by the AI and the user's own messages. Of course, the actions shouldn't appear in the user's messages. To fix this, we changed one element in the conditions for these actions. Prior we were fetching the user_id from the author of the message and comparing it with the current user. Recent changes make it impossible to fetch the user_id like so. Now we use the function isSelfAuthored which would return false for AI messages and true for the user's own messages. Forward-Port-Of: odoo/enterprise#88371
17 changes
Resolved issues and error corrections
Installing Accounting with demo data for German databases no longer fails because of an audit trail protection error. The change lets the demo chart of accounts cleanup run safely during setup, improving first-time installation reliability.
Original PR description
When installing the Accounting app on a new database created with Germany as
country and with demo data loaded, the demo loader invokes in
`account/demo/account_demo.xml` the `<function name="try_loading">` call which
does a wholesale `records.with_context({MODULE_UNINSTALL_FLAG: True}).unlink()`. This
cascades into deleting mail.message records, but the audit‑trail hook in
only bypasses its check when the `bypass_audit` token is present not when `MODULE_UNINSTALL_FLAG is set
causing a “You cannot remove parts of the audit trail” UserError.
Steps to reproduce:
- Created new database, with Germany as country
- Download demo data
- Attempt to install Accounting application
! Receive error message
OPW- 4712364Payment providers are now consistently limited to those configured for the current website across checkout, saved payment methods, and payment links. This prevents customers in multi-website setups from seeing or using payment options intended for another site, reducing confusion and transaction mistakes.
Original PR description
In a multi-website environment, payment providers are often configured specifically for each website using the `website_id` field. While the checkout page (`/shop/payment`) correctly filters providers by the current website, other routes such as `/my/payment_method` or `/payment/pay` flows do not apply this filtering consistently. This patch ensures that the `website_id` constraint on payment providers is respected across all relevant flows, improving consistency and preventing users from seeing or using providers that are not available for their current website. Without this patch, users may see or select payment providers that are not intended for their site, leading to potential confusion, incorrect transactions, or access to providers that are not supported on the current website. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#218089
This fix ensures connected hardware devices are sent correctly right after pairing with a database. It prevents a stale saved token from blocking device updates before the system is restarted, improving reliability for newly paired setups.
Original PR description
Since the PR odoo/odoo#218109, the send_all_devices logic was refactored to always send whenever something changes. However, there was a bug introduced due to the fact the token is saved at start-up and never updated. This caused the devices to not get sent correctly immediately after pairing with a DB (in the time before checking out and restarting). --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Future time off balances now correctly account for yearly entitlements and carryover days that expire mid-year. This prevents employees and HR teams from seeing incorrect zero or carryover-only balances when checking future leave availability.
Original PR description
### Steps to reproduce: - Create an accrual plan with the following rule: — The employee has 20 days off in the first year. Total 20. — The employee has 21 days off in the second year and an…
### Steps to reproduce: - Create an accrual plan with the following rule: — The employee has 20 days off in the first year. Total 20. — The employee has 21 days off in the second year and an additional 5 days off if available from the previous year, which can be taken until 6 months. Total 21 + 5 = 26 — The employee has 22 days off in the third year and an additional 5 days off if available from the previous year, which can be taken until 6 months. Total 22 + 5 = 27 — The employee has 23 days off in the fourth year and an additional 5 days off if available from the previous year, which can be taken until 6 months. Total 23 + 5 = 28 - Create an accrual allocation with the created plan - Check future allocation data using 'Balance at the' - Notice the following behaviour: — until 31/12/2025 it CORRECTLY shows 20 days available. — from 01/01/2026 to 30/06/2026 it CORRECTLY shows 26 days (21 days for renewal and 5 days not used in 2025) — from 01/07/2026 it INCORRECTLY shows no days available. — from 01/01/2027 to 30/06/2027 it CORRECTLY shows 27 days (22 days for renewal and 5 days not used in 2026) — from 01/07/2027 it INCORRECTLY shows 5 days. — from 01/01/2028 to 30/06/2028 it CORRECTLY shows 28 days (23 days for renewal and 5 days not used in 2027) — from 01/07/2028 it INCORRECTLY shows no days available. — from 01/01/2029 it CORRECTLY shows 28 days again. — In the following years, after 6 months, one year shows 5 days and the next shows nothing. ### Cause: The first cause here is that when we have validity for the carryover then we will have two calls in each year one at the start of the year and another at the expiration date of the carryover. So, when we add the days to the allocation we don't consider the second call in the condition and we only check if the allocation.actual_lastcall is equal to one of the start dates for each year https://github.com/odoo/odoo/blob/3fb37cbc59adc2caace8efcdae418d2466a9b750/addons/hr_holidays/models/hr_leave_allocation.py#L588 The second cause where each two years one of them shows the number of carryover days from the previous year, this is happening because when we remove the expiring days for the first year we set the number of days to 0 https://github.com/odoo/odoo/blob/3fb37cbc59adc2caace8efcdae418d2466a9b750/addons/hr_holidays/models/hr_leave_allocation.py#L516-L517 And it will be 0 until we loop again and add the days to allocation https://github.com/odoo/odoo/blob/3fb37cbc59adc2caace8efcdae418d2466a9b750/addons/hr_holidays/models/hr_leave_allocation.py#L521-L522 and since this is happening after we already set the expiring days which in this year will be 0 we won't remove those expiring days from the year's allocation data ### Fix: We add a condition to check if the actual_lastcall is either a date in the start of the allocation or one of the expiration dates for the carryover. Also, before we set the value of the expiring_carryover_days we call _add_days_to_allocation to calculate on the correct number of days for the plan level we are checking. opw-4606886
Timesheet administrators who do not have Project app access can now open timesheet lists and related forms without being blocked by permission errors. This ensures authorized timesheet review work continues smoothly even when linked tasks or projects are private.
Original PR description
Steps to Reproduce: - Ensure the `sale_timesheet` module is installed. - Log in as a user with Timesheet Administrator permissions but without access to the Project module. - Attempt to open the…
Steps to Reproduce: - Ensure the `sale_timesheet` module is installed. - Log in as a user with Timesheet Administrator permissions but without access to the Project module. - Attempt to open the Timesheets list view results in an `AccessError` due to missing read rights on `project.task`. - Create a task in a private project linked to a timesheet and open its form view results in an `AccessError` due to missing read rights on `project.project`. Cause: - When a user has Timesheet Administrator access but lacks project access, they can view all timesheets, including those linked to tasks with private privacy visibility. However, these users do not have read access to the private tasks themselves. - The `_compute_commercial_partner` method reads `task_id.partner_id.commercial_partner_id` and `project_id.partner_id.commercial_partner_id`. When a user without read access to `project.task` or `project.project` tries to compute this field, an `AccessError` occurs because the code tries to access these related records without bypassing access rights. Solution: - Use `sudo()` on `task_id` and `project_id` when accessing their `partner_id` fields inside the compute method to bypass access rights checks, preventing ` AccessError` for users lacking read permissions. task-4798066 Forward-Port-Of: odoo/odoo#210826
This fix improves PDF printing from Odoo on Android and iOS mobile browsers. It gives the mobile print preview enough time to finish preparing the document, reducing failed or incomplete print attempts for users working from phones or tablets.
Original PR description
[FIX] web: Mobile print support on Android and iOS Currently, pdf.js does not support printing from mobile browsers, and the pdf.js team will not fix this issue [1]. I investigated and found that sometimes `window.print()` is asynchronous [2]. On Android and iOS, the print preview dialog re-renders the entire PDF within the preview, which can obviously take some time. Therefore, we need to account for this time in the overall duration of the asynchronous print process to ensure that the print preview works well. opw-4190135 [1]: https://github.com/mozilla/pdf.js/issues/12020 [2]: https://github.com/mozilla/pdf.js/blob/2d0ba7db08fb6bb597ba718635314d8e8998a7d0/web/pdf_print_service.js#L226 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#217526
Free self-service point-of-sale orders now create the required fulfillment record, just like paid orders. This prevents free product orders from being missed by inventory or preparation workflows.
Original PR description
Steps to reproduce: ------------------- 1. Create a free product 2. Add it to self_order 3. Make a self order with only that product -> Free order Sicne it's a free order, you will not be asked to…
Steps to reproduce: ------------------- 1. Create a free product 2. Add it to self_order 3. Make a self order with only that product -> Free order Sicne it's a free order, you will not be asked to pay, which is normal. However, the issue is, no picking is created for that order!! Why the issue? -------------- For a non free self order, we create a picking for it by calling `_process_saved_order` [1] with `draft` argument set to `True`, either after paying using the online payment method [2], or after paying it from the payment wizard [3]. However, since for free orders, we're not asked at any point to pay, and hence, we're not calling `_process_saved_order` with `draft=True` at any point, and as consequence, we're also not calling `_create_order_picking`, no picking will be created for it. The fix ------- After, marking the free order as 'paid', we manually call `_process_saved_order(True)`. We only do it for the free orders, since the flow is working as expected for non-free order. [1]: https://github.com/odoo/odoo/blob/a7a29ed691db4f1607c0d12929c56845681164fa/addons/point_of_sale/models/pos_order.py#L153C19-L153C31 [2]: https://github.com/odoo/odoo/blob/a7a29ed691db4f1607c0d12929c56845681164fa/addons/pos_online_payment/models/payment_transaction.py#L64 [3]: https://github.com/odoo/odoo/blob/a7a29ed691db4f1607c0d12929c56845681164fa/addons/point_of_sale/wizard/pos_payment.py#L70 opw-4739523
This fix ensures the accounting app uses the correct transaction information when predicting taxes. It helps prevent failed or missing tax suggestions, making accounting workflows more accurate and reliable.
Original PR description
Previously, when _predicted_field was invoked from _predict_specific_taxes, self did not have an associated move_id. As a result, _build_predictive_query was unable to construct the correct query, causing the prediction logic to fail and return False. With this fix, the correct move_id is passed through the context and later retrieved in _predicted_field. This ensures that the prediction logic uses the intended move_id and functions as expected. **task**-4943015 Community PR - https://github.com/odoo/odoo/pull/219911
Refunds in Mexican point of sale can now be completed when a gift card is used. This prevents checkout errors and correctly treats gift card top-ups as valid positive lines during refund processing.
Original PR description
**Problem:** When trying to make a refund in Mexico, with a gift card in the order, the order should be refunded on said gift card. But when doing so, two problems arise: - In the case of a gift…
**Problem:** When trying to make a refund in Mexico, with a gift card in the order, the order should be refunded on said gift card. But when doing so, two problems arise: - In the case of a gift card, *line[2].refunded_orderline_id* is not set, so we are trying to read the property of an undefined variable. - Another problem is that the order can not have any line that have a positive subtotal in the case of a refund. This was not taking the gift cards into accounts, as it makes sense for them to be positive in such a case. **Steps to reproduce:** - Set your company to a Mexican company - Make a purchase for a gift card - Make another purchase for a random product - Start the refund process and enter the gift card code we created before - Try to finalize the purchase, a traceback appears - If we were not trying to read an undefined variable, the purchase would still not go through as some lines are positive in a refund **Why the fix:** When refunding with a gift card, we should refill the gift card by the order's cost instead. With this in mind, it makes sense for the gift card to have a positive price even though we are in the context of a refund, which usually only permits negative priced lines. opw-4892935
Appointments in the evening could be incorrectly shown as unavailable when a next-day all-day calendar event existed in another timezone. The fix aligns all-day event checks with the user’s local timezone, preventing valid appointment slots from being blocked.
Original PR description
All-day calendar events were incorrectly causing unavailability for appointment slots scheduled on the previous evening, due to mismatches between local time and UTC. Previously, all-day events…
All-day calendar events were incorrectly causing unavailability for appointment slots scheduled on the previous evening, due to mismatches between local time and UTC. Previously, all-day events scheduled for Tuesday were stored with a start time of 00:00 UTC. In timezones like America/Chicago, this corresponds to 7:00 PM Monday. As a result, a valid appointment booked from 6:30 PM to 8:00 PM local time on Monday would partially fall into Tuesday in UTC (ending at 01:00 UTC), causing a false conflict with Tuesday’s all-day event. The `calendar_verify_availability` method now calls the newly added `_get_date_boundaries` which than computes naive datetime boundaries based on the user's local timezone by taking the end of the previous local day and the start of the next local day. This change resolves those edge cases where evening slots crossing the UTC boundary were falsely marked as unavailable due to timezone misalignment. opw-4614544 Forward-Port-Of: odoo/enterprise#85654
This fixes the payslip PDF so the basic wage is hidden when the salary structure option is enabled. It helps payroll teams keep printed payslips aligned with their configured confidentiality settings.
Original PR description
After this commit: odoo/enterprise@9dceed0896ce5089bccbc9cc2ce1e8c4b13f0048…
After this commit: odoo/enterprise@9dceed0896ce5089bccbc9cc2ce1e8c4b13f0048 [diff](https://github.com/odoo/enterprise/commit/9dceed0896ce5089bccbc9cc2ce1e8c4b13f0048#diff-de4a628e7837c273b67d71f93efab85b6a9ee957ea702f502066ebcc632a76cbL64) The condition that handles hiding the basic wage on the payslip was not added —possibly it was missed. That’s why the "Hide basic on PDF" feature doesn’t work, regardless of whether it’s enabled, as the necessary condition is missing in the template. Steps to reproduce (on runbot): - In a v18 runbot, open any payslip and go to the salary structure. Enable the "Hide basic on PDF" option. - Return to the payslip and print it. - You’ll see that the basic wage is still printed on the payslip. **Before Fix:** <img width="669" height="238" alt="payslipbefore" src="https://github.com/user-attachments/assets/2fce67a2-19d8-45d8-88fa-4fc6a1767e68" /> **After Fix:** <img width="683" height="289" alt="payslipafter" src="https://github.com/user-attachments/assets/adcb0104-9c4e-4a35-ba78-b3f278f6bfda" /> opw-4953831
Fixes an issue that prevented the Accounting app demo data from loading for some German trial databases. The change makes demo invoice setup use reliable predefined records, helping users install and evaluate Accounting without hitting an error.
Original PR description
The demo data for deferred invoices failed to load due to unresolved `journal_id` and `account_id` references caused by dynamic search, but if the search return Null a `violates not-null constraint ` occur . This commit replaces search with explicit `ref` IDs for journals and accounts to be sure they are exist. Steps to reproduce: - Created new database (odoo.com/trial), with Germany as country, and German as language - Download demo data - Attempt to install Accounting application - Receive error message OPW-4712364
Users who manage timesheets but do not have Project access can now open Timesheet list and kanban views without being blocked by an access error. This keeps timesheet review workflows available while respecting existing project permissions.
Original PR description
Steps to Reproduce: - Ensure the `timesheet_grid_holidays` module is installed. - Log in as a user with Timesheets Administrator access but no access to the Project module. - Navigate to the Timesheets > List or Kanban view. - An `AccessError` occurs due to missing read rights on the `project.task` model. Cause: - In the `timesheet_grid_holidays` module, the `_should_not_display_timer` method accesses `self.task_id.is_timeoff_task` without checking access rights, causing an `AccessError` when users who can view timesheets but lack read access to `project.task` try to access tasks linked to projects with private privacy visibility. Solution: - Use `sudo()` when accessing `self.task_id` in `_should_not_display_timer()` to avoid access errors. task-4798066 Forward-Port-Of: odoo/enterprise#86302
Upsell invoices for yearly subscriptions now show the correct split between the remaining current period and the next full billing period. This prevents misleading invoice descriptions and helps customers better understand what they are being charged for.
Original PR description
**Steps to Reproduce:** - Install `sale_subscription`. - Create a product (recurring product) with: - Type: Service - Invoicing Policy: Prepaid/Fixed Price - Create a subscription plan Yearly with: -…
**Steps to Reproduce:**
- Install `sale_subscription`.
- Create a product (recurring product) with:
- Type: Service
- Invoicing Policy: Prepaid/Fixed Price
- Create a subscription plan Yearly with:
- Billing Period: 1 year
- Align to period start: enabled
- Create and confirm a subscription for the product using the Yearly plan.
- Create and confirm the first invoice (shows remaining days like
185 days – 06/30/2025 to 12/31/2025 in product description).
- Create and confirm second invoice (check 1 year – 01/01/2026 to 12/31/2026).
- Go back to the subscription and create an upsell.
- Confirm the upsell and generate its invoice.
**Observation:**
- The upsell invoice line shows the wrong duration:
1 year (06/30/2025 to 12/31/2026).
- This is incorrect because the expected duration is:
185 days (from 06/30/2025 to 12/31/2025) + 1 year (01/01/2026 to 12/31/2026)
**Issue:**
- The duration calculation is based on the ratio of the first date and the end
date, but for the Upsell's ratio is always 1, so it considers fix duration,
i.e 1 year, 1 month
https://github.com/odoo/enterprise/blob/4bb43da79dba7ac1d0772fde814b3da6bade7db6/sale_subscription/models/sale_order_line.py#L346-L347
**Solution:**
- Corrected the logic to calculate the upsell duration by combining the remaining
current period (e.g., 185 days) with the standard 1-year period ratio.
Reference PR: https://github.com/odoo/enterprise/pull/68163/commits/cfed2d369960896f0f4d91a90eb24f3641627419
opw-4853426This fix restores proper display of long descriptions in the Italian Libro Giornale PDF report, so text in the Name column is no longer cut off. It also improves column spacing consistency, making exported reports easier to read and more reliable for accounting review.
Original PR description
Issue: In the Libro Giornale report (PDF), long descriptions in the 'Name' column were getting cut off, and column spacing appeared inconsistent in the generated PDF. These issues reappeared due to recent layout changes from commit https://github.com/odoo/enterprise/commit/233e82cf4e6908502a580be4bcd77fadd2aada53, which unintentionally removed previous fixes made to handle such cases. Fixes Applied: - Reintroduced the `o_overflow_name` class on the 'Name' column to ensure long descriptions wrap correctly and are not truncated in the PDF export. - Applied the `o_fixed_column_width` class to the 3rd column (currently 'Account Code') to resolve inconsistent spacing between columns caused by `wkhtmltopdf`.
Vendor batch payment reconciliation now uses the correct payable account instead of the receivable account. This prevents accounting entries from being posted to the wrong partner account when matching bank statements with vendor batch payments.
Original PR description
**Steps to reproduce:** - Install accountant - Go to "Accounting / Vendors / Payments" - Create a payment: * Payment Type: Send * Vendor: [any] * Amount: 1000 - Confirm the payment - From payments list, select the payment and create a batch - Validate the batch payment - From Accounting dashboard, go to Bank journal - Create a statement: * Partner: [None] * Amount: -1000 * Memo: [anything] - Reconcile the statement with the batch payment **Issue:** The receivable account of the partner is used for the batch line instead of his payable account. **Solution:** Select the type of the account to use depending on the type of the payment. opw-4952786
Rental-related invoice lines are now excluded from a cost entry process that is meant for sold goods. This prevents incorrect accounting entries for rental orders and helps keep financial reporting accurate.
Original PR description
…entries Modified the COGS generation logic to skip any invoice lines that come from a rental sales order. task-4919306 Forward-Port-Of: odoo/enterprise#90901