Daily updates from Odoo
Tuesday, February 24, 2026
245 changes
8 changes
Resolved issues and error corrections
This update resolves an issue where VoIP session tracking was incorrectly identifying sessions due to recent changes in how user sessions are managed. The fix ensures the system correctly searches for sessions in the updated session map, improving the reliability of VoIP functionality. This ensures accurate session tracking for our users.
Original PR description
In this PR: https://github.com/odoo/enterprise/pull/104426 session management was introduced that changed the concept of `mainSession` and `transferSession` in the userAgent. There was a missing cleanup in the function `isInProgress` that is still using the old main and transfer sessions. This commit fixes this bug by searching for the session in the new sessions map.
This update fixes a critical issue where accrual entries weren't correctly reflecting product costs, leading to inaccurate inventory valuations. Specifically, it addresses scenarios where product prices differed from their cost, ensuring proper accounting for sales and purchase orders. This improves the accuracy of financial reporting.
Original PR description
## [FIX] Accrual account domain Since [1], the accrued order wizard can be open from a purchase order line view and from a sale order line view. The wizard account field uses a domain, and this…
## [FIX] Accrual account domain Since [1], the accrued order wizard can be open from a purchase order line view and from a sale order line view. The wizard account field uses a domain, and this domain is different if the active model is `purchase.order`. In quoted PR, the domain wasn't adapted to work with `purchase.order.line` as active model. This PR fixes that. ## [FIX] Correct COGS cost #### How to reproduce the issue - Use anglo-saxon config; - Have a product with a cost; - Sale this product with its unit price =/= its cost; - Deliver; - Create accrual entry for this product => The perpetual valuation lines are not correct, they use the SO lines' price for their debit/credit instead of the product's cost. #### Example If we have a product with cost of $100 and sell it for $180 We currently have: Account Debit Credit Stock Valuation $ 0.00 $ 180.00 Cost of Goods Sold $ 180.00 $ 0.00 But we should have: Account Debit Credit Stock Valuation $ 0.00 $ 100.00 Cost of Goods Sold $ 100.00 $ 0.00 ## PO line price diff #### Issue While generating accrual entries for a PO with billed not received, if the billed price is different than the PO line price, no entries were generated for the price diff account. #### How to reproduce 1. Create a product using "Standard Price" as its costing method and set a cost for this product and set a price difference account (on its product category); 2. Create a purchase order for this product and confirm it; 3. Create an invoice for this PO with a different price for the product; 4. Go to Accounting > Review > Billed Not Received; 5. Select the PO and click on "Create Accrual Entries" button => Accrued entries are created but no entries are created for the price difference. #### Expected behavior Two more entries must be created: one for the price diff account and one for the stock valuation account. [1]: https://github.com/odoo/odoo/pull/231510 task-[5349657](https://www.odoo.com/odoo/966/tasks/5349657) Forward-Port-Of: odoo/odoo#249875 Forward-Port-Of: odoo/odoo#234600
This update resolves an issue preventing users from sharing document templates with read-only fields. By separating validation logic and removing unnecessary security checks, the system now correctly handles shared template requests, ensuring a smoother user experience. This fix improves the reliability of document sharing workflows.
Original PR description
Currently, attempting to share a document template that contains readonly fields fails. When `_populate_constant_items` calls `_fill` to pre-fill these fields, `_fill` aggressively checks that the request state is 'sent'. Since shared links create requests in the 'shared' state, the transaction crashes. Additionally, `_fill` throws a `UserError` if not called with `sudo`, which inappropriately treats a developer/privilege error as an end-user error. This commit resolves the issue by separating concerns: - Moves the `state == 'sent'` validation out of the `_fill` helper and into `_sign` (the caller responsible for actual user signatures). - Removes the artificial `sudo` check in `_fill`, relying instead on standard ORM Access Errors to block unauthorized database writes. (only in master) Task: 5949263 Forward-Port-Of: odoo/enterprise#107898
This update fixes an issue where the order of selection options in sign templates was being lost after saving. The change ensures that user-defined option sequences are consistently preserved, preventing confusion and ensuring data integrity within sign documents. This improves the user experience and reliability of the sign process.
Original PR description
Steps to reproduce: 1. Open a Sign template. 2. Drag a 'Selection' field onto the document. 3. In the popover, type options in a specific order (e.g., Delta, Alpha, Beta). 4. Click save. 5. Re-open or inspect the data 6. observe the order is scrambled based on Database ID. Cause: The Python method used `list(set())` which is an unordered collection, losing the user's input sequence. Furthermore, the final `search().ids` call returned records sorted by primary key (ID) rather than the provided list order. Solution: Replace `set()` with `dict.fromkeys()` to deduplicate while preserving input order. opw-5896373 Forward-Port-Of: odoo/enterprise#108380 Forward-Port-Of: odoo/enterprise#107175
This update clarifies a confusing error message related to delivery scheduling and lock dates. Previously, a validation error would incorrectly flag deliveries as being in a locked fiscal period. The fix ensures the error message accurately reflects the issue and provides better guidance to users, streamlining the delivery validation process.
Original PR description
A recent improvement task (ID [5065601](https://www.odoo.com/odoo/project.task/5065601)) allows `stock.picking` to backdate deliveries, as long as the `scheduled_date` and `date_done` fields are both…
A recent improvement task (ID [5065601](https://www.odoo.com/odoo/project.task/5065601)) allows `stock.picking` to backdate deliveries, as long as the `scheduled_date` and `date_done` fields are both after the lock date. Related: PR #222169
When validating a `stock.picking` record, the constraint `_check_backdate_allowed()` can fail on a different `stock.picking` record. This is confusing for the end user and makes finding the erroneous `stock.picking` difficult.
## Steps to reproduce.
**setup**:
1. install stock, sale, purchase. Use the demo data.
2. Navigate to Inventory > Configuration > Warehouse and click into the Warehouse for the active company.
3. Select the Routes smart button, then select the Buy route. Ensure that the "Product" option is selected for the Buy route.
4. Navigate to Inventory > Product > Product.
5. Create a test product that is:
1. tracked by quantity (General Information tab)
2. Has a vendor listed (in the Purchases tab)
3. Uses the "buy" route (in the Inventory tab)
4. Has a reordering rule for the Buy route (reordering rules smart button)
6. Do not add any stock for this product.
**reproduction**:
1. Navigate to Sale > Orders.
2. Create and confirm a sale order for the configured product, such that more products will need to be created.
3. Navigate into the delivery order for the sale and set its scheduled date to be December 1st.
4. In Accounting > Accounting > lock dates, set all the lock dates to be December 3rd.
5. Navigate back to the sales order, then use the Purchase order smart button to view the purchase order.
7. Use the Deliveries smart button to view the purchase delivery.
8. Validate the delivery - > Validation error thrown
> You cannot modify the scheduled date of this operation because it falls within a locked fiscal period.
**Solution**: add the name of the stock.picking to the error message & only check the lock date when `date_done` is altered, not `scheduled_date`.
[opw-5428179](https://www.odoo.com/odoo/unassigned-tasks/5428179)
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#247474This update resolves an issue that caused duplicate move entries to appear in the shop floor view when creating work orders without a Bill of Materials. The fix clarifies how work orders and operations are linked, ensuring accurate display of components and preventing errors that could disrupt production workflows. This improves the reliability of the shop floor interface.
Original PR description
### Steps to reproduce: - Enable debug mode (to trigger a traceback rather than a silent error) - In the settings, enable `Work Orders` - Create an MO for a product without a BoM - Add an operation…
### Steps to reproduce: - Enable debug mode (to trigger a traceback rather than a silent error) - In the settings, enable `Work Orders` - Create an MO for a product without a BoM - Add an operation to be performed in a workcenter - Confirm the MO and open the Shop Floor - Enable the workcenter of your operation, switch to it, and click on the three dots at the bottom right of the operation display - Click on `Add component` and add any valid component via the catalog #### > Traceback: `OwlError: Got duplicate key in t-foreach` ### Cause of the issue: The rendering error is raised by the `MrpDisplayRecord` template: https://github.com/odoo/enterprise/blob/51ce336f8dac9ba0a8ca719201640b2829044164/mrp_workorder/static/src/mrp_display/mrp_display_record.xml#L69-L72 Two moves with the same `id` are provided to the template. Which is unexpected since the `moves` getter should not return the same move twice: https://github.com/odoo/enterprise/blob/51ce336f8dac9ba0a8ca719201640b2829044164/mrp_workorder/static/src/mrp_display/mrp_display_record.js#L174-L188 However, neither of the two move pools is well defined. The issue stems from the confusing `operation_id` field, which should rather be `workorder_id`. Currently, the moves associated with the MO are those not linked to an `operation_id` (i.e., not linked to an `mrp.routing.workcenter` from the BoM), whereas they should instead be those linked to a `workorder_id`, representing an operation of the MO: https://github.com/odoo/odoo/blob/0d7e3d4c0ea976e37871ca44a10a442cce7caa85/addons/mrp/models/stock_move.py#L43-L47 Similarly, moves linked to workorders are only those matching the same `operation_id` as the workorder. This can only happen when the workorder is generated from the BoM and therefore has a set `operation_id`, or when both are `False`. In the latter case, all moves unlinked to any `operation_id` are displayed on all operations not generated by the BoM, which is again completely unexpected. In the present case, our operation has not been generated from the bom and hence will fall in both move pulls for the unexpected reason leading to the duplicate key-error. opw-5417887 Forward-Port-Of: odoo/enterprise#106200
This change reverses a previous update that was incorrectly removing accented characters from legal names used for Mexican VAT (EDI) processing. The SAT now allows all characters, so Odoo will now accept the user-entered, accented names as they are, giving users full control and preventing issues. This simplifies the process and ensures accurate VAT compliance.
Original PR description
An accent sanitization feature was introduced in Odoo 18 [1]. It was done because it appeared the SAT replaced certain characters with their unaccented counterpart, but it's not the case. At least…
An accent sanitization feature was introduced in Odoo 18 [1]. It was done because it appeared the SAT replaced certain characters with their unaccented counterpart, but it's not the case. At least today, the SAT allows all characters (pointed out in [2]). This explains why in the past 6 months this feature has been slowly undone [3][4][5], character by character, after customers run into issues. The approach can not work, so we go back to the name with the accents the user puts on the partner. Users need to put the correct, legally registered name in Odoo. If it doesn't work then they can adapt it as needed. This way the user is in full control, and we don't block them. This reverts the whole accent sanitization saga: - Revert "[FIX] l10n_mx_edi - More accented characters accepted by SAT", this reverts commit 46cc41ddd258e80372478a746ea79d154a5931d9. - Revert "[FIX] l10n_mx_edi: Fix accents in legal name", this reverts commit dcbd8797667b5be88f48045e48da86ac42db362c. - Revert "[FIX] l10n_mx_edi: Fix accents in legal name", this reverts commit 32b8333fd3f813ec3188394c2634129e3fbfe31d. - Revert "[FIX] l10n_mx_edi: Fix accents in legal name", this reverts commit 05ed1fb9059bd1459e38dc00b041cada6bf06ac4. This also removes the unused frozendict import to make "Check Style" happy. opw-5915515 [1] https://github.com/odoo/enterprise/pull/95207 [2] https://github.com/odoo/enterprise/pull/107960 [3] https://github.com/odoo/enterprise/pull/96043 [4] https://github.com/odoo/enterprise/pull/106557 [5] https://github.com/odoo/enterprise/pull/107677 Closes odoo/enterprise#107960 Forward-Port-Of: odoo/enterprise#108425 Forward-Port-Of: odoo/enterprise#108189
This update fixes an issue where receipts printed with the l10n_gcc_pos module were displaying English text instead of Arabic. The fix adds Arabic translations to the receipt XML files, ensuring that all text is displayed in the user's chosen language, matching the behavior of other receipts.
Original PR description
Problem: When printing a receipt in arabic using the l10n_gcc_pos module, some of the text is in English. Cause: Translation is not enabled for the module and the text is written in English only in the receipts XML. Solution: Add the arabic translations of texts to the receipts XML and choose the display language based on the user's language (same behaviour in other receipts). Steps to reproduce: - Install l10n_gcc_pos module - Activate and choose Arabic as the language - Open Point of Sale and validate an order - See how some text (specifically "Tax Invoice" and "Simplified Tax Invoice") are printed in English although the rest of the receipt is printed in Arabic. opw-5501464 Forward-Port-Of: odoo/odoo#245795
25 changes
Resolved issues and error corrections
This update fixes a bug where the Odoo website would crash when a breadcrumb was displayed without the standard header. The change ensures the breadcrumb interaction works correctly regardless of whether the header is enabled or disabled, improving website stability and user experience.
Original PR description
When the header is disabled globally via the Theme tab in edit mode, navigating to a page containing a breadcrumb caused a crash. The PageBreadcrumb interaction did not handle the case where no header was present on the page. This commit updates the interaction to safely handle pages without a header. Task-ID: 5927177 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where the 'is_company' field wasn't accurately determined in Odoo's localization modules (l10n_br and l10n_ec). Now, Brazilian CNPJ and Ecuadorian RUC identification types correctly mark partners as companies, and foreign partners with VATs are also recognized as companies. This ensures accurate reporting and functionality for international business operations.
Original PR description
`is_company` was not correctly computed in some localization modules. This commit adds a compute method for: - l10n_br*: Company if identification type is CNPJ - l10n_ec*: Company if identification type is RUC For foreign partners (country ≠ BR/EC), a partner is considered a company if a VAT is provided. Follow-up of: https://github.com/odoo/odoo/pull/211043 Task-5947797
This update corrects a bug where the system incorrectly identified companies in Brazil and Ecuador. Now, the system accurately determines if a partner is a company based on their identification type (CNPJ or RUC in those countries) or if a VAT is provided for other countries. This ensures accurate reporting and accounting.
Original PR description
`is_company` was not correctly computed in some localization modules. This commit adds a compute method for: - l10n_br*: Company if identification type is CNPJ - l10n_ec*: Company if identification type is RUC For foreign partners (country ≠ BR/EC), a partner is considered a company if a VAT is provided. Follow-up of: https://github.com/odoo/enterprise/pull/86089 Task-5947797
This update resolves an issue where signature requests would fail with error messages due to a missing link to an employee offer. The fix ensures that signature requests are properly validated, preventing redirection errors and date validation issues. This improves the user experience for employees signing contracts.
Original PR description
Steps to reproduce: 1- On an employee page, create a new signature request for a document through the gear icon 2- Log in with the employee (ex. Marc Demo) and sign the contract 3- It will be signed but you will still get an <error 404 not found> page as it redirects to an offer that does not exist 4- Log in with the admin again to counter sign the document 5- You will get an error saying contract end date cannot be before contract start date Cause of the bug: We don't have an offer linked to the document we're signing. We can test this with the demo employee_contract.pdf or Employee Termination.pdf. The logic inside the sign() function will try to update the employee's version with fields from the offer which we don't have as it assumes this is a new offer. Fix done: Check if we have an offer linked to this sign request at first, if not return the default behavior that validates the signature. task-5423393
This update resolves an issue where a misleading warning appeared on payslips, even when employee wages were correctly calculated. The fix corrects a technical error in how the system checked net wages, ensuring the warning only appears when a payslip genuinely has a negative or zero net wage. This improves the accuracy and clarity of payroll reporting.
Original PR description
Steps to Reproduce: 1. Generate payslips for a batch of employees (e.g., Employee A and Employee B). 2. Ensure the last processed payslip (Employee B) has a negative net wage or is uncomputed (net…
Steps to Reproduce: 1. Generate payslips for a batch of employees (e.g., Employee A and Employee B). 2. Ensure the last processed payslip (Employee B) has a negative net wage or is uncomputed (net wage 0.0). 3. Ensure Employee A has a valid, positive net wage. 4. Open the payslip for Employee A. Issue: Employee A displays the warning "The net pay for this payslip is zero or negative," even though their net wage is positive. This occurred because the lambda filter used the `slip` variable from the outer loop scope instead of the iterator, causing the last record's net wage to determine the warning for the entire batch. Additionally, uncomputed payslips (which have no lines) default to a net wage of 0.0, which triggered the warning condition prematurely. Expected Behavior: The warning should only appear if the specific payslip being checked has a negative or zero net wage. Furthermore, the warning should be suppressed if the payslip lines have not yet been computed. Additionally, added a test to check the message is not displayed if we don't have net salary, and appears if the net is indeed negative. task-5484107
This update fixes a bug where users could accidentally create duplicate lines within Point of Sale orders. Previously, a refreshed page might send redundant requests, leading to multiple entries for the same item. Now, the system checks if a line already exists and updates it instead, ensuring data accuracy and a smoother user experience.
Original PR description
Before this commit, it could happen that a user send a request to the backend to create a pos.order.line that already exists because it didn't know it was already synced for some reason (the page was reloaded before getting the response and the frontend was then relying on indexedDB for example). It would then send a create command and we would have multiple lines with the same values. We have a constraint that usually works but for people where the bug happened before the constraint was created, the constraint would not be created and so the bug could still happen We now prevent that by changing the create command into an update command if the line to create already exists by comparing its uuid to the uuids of the lines related to the order. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#249109
This update resolves an issue in Odoo 19.0 where uploading encrypted KSeF certificates caused server crashes. The fix allows users to correctly configure KSeF authentication using encrypted private keys by adding a password argument to the key loading process. This ensures KSeF functionality is reliably accessible.
Original PR description
In Odoo 19.0 (Master), the handling of KSeF certificates introduced an issue where uploading an encrypted private key caused a server crash, blocking the configuration of KSeF. This functionality worked correctly in v18 (where keys were often unencrypted). The `XadesSigner` class was not designed to accept a password argument. The `serialization.load_pem_private_key` method would fail with a `TypeError` because the password was not passed to the underlying Updated the `XadesSigner.__init__` method to accept a `private_key_password` argument. Passed this password correctly to `serialization.load_pem_private_key`. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#248423
This update fixes an issue where users could add more than the available quantity of products to their cart when using the Click & Collect feature. The change removes a previous workaround that allowed this behavior, ensuring accurate inventory tracking and a better user experience. This resolves a potential over-ordering scenario.
Original PR description
Versions -------- - 19.0+ Steps ----- 1. Enable click and collect 2. Add a product with tracked inventory 3. Set the quantity on hand 4. Uncheck "Sell when Out-of-stock" 5. Try to add to cart more…
Versions
--------
- 19.0+
Steps
-----
1. Enable click and collect
2. Add a product with tracked inventory
3. Set the quantity on hand
4. Uncheck "Sell when Out-of-stock"
5. Try to add to cart more than the quantity on hand on the product page
- note that you are only allowed to add up to the quantity on hand
6. Try to add to cart more than the quantity on hand from the shop page by hovering over the product and clicking the cart icon
- note that you can add to cart more than the quantity on hand
7. Try to go to the cart page and adjust the quantity of the product
- note that it is reset to the quantity on hand and you're prevented from exceeding it
Issue
-----
You shouldn't be able to add to cart more than the quantity on hand of a product when you have "Sell when Out-of-stock" disabled. Especially since you can't do that from the product or cart page, and adjusting the extra quantity from the cart page leads it to reset.
Cause
-----
When you enable click and collect, it disables the check for quantity when adding items to cart. This was originally done because otherwise you had no way of adding items to cart in case there was a quantity available for pickup from shop but not available for delivery. This has changed since the introduction of the widget on the product page that allows you to select a store to pickup from in that case.
Solution
--------
Remove the code that disables checking for quantity when adding to cart when click to collect is installed.
opw-5449451
Forward-Port-Of: odoo/odoo#242864This update resolves an issue where the 'typing' indicator on chat channels remained visible indefinitely. The fix ensures that timeout expiration is correctly triggered when a user starts typing, regardless of timestamp duplication, improving the chat experience for users.
Original PR description
Typing expiration was indirectly tied to typing timestamp updates. Typing timestamps are second-precision, so two consecutive typing events can carry the same timestamp value. In that case, the timestamp field may not be considered updated on the client. The expiration timeout is then not re-armed even though typing is set to true. When that happens, the typing indicator can remain visible indefinitely unless an explicit "stop typing" event is received. This change makes timeout registration depend on typing state updates directly. Expiration is always scheduled when typing becomes active, regardless of timestamp equality. [task-4922630](https://www.odoo.com/odoo/project/1519/tasks/4922630) Forward-Port-Of: odoo/odoo#249917 Forward-Port-Of: odoo/odoo#249796
This update resolves an issue where a payment QR code remained visible on the customer display after an order was completed. The fix clears data related to the QR code when an order is finalized, ensuring a cleaner user experience. This improves the overall customer flow and prevents unnecessary visual clutter.
Original PR description
Steps: --- - Configure online payment on the POS configuration. - Open a POS session and the customer display. - Add a product and an online payment line. - Validate the order and complete the payment via QR code. Issue: --- - The order is finalized, but the payment QR code remains visible on the customer display. - The QR popup must be closed manually every time. Cause: --- - The customer display popup lifecycle depends on `onlinePaymentData`. - This data was not cleared when the order was finalized. Fix: --- - Clear `onlinePaymentData` when the order is completed. task-5502344 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#250102 Forward-Port-Of: odoo/odoo#244991
This update resolves an issue where the order of columns within the add snippet dialog was incorrect when using languages with different text directions (RTL/LTR). The fix ensures that the column order aligns with the backend language, improving usability for users with various language settings. This ensures a consistent and intuitive user experience.
Original PR description
After the accessibility improvement in [9ae02d8], snippets previews within the add snippet dialog are tabable. It reveals an issue with the order of the columns depending on the interface language:…
After the accessibility improvement in [9ae02d8], snippets previews within the add snippet dialog are tabable. It reveals an issue with the order of the columns depending on the interface language: when the backend language and the frontend language are not read in the same direction (RTL / LTR), the frontend language is taken to display the previews (see [f9c77de]). This is the right approach to show the snippets themselves, but the order of the columns should be done according to the backend language, which is the one that gives the instructions for the overall UI. To reproduce: - Set the admin's language to arabic - Clear the cache and refresh your page - Edit and open the add snippet dialog - Navigate with Tab => The 1st focused snippet is in the wrong column compared with the rest of the UI. [9ae02d8]: https://github.com/odoo/odoo/commit/9ae02d80894d4043e49d8e2cad068f8018e6f113 [f9c77de]: https://github.com/odoo/odoo/commit/f9c77de84aa6ea705e5d3f129328fb2199103b9a task-5109547 Forward-Port-Of: odoo/odoo#228414
This update ensures inactive taxes are accurately shown in fiscal position mappings, resolving a previous display issue. Previously, inactive taxes weren't consistently visible in key views. The change adds necessary context to the fiscal position action to ensure correct tax representation.
Original PR description
Observed issue: inactive taxes are shown in "Replaces" `original_tax_ids` field if the form view of a tax is opened through "Configuration"->"Taxes", but not shown under "Replaces" in a fiscal position tree view, nor are they shown in the same "Replaces" field of the tax form view when opened from the fiscal position tree view. Cause: the fiscal position link calls `action_open_related_taxes` on partner (path `/account.tax/[id]`), while the "Configuration"->"Taxes" calls `action_tax_form` on tax (path `/taxes/[id]`), which has additional context element `'active_test': False` among others. Solution: adding the context to the fiscal position action produces the desired behavior, but it might break something else as it affects the whole view. task-5917667 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#247787
This update ensures that when settling invoices quickly through the product screen (fast payment), the system now correctly creates a 'pay later' payment line alongside the fast payment line, balancing the transaction. This was previously missed during a recent update to support both payment screen and product screen validation flows.
Original PR description
Steps to reproduce ------------------ 1. Install `pos_settle_due` 2. Enable "One-Click Payment" from the configs, and make sure it has some valid payment methods (Cash, Card, etc). 3. Open PoS, and…
Steps to reproduce ------------------ 1. Install `pos_settle_due` 2. Enable "One-Click Payment" from the configs, and make sure it has some valid payment methods (Cash, Card, etc). 3. Open PoS, and click "Settle Invoices" for a client having a "Total Due" > 0 4. Select the invoice(s) 5. Fast settle the invoice by directly paying on the product screen, using one of the fast payment methods on the bottom. -> The order is payed, however, it only has the fast payment line, while it should also have an additional equivalent "pay later" line, with a negative amount, balancing the amount payed with the fast payment method. Why the issue ------------- If we settled this invoice from the payment page, this issue does not happen, i.e. an equivalent "pay later" payment line is created. That additional "pay later" line is created when calling the `validateOrder` method on the `payment_screen`, which in `pos_settle_due`, is overriden to also add the "pay later" payment lines under certain conditions. After introducing the "One-Click Payment" feature in #216523, we needed to be able to validate the order in two different places: 1. On the payment screen, that was already taken care of, by the method `validateOrder` mentioned just above, that is normal validation. 2. On the products screen, when using fast payment, that is fast validation. For that reason, the validation code has been moved from the payment screen to the class `OrderPaymentValidation` which will be used by the two flow: the normal validation and the fast validation. However, we have forgot to move the `pos_settle_due` specific validation code from payment_screen to the new `OrderPaymentValidation`, hence, the `pos_settle_due` validation that creates the "pay later" PL is only executed from the payment_screen, never from fast validation. The fix ------- Now, we move the `pos_settle_due` validation code from `payment_screen` to an override of `OrderPaymentValidation` so it's executed when for both normal and fast validation. Notes ----- - We keep the methods in `payment_screen` for backward compatibility, they will be removed in master. - We replace the usage of `props.isDepositOrder` in the `payment_screen` with `order.is_settling_account`, as they will have both the same value, but `order.is_settling_account` is available on the order, so it can be used for both normal and fast flows, while `props.isDepositOrder` was only available in the payment screen during normal valuation. On master, we can remove the prop `isDepositOrder` in favor of `order.is_settling_account === true`. opw-5488587 Forward-Port-Of: odoo/enterprise#105660
This update fixes an issue where the order of selection options in sign templates was being lost after saving. The change ensures that user-defined option sequences are consistently preserved, preventing confusion and ensuring data integrity. This improves the user experience when creating and managing sign templates.
Original PR description
Steps to reproduce: 1. Open a Sign template. 2. Drag a 'Selection' field onto the document. 3. In the popover, type options in a specific order (e.g., Delta, Alpha, Beta). 4. Click save. 5. Re-open or inspect the data 6. observe the order is scrambled based on Database ID. Cause: The Python method used `list(set())` which is an unordered collection, losing the user's input sequence. Furthermore, the final `search().ids` call returned records sorted by primary key (ID) rather than the provided list order. Solution: Replace `set()` with `dict.fromkeys()` to deduplicate while preserving input order. opw-5896373 Forward-Port-Of: odoo/enterprise#108380 Forward-Port-Of: odoo/enterprise#107175
This update corrects a validation issue with invoices generated using the facturae module for Spanish e-Facturae. Previously, the system was generating XML files with excessive decimal places (up to 8), leading to validation errors. This change ensures that all currency amounts, specifically for invoices in Euros, are rounded to two decimal places as required by Spanish regulations, resolving the validation problem.
Original PR description
Steps to reproduce: - Have facturae modules installed - Generate invoice with any amount - Send to Facturae Issue: Resulting XML has 8 digits after the decimal point on several fields, such as unit…
Steps to reproduce: - Have facturae modules installed - Generate invoice with any amount - Send to Facturae Issue: Resulting XML has 8 digits after the decimal point on several fields, such as unit price, gross amount, and total cost. When trying to validate such an XML, this results in validation error: "RCF06001: En facturas emitidas en euros, alguno de los importes de las líneas tiene más de dos decimales (regla 6a del anexo II de la Orden HAP/1650/2015)." According to regulation HAP/1650/2015 [1]: For invoices issued in euros, it will be validated that the total line amounts related to the total cost are numeric and rounded, according to the common rounding method, to two decimal places. This commit introduces dynamic decimal precision: 2 places for EUR and 8 places (the previous default) for other currencies. [1] https://www.boe.es/diario_boe/txt.php?id=BOE-A-2015-8844 Machine translated [BOE-A-2015-8844 (1).pdf](https://github.com/user-attachments/files/25345382/BOE-A-2015-8844.1.pdf) opw-5927356 Forward-Port-Of: odoo/odoo#249674 Forward-Port-Of: odoo/odoo#248882
This update fixes an issue where the names of Ecuadorian invoicing regimes didn't comply with government regulations. The changes ensure that all invoice data sent to the Ecuadorian tax authority (SRI) uses the correct, officially recognized regime names. This ensures compliance and accurate reporting.
Original PR description
[FIX] l10n_ec_edi: fiscal localizations name The name of the regimes for the Ecuadorian localization does not respect the government requirements Steps to reproduce: 1. Install l10n_ec_edi module 2. Go to Settings > Invoicing > Ecuadorian Localization 3. In Electronic Invoicing > Regime, the names of the regimes do not respect government requirements Solution: Change the name of the fiscal localizations to respect the requirements Add a computed field used to map the name of the regime to the technical name of the regime used in SRI documents We write them in Spanish because we always want the name of the regime to be in Spanish in the XML invoice sent to the government, even if the user didn't install any other language. opw-5221871 Forward-Port-Of: odoo/enterprise#105914
This update resolves an issue that prevented users from clicking the Work Entries button when overtime records lacked a 'Stop' time. The fix corrects a comparison error between a datetime object and a boolean value, ensuring the button functionality is consistently available. This prevents a frustrating error for users managing overtime times.
Original PR description
Clicking the Work Entries smart button raises a traceback when an overtime record has no Stop (time_stop). Steps to reproduce the error: - Install ``hr_work_entry_attendance`` module with demo data -…
Clicking the Work Entries smart button raises a traceback when an overtime record has no Stop (time_stop). Steps to reproduce the error: - Install ``hr_work_entry_attendance`` module with demo data - Activate developer mode - Create an Employee A > Settings > Set Default Ruleset in Overtime Ruleset In Payroll Tab, Work Entry Source: ``Attendances`` and set Contract - Create an overtime attendance > Save > Open the Overtime Details > Unset the ``Stop(time_stop)`` > Save - Open Employee A > Click on Work Entries smart button Traceback: ```py TypeError: '<' not supported between instances of 'bool' and 'datetime.datetime' ``` https://github.com/odoo/enterprise/blob/56c3723a925f718ba39d11cde12933542ebcd7c1/hr_work_entry_attendance/models/hr_version.py#L49-L52 When ``stop(time_stop)`` is unset in the overtime, ``ot.time_stop`` is False, causing ``min()`` to compare a ``datetime`` with ``False``, which raises the above traceback. sentry-7169332615 Forward-Port-Of: odoo/enterprise#103764
This update clarifies a confusing error message related to delivery scheduling and lock dates. Previously, a validation error would point to the wrong stock picking record. Now, the error message identifies the specific stock picking record and only checks lock dates when the delivery date is changed, making it easier for users to resolve scheduling issues.
Original PR description
A recent improvement task (ID [5065601](https://www.odoo.com/odoo/project.task/5065601)) allows `stock.picking` to backdate deliveries, as long as the `scheduled_date` and `date_done` fields are both…
A recent improvement task (ID [5065601](https://www.odoo.com/odoo/project.task/5065601)) allows `stock.picking` to backdate deliveries, as long as the `scheduled_date` and `date_done` fields are both after the lock date. Related: PR #222169
When validating a `stock.picking` record, the constraint `_check_backdate_allowed()` can fail on a different `stock.picking` record. This is confusing for the end user and makes finding the erroneous `stock.picking` difficult.
## Steps to reproduce.
**setup**:
1. install stock, sale, purchase. Use the demo data.
2. Navigate to Inventory > Configuration > Warehouse and click into the Warehouse for the active company.
3. Select the Routes smart button, then select the Buy route. Ensure that the "Product" option is selected for the Buy route.
4. Navigate to Inventory > Product > Product.
5. Create a test product that is:
1. tracked by quantity (General Information tab)
2. Has a vendor listed (in the Purchases tab)
3. Uses the "buy" route (in the Inventory tab)
4. Has a reordering rule for the Buy route (reordering rules smart button)
6. Do not add any stock for this product.
**reproduction**:
1. Navigate to Sale > Orders.
2. Create and confirm a sale order for the configured product, such that more products will need to be created.
3. Navigate into the delivery order for the sale and set its scheduled date to be December 1st.
4. In Accounting > Accounting > lock dates, set all the lock dates to be December 3rd.
5. Navigate back to the sales order, then use the Purchase order smart button to view the purchase order.
7. Use the Deliveries smart button to view the purchase delivery.
8. Validate the delivery - > Validation error thrown
> You cannot modify the scheduled date of this operation because it falls within a locked fiscal period.
**Solution**: add the name of the stock.picking to the error message & only check the lock date when `date_done` is altered, not `scheduled_date`.
[opw-5428179](https://www.odoo.com/odoo/unassigned-tasks/5428179)
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#247474This update resolves an error that occurred when employees had multiple leave types allocated. The fix ensures the holiday attest calculation accurately sums all available leave time, preventing a traceback during payroll processing. This improves the reliability of holiday pay calculations for employees with complex leave arrangements.
Original PR description
Bug : - allocate multiple leave types to an employee - lay off the employee -access the holiday attest wizard and try to compute holiday attest and you'll see a traceback Reason : - time_off_allocated and time_off_taken were expecting to find exactly one line of "Legal Time Off". Receiving multiple caused an Error. Fix : FIxing the logic by taking all the available lines and summing there values. task - 5461268 Forward-Port-Of: odoo/enterprise#107673
This update fixes an issue where selling kit products through Point of Sale (POS) resulted in incorrect stock valuation calculations. The fix ensures that the UoM of kit components is properly considered when calculating expenses and stock levels, leading to accurate inventory management. This improves the reliability of financial reporting within Odoo.
Original PR description
When selling a kit product in POS, if the component of the kit use a different UoM than the UoM defined on the product, the stock valuation lines are wrong. Steps to reproduce: ------------------- * Create a storable product A with a UoM "Dozen" and a cost price of 10€ * Create a kit product B with a BoM of 1 unit of product A * Sell 1 unit of product B in POS > Observation: The valuation lines have the wrong value Why the fix: ------------ The product qty was not considering the UoM when computing the expense and stock valuation lines. opw-5471923 Forward-Port-Of: odoo/odoo#248694
This update fixes a bug in the 19.0 version of Odoo's MRP module that prevented users from copying operations from other Bills of Materials. The 'Copy Existing Operations' button was accidentally removed during a UI update. This change restores the functionality, allowing users to easily duplicate operations when starting with a blank BoM, improving efficiency.
Original PR description
### Steps to reproduce the bug: - Install mrp - Go to manufacturing app - Go to products -> bills of materials - Create a new bill of material for a product - Go to the operations tab - No 'copy…
### Steps to reproduce the bug: - Install mrp - Go to manufacturing app - Go to products -> bills of materials - Create a new bill of material for a product - Go to the operations tab - No 'copy existing operations' button appears if at least one operation is already created ### The problem: In version 19.0, the "Copy Existing Operations" button is missing from the BoM operations tab when no operations have been defined yet for the current BoM. While this feature was fully functional in version 18.4, it became inaccessible in 19.0 to users due to a UI reorganization introduced in commit https://github.com/odoo/odoo/commit/80e6ed658fb43584bc2fad673ca40d9af6cf0ab6 that accidentally omitted the "Copy Existing Operations" button. Currently, users are forced to manually create at least one operation before they can see the option to copy from other BoMs. ### The reason to introduce the fix: The ability to copy operations is useful also when starting with an empty BoM if operations in other BoM's have been already created. Since this fix has already been implemented in version 19.1 via commit https://github.com/odoo/odoo/commit/02e837c959381523170c653da099328e9855a4e4, this PR backports that changes to 19.0 to restore feature parity and improve the user experience. opw-5906667 Forward-Port-Of: odoo/odoo#248225
This change reverses a recent update that was incorrectly removing accented characters from legal names used for Mexican VAT (EDI) processing. The SAT now allows all characters, so Odoo will now accept the user-entered, accented names as they are, giving users full control and preventing errors. This simplifies the process and ensures accurate data.
Original PR description
An accent sanitization feature was introduced in Odoo 18 [1]. It was done because it appeared the SAT replaced certain characters with their unaccented counterpart, but it's not the case. At least…
An accent sanitization feature was introduced in Odoo 18 [1]. It was done because it appeared the SAT replaced certain characters with their unaccented counterpart, but it's not the case. At least today, the SAT allows all characters (pointed out in [2]). This explains why in the past 6 months this feature has been slowly undone [3][4][5], character by character, after customers run into issues. The approach can not work, so we go back to the name with the accents the user puts on the partner. Users need to put the correct, legally registered name in Odoo. If it doesn't work then they can adapt it as needed. This way the user is in full control, and we don't block them. This reverts the whole accent sanitization saga: - Revert "[FIX] l10n_mx_edi - More accented characters accepted by SAT", this reverts commit 46cc41ddd258e80372478a746ea79d154a5931d9. - Revert "[FIX] l10n_mx_edi: Fix accents in legal name", this reverts commit dcbd8797667b5be88f48045e48da86ac42db362c. - Revert "[FIX] l10n_mx_edi: Fix accents in legal name", this reverts commit 32b8333fd3f813ec3188394c2634129e3fbfe31d. - Revert "[FIX] l10n_mx_edi: Fix accents in legal name", this reverts commit 05ed1fb9059bd1459e38dc00b041cada6bf06ac4. This also removes the unused frozendict import to make "Check Style" happy. opw-5915515 [1] https://github.com/odoo/enterprise/pull/95207 [2] https://github.com/odoo/enterprise/pull/107960 [3] https://github.com/odoo/enterprise/pull/96043 [4] https://github.com/odoo/enterprise/pull/106557 [5] https://github.com/odoo/enterprise/pull/107677 Closes odoo/enterprise#107960 Forward-Port-Of: odoo/enterprise#108425 Forward-Port-Of: odoo/enterprise#108189
This update corrects a discrepancy in payslip calculations related to the private car allowance. The daily amount is now rounded to two decimal places, ensuring the displayed value precisely matches the 'Quantity × Amount' shown on payslips. This improves payroll accuracy and reporting.
Original PR description
Round the computed daily private-car salary rule amount to 2 decimals so the displayed per-day value matches Quantity × Amount on payslips. References task-5917569 Forward-Port-Of: odoo/enterprise#108160 Forward-Port-Of: odoo/enterprise#106753
This update resolves access restrictions preventing basic sales, stock, and purchase workflows for users with limited permissions. The changes ensure these users can correctly interact with key processes like creating invoices and purchase orders, improving usability and reducing potential disruptions.
Original PR description
*: account,sale,stock_delivery Since [19.0](https://github.com/odoo/odoo/pull/217277#issue-3198442339), read access rights are checks on comodels when trying to read the value of a many2many fields…
*: account,sale,stock_delivery Since [19.0](https://github.com/odoo/odoo/pull/217277#issue-3198442339), read access rights are checks on comodels when trying to read the value of a many2many fields you have read acccess to. This change highlight numerous access right issues in basic flows for users with minimal access. Here is a list of examples (each performed with every other access rights disabled): - With a `stock user`, open the delivery list or form view #### > Access error - With a `purchase user` create and confirm a PO > Upload Bill #### > the Bill will be created but an access error will prevent the draft bill from opening. - With a `sale user` create and confrim an SO > Create invoice #### > the invoice will be created but an access error will prevent the draft invoice from opening. ## Solutions: ### Use case: Open an invoice (`acount.move`) linked to one of your SO/PO with a basic `sale`/`purchase` user: 1) For basic `sale` and `purchase` users to be able to open the `account.move` Form on which they have read, update, create, delete access rights, it is necessary for the `payment_count` to be compute sudo since it is used in the view: https://github.com/odoo/odoo/blob/4ea42f8b16a8619cced4255f5bba8de6427345b7/addons/account/views/account_move_views.xml#L859 And these users do not have the read access of the `account.payment` model. Similarily the `_compute_asset_ids` needs to be compute sudo because it relies on the related `asset_ids` of `account.move.line`s or on values of these `account.asset`s for which the users shoud not have read access: https://github.com/odoo/enterprise/blob/06cf3f2b6663c61f1fcc158678dfb1fa43ece4e1/account_asset/models/account_move.py#L27-L30 https://github.com/odoo/enterprise/blob/06cf3f2b6663c61f1fcc158678dfb1fa43ece4e1/account_asset/models/account_move.py#L317-L323 and the `asset_ids`, `count_asset`, `asset_id_display_name` and `draft_asset_exists` are all used in the view. #### Note for master: IMO, the `asset_ids` field of the `account.move` model should probably be in a separate compute to not be computed in sudo and removed from the views as it is currently used only to determine if there is or not `asset_ids`. An information that is provided by the `count_asset`. E.G. here: https://github.com/odoo/enterprise/blob/06cf3f2b6663c61f1fcc158678dfb1fa43ece4e1/account_asset/views/account_move_views.xml#L10 https://github.com/odoo/enterprise/blob/06cf3f2b6663c61f1fcc158678dfb1fa43ece4e1/account_asset/views/account_move_views.xml#L35-L40 https://github.com/odoo/enterprise/blob/06cf3f2b6663c61f1fcc158678dfb1fa43ece4e1/account_asset/views/account_move_views.xml#L44-L52 2) For basic `purchase` users to open the invoice linked to one of their PO, it is necessary that the `sale_order_count` is computed in sudo as they do not have access to the related `sale_line_ids` field and the field is used in the `account.move` form: https://github.com/odoo/odoo/blob/4ea42f8b16a8619cced4255f5bba8de6427345b7/addons/sale/models/account_move.py#L46-L49 https://github.com/odoo/odoo/blob/4ea42f8b16a8619cced4255f5bba8de6427345b7/addons/sale/views/account_views.xml#L53 ### Use case: Open a `stock.picking` views as basic stock user: 3) The basic `stock` users have a read access on the `delivery.carrier` model and should also on the related `delivery.zip.prefix` and `delivery.price.rule` models. First as it make sense functionally but also as it currently blocks them on basic flows. For instance basic stock users can not open the `stock.picking` list or form view as the `carrier_id` is part of these view: https://github.com/odoo/odoo/blob/4ea42f8b16a8619cced4255f5bba8de6427345b7/addons/stock_delivery/views/delivery_view.xml#L125-L132 This is problematic as this field has a domain relying on the related `allowed_carrier_ids` field: https://github.com/odoo/odoo/blob/93fa6d9fff63534cfa9251e21fc82797d8b83468/addons/stock_delivery/models/stock_picking.py#L23-L24 As such, when the view is opened, the related field needs to be read. However, the `_compute_allowed_carrier_ids` fails if you do not have read access rights on the `delivery.zip.prefix` model: https://github.com/odoo/odoo/blob/93fa6d9fff63534cfa9251e21fc82797d8b83468/addons/delivery/models/delivery_carrier.py#L198 https://github.com/odoo/odoo/blob/93fa6d9fff63534cfa9251e21fc82797d8b83468/addons/delivery/models/delivery_carrier.py#L70-L72 Similarily `delivery.price.rule` model should be readable for `stock` users in order to be able to get be able to rely on the `price_rule_ids` when necessary such as here: https://github.com/odoo/odoo/blob/93fa6d9fff63534cfa9251e21fc82797d8b83468/addons/delivery/models/delivery_carrier.py#L492-L496 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr opw-5461135 opw-5417749 Forward-Port-Of: odoo/odoo#247531
This update resolves access restrictions that were preventing basic sales, purchase, and stock users from fully utilizing key workflows. The changes ensure these users can correctly create and manage invoices, purchase orders, and stock deliveries, improving usability for users with limited permissions.
Original PR description
*: account_asset, sale_lazada Since [19.0](https://github.com/odoo/odoo/pull/217277#issue-3198442339), read access rights are checks on comodels when trying to read the value of a many2many fields…
*: account_asset, sale_lazada Since [19.0](https://github.com/odoo/odoo/pull/217277#issue-3198442339), read access rights are checks on comodels when trying to read the value of a many2many fields you have read acccess to. This change highlight numerous access right issues in basic flows for users with minimal access. Here is a list of examples (each performed with every other access rights disabled): - With a `stock user`, open the delivery list or form view #### > Access error - With a `purchase user` create and confirm a PO > Upload Bill #### > the Bill will be created but an access error will prevent the draft bill from opening. - With a `sale user` create and confrim an SO > Create invoice #### > the invoice will be created but an access error will prevent the draft invoice from opening. ## Solutions: ### Use case: Open an invoice (`acount.move`) linked to one of your SO/PO with a basic `sale`/`purchase` user: 1) For basic `sale` and `purchase` users to be able to open the `account.move` Form on which they have read, update, create, delete access rights, it is necessary for the `payment_count` to be compute sudo since it is used in the view: https://github.com/odoo/odoo/blob/4ea42f8b16a8619cced4255f5bba8de6427345b7/addons/account/views/account_move_views.xml#L859 And these users do not have the read access of the `account.payment` model. Similarily the `_compute_asset_ids` needs to be compute sudo because it relies on the related `asset_ids` of `account.move.line`s or on values of these `account.asset`s for which the users shoud not have read access: https://github.com/odoo/enterprise/blob/06cf3f2b6663c61f1fcc158678dfb1fa43ece4e1/account_asset/models/account_move.py#L27-L30 https://github.com/odoo/enterprise/blob/06cf3f2b6663c61f1fcc158678dfb1fa43ece4e1/account_asset/models/account_move.py#L317-L323 and the `asset_ids`, `count_asset`, `asset_id_display_name` and `draft_asset_exists` are all used in the view. #### Note for master: IMO, the `asset_ids` field of the `account.move` model should probably be in a separate compute to not be computed in sudo and removed from the views as it is currently used only to determine if there is or not `asset_ids`. An information that is provided by the `count_asset`. E.G. here: https://github.com/odoo/enterprise/blob/06cf3f2b6663c61f1fcc158678dfb1fa43ece4e1/account_asset/views/account_move_views.xml#L10 https://github.com/odoo/enterprise/blob/06cf3f2b6663c61f1fcc158678dfb1fa43ece4e1/account_asset/views/account_move_views.xml#L35-L40 https://github.com/odoo/enterprise/blob/06cf3f2b6663c61f1fcc158678dfb1fa43ece4e1/account_asset/views/account_move_views.xml#L44-L52 2) For basic `purchase` users to open the invoice linked to one of their PO, it is necessary that the `sale_order_count` is computed in sudo as they do not have access to the related `sale_line_ids` field and the field is used in the `account.move` form: https://github.com/odoo/odoo/blob/4ea42f8b16a8619cced4255f5bba8de6427345b7/addons/sale/models/account_move.py#L46-L49 https://github.com/odoo/odoo/blob/4ea42f8b16a8619cced4255f5bba8de6427345b7/addons/sale/views/account_views.xml#L53 ### Use case: Open a `stock.picking` views as basic stock user: 3) The basic `stock` users have a read access on the `delivery.carrier` model and should also on the related `delivery.zip.prefix` and `delivery.price.rule` models. First as it make sense functionally but also as it currently blocks them on basic flows. For instance basic stock users can not open the `stock.picking` list or form view as the `carrier_id` is part of these view: https://github.com/odoo/odoo/blob/4ea42f8b16a8619cced4255f5bba8de6427345b7/addons/stock_delivery/views/delivery_view.xml#L125-L132 This is problematic as this field has a domain relying on the related `allowed_carrier_ids` field: https://github.com/odoo/odoo/blob/93fa6d9fff63534cfa9251e21fc82797d8b83468/addons/stock_delivery/models/stock_picking.py#L23-L24 As such, when the view is opened, the related field needs to be read. However, the `_compute_allowed_carrier_ids` fails if you do not have read access rights on the `delivery.zip.prefix` model: https://github.com/odoo/odoo/blob/93fa6d9fff63534cfa9251e21fc82797d8b83468/addons/delivery/models/delivery_carrier.py#L198 https://github.com/odoo/odoo/blob/93fa6d9fff63534cfa9251e21fc82797d8b83468/addons/delivery/models/delivery_carrier.py#L70-L72 Similarily `delivery.price.rule` model should be readable for `stock` users in order to be able to get be able to rely on the `price_rule_ids` when necessary such as here: https://github.com/odoo/odoo/blob/93fa6d9fff63534cfa9251e21fc82797d8b83468/addons/delivery/models/delivery_carrier.py#L492-L496 opw-5461135 opw-5417749 Forward-Port-Of: odoo/enterprise#106694
1 change
Resolved issues and error corrections
This update fixes a problem where users wouldn't receive helpful information when printing PDF payroll reports with invalid templates. Now, when an error occurs, a traceback is displayed, making it easier to diagnose and resolve issues with report layouts. This ensures smoother report generation and reduces potential user frustration.
Original PR description
Currently, when a user tries to print a PDF report with an invalid document layout template, there’s no traceback to show what went wrong. **Steps to produce:** * Install payroll with demo data. *…
Currently, when a user tries to print a PDF report with an invalid document layout template, there’s no traceback to show what went wrong. **Steps to produce:** * Install payroll with demo data. * Settings > Configure Document Layout then Edit Layout * Add non-existent field `<div t-if='o.no'/>` * Payroll > All payslips > print any payslip **Observed Behavior:** * Currently it only shows the error in [1], with no context or traceback to explain what went wrong. **Root cause:** * This happens because the route doesn’t include the website parameter. Without it, the system treats the route as non–front end [2], so the error handler never reaches [3].That means [4] never loads the templates [5], and the browser just gets a plain response at [6]. **Solution:** * Catching and raising UserError shows appropriate traceback. **Before:** <img width="1601" height="507" alt="image" src="https://github.com/user-attachments/assets/f7f208f0-cdd7-410e-87e7-32a9651df9d8" /> **After:** <img width="1847" height="928" alt="image" src="https://github.com/user-attachments/assets/c73522d6-2632-422b-b1d1-234e6c61ed2e" /> [1]: https://drive.google.com/file/d/1qJLkFGw4bEclqKihdUI-4bjJofdFArEc/view?usp=sharing [2]: https://github.com/odoo/odoo/blob/e4e2dca73213c33c487033dd404a7ca335960a66/addons/http_routing/models/ir_http.py#L386 [3]: https://github.com/odoo/odoo/blob/e4e2dca73213c33c487033dd404a7ca335960a66/addons/http_routing/models/ir_http.py#L611 [4]: https://github.com/odoo/odoo/blob/e4e2dca73213c33c487033dd404a7ca335960a66/addons/http_routing/models/ir_http.py#L573-L576 [5]: https://github.com/odoo/odoo/blob/e4e2dca73213c33c487033dd404a7ca335960a66/addons/http_routing/views/http_routing_template.xml#L139 [6]: https://github.com/odoo/odoo/blob/e4e2dca73213c33c487033dd404a7ca335960a66/addons/http_routing/models/ir_http.py#L575 Related:https://github.com/odoo/odoo/pull/237262 opw-5167898 Forward-Port-Of: odoo/enterprise#100142
7 changes
Resolved issues and error corrections
This update resolves an issue where Peppol invoices weren't correctly processed if the specific module wasn't installed. The import logic for self-billing invoices has been moved to the core `account_peppol` module, ensuring consistent and accurate handling of Peppol invoices for all users. This improves the reliability of our Peppol integration.
Original PR description
At the moment, the Peppol AP accepts incoming self-billing invoices for all 18.0 users, but if the `account_peppol_selfbilling` module is not installed on the database, incoming self-billing invoices are not decoded correctly, and end up as as vendor bills rather than sales documents. This is because the import logic for self-billing invoices is in `account_peppol_selfbilling` at the moment. To solve this issue, we move the import logic to `account_peppol`, as well as related tests. task-none Forward-Port-Of: odoo/odoo#247796
This update fixes an issue where the stock valuation calculation was incorrect when creating purchase orders with multiple moves for the same product within the same picking. The fix ensures accurate valuation by preventing double-counting of quantities when stock valuation smart buttons are used, ultimately improving inventory accuracy.
Original PR description
**Steps to reproduce:** - create a storable avco automated product - in the purchase tab, select control policy : "on invoice quantitites" - create and confirm a purchase order for 100 qty at 1 unit…
**Steps to reproduce:** - create a storable avco automated product - in the purchase tab, select control policy : "on invoice quantitites" - create and confirm a purchase order for 100 qty at 1 unit price - on the picking, unhide the description column - change the description for the move - go back to the purchase order and change the quantity to 105 - (because we changed the description, the new move created with a quantity of 5 is not merged to the existing one of 100 and we now have two moves on the picking) - create and confirm the bill - validate the picking - select the valuation smart button **Current behavior:** the svl with a quantity of 100 has a total value of 105 the svl with a quantity of 5 has a total value of 105 **Expected behavior:** the svl with a quantity of 100 should have a value of 100 the svl with a quanitty of 5 shoul have a total value of 5 **Cause of the issue:** When the picking is validated, action_done is created on the two moves. In the stock_account override: - first the super method is called As a consequence the state of the two moves becomes 'done' and the qty_received of the linked purchase order line becomes 105. - then product_price_update_before_done is called on the two moves before creating the svls. https://github.com/odoo/odoo/blob/2f00b0085574653ca1a8f734ef91893a4a1c1a7c/addons/stock_account/models/stock_move.py#L352 Inside product_price_update_before_done, for each move, we call _get_price_unit. https://github.com/odoo/odoo/blob/2f00b0085574653ca1a8f734ef91893a4a1c1a7c/addons/stock_account/models/stock_move.py#L426 For the first move, in the purchase_stock override of _get_price_unit : - to get the received qty we call _get_qty_received_without_self() https://github.com/odoo/odoo/blob/2f00b0085574653ca1a8f734ef91893a4a1c1a7c/addons/purchase_stock/models/stock_move.py#L50 and because the super method of action_done was already called, qty_received of the purchase order line is 105, so _get_qty_received_without_self will return 5. https://github.com/odoo/odoo/blob/2f00b0085574653ca1a8f734ef91893a4a1c1a7c/addons/purchase_stock/models/stock_move.py#L108-L113 So received_qty is 5 and later remaining_qty will be 100 https://github.com/odoo/odoo/blob/dc57ea4d306f8745d37f2c5d2c3d3fa4bcaf7253/addons/purchase_stock/models/stock_move.py#L86 - but because no svl was created yet receipt_value will stay 0 and later remaining_value will be 105 https://github.com/odoo/odoo/blob/dc57ea4d306f8745d37f2c5d2c3d3fa4bcaf7253/addons/purchase_stock/models/stock_move.py#L55-L60 Therefore price_unit will be 1.05 (105/100) instead of 1 https://github.com/odoo/odoo/blob/2f00b0085574653ca1a8f734ef91893a4a1c1a7c/addons/purchase_stock/models/stock_move.py#L95 For the second move, the problem is the same and the price unit ends up being 21 (105/5) **fix** We do not take into account the move(s) for the same product of the same picking in the remaining value (because svls are not created yet) so we should not take them into account in the remaining quantity. the problem is very similar to https://github.com/odoo/odoo/pull/235601 In this other PR it happend because we had multiple move for the same product because they were in a batch, and in this PR we have the issue because we have multiple move for the same product because they didn't merge due to the description difference. opw-5429501 Forward-Port-Of: odoo/odoo#247640
A bug was causing errors when setting up email approval rules in web_studio. This update corrects a technical issue related to how domain definitions were being handled, ensuring that approval rules with 'not set' operators now function correctly. This prevents errors and ensures proper email rule configuration.
Original PR description
Steps to reproduce ================== - Install web_studio,sale_management - Open a form view in sale - Open studio - Click on the "Send by email" button - Add an approval rule - Add a domain by clicking on the filter icon - Use the not set operator - Confirm - Click on the filter icon again - Confirm => ValueError: malformed node or string on line 1: <ast.Name object at 0x79ff4c7b7f50> Cause of the issue ================== JSON.stringify was used to pass the domain as a string to the DomainSelectorDialog. This doesn't work for boolean as they don't have the same representation in JavaScript as opposed to Python. Solution ======== Use the Domain().toString function opw-5923585 Forward-Port-Of: odoo/enterprise#107558 Forward-Port-Of: odoo/enterprise#107432
This update fixes an issue where the names of Ecuadorian invoicing regimes didn't comply with government regulations. The changes ensure that all invoice names are now correctly formatted in Spanish, as required by the Ecuadorian tax authority (SRI). This ensures accurate and compliant electronic invoicing.
Original PR description
[FIX] l10n_ec_edi: fiscal localizations name The name of the regimes for the Ecuadorian localization does not respect the government requirements Steps to reproduce: 1. Install l10n_ec_edi module 2. Go to Settings > Invoicing > Ecuadorian Localization 3. In Electronic Invoicing > Regime, the names of the regimes do not respect government requirements Solution: Change the name of the fiscal localizations to respect the requirements Add a computed field used to map the name of the regime to the technical name of the regime used in SRI documents We write them in Spanish because we always want the name of the regime to be in Spanish in the XML invoice sent to the government, even if the user didn't install any other language. opw-5221871 Forward-Port-Of: odoo/enterprise#105914
This update fixes an issue where table menus would sometimes overlap with adjacent cells, particularly when viewing partial table views. Now, table menus appear correctly when hovering over list elements within table cells, ensuring a smoother and more reliable user experience.
Original PR description
**Current behavior before PR:** - Table menu handlers could overflow into adjacent table areas when the targeted part of the table was only partially visible within the container. - When a table cell contained a list, hovering over the list element did not display the table UI menus, even though the mouse was inside the cell. **Desired behavior after PR is merged:** - Use a local overlay for the table menu to prevent overflow into adjacent cells. - Table UI menus are now correctly displayed when hovering over list elements inside a table cell. task-5353518 Forward-Port-Of: odoo/odoo#249261 Forward-Port-Of: odoo/odoo#240342
This update ensures that freight charges are accurately reflected on commercial invoices generated for international UPS shipments. Previously, invoices were set to $0 for freight, which caused issues with customs clearance. The fix adds the necessary freight charge information to the shipment request, ensuring accurate invoicing and smoother customs processing.
Original PR description
Issue ----- For international deliveries, the commercial invoice used for customs does not include the freight charges (it is set to 0). Steps to reproduce ----- - Create an international UPS sale - Confirm the delivery - Open the "UPSCommercialInvoice.pdf" file > In the price breakdown, freight is set to 0.0 Cause ----- It has to be specified in the `ship` request as `ShipmentServiceOptions.InternationalForms.FreightCharges.MonetaryValue` (source https://docs.rocketshipit.com/rs/docs/ups-api-parameters.html#shipment) Expected result ----- <img width="1912" height="963" alt="image" src="https://github.com/user-attachments/assets/170e49f7-6575-4524-b186-3829f4c20430" /> ----- Ticket: opw-5135494 Forward-Port-Of: odoo/enterprise#105505
This update resolves a crash in the HTML Editor component caused by overly aggressive sanitization of data attributes. The fix involves temporarily encoding and decoding these attributes during sanitization to prevent removal, ensuring the editor functions correctly. This improves stability and prevents disruptions to users.
Original PR description
Prior to this commit, since DOMPurify v3.1.2 (and more precisely since usage of v3.1.5 in Odoo), the JS sanitization process aggressively removes html attributes with `-->`, `<style` and `<title` for…
Prior to this commit, since DOMPurify v3.1.2 (and more precisely since usage of v3.1.5 in Odoo), the JS sanitization process aggressively removes html attributes with `-->`, `<style` and `<title` for security reasons (see [1]). However `html_editor` embedded components use `data-attributes` (`data-embedded-props` and `data-embedded-state`) to store various kind of data as a JSON string. Obviously, such JSON strings easily match the DOMPurify regex and these attributes are therefore removed, which results in an Editor crash. There are multiple reasons why such values are acceptable as is for the `html_editor` usage: - only `HTMLElement` instances are sanitized, never a string, therefore there is no `DOMParser` to trick with invalid HTML. - values in these attributes are always/exclusively parsed as JSON strings, and the editor will crash if the value is not a legit JSON. - values in these attributes are HTML escaped by the python sanitizer when the serialized html is sent to the server. - values in the JSON parsed object are at worst rendered as plain text (never as HTML or other parsed formats). - values in the JSON parsed object are never executed as JS (only serializable primitives are stored). Therefore, the suggested solution is to encode the values during sanitization, and decode just after, to keep the rest of the codebase simple and explicit. [1]: https://mizu.re/post/exploring-the-dompurify-library-hunting-for-misconfigurations#dompurify-gt-3.1.2-safe-for-xml task-5960707 Forward-Port-Of: odoo/odoo#250210
3 changes
Resolved issues and error corrections
This update resolves a technical issue that was causing tests to fail in the Odoo Stock module. By specifically targeting the 'Open Move' button in tour tests, the team has ensured consistent test results and improved the stability of the Stock module. This prevents unexpected test failures due to generic element matching.
Original PR description
#### Description of the issue/feature this PR addresses: This avoids unit test failures when the overly generic `.fa-list` matches an unexpected element instead of the "Open Move" button. #### Current behavior before PR: Tests fail. #### Desired behavior after PR is merged: Tests pass. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
A bug was causing the 'Publish & Send' button to disappear in the scheduling interface. This update removes a previous fix that inadvertently removed this button. The change ensures the button remains visible, allowing users to properly send their schedules.
Original PR description
## Issue Since commit https://github.com/odoo/enterprise/commit/a0f44c2bdb2, `planning_test_tour_no_email` is failing when trying to click on the (missing) `Publish & Send` button. ## Cause The…
## Issue
Since commit https://github.com/odoo/enterprise/commit/a0f44c2bdb2, `planning_test_tour_no_email` is failing when trying to click on the (missing) `Publish & Send` button.
## Cause
The commits adds the `my_planning_action` attribute to the context when opening the `Schedule by Resource`. This allowed to display the `I Take It!` button when opening an open shift, but it also removed the `Publish & Send` button, as its condition to be invisible consistently contains `context.get('my_planning_action')` [[1](https://github.com/odoo/enterprise/blob/6892fbda8717effdf3eac06eb6783f1c238ce789/planning/views/planning_views.xml#L11), [2](https://github.com/odoo/enterprise/blob/6892fbda8717effdf3eac06eb6783f1c238ce789/planning/views/planning_views.xml#L78-L79), [3](https://github.com/odoo/enterprise/blob/6892fbda8717effdf3eac06eb6783f1c238ce789/planning/views/planning_views.xml#L273-L274)].
## Fix
The objective is to fix the bug from previous commit https://github.com/odoo/enterprise/commit/a0f44c2bdb2 differently. Instead of adding the `my_planning_action` to the context, we remove the conditions on the `I Take It!` button.
runbot-241028This update corrects a bug where a previously revoked portal user could be incorrectly set as the default public user for a new website. This prevented potential confidentiality issues and ensures that website public user assignments are based on current permissions. The fix temporarily archives revoked users to maintain reactivation options.
Original PR description
**Steps to reproduce:** - Go to a Contact - Go to the actions dropdown menu of the record - Grant Portal Access - Revoke that Access - Create a new Website in the same Company that Portal Access was…
**Steps to reproduce:**
- Go to a Contact
- Go to the actions dropdown menu of the record
- Grant Portal Access
- Revoke that Access
- Create a new Website in the same Company that Portal Access was granted
- That Contact's user will be set as the Public User for the new Website
- New orders and other default public user behavior will be assigned to this user
- The user will be mentionned in non-logged interactions
**Issue:**
Archived portal user are set as public user when revoked, and the default public user of a website is set on create to the first public user it finds in `_get_public_user`:
```
public_users = self.env.ref('base.group_public').sudo().with_context(active_test=False).users
public_users_for_company = public_users.filtered(lambda user: user.company_id == self)
if public_users_for_company:
return public_users_for_company[0]
```
This seems to be an issue as such user can be reactivated or be assigned to some transactions it has not made (confidentiality issue).
**Fix:**
Not sure of the best way to fix this. We could ensure new website always creates a new public user, or find a better way to use by default the `self.env.ref('base.public_user')` (or its company-specific copies) for the company of the website during creation (or in `_get_public_user`).
For now the fix archive the revoked portal user (keeping its previous non-public groups), to still be able to reactivate it later on, without mistaking it for the default public user of a company.
Also we can't remove the `with_context(active_test=False)` as default public user always seems to be disabled.
related: https://github.com/odoo/odoo/commit/83e22fd0636748c4fe1058fb93adfad2623fc31b
*Reapply the reverted fix properly to avoid template issues and blocking flows (https://github.com/odoo/odoo/pull/239477 and https://github.com/odoo/odoo/pull/236462)*
opw-47605501 change
Resolved issues and error corrections
This update fixes an issue where SII invoices were not correctly formatted, preventing successful confirmation. The update replaces specific XML tags in the DTE template to align with SII's invoice requirements, ensuring invoices meet regulatory standards and avoid processing errors.
Original PR description
Link to SII API Documentation: https://www.sii.cl/factura_electronica/formato_dte.pdf Problem: The DTE template was using incorrect XML elements for withholdings when confirming an invoice with SII. This fix replaces: ImptRetOtrMnda -> ImpRetOtrMnda ValorImpOtrMnda -> VlrImpOtrMnda so the generated DTE matches SII specifications. OPW-5437484