Wednesday, June 4, 2025
40 changes · 18.0
Resolved issues and error corrections
Fixes an error that occurred when website editors clicked the publish button on a user profile page. This restores the expected ability to publish or unpublish profiles and may also prevent similar publishing errors in related website features.
Original PR description
Currently, an error is encountered when clicking on the publish button in the profile page in the website view. **Steps to Reproduce:** - Install `website_profile` module. - Navigate to the user's…
Currently, an error is encountered when clicking on the publish button in the profile page in the website view. **Steps to Reproduce:** - Install `website_profile` module. - Navigate to the user's profile page.`(/profile/user/2)` - Click on the publish button in the editor view. **Note:** - The error is generic and could be generated via different website modules as well (e.g, website_forum). **Error:** AttributeError: The method `res.users.website_publish_button` does not exist. **Root Cause:** - since [1] we are using `website_publish_button` method to publish/unpublish records, however, `res.users` model **inherits** the publishing fields from its `res.partner`, but not its related publishing methods [1]- https://github.com/odoo/odoo/commit/97d00377de0c32e919587a98210679376e27ecc4 **Solution:** - This commit ensures that the `res.users` model can handle publish/unpublish calls by adding the `website_publish_button` method to `res.users`. sentry-6356507720
This fixes a problem where users could not extend a text selection while scrolling through long editable content. The editor now avoids forcing the page back to the current selection when that selection is already visible, making selection smoother and preventing flickering.
Original PR description
**Current behaviour before PR:** Steps to reproduce: - Have a long content so that editable content becomes scrollable. - Scroll to the bottom of content. - Select the last line of text. - Try extending selection by scrolling through mouse. - Selection is not extending and it flickers. The issue happens because `scrollToSelection` function is invoked on selectionchange and forcefully scrolls to the selected content. As result, selection is not extending when scrolling. **Desired behaviour after PR is merged:** Now, `scrollToSelection` doesn't scroll to the selection if selection range is is within visible viewport area. As result, selection can be extended by scrolling. task-4756869 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixes an editor display issue where restoring a deleted embedded video with undo could leave the command hint and action buttons on different lines. The editor now waits until embedded content is fully mounted before repositioning these controls, keeping the writing experience clean and predictable.
Original PR description
Steps to Reproduce: 1. Insert a video using the /video command. 2. Place the cursor on the new line below the video. 3. Press Backspace to delete the video. 4. Press Ctrl + Z to undo the deletion. 5.…
Steps to Reproduce: 1. Insert a video using the /video command. 2. Place the cursor on the new line below the video. 3. Press Backspace to delete the video. 4. Press Ctrl + Z to undo the deletion. 5. Observe that the `Type / for commands` hint and the magic buttons appear misaligned on different lines. Current behavior before PR: - After undoing video removal, the video block is remounted and at that time powerButtons position updates but iframe loads after that. - PowerButtons update runs too early when video height is zero, causing misalignment. Desired behavior after PR is merged: - Introduce `post_mount_component_handlers` dispatched after each component mount completes. - PowerButtonsPlugin uses this to update positions after the video and iframe are fully ready. - Ensures powerButtons and hint paragraph stay correctly aligned after undo restores video. task-4832484 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Invoice screens in Spanish now display the outstanding credits section correctly, even when browser zoom or longer translated text is used. This prevents important credit information from being cut off and improves readability for Accounting users.
Original PR description
**Issue** When viewing an invoice in Spanish, the "Outstanding credits" section may overflow or be cut off on the right side. **Steps to Reproduce** 1. Install the Accounting module. 2. Switch the…
**Issue** When viewing an invoice in Spanish, the "Outstanding credits" section may overflow or be cut off on the right side. **Steps to Reproduce** 1. Install the Accounting module. 2. Switch the user language to Spanish. 3. Navigate to Contabilidad > Clientes > Facturas. 4. Open an invoice that has outstanding credits. 5. Set the browser zoom to 125%. 6. Observe that the outstanding credits widget content is truncated or overflows its container. **Root Cause** The field `invoice_outstanding_credits_debits_widget` was placed directly in the form without a layout container, causing it to misalign and overflow in cases where translated text or zoom scaling increased its width. The lack of a proper responsive layout prevented it from adapting gracefully. **Fix** Wrapped the field inside a `<group>` element with class `oe_subtotal_footer px-4` to ensure it inherits consistent padding and alignment with other form elements. This provides a flexible layout that handles longer text and browser zoom correctly, maintaining readability and visual consistency. opw-4716266 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Printing invoices with long Terms & Conditions text no longer creates an unwanted horizontal scrollbar in that section. This keeps invoice documents cleaner and easier to read for customers and internal users.
Original PR description
<b>Steps to reproduce:</b> 1. Go to Invoices > Create new 2. Add a long string in Terms & Conditions > Click "Print" <b>Issue:</b> - In Invoices, a horizontal scrollbar appears in the Terms & Conditions section. <b>Cause:</b> - The class `overflow-auto` was applied to the container, which triggers scrollbar when content overflows. <b>Solution:</b> - Replace `overflow-auto` with `overflow-hidden` to avoid overflow. <b>opw-4776919</b> Image of issue:  
This fix allows businesses to remove a Point of Sale manager from advanced access rights when needed. It helps keep employee permissions accurate and avoids managers retaining elevated POS access after their role changes.
Original PR description
Before this commit, it wasn't possible to remove a POS manager from the advanced access rights. opw-4774770 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The marketing card section added to robots.txt will now stay in the required standard format regardless of the website language. This prevents search engine crawler instructions from being translated into invalid text and cleans up the file formatting.
Original PR description
Versions -------- - 18.0+ Steps ----- 1. Set up a site in Dutch; 2. go to `/nl/robots.txt` Issue ----- File shows "Toestaan: /kaarten/", which is not a valid string for a robots.txt file. This section is also oddly indented. Cause ----- Inserting the additional text in a template override does not inherit the parent view's `t-translation="off"` setting. Solution -------- Add `t-translation="off"` to the template override, and ensure there's no indentation when generating the file. opw-4815818
This fix ensures sales orders that begin with a section or note are handled correctly in Point of Sale. It prevents incorrect or missing lot information, reducing errors when processing linked sale orders.
Original PR description
Before this commit, if the first line in a sale order was a Section or Note, it would not be included in the `read_converted` result. As a result, using the index to access the corresponding data and read `lot_names` could fail, leading to missing or incorrect `lot_names`. opw-4816447 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents imports from crashing when a record contains an empty selection field inherited from a parent record. Businesses can now export and re-import affected records reliably without manual data cleanup.
Original PR description
If the selection property of a parent record is NULL, and the record is exported and then re-imported, a TypeError occurs. This is resolved by returning an empty dictionary during import whenever the selection property's value is NULL in the parent record. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: opw-4670210 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes a test issue that could occur when certain accounting apps were installed without the Accountant app. It helps keep automated quality checks reliable across different installation combinations, reducing false failures during development and release validation.
Original PR description
If account and account_accountant are installed but not accountant the test test_change_payment_state_valid will fail This occurs because the valid payment states for batch payments change when accountant is installed runbot-226305
Closing a POS session with customer account payments now ignores cancelled or unposted accounting entries during reconciliation. This prevents session closing failures caused by invalid entries and helps keep payment processing smoother.
Original PR description
Before this commit, closing a session containing a customer account payment would attempt to reconcile all move lines related to the customer with the same account. However, some of these lines could belong to cancelled journal entries, leading to an error. opw-4843923
Code cleanup and technical improvements
This change modernizes how several Odoo editing tools trigger actions, replacing an older internal dispatch mechanism with user commands. It affects content editing areas such as Appointments, Knowledge, and Studio reports, helping keep the editor framework more consistent and easier to maintain without introducing a direct business workflow change.
Original PR description
See https://github.com/odoo/odoo/pull/184096
Miscellaneous changes
Currently the "Is Simplified" field (`l10n_es_is_simplified`) is recomputed when the state of the move changes. I.e. this can lead to to issues when confirming invoices with the "Is Simplified" checked. When the invoice has a partner (not the simplified one) and the total amount exceeds 400€ the "Is Simplified" is set to `False`. (The same thing could also happen when cancelling a simplified invoice) Technically the reason for the recomputation is a `depends` on `amount_total_signed`,
Original PR description
Currently the "Is Simplified" field (`l10n_es_is_simplified`) is recomputed when the state of the move changes. I.e. this can lead to to issues when confirming invoices with the "Is Simplified" checked. When the invoice has a partner (not the simplified one) and the total amount exceeds 400€ the "Is Simplified" is set to `False`. (The same thing could also happen when cancelling a simplified invoice) Technically the reason for the recomputation is a `depends` on `amount_total_signed`, which itself depends on `state`. After this fix we depend on `line_ids.balance` instead. This way we avoid the dependency on `state` but still recompute when the amounts on the invoice are changed. (The `amount_total_signed` is just the sum of the `balance` of all the lines). task: None (found / needed for task-3745982) Forward-Port-Of: odoo/odoo#212498
Prior to this change, when users cancelled their payment, they remained stuck on their previous order. It was not possible to cancel the order from the basket page. This change allows the user to cancel the order from the shopping cart page. taskId: 4830007 Forward-Port-Of: odoo/odoo#212140
Original PR description
Prior to this change, when users cancelled their payment, they remained stuck on their previous order. It was not possible to cancel the order from the basket page. This change allows the user to cancel the order from the shopping cart page. taskId: 4830007 Forward-Port-Of: odoo/odoo#212140
### Steps to reproduce: - Create a storable product P with 10 units in stock. - Inventory > Configuration > Warehouse Management > Operation Types - Change the reservation Method of Delivery orders to Manual - Create confirm and manually assign a delivery order for 3 units of P - Process the DO in the barcode app, scan 1 unit of P > The line should be 1/3 - Leave and come back #### > The line is now at 1/1 Cause of the issue: Leaving the barcode app launch a call of the `split_un
Original PR description
### Steps to reproduce: - Create a storable product P with 10 units in stock. - Inventory > Configuration > Warehouse Management > Operation Types - Change the reservation Method of Delivery orders…
### Steps to reproduce: - Create a storable product P with 10 units in stock. - Inventory > Configuration > Warehouse Management > Operation Types - Change the reservation Method of Delivery orders to Manual - Create confirm and manually assign a delivery order for 3 units of P - Process the DO in the barcode app, scan 1 unit of P > The line should be 1/3 - Leave and come back #### > The line is now at 1/1 Cause of the issue: Leaving the barcode app launch a call of the `split_uncompleted_moves` in order to keep track of the initial reservation in the barcode app: https://github.com/odoo/enterprise/blob/577cb4b74a614d2dd472375b325706525ae591d7/stock_barcode/models/stock_move.py#L9-L11 However, one of the issue of the current system is that these new moves are expected to be assigned by the `_action_confirm`: https://github.com/odoo/enterprise/blob/577cb4b74a614d2dd472375b325706525ae591d7/stock_barcode/models/stock_move.py#L37 But they are not in certain cases and we should therefore force re-assignation in that case: https://github.com/odoo/odoo/blob/bf0461552effe806fdaa8f85f088be3c3f3be09d/addons/stock/models/stock_move.py#L1427-L1432 Enterprise: https://github.com/odoo/enterprise/pull/86394 opw-4798349 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#211616
Currently in MX localization we allow updating existing bills when users upload a CFDI XML [1] However, we might change the bill source PO with a wrong one in case we have similar records Steps to reproduce: - With an MX Company setup - Create a PO [PO1] with [Partner] and a line and confirm it - Create an identical PO [PO2], confirm it, receive and create bill (Note: the bill is currently associated with PO2) - In the bill upload the corresponding xml bill Issue: After uploading the
Original PR description
Currently in MX localization we allow updating existing bills when users upload a CFDI XML [1] However, we might change the bill source PO with a wrong one in case we have similar records Steps to…
Currently in MX localization we allow updating existing bills when users upload a CFDI XML [1] However, we might change the bill source PO with a wrong one in case we have similar records Steps to reproduce: - With an MX Company setup - Create a PO [PO1] with [Partner] and a line and confirm it - Create an identical PO [PO2], confirm it, receive and create bill (Note: the bill is currently associated with PO2) - In the bill upload the corresponding xml bill Issue: After uploading the document, the bill will be associated to PO1 This occurs because in case of CFDI xml bills we process the attachment and update the bill even if some lines already exists. The system tries to find a PO not yet invoiced to associate with the bill, and finds PO1 which is identical to PO2 but not invoiced yet A solution would be to avoid changing the source purchase order when we want to just extend the bill with an attachment [1] https://github.com/odoo/odoo/commit/e05457c51e7a03115ba37a196e88a199b7682501 opw-4521106 Forward-Port-Of: odoo/odoo#211252
This commit fixes an issue in the `_compute_valid` method of the `hr.leave.type` model. The `('allocation_type', '=', 'accrual')` was removed from the domain, as it limited the valid allocations to type `accrual` only, which is not the intended behavior --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#212548
Original PR description
This commit fixes an issue in the `_compute_valid` method of the `hr.leave.type` model. The `('allocation_type', '=', 'accrual')` was removed from the domain, as it limited the valid allocations to type `accrual` only, which is not the intended behavior
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#212548This is clearer. It also avoids some noisy messages in runbot. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#212556 Forward-Port-Of: odoo/odoo#212037
Original PR description
This is clearer. It also avoids some noisy messages in runbot. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#212556 Forward-Port-Of: odoo/odoo#212037
Context: Migration keys in the context of Peppol are keys that are used to transfer a Peppol participant from one SMP (a service provider by simplification, like Odoo) to another. Problem: The error fixed in this commit is raised when we detect the Peppol Identification/Peppol Address is already on the Peppol Network. It mentions the migration key while it can also be raised when the identification is already used on our own SMP, which makes the migration mention irrelevant and confusing.
Original PR description
Context: Migration keys in the context of Peppol are keys that are used to transfer a Peppol participant from one SMP (a service provider by simplification, like Odoo) to another. Problem: The error fixed in this commit is raised when we detect the Peppol Identification/Peppol Address is already on the Peppol Network. It mentions the migration key while it can also be raised when the identification is already used on our own SMP, which makes the migration mention irrelevant and confusing. Moreover, migration keys are actually handled by very few provider. Generally, the way to go is to unregister from the SMP you want to leave, to be able to register on a new one. task-no Forward-Port-Of: odoo/odoo#212706
To be able to merge moves, the 'price_unit' fields needs to be equal. However, if the product price decimal accuracy is higher than the currency decimal accuracy, then price_unit that looks the same are actually not, and prevent the merge. It can happen in 2 situations: - Python rounding precision: 55.55 != 55.5500000000001 - Tax involvement: If a tax is present on the Purchase Order, then the price unit will be recomputed to check the tax, with something similar to `CURRENCY_ROUND(price_un
Original PR description
To be able to merge moves, the 'price_unit' fields needs to be equal. However, if the product price decimal accuracy is higher than the currency decimal accuracy, then price_unit that looks the same…
To be able to merge moves, the 'price_unit' fields needs to be equal. However, if the product price decimal accuracy is higher than the currency decimal accuracy, then price_unit that looks the same are actually not, and prevent the merge.
It can happen in 2 situations:
- Python rounding precision: 55.55 != 55.5500000000001
- Tax involvement: If a tax is present on the Purchase Order, then the price unit will be recomputed to check the tax, with something similar to `CURRENCY_ROUND(price_unit * qty) / qty`, and because the currency rounding is less precise, the resulting price_unit will vary depending on the quantity.
A similar issue was already fixed in this commit: a7f08f0b4c87aeb60315d07c2e0a5fc4c7a21e50 ,but only for decrease of quantity.
This fix attempts to fix the increase of quantity. The main issue when fixing this problem is that we can't simply use float_compare, this is because the move values are fetched with _itemgetter_, and are 'compared' when _groupby_ is using these values as dictionary key.
The idea is to create a custom _itemgetter_, that will cast the price_unit as a string using the correct precision.
So, the list of values used in the group by will now look like this:
```
(product.product(84,), 'make_to_stock', ..., '25.67')
```
While it previously looked like this:
```
(product.product(84,), 'make_to_stock', ..., 25.668000000000003)
```
---
## How to reproduce
- Create a Storable product.
- Change the decimal accuracy of product price to 5.
- Create a purchase order for 10 units of P, and a price unit of 25.66803.
- Ensure a tax is set on the PO
- Confirm the order
- Edit the PO line quantity to 13 => The receipt has 2 lines of P, one for the first 10 units and the other for the added 3 units
https://github.com/user-attachments/assets/d93f697f-126a-44e5-b134-5bfc8f3ccc68
---
Test results without fix:
```
2021-01-14 09:12:15,000 21884 ERROR oes_17_test odoo.addons.purchase_stock.tests.test_purchase_order: FAIL: TestPurchaseOrder.test_05_po_update_qty_stock_move_merge
Traceback (most recent call last):
File "/home/odoo/projects/odoo-src/multiverse/src/17.0/odoo/addons/purchase_stock/tests/test_purchase_order.py", line 442, in test_05_po_update_qty_stock_move_merge
self.assertEqual(len(purchase_order.picking_ids.move_line_ids), 1)
AssertionError: 2 != 1
```
---
OPW-4675425
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#210077Currently all floats are formatted with the default of 2 in the chatter. Instead if "digits" is specified for the field we should display the field with that precision. Formatting tests were updated, which required adding the option to set the "digits" field value for fields on models that are fetched from back-end definitions. As that info is only stored in python and is not transmitted to the test framework, similarly to "default". task-4746268 Forward-Port-Of: odoo/odoo#206989
Original PR description
Currently all floats are formatted with the default of 2 in the chatter. Instead if "digits" is specified for the field we should display the field with that precision. Formatting tests were updated, which required adding the option to set the "digits" field value for fields on models that are fetched from back-end definitions. As that info is only stored in python and is not transmitted to the test framework, similarly to "default". task-4746268 Forward-Port-Of: odoo/odoo#206989
Steps to reproduce: - Enter Website edit mode. - Click on the Theme tab. - Click the 4th colorpicker in the colors options to change the body background color. - Choose a transparent color. - Save and exit edit mode. - Navigate to the "Contact Us" page. - Issue: The fallback iframe is visible beneath the website iframe. To prevent this, this commit adds a white background to the website's HTML element, so the fallback iframe will never be visible. task-4816245 Forward-Port-Of:
Original PR description
Steps to reproduce: - Enter Website edit mode. - Click on the Theme tab. - Click the 4th colorpicker in the colors options to change the body background color. - Choose a transparent color. - Save and exit edit mode. - Navigate to the "Contact Us" page. - Issue: The fallback iframe is visible beneath the website iframe. To prevent this, this commit adds a white background to the website's HTML element, so the fallback iframe will never be visible. task-4816245 Forward-Port-Of: odoo/odoo#211257
Description of the issue/feature this PR addresses: This commit removes the typo (question marks) in the tax report in South Africa localization. task-4789823 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209673
Original PR description
Description of the issue/feature this PR addresses: This commit removes the typo (question marks) in the tax report in South Africa localization. task-4789823 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209673
Currently, an exception is raised when validating a new receipt transfer where both the stock move and the push rule have the same destination location. Steps to Reproduce: 1. Install `stock` module 2. Enable Multi-Step Routes in Inventory 3. Routes -> Enable Warehouses and ensure they are linked to `YourCompany`. 4. Create a new rule for that route. 5. Set action to 'Push To' with same source and destination (e.g., WH/Stock) and Automatic Move to 'Automatic No Step Added'. 6. Go to
Original PR description
Currently, an exception is raised when validating a new receipt transfer where both the stock move and the push rule have the same destination location. Steps to Reproduce: 1. Install `stock` module…
Currently, an exception is raised when validating a new receipt transfer where both the stock move and the push rule have the same destination location. Steps to Reproduce: 1. Install `stock` module 2. Enable Multi-Step Routes in Inventory 3. Routes -> Enable Warehouses and ensure they are linked to `YourCompany`. 4. Create a new rule for that route. 5. Set action to 'Push To' with same source and destination (e.g., WH/Stock) and Automatic Move to 'Automatic No Step Added'. 6. Go to Inventory -> Operations-> Receipts 7. Create a new receipt with the same destination location as defined in the rule. 8. Click on Validate TypeError: ```TypeError unsupported operand types in: stock.move() - None ``` This issue[1] occurs when the rule and stock have the same destination location. It does not execute and returns None, resulting in new_move being None. When `move.move_dest_ids - new_move` is executed, it raises an error. [1]- https://github.com/odoo/odoo/blob/5c182227514af87659ee48360c63f33487de71bf/addons/stock/models/stock_move.py#L1048 sentry-6551676919 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#206850
**Steps to reproduce:** - Install account_accountant and l10n_es_edi_tbai - Create 2 companies with 2 different currencies having different rounding factors: * a Spanish company with EUR (rounding factor: 0.01) * another company with another currency (rounding factor: 1.0) - For the other company, select "Round Globally" in Accounting settings - Switch to the Spanish company - Create an invoice: * Customer: [a Spanish customer] * Lines: [any with a tax generating a tax amount
Original PR description
**Steps to reproduce:** - Install account_accountant and l10n_es_edi_tbai - Create 2 companies with 2 different currencies having different rounding factors: * a Spanish company with EUR (rounding…
**Steps to reproduce:** - Install account_accountant and l10n_es_edi_tbai - Create 2 companies with 2 different currencies having different rounding factors: * a Spanish company with EUR (rounding factor: 0.01) * another company with another currency (rounding factor: 1.0) - For the other company, select "Round Globally" in Accounting settings - Switch to the Spanish company - Create an invoice: * Customer: [a Spanish customer] * Lines: [any with a tax generating a tax amount with a decimal part] - Save the invoice - In the company selector, select both companies with the other one as the main one - Confirm the invoice - Send it to "TicketBAI (ES)" - Download the electronic invoice and check it **Issue:** In the XML, the value of "CuotaImpuesto" is the tax amount but it has been rounded with the decimal precision of the currency of the main selected company instead of tthe currency of the invoice. **Cause:** In "_prepare_invoice_aggregated_taxes" method, "_aggregate_taxes" is called in which some rounding are done using the currency of "self.env.company". But in this case, "self.env.company" is not the company of the invoice and the currency used for the rounding isn't the one set on the invoice. opw-4724945 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#211841
Some of the reasons were added with a wrong code. https://github.com/odoo/odoo/blob/fba7abd168b99157ee9abd1c084720a90196de39/addons/account_edi_ubl_cii_tax_extension/models/account_tax.py#L76-L85 Example: VATEX_EU_AE should have been VATEX-EU-AE... This fix adds a mapping to correct the codes when exporting XML, since we cannot update the keys of the selection field directly in stable versions. Source: https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-tc434/BR-CL-22/ task-4817958 (p
Original PR description
Some of the reasons were added with a wrong code. https://github.com/odoo/odoo/blob/fba7abd168b99157ee9abd1c084720a90196de39/addons/account_edi_ubl_cii_tax_extension/models/account_tax.py#L76-L85 Example: VATEX_EU_AE should have been VATEX-EU-AE... This fix adds a mapping to correct the codes when exporting XML, since we cannot update the keys of the selection field directly in stable versions. Source: https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-tc434/BR-CL-22/ task-4817958 (part of) Forward-Port-Of: odoo/odoo#211681
### Steps to reproduce: - Create a storable product P with 10 units in stock. - Inventory > Configuration > Warehouse Management > Operation Types - Change the reservation Method of Delivery orders to Manual - Create confirm and manually assign a delivery order for 3 units of P - Process the DO in the barcode app, scan 1 unit of P > The line should be 1/3 - Leave and come back #### > The line is now at 1/1 ### Cause of the issue: Leaving the barcode app launch a call of the `spli
Original PR description
### Steps to reproduce: - Create a storable product P with 10 units in stock. - Inventory > Configuration > Warehouse Management > Operation Types - Change the reservation Method of Delivery orders…
### Steps to reproduce: - Create a storable product P with 10 units in stock. - Inventory > Configuration > Warehouse Management > Operation Types - Change the reservation Method of Delivery orders to Manual - Create confirm and manually assign a delivery order for 3 units of P - Process the DO in the barcode app, scan 1 unit of P > The line should be 1/3 - Leave and come back #### > The line is now at 1/1 ### Cause of the issue: Leaving the barcode app launch a call of the `split_uncompleted_moves` in order to keep track of the initial reservation in the barcode app: https://github.com/odoo/enterprise/blob/577cb4b74a614d2dd472375b325706525ae591d7/stock_barcode/models/stock_move.py#L9-L11 However, one of the issue of the current system is that these new moves are expected to be assigned by the `_action_confirm`: https://github.com/odoo/enterprise/blob/577cb4b74a614d2dd472375b325706525ae591d7/stock_barcode/models/stock_move.py#L37 But they are not in certain cases and we should therefore force re-assignation in that case: https://github.com/odoo/odoo/blob/bf0461552effe806fdaa8f85f088be3c3f3be09d/addons/stock/models/stock_move.py#L1427-L1432 Community: https://github.com/odoo/odoo/pull/211616 opw-4798349 Forward-Port-Of: odoo/enterprise#86394
Steps to reproduce: - With an ES company setup - Create and confirm invoice with: - partner: EU partner - Invoice Date: 01 Dec 2024 - Accounting Date: 01 Jan 2025 - Amount: 1000 - Confirm and create the credit note dated 02 Jan 2025 - Check Mod 349 Tax Report for Jan 2025 Issue: In the Invoices section we can see the full invoice amount (1000) but nothing about the refund This occurs because we use the invoice date to decide if we consider the move amount for the current se
Original PR description
Steps to reproduce: - With an ES company setup - Create and confirm invoice with: - partner: EU partner - Invoice Date: 01 Dec 2024 - Accounting Date: 01 Jan 2025 - Amount: 1000 - Confirm and create the credit note dated 02 Jan 2025 - Check Mod 349 Tax Report for Jan 2025 Issue: In the Invoices section we can see the full invoice amount (1000) but nothing about the refund This occurs because we use the invoice date to decide if we consider the move amount for the current section and not the accounting date opw-4718611 Forward-Port-Of: odoo/enterprise#85479
Runbot error: https://runbot.odoo.com/odoo/error/160977 This commit fixes the tour by moving the steps related to the contract management in the python part of the test. Also fixes the formatting of the tour file. Forward-Port-Of: odoo/enterprise#83931 Forward-Port-Of: odoo/enterprise#83686
Original PR description
Runbot error: https://runbot.odoo.com/odoo/error/160977 This commit fixes the tour by moving the steps related to the contract management in the python part of the test. Also fixes the formatting of the tour file. Forward-Port-Of: odoo/enterprise#83931 Forward-Port-Of: odoo/enterprise#83686
**Problem:** When internal transfer operation type has a manadatory destination in barcode, the transfer can still be validated without destination location scanned if it's a package **Steps to reproduce:** - In settings, enable the "packages" settings - Navigate to Inventory/Configuration/Warehouse Management/ Operations Types - Select "Internal Transfers", in the "Barcode App" page for Source Location, select Mandatory Scan - for "Destination Location" select "after each product"
Original PR description
**Problem:** When internal transfer operation type has a manadatory destination in barcode, the transfer can still be validated without destination location scanned if it's a package **Steps to…
**Problem:** When internal transfer operation type has a manadatory destination in barcode, the transfer can still be validated without destination location scanned if it's a package **Steps to reproduce:** - In settings, enable the "packages" settings - Navigate to Inventory/Configuration/Warehouse Management/ Operations Types - Select "Internal Transfers", in the "Barcode App" page for Source Location, select Mandatory Scan - for "Destination Location" select "after each product" - create a new storable product - Navigate to Inventory/Operations/Physical Inventory - Create a new line and select stock as the location - Select your product - In the package column, create a package and give it a name - Set a quantity > Apply - Open the barcode app, select operations and then internal transfers - Click on New and then Scan WH-Stock and the package name: PACK **Current behavior:** The validate button is higlighted in green and clickable **Expected behavior:** Because we didn't scan a destination location it shouldn't be green and clickabel **Cause of the issue:** When a package barcode is scanned, when _processBarcode calls _processPackage https://github.com/odoo/enterprise/blob/a60aea84d68587b1dfe1b6bfd20cb4fced0f7d46/stock_barcode/static/src/models/barcode_model.js#L1007 Inside _processPackage barcodeData.stopped is set to true (1) and this.selectedLineVirtualId is set to false (2) https://github.com/odoo/enterprise/blob/a60aea84d68587b1dfe1b6bfd20cb4fced0f7d46/stock_barcode/static/src/models/barcode_picking_model.js#L1532-L1533 Because of (1) _processBarcode returns here https://github.com/odoo/enterprise/blob/a60aea84d68587b1dfe1b6bfd20cb4fced0f7d46/stock_barcode/static/src/models/barcode_model.js#L1008-L1011 and doesn't reach the part of the method where _selectLine is called https://github.com/odoo/enterprise/blob/a60aea84d68587b1dfe1b6bfd20cb4fced0f7d46/stock_barcode/static/src/models/barcode_model.js#L1181-L1182 (Inside _selectLine the value of selectedLineVirtualId is defined https://github.com/odoo/enterprise/blob/a60aea84d68587b1dfe1b6bfd20cb4fced0f7d46/stock_barcode/static/src/models/barcode_model.js#L1269-L1274 ) So as a consequence of (1) and (2) the value of this.selectedLineVirtualID is false when a package is scanned When the validate method is called when the user clicks on validate, the method uses the value of this.selectedLine https://github.com/odoo/enterprise/blob/a60aea84d68587b1dfe1b6bfd20cb4fced0f7d46/stock_barcode/static/src/models/barcode_picking_model.js#L777-L779 Because this.selectedLineVirtualID is false, get selectedLine returns false https://github.com/odoo/enterprise/blob/a60aea84d68587b1dfe1b6bfd20cb4fced0f7d46/stock_barcode/static/src/models/barcode_model.js#L307-L309 So the if condition is false, the method is allowed to run and the error notification is not triggered **Fix:** After scanning a package there is no selectedLine so we need another condition opw-4590345 Forward-Port-Of: odoo/enterprise#83710
Forward-Port-Of: odoo/enterprise#86889
Original PR description
Forward-Port-Of: odoo/enterprise#86889
**Steps to reproduce**: 1. Install Appraisals 2. Appraisals > Open any Employee card 3. Turn on the debug mode 4. Click on Debug Icon 5. Click Data **Issue**: - A Traceback error occurs when trying to read the record. - The fields parameter is None in some cases (viewing Raw Record data in Debug mode) in read function, leading to an attempt to convert it to an empty dictionary, which is not iterable. **Cause**: - The read() function was called with fields is None in debug mod
Original PR description
**Steps to reproduce**:
1. Install Appraisals
2. Appraisals > Open any Employee card
3. Turn on the debug mode
4. Click on Debug Icon
5. Click Data
**Issue**:
- A Traceback error occurs when trying to read the record.
- The fields parameter is None in some cases (viewing Raw Record data in Debug mode) in read function, leading to an
attempt to convert it to an empty dictionary, which is not iterable.
**Cause**:
- The read() function was called with fields is None in debug mode and it was incorrectly converting None to {}, causing a
TypeError when performing set operations.
**Solution**:
- Instead of setting None to {}, it should be converted to an empty set to avoid type mismatch.
opw-4788901
Forward-Port-Of: odoo/enterprise#85876Currently, when a user sends an article to the trash, the system triggers a notification email to relevant members informing them that the article has been trashed and will be permanently deleted in 30 days (see: `knowledge_article_trash_notification`). This email includes a link to the trashed article (see: `article_url`). However, when a user clicks the link, they are taken to a 403 error page and cannot access the article to review or restore it. Steps to reproduce the issue: 1. Open a
Original PR description
Currently, when a user sends an article to the trash, the system triggers a notification email to relevant members informing them that the article has been trashed and will be permanently deleted in…
Currently, when a user sends an article to the trash, the system triggers a notification email to relevant members informing them that the article has been trashed and will be permanently deleted in 30 days (see: `knowledge_article_trash_notification`). This email includes a link to the trashed article (see: `article_url`). However, when a user clicks the link, they are taken to a 403 error page and cannot access the article to review or restore it. Steps to reproduce the issue: 1. Open an article 2. Send the article to the trash 3. Open the notification email and click on the article link => The user is redirected to a 403 error page When an article is trashed (see: `action_send_to_trash`), it is marked as inactive. As a result, it is excluded from ORM search results by default. The `/knowledge/article/<id>` route uses the ORM to retrieve the article by its ID. Since trashed articles are inactive, the ORM does not return the article, leading the route to assume the article does not exist and redirect the user to a 403 error page. To resolve this issue, we will modify the context of the search method to include the key `active_test=False`. This will allow the ORM to return inactive (trashed) articles. As a result, users who follow the link from the email will be correctly redirected to the trashed article page, where they can view its content and choose to restore it using the banner interface. Task-4636494 Forward-Port-Of: odoo/enterprise#86065
to reproduce: ============= - enable timesheet for a helpdesk team - create 5 tickets with 10 minutes each - on list view of tickets, select these tickets -> total spent time is 51 minutes instead of 50 minutes Problem: ======== time is represented as float, when computing the total time spent, we round the float value to 2 decimal places, which can lead to loss of precision. for example 10 minutes is represented as 0.16666666666666666 hours, and when we round it to 2 decimal places,
Original PR description
to reproduce: ============= - enable timesheet for a helpdesk team - create 5 tickets with 10 minutes each - on list view of tickets, select these tickets -> total spent time is 51 minutes instead of 50 minutes Problem: ======== time is represented as float, when computing the total time spent, we round the float value to 2 decimal places, which can lead to loss of precision. for example 10 minutes is represented as 0.16666666666666666 hours, and when we round it to 2 decimal places, we get 0.17 hours, which is 10.2 minutes. when we sum up 5 tickets, we get 0.85 hours, which is 51 minutes. Solution: ========= we don't round the float value to 2 decimal places, and we let the front handle the display of the time in the correct format. opw-4560872 Forward-Port-Of: odoo/enterprise#86423
Besides being clearer this avoids some noisy messages in runbot. Example: ``` Cannot evaluate 'documents.document' domain: "['&', ('folder_id.read_group_ids', 'in', [g.id for g in user.groups_id]), '|', ('folder_id.user_specific', '=', False), ('owner_id', '=', user.id)]": RuntimeError('Cannot self-print iterations') while evaluating "['&', ('folder_id.read_group_ids', 'in', [g.id for g in user.groups_id]), '|', ('folder_id.user_specific', '=', False), ('owner_id', '=', user.id)]" ``` Fo
Original PR description
Besides being clearer this avoids some noisy messages in runbot.
Example:
```
Cannot evaluate 'documents.document' domain: "['&', ('folder_id.read_group_ids', 'in', [g.id for g in user.groups_id]), '|', ('folder_id.user_specific', '=', False), ('owner_id', '=', user.id)]": RuntimeError('Cannot self-print iterations') while evaluating
"['&', ('folder_id.read_group_ids', 'in', [g.id for g in user.groups_id]), '|', ('folder_id.user_specific', '=', False), ('owner_id', '=', user.id)]"
```
Forward-Port-Of: odoo/enterprise#86787
Forward-Port-Of: odoo/enterprise#86591The `action_timer_start` method caused infinite recursion when the user's timezone differed from the timesheet's timezone. The comparison between `fields.Date.today()` and `self.date` failed, creating a new timesheet. That new timesheet triggered `action_timer_start` again, repeating the loop. **Steps to Produce:-** 1. Install the `Timesheets` application. 2. Navigate to `Settings > Users & Companies > User`. 3. Select your current user and, under `Preferences`, set the timezone to one t
Original PR description
The `action_timer_start` method caused infinite recursion when the user's timezone differed from the timesheet's timezone. The comparison between `fields.Date.today()` and `self.date` failed,…
The `action_timer_start` method caused infinite recursion when the user's timezone differed from the timesheet's timezone. The comparison between `fields.Date.today()` and `self.date` failed, creating a new timesheet. That new timesheet triggered `action_timer_start` again, repeating the loop.
**Steps to Produce:-**
1. Install the `Timesheets` application.
2. Navigate to `Settings > Users & Companies > User`.
3. Select your current user and, under `Preferences`, set the timezone to one that does not reflect today’s date.
4. Open the Timesheets application, and for any record, click on the `Search icon` in the column for today’s date.
5. Start the time tracking by clicking the `Play button`.
6. Wait for a moment; an error will generate.
**Error:-**
`RecursionError: maximum recursion depth exceeded.`
**Solution:-**
- When action_timer_start() is invoked, it first checks for the _from_action_timer flag in the context.
- If not set, it sets _from_action_timer=True.
- The next time action_timer_start() is triggered, the presence of _from_action_timer in the context causes it to exit early,
preventing recursion.
**Sentry - 6592348827**
Forward-Port-Of: odoo/enterprise#85105Currently, an error-level log is generated when confirming a Vendor Bill without setting the required AFIP Authorization Code. **Steps to Reproduce:** 1) Install `l10n_ar_edi module`. 2) Select Company having Argentina code (e.g **(AR)Exento**) 3) Navigate to `Invoicing->Configuration->settings`, under Argentina localization, set `Verify Vendor Bills validity in AFIP` to **required**. 4) Create a new Vendor Bill, select Vendor Name (e.g **ADHOC SA**). 5) Click on confirm. **Error
Original PR description
Currently, an error-level log is generated when confirming a Vendor Bill without setting the required AFIP Authorization Code. **Steps to Reproduce:** 1) Install `l10n_ar_edi module`. 2) Select…
Currently, an error-level log is generated when confirming a Vendor Bill without setting the required AFIP Authorization Code.
**Steps to Reproduce:**
1) Install `l10n_ar_edi module`.
2) Select Company having Argentina code (e.g **(AR)Exento**)
3) Navigate to `Invoicing->Configuration->settings`, under Argentina localization,
set `Verify Vendor Bills validity in AFIP` to **required**.
4) Create a new Vendor Bill, select Vendor Name (e.g **ADHOC SA**).
5) Click on confirm.
**Error:**
UserError('Please set AFIP Authorization Mode and Code to continue!')
**Root Cause:**
- The code calls `_logger.error(repr(error))` on any exception at [1] during the AFIP verification attempt, causing an ERROR‐level log entry.
[1]- https://github.com/odoo/enterprise/blob/ca16c89c6f53b1c0adb0a1a061d985bdf3439e5e/l10n_ar_edi/models/account_move.py#L500
**Solution:**
- This commit handles `UserError` exceptions separately using a warning log to prevent error-level entries.
Sentry-6576006813
Forward-Port-Of: odoo/enterprise#85261Currently, an error occurs when updating data for payroll if a referenced partner record has been deleted by the user. **Steps to produce:** - Install the `contacts` and `l10n_ma_hr_payroll` module. - Delete the partner **National Social Security Fund**. - Navigate to `Settings > Technical > Scheduled Actions`. - Run action manually for **Payroll: Update data**. - Observe the error. **Error:** `ValueError: ParseError('while parsing /home/odoo/src/enterprise/saas-18.3/l10n_ma_hr_payro
Original PR description
Currently, an error occurs when updating data for payroll if a referenced partner record has been deleted by the user. **Steps to produce:** - Install the `contacts` and `l10n_ma_hr_payroll` module.…
Currently, an error occurs when updating data for payroll if a referenced partner record has been deleted by the user.
**Steps to produce:**
- Install the `contacts` and `l10n_ma_hr_payroll` module.
- Delete the partner **National Social Security Fund**.
- Navigate to `Settings > Technical > Scheduled Actions`.
- Run action manually for **Payroll: Update data**.
- Observe the error.
**Error:**
`ValueError: ParseError('while parsing /home/odoo/src/enterprise/saas-18.3/l10n_ma_hr_payroll/data/hr_salary_rule_data.xml:169 ...`
The error occurs because the method at [1] tries to load the `hr_salary_rule_data.xml` file, which references a deleted `partner_id` [2], resulting in a parsing failure.
[1] - https://github.com/odoo/enterprise/blob/b7c26a504264ee02ce40fc522faa2ef3624c9915/l10n_ma_hr_payroll/models/hr_payslip.py#L9
[2] - https://github.com/odoo/enterprise/blob/b7c26a504264ee02ce40fc522faa2ef3624c9915/l10n_ma_hr_payroll/data/hr_salary_rule_data.xml#L169
This commit ensures that all the referenced data is loaded properly, preventing errors due to missing references.
Sentry - 6617089492
Forward-Port-Of: odoo/enterprise#85979This commit adapts our media upload usage of the Twitter API as they decided on a lunch break to deprecate the `command` parameter from their `/2/media/upload` endpoint. We now have to use `/2/media/upload/initialize`, `/2/media/upload/{id}/append` and `/2/media/upload/{id}/finalize` to upload a media to twitter. Instead of the old command parameter. task-4771023 Forward-Port-Of: odoo/enterprise#84667
Original PR description
This commit adapts our media upload usage of the Twitter API as they decided on a lunch break to deprecate the `command` parameter from their `/2/media/upload` endpoint.
We now have to use `/2/media/upload/initialize`, `/2/media/upload/{id}/append` and `/2/media/upload/{id}/finalize` to upload a media to twitter. Instead of the old command parameter.
task-4771023
Forward-Port-Of: odoo/enterprise#84667The aim of this commit is to prevent the file generated to be rejected by the administration. Before this commit: As there weren't any mapping for those country code, the field `f2112_buitenlandspostnummer` wouldn't be set in the xml. After this commit: The field is correctly set task-none Forward-Port-Of: odoo/enterprise#86886
Original PR description
The aim of this commit is to prevent the file generated to be rejected by the administration. Before this commit: As there weren't any mapping for those country code, the field `f2112_buitenlandspostnummer` wouldn't be set in the xml. After this commit: The field is correctly set task-none Forward-Port-Of: odoo/enterprise#86886