Daily updates from Odoo
Friday, June 5, 2026
268 changes
22 changes
Resolved issues and error corrections
This update resolves an issue where refunded orders were still appearing in the 'orders to settle' list when the customer account balance was zero. The fix ensures that orders and their associated refunds are removed from this list when the customer account balance is fully reconciled, streamlining the settlement process for users.
Original PR description
Currently, if you refund an order made on the customer account with the customer account as well, you can still see the order in the list of orders to settle. Steps to reproduce: -------------------…
Currently, if you refund an order made on the customer account with the customer account as well, you can still see the order in the list of orders to settle. Steps to reproduce: ------------------- * Open shop * Make an order using the customer account for a customer, don't invoice it * Refund one of the order using the customer account, don't invoice it * Make a new order using the customer account * In the customer list, find the customer used and select "Settle Orders" > The 2 orders are present in the list Why the fix: ------------ Originally the list would only show the orders for chich the customers have due (>0). https://github.com/odoo/enterprise/commit/bf4b6043b999b4a081b1afa73fc4113bf4db28f8 But recently the code we also see the refunds in the list as well. https://github.com/odoo/enterprise/commit/12af23d5382e972facfaa999e4c5ab30c97e8d1f However this new behavior is not visible if, with the refund, the customer account temporarily falls to 0. So currently we have some refunds that impact the amount to settle and some that don't. Originally we were thinking that either we should show all refunds in that list (given they use the customer account) or we shouldn't show any as it was previously. Both solutions are not ideal. * Showing them all would get the list bigger than it is and would require the customer to select the order and its refund(s) and settle them together. Since refunds are not usually done right after the order they would not be close it that list. However this solution would enable the option to remove the orders from the list requiring a few step from the customer. * Showing none isn't idea either with this use case as it means that we still see orders that were cancelled out by their refunds. To remove to order the customer has two options. Either going backend and searching the order and its refund(s) and invoice them, either settling the order but that means that now there's money deposited on the customer account. Any of the two option isn't perfect a it still requires manual intervention from the customer and wouldn't work on previous data. Creating a server action to correct those data wouldn't have been feasible either. Instead, the approach we're taking is the following: When loading the list of order to settle we want to remove the orders and the potential refunds were the customer account is evened out. We only need to look at the orders of the partners that contains refunds for which the customer account was used. If the sum of the transactions made on the customer account is 0 we can say that the order and its refunds have cancelled out each other (in terms of customer account) and we don't show them if the list of orders remaining to settle. opw-6170830 Forward-Port-Of: odoo/enterprise#117725
This update fixes an issue where a recurring activity would be unnecessarily recreated after being marked as 'done'. The change prevents the system from re-creating the activity if it's already marked as completed, streamlining the process and improving efficiency. This ensures accurate scheduling and reduces potential errors.
Original PR description
When a next activity is set to done, the record is archived. So once the next activity set on the contract is set to done, the cron will re-create it the next day as it won't see it. So we add active_test=False, to be sure that one has not already been set to done --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268206
This update resolves a validation issue with the company's XBRL reports submitted to the NBB. The fix adds missing data points to ensure the reports pass validation, preventing potential delays or errors in reporting. This ensures compliance and accurate financial reporting.
Original PR description
This commit adds missing explanatory disclosure datapoints to the generated XBRL report. The missing disclosures resulted in failing validation when report is submitted to NBB. The datapoints are only added if the original value was non-zero. For example, the tangible assets disclosures are only added if the tangible assets in balance sheet is non-zero. Additionally, only disclosures that were reported as causing a failing validation were added. task-5977199 Forward-Port-Of: odoo/enterprise#117853
This update fixes an issue where check amounts weren't being properly rounded in the Philippines (PH) version of Odoo. Previously, the check amount in words displayed with an incorrect decimal format, including 'ONLY'. This change ensures that check amounts are rounded to the nearest cent, presenting a more accurate and professional representation of payments.
Original PR description
Current behaviour: --- When paying with checks, the amount is not rounded in the check amount in words string. Steps to reproduce: --- 1. Switch to PH company 2. Set setting Check Layout as "Print Check - PH" 3. Create a new vendor bill 4. Add a product with a specific price like 91490.15 5. Confirm the bill, click on Register Payment 6. Select Payment Method "Checks", Create Payment 7. Go to the payment, Amount in Words is wrong 8. Ninety-One Thousand Four Hundred Ninety And 15000000001/100 ONLY Expected behaviour: --- The decimal amount should be rounded, and "ONLY" shouldn't appear. Fix: --- Rounded the pay amount And backported: https://github.com/odoo/enterprise/commit/bb6c9848665709c14c5113b2c98976f869cd473b opw-6058344 Forward-Port-Of: odoo/enterprise#117679 Forward-Port-Of: odoo/enterprise#116717
This update corrects a flaw in the interval inversion function, ensuring it accurately handles various edge cases. The fix includes new test cases to guarantee correct behavior across a wider range of inputs, preventing potential errors in calculations.
Original PR description
The [commit] introduced the method for inverting the interval inside the given limits. The method was failing for the following edge cases: ```python >>> invert_intervals([(1, 2), (4, 5)], 0, 10)…
The [commit] introduced the method for inverting the interval inside the given limits. The method was failing for the following edge cases: ```python >>> invert_intervals([(1, 2), (4, 5)], 0, 10) result - [(2, 4), (5, 10)] expected - [(0, 1), (2, 4), (5, 10)]? >>> invert_intervals([(-2, -1)], 0, 10) result - [(0, 10)] expected - same >>> invert_intervals([(11, 12)], 0, 10) result - [] expected - [(0, 10)] >>> invert_intervals([(-1, 1), (2, 5), (8, 12)], 0, 10) result - [(1, 2), (5, 8)] expected - same >>> invert_intervals([(2, 5), (8, 12)], 0, 10) result - [(5, 8)] expected - [(0, 2), (5, 8)] >>> invert_intervals([(2, 5), (11, 12)], 0, 10) result - [] expected - [(0, 2), (5, 10)] ``` This commit fixes the function to correctly handle all the cases. The test cases are also added to test all the edge cases. [commit]: https://github.com/odoo/enterprise/commit/53450065be0c3ec9d648d4fd39ec3a9a912bd06c Forward-Port-Of: odoo/odoo#268161 Forward-Port-Of: odoo/odoo#267917
This update resolves an issue in the Lithuanian tax reporting module (l10n_lt) where certain calculations were incorrectly presented. The code has been adjusted to negate specific lines, ensuring accurate tax reporting for Lithuanian businesses. This fix improves the reliability of financial data.
Original PR description
Lines 29 to 34 in the tax report should be negated opw-5985774 Forward-Port-Of: odoo/odoo#259147
This update resolves an issue where the forum toolbar wasn't consistently visible or repositioning correctly within website forums, specifically when the forum was displayed inside an iframe. The fix ensures scroll events are properly detected within the iframe's view, guaranteeing the toolbar appears and adjusts correctly for all users.
Original PR description
Description of the issue: - In website forums, the toolbar was either not visible or did not reposition correctly after scrolling. Cause: - This issue occurred only in forums when an iframe was present. In that case, scroll events were not triggered on the window visual viewport, preventing toolbar repositioning. Solution: - Attached scroll events to the iframe’s visual viewport instead of the window visual viewport when an iframe is present. task-6201171 Forward-Port-Of: odoo/odoo#265221
This update resolves a bug that prevented quality checks from running correctly when modifying manufacturing operations on a sales order. The change adjusts how the system handles lot references, ensuring compatibility with recent Odoo updates and preventing errors related to outdated field names. This ensures quality checks function reliably after product modifications.
Original PR description
## Steps to reproduce: - Install the `quality_mrp` module. - Create a new product. - Create a Quality Point with: Type: Measure, Control per: Product/Operation Operations: Manufacturing - Create and…
## Steps to reproduce: - Install the `quality_mrp` module. - Create a new product. - Create a Quality Point with: Type: Measure, Control per: Product/Operation Operations: Manufacturing - Create and confirm MO for the product. - Update the Quality Point: Remove the 'manufacturing' operation type and add 'receipts' type. Change Control per to 'Quantity'. - Open the MO and start a quality check. - Enter an invalid measure and try to validate it. ## Error: `AttributeError - 'mrp.production' object has no attribute 'lot_producing_id'` ## Cause: Since commit https://github.com/odoo/odoo/commit/4bb4e08066449177f89382718ceadd840ce90d0e, the `lot_producing_id` field on MO was replaced by the Many2many field `lot_producing_ids`. Invalid references to the removed field lead to an error. ## Fix: This commit uses the first lot/serial from the MO. Note: Multiple produced lots are only possible for serial-tracked products. sentry-7511513479 Forward-Port-Of: odoo/enterprise#119231
This update ensures the 'New' button in Kanban views functions correctly when Odoo is operating offline. Previously, the button was always disabled, even when offline. Now, the system correctly checks for the availability of a full creation form view, allowing users to create new records seamlessly.
Original PR description
Before this commit, when working offline, the "New" button in a Kanban view was always disabled if quick create was not enabled. This occurred because the code incorrectly checked whether the quick create view had been previously visited online, rather than looking for the full fallback creation form view. This commit resolves the issue by correctly verifying if the creation form view itself was previously visited. Additionally, it ensures that if a custom action is specified for `on_create` (other than opening a standard form view or quick create), the button will remain disabled while offline.
This update fixes a technical issue where changing POS configurations within Odoo Enterprise caused a traceback error when opening preparation displays. The fix ensures that orders linked to old POS configurations are no longer processed, preventing this error and improving stability for users managing kitchen displays and order workflows.
Original PR description
Steps: = - Create a kitchen display linked to any one Point of Sale. - Open the POS, create a draft order, and send it to the kitchen display. - Open the kitchen display configuration from the backend and change the POS configuration to a different one. - Open the kitchen display again. Issue: = - A traceback occurs when opening the preparation display after changing the POS configuration while orders from the old configuration are still open and linked to selected kitchen display. Fix: = - Apply a POS config domain while fetching open orders for the preparation display to avoid processing orders from old configurations, eliminating the traceback. task-6196096
This update fixes an issue where the cost of goods sold (COGS) was incorrectly calculated when products were delivered and returned. Previously, returns were not properly accounted for, leading to inaccurate COGS figures. Now, returns are correctly deducted, ensuring accurate COGS calculations for invoices, particularly when dealing with multiple deliveries and returns.
Original PR description
When the cogs are computed using the Stock Moves values, we would not differentiate between deliveries and returns, taking both in the cogs value computation. This meant that when doing multiple…
When the cogs are computed using the Stock Moves values, we would not differentiate between deliveries and returns, taking both in the cogs value computation. This meant that when doing multiple deliveries with returns before posting the invoice, if the deliveries/returns had different cost, the COGS would be an average of all of them. Example: Delivery $10 -> Return $10 -> Delivery $20 ==> COGS $13.33
## HOW TO REPRODUCE
- Create Product FIFO Perpetual, cost=10, onHand=1
- Create Sale order for 1 unit
- Deliver and return
- Change cost from 10 to 20:
- Set on hand to 0
- Change product cost to 20
- Set on hand to 1
- Duplicate SO delivery and validate
- Create and Post Invoice => COGS == 13.33
## FIX EXPLANATION
Returns / Refunds are counted negatively.
So when we compute the moves value, instead of doing `(10 + 10 + 20) / (1 + 1 + 1)`, we do `(10 - 10 + 20) / (1 - 1 + 1)`.
We need to propagate this logic to the cogs quantity, so that we don't believe that we invoiced 3 units while only 1 (1-1+1) was delivered.
---
Note:
For the update in test `test_fifo_delivered_invoice_post_delivery_with_return`, I put back the original values modified by 5978bc5dc683d317f4ab87f6c9c9d843568bf4ea
---
<img width="1852" height="363" alt="image" src="https://github.com/user-attachments/assets/ea9f16b2-a818-4c21-b3c3-aa296792f477" />
<img width="1203" height="787" alt="image" src="https://github.com/user-attachments/assets/7348d15a-b840-4ee0-b1da-2b954cdb3d5e" />
---
## Test result without fix:
```
2026-05-28 11:57:45,899 36667 INFO oes_test_19.0 odoo.addons.sale_stock.tests.test_anglo_saxon_valuation: Starting TestAngloSaxonValuation.test_fifo_invoice_with_delivery_with_return ...
2026-05-28 11:57:47,138 36667 INFO oes_test_19.0 odoo.addons.sale_stock.tests.test_anglo_saxon_valuation: ======================================================================
2026-05-28 11:57:47,138 36667 ERROR oes_test_19.0 odoo.addons.sale_stock.tests.test_anglo_saxon_valuation: FAIL: TestAngloSaxonValuation.test_fifo_invoice_with_delivery_with_return
Traceback (most recent call last):
File "/home/odoo/Odoo/src/19.0/odoo/addons/sale_stock/tests/test_anglo_saxon_valuation.py", line 1099, in test_fifo_invoice_with_delivery_with_return
self.assertRecordValues(invoice.line_ids, [
File "/home/odoo/Odoo/src/19.0/odoo/odoo/tests/common.py", line 727, in assertRecordValues
self.assertSequenceEqual(expected_reformatted, record_reformatted, seq_type=list)
AssertionError: Lists differ: [{'ac[22 chars]t': 0, 'credit': 50}, {'account_id': 9141, 'de[114 chars]: 0}] != [{'ac[22 chars]t': 0.0, 'credit': 50.0}, {'account_id': 9141,[132 chars]0.0}]
First differing element 2:
{'account_id': 9138, 'debit': 0, 'credit': 20}
{'account_id': 9138, 'debit': 0.0, 'credit': 13.33}
- [{'account_id': 9162, 'credit': 50, 'debit': 0},
+ [{'account_id': 9162, 'credit': 50.0, 'debit': 0.0},
? ++ ++
- {'account_id': 9141, 'credit': 0, 'debit': 50},
+ {'account_id': 9141, 'credit': 0.0, 'debit': 50.0},
? ++ ++
- {'account_id': 9138, 'credit': 20, 'debit': 0},
? ^^
+ {'account_id': 9138, 'credit': 13.33, 'debit': 0.0},
? ^^^^^ ++
- {'account_id': 9168, 'credit': 0, 'debit': 20}]
? ^^
+ {'account_id': 9168, 'credit': 0.0, 'debit': 13.33}]
? ++ ^^^^^
```
---
OPW-6213321
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#268128
Forward-Port-Of: odoo/odoo#266917This update dynamically adjusts the number of pages processed when uploading PDFs to the AI chat feature. Previously, uploads were limited to 5 pages. Now, the system can handle entire documents, improving the efficiency of AI-powered conversations. This change ensures agents can fully utilize the AI's capabilities with PDF attachments.
Original PR description
Prior to this commit, when uploading a document (i.e. during a chat with an agent). Only a part of its pages would get parsed and sent to the API (5 pages). With this commit, the number of pages is made dynamic by the use of a new context key `ai_max_pdf_pages`. This variable is still set for the document autosorting features since it is not required to read the full document. Default value is None (no limit). Forward-Port-Of: odoo/enterprise#119338
This update resolves an issue preventing Verifactu documents from being generated when invoicing a Point of Sale order directly. Previously, the system required a cancellation step before invoicing, which caused errors. Now, the system correctly handles invoicing directly, ensuring Verifactu documents are created seamlessly.
Original PR description
**Steps to reproduce:** - Setup a Verifactu installation and a Spanish company - Go to the PoS, make a Sale - Keep the ticket - Go to the /pos/ticket URL and enter the ticket informations - Last step…
**Steps to reproduce:** - Setup a Verifactu installation and a Spanish company - Go to the PoS, make a Sale - Keep the ticket - Go to the /pos/ticket URL and enter the ticket informations - Last step also works when requesting an invoice in the backend on the order - Go to the order in the backend, an error is shown, the cancellation didn't go through **Veri*Factu documents can only be generated for paid or posted Point of Sale Orders.** **Why the fix:** When we directly invoice an order, we do not go through the verification of being paid and done. This is why is works, but when making the invoice after the sale is done, we cancel the order first, then we register the invoice instead. When trying to cancel the order, we check if the order is either paid or done, but it is currently invoiced as we just generated the invoice. We now allow no errors if the order is in the invoiced state, and let it pass through. With this flow we get the same result as the direct invoice from the PoS. The new cancellation on the order and submission on the invoice may take a bit of time to get accepted but they will be eventually. opw-6139200 Forward-Port-Of: odoo/odoo#267869 Forward-Port-Of: odoo/odoo#264272
This update corrects an issue with the data sent to UrbanPiper for store updates, ensuring accurate store information is transmitted. Additionally, a previously removed test case has been restored, and the delivery provider is now hidden from payment method views. These changes improve the reliability and presentation of UrbanPiper integration.
Original PR description
Fixes the UrbanPiper store timings payload used in store update requests. Also restores the preparation display assertion in `test_01_order_flow`, which was accidentally removed during refactoring. Additionally, hides the delivery provider in the payment method view. Task-6065459 Runbot Err-[242023](https://runbot.odoo.com/odoo/error/242023)
This update resolves an issue where validating delivery costs on confirmed sales orders (with 'Lock Confirmed Sales' enabled) would trigger an error. The fix prevents the system from incorrectly applying carrier prices to delivery lines when a real-cost invoicing policy is used, ensuring smooth order processing even on locked sales.
Original PR description
Sale module has setting `Lock Confirmed Sales`, which particularly doesn't allow order line modification on a confirmed order. However, when a delivery carrier is set up with Invoicing Policy = Real cost, validating the picking pushes the actual carrier price onto the delivery line, writing `price_unit` and `name`. On a locked SO this raises a UserError. Fix it by excluding the delivery line's `price_unit` and `name` from the protected fields, only when the write originates from `_add_delivery_cost_to_so`. The code path is identified by the context `allow_delivery_cost_update`, so a regular UI edit of those fields on a locked SO is still blocked. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266511 Forward-Port-Of: odoo/odoo#265721
This update resolves an issue where users were blocked from uploading documents to requests linked to records they didn't have full access to. By adding a special permission bypass, users can now upload documents regardless of their access level to the related record, improving usability and workflow efficiency.
Original PR description
Issue: Users are currently blocked from uploading requested documents if the request is linked to a record they do not have access to (e.g., User A links Record X to a request assigned to User B, but User B lacks read/write access to Record X). The system throws an error because the user cannot create an attachment for that record. Fix: Add .sudo() on the attachment creation process. task-6107099 Forward-Port-Of: odoo/enterprise#113698
This update fixes an issue where payments for Mexican invoices were being sent to CFDI multiple times, leading to inaccurate payment records. The change ensures the 'Update Payments' button only appears after the invoice payment is fully reconciled, preventing duplicate submissions and maintaining accurate financial reporting.
Original PR description
Issue: Sending payments to SAT before its full amount is reconciled allow sending the same invoice payment several times to CFDI. Steps to reproduce: - In a Mexican company - Create an invoice A of…
Issue: Sending payments to SAT before its full amount is reconciled allow sending the same invoice payment several times to CFDI. Steps to reproduce: - In a Mexican company - Create an invoice A of $40 to Inmobiliaria CVA - Confirm and send to CFDI - Go to bank, create a new Bank transaction of $80 - reconcile with Invoice A - Go to invoice A => click on button "Update payments" (it doesn't appear in previous versions) - Then sheet CFDI and Download There is the first XML sent to CFDI with payment for invoice A - Create an invoice B of $40 to Inmobilira CVA - Confirm and send to CFDI - reconcile the transaction with Invoice B - Go to invoice B - Click on button "Update payments" - Then sheet CFDI and Download There is the second XML sent to CFDI with payment for invoices A and B Invoice A payment was sent twice to CFDI Expected behavior: - The "Update payment" button should appear only once the invoice payment is fully reconciled. Current behavior: - The update payment button appear once the invoice is reconciled with a payment. The method `_l10n_mx_edi_cfdi_invoice_get_payments_diff` is called twice, once to check whether it's needed to display the "Update button" and once when you try to update the payment (called only after clicking on said button). opw-5432421 Forward-Port-Of: odoo/enterprise#119244 Forward-Port-Of: odoo/enterprise#108355
This update prevents incorrect tax calculations on COGS lines generated from vendor bills. Previously, manual tax adjustments were overwritten due to the system applying product taxes to these internal operations. This change ensures COGS lines accurately reflect internal costs without tax implications.
Original PR description
Issue: After manually modifying the taxes on a vendor bill that generates COGS lines, confirming the vendor bill causes the taxes to revert to their original values before the manual edit. This…
Issue: After manually modifying the taxes on a vendor bill that generates COGS lines, confirming the vendor bill causes the taxes to revert to their original values before the manual edit. This happens because the product’s purchase taxes are applied to the generated COGS lines, which triggers the tax recomputation logic and overwrites the manually adjusted tax amounts. However, COGS lines represent internal operations and should not have taxes applied to them Steps to reproduce: 1. Turn on Anglo-Saxon accounting 2. Turn on automatic accounting 3. Make a FIFO product category and make the valuation automatic 4. Make a new product and set the FIFO product category on it 5. Make sure the product has a vendor tax set 6. Make a purchase order for 10 of the FIFO product category at $10 7. Create and validate the receipt for 10 8. Make a sales order for 6 of the FIFO product category at $10 9. Create and validate the delivery for 6 10. Create the vendor bill for 10 the purchase order created above (make sure that there is a tax set on the vendor bill; the vendor tax that was set on the product). Make this vendor bill set for 10 at $20 11. Edit the tax at the bottom of the total 12. Confirm the vendor bill 13. Notice that the tax at the bottom of the total changes 14. Reset the vendor bill 15. Remove the purchase tax from the product 16. Confirm the vendor bill again and notice that the tax at the bottom of the total does not change this time Cause: On confirmation, the COGS lines on the vendor bill will be generated and “_compute_tax_ids” will be triggered on those lines. Since COGS lines have a “product_id” set on them, those lines will receive the purchase tax set on the product. Setting the “tax_ids” on those COGS lines will cause tax computation to trigger again, which will reset the manually edited tax amount to the new computed amount. However, since COGS lines come in pairs that are equal and opposite in amount, the taxes from both COGS lines will cancel out, and the new computed tax amount does not change Solution: Skip setting the purchase taxes of the product onto COGS lines in “_compute_tax_ids” opw-6110692 Forward-Port-Of: odoo/odoo#268434 Forward-Port-Of: odoo/odoo#265352
This update fixes a crash issue in the Point of Sale interface when a large number of customers are stored in the browser cache. The change limits the number of partners rendered during searches, improving performance and stability, particularly when dealing with extensive customer lists. This ensures a smoother user experience for POS operations.
Original PR description
Currently, it's possible to experience very slow loading speed of the partner list and/or browser crashes in the POS when there are thousands of customers stored in the browser cache. This appears to…
Currently, it's possible to experience very slow loading speed of the partner list and/or browser crashes in the POS when there are thousands of customers stored in the browser cache.
This appears to be caused by a few reasons compounding together:
1. While we limit the number of customers in the initial render of the list, there is no limit during the search. Therefore, if there are thousands of customers matching the search pattern loaded in the browser cache, the browser will attempt to render equally as many `PartnerLine` components.
2. A 100 ms debounce time is fast enough to trigger the render after each key stroke. 200~300ms is the industry standard for Software UI debounce.
3. For each customer rendered in the list, we may perform a search for its parent partner amongst all loaded customers with the function `PosStore.getPartnerCredit()`.
This PR aims at reducing the number of partner lines rendered in a short period of time and thus, at improving speed and avoiding crashes.
Steps to reproduce:
1. Create a fresh db + install the point_of_sale with demo data
2. Populate the res.partner model by a factor of 100 to reach 4000+ partners
3. Update the following system parameter to make sure that we load all partners in the browser cache when we open the POS session:
- `point_of_sale.limited_customer_count` -> 5000
4. Open a POS session and and click on the `Customer` button to render the partner list
5. Type `adm` in the search bar at normal typing speed
6. Crash
Ticket: opw-5435973
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#258667This update fixes an error in the import of Italian vendor invoices (l10n_it_edi) where pension fund tax was incorrectly applied to all invoice lines with the same VAT rate. The fix extracts the specific tax exemption reason from the invoice data, ensuring the correct tax is applied to the first line, leading to accurate financial reporting.
Original PR description
In `l10n_it_edi` vendor bill import, the pension fund tax was incorrectly applied to all invoice lines sharing the same VAT rate, even though they have different `l10n_it_tax_exemption_reason`s, resulting in wrong entries and document total. We now extract the Tax Exemption reason from the `DatiCassaPrevidenziale` node, and use it to search the correct tax. Steps to reproduce: 1. Install `account` and `l10n_edi_it` 2. In the `4% INPS` tax, set `TC22` in pension fund type and `N2.2` in exoneration 3. Import bill from the ticket 4. See the pension fund tax is applied to all the lines. It should only be applied only to the first one. Ticket [link](https://www.odoo.com/odoo/project.task/6212975) opw-6212975 Forward-Port-Of: odoo/odoo#267066 Forward-Port-Of: odoo/odoo#265821
This update resolves a potential error that could occur when creating new PDP reporting flows. Previously, the system would crash if it tried to compare dates when the due period dates were initially empty. This fix ensures the system handles missing dates gracefully, improving the stability and reliability of the reporting process.
Original PR description
PDP reporting flows compute their period status from the due period dates. On a new or incomplete flow record, those dates can still be empty during form/onchange initialization. The compute then tried to compare today's date with `False`, which could crash generic form creation. This patch makes the compute handle missing period dates before doing date comparisons. runbot.build.error-939459 Forward-Port-Of: odoo/odoo#268002
This update prevents Odoo from crashing when the Barcode Lookup API returns a broken image URL. Previously, an invalid URL would cause an error. Now, the system gracefully handles these errors, safely ignoring the bad URL and continuing to function correctly.
Original PR description
[FIX] product_barcodelookup: avoid crash on invalid image URLs **Steps to Reproduce:** - Install Sales module. - Configure a valid Barcode Lookup API key. - Create a product without an image. - Set a…
[FIX] product_barcodelookup: avoid crash on invalid image URLs
**Steps to Reproduce:**
- Install Sales module.
- Configure a valid Barcode Lookup API key.
- Create a product without an image.
- Set a barcode whose returned image URL is broken or returns HTTP 404
(e.g. `8426904171073`).
- Select the product and trigger the server action:
`Action -> Get Pictures from Barcode Lookup`
Issue:
**During image fetching:**
- Barcode Lookup API successfully returns product data and image URLs.
- `_get_image_from_url()` attempts to download the image.
- The image URL responds with HTTP 404.
- `barcode_lookup_request()` returns a dict for non-200 responses.
- `_get_image_from_url()` assumes the response is always a `requests.Response`
object and directly accesses: `response.status_code`
- This causes: `AttributeError: 'dict' object has no attribute 'status_code'`
**Root Cause:**
- `barcode_lookup_request()` returns inconsistent response types:
- `requests.Response` for successful requests
- `dict` for failed requests
- _get_image_from_url() does not handle the dict response before accessing
response attributes.
**Solution:**
- Make barcode_lookup_request() always return a One Response
object.
- Move the response validation to the callers instead of returning custom
dict objects.
**Result:**
- No RPC crash when image URLs are invalid or return 404.
- Broken image URLs are safely ignored.
**OPW-6200749**
Forward-Port-Of: odoo/enterprise#11692518 changes
Resolved issues and error corrections
This update fixes a visual issue where alert content was misaligned in the Odoo portal. The problem stemmed from styling applied to the alert elements, which has now been removed. This ensures a cleaner and more professional appearance for portal users.
Original PR description
The alert content is misaligned these changes are side effects of commit[1], the `h5` and `p` in the alert have margin that creates whitespace in the alert. Commit[2] addressed a misalignment issue and alignment issue due to nested `row` but these became irrelevant with commit[1]. This is why we remove the styling. task-5262108 [1]: odoo/odoo@513931a5e540f22f37e317f80fd131701cbbc8f0 [2]: odoo/odoo@d64dbaadcb1bef27d89a89e9d42bdb38890c73e0 | Before | After | |--------|--------| | <img width="1029" height="523" alt="image" src="https://github.com/user-attachments/assets/ff3f827b-652a-4a84-ad7e-205200cf3256" />| <img width="1022" height="486" alt="image" src="https://github.com/user-attachments/assets/b86163d8-bedd-4cb6-a950-ba36a6b401ee" /> | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267776
This update resolves a technical issue within the Odoo interval inversion function that was causing incorrect results for specific input scenarios. The fix ensures accurate interval calculations across a wider range of values, improving the reliability of this core tool. The changes include added test cases to verify the corrected functionality.
Original PR description
The [commit] introduced the method for inverting the interval inside the given limits. The method was failing for the following edge cases: ```python >>> invert_intervals([(1, 2), (4, 5)], 0, 10)…
The [commit] introduced the method for inverting the interval inside the given limits. The method was failing for the following edge cases: ```python >>> invert_intervals([(1, 2), (4, 5)], 0, 10) result - [(2, 4), (5, 10)] expected - [(0, 1), (2, 4), (5, 10)]? >>> invert_intervals([(-2, -1)], 0, 10) result - [(0, 10)] expected - same >>> invert_intervals([(11, 12)], 0, 10) result - [] expected - [(0, 10)] >>> invert_intervals([(-1, 1), (2, 5), (8, 12)], 0, 10) result - [(1, 2), (5, 8)] expected - same >>> invert_intervals([(2, 5), (8, 12)], 0, 10) result - [(5, 8)] expected - [(0, 2), (5, 8)] >>> invert_intervals([(2, 5), (11, 12)], 0, 10) result - [] expected - [(0, 2), (5, 10)] ``` This commit fixes the function to correctly handle all the cases. The test cases are also added to test all the edge cases. [commit]: https://github.com/odoo/enterprise/commit/53450065be0c3ec9d648d4fd39ec3a9a912bd06c Forward-Port-Of: odoo/odoo#268161 Forward-Port-Of: odoo/odoo#267917
This update resolves an issue with the tax report generated for Lithuanian businesses. Specifically, a technical correction was made to ensure accurate tax calculations by negating certain lines within the report data. This ensures compliance with Lithuanian tax regulations and improves the reliability of financial reporting.
Original PR description
Lines 29 to 34 in the tax report should be negated opw-5985774 Forward-Port-Of: odoo/odoo#259147
This update resolves an issue where the forum toolbar wasn't consistently visible or repositioning correctly within website forums, specifically when content was displayed in an iframe. The fix ensures scroll events are properly triggered within the iframe's view, guaranteeing the toolbar appears and adjusts correctly for all users.
Original PR description
Description of the issue: - In website forums, the toolbar was either not visible or did not reposition correctly after scrolling. Cause: - This issue occurred only in forums when an iframe was present. In that case, scroll events were not triggered on the window visual viewport, preventing toolbar repositioning. Solution: - Attached scroll events to the iframe’s visual viewport instead of the window visual viewport when an iframe is present. task-6201171 Forward-Port-Of: odoo/odoo#265221
This update resolves an issue where extra spaces within code blocks were incorrectly displayed as ` ` characters. The fix converts these ` ` characters to regular spaces, ensuring accurate syntax highlighting and a cleaner user experience when creating code blocks in To-Do items.
Original PR description
Step to reproduce: - Go to To-Do → Create New - Type text with multiple consecutive spaces in the same line - In the same line → insert a /code block Description of the issue: Multiple spaces are converted into ` ` inside the code block. Cause: When the code block is processed for syntax highlighting, its `innerHTML` is used as the source text. During this process, ` ` is not handled as a result it remains as literal text, so syntax highlighting displays ` ` instead of a normal space. Solution: Convert ` ` into a normal space before the content is used for syntax highlighting. task-6184686 Forward-Port-Of: odoo/odoo#267299 Forward-Port-Of: odoo/odoo#263053
This update resolves an error that occurred when updating quality checks on Manufacturing Orders (MOs). The change adjusts how the system handles lot references, ensuring compatibility after a previous update. This prevents quality checks from failing due to outdated data.
Original PR description
## Steps to reproduce: - Install the `quality_mrp` module. - Create a new product. - Create a Quality Point with: Type: Measure, Control per: Product/Operation Operations: Manufacturing - Create and…
## Steps to reproduce: - Install the `quality_mrp` module. - Create a new product. - Create a Quality Point with: Type: Measure, Control per: Product/Operation Operations: Manufacturing - Create and confirm MO for the product. - Update the Quality Point: Remove the 'manufacturing' operation type and add 'receipts' type. Change Control per to 'Quantity'. - Open the MO and start a quality check. - Enter an invalid measure and try to validate it. ## Error: `AttributeError - 'mrp.production' object has no attribute 'lot_producing_id'` ## Cause: Since commit https://github.com/odoo/odoo/commit/4bb4e08066449177f89382718ceadd840ce90d0e, the `lot_producing_id` field on MO was replaced by the Many2many field `lot_producing_ids`. Invalid references to the removed field lead to an error. ## Fix: This commit uses the first lot/serial from the MO. Note: Multiple produced lots are only possible for serial-tracked products. sentry-7511513479 Forward-Port-Of: odoo/enterprise#119231
This update fixes an error in the import of Italian vendor invoices (l10n_it_edi) where pension fund tax was incorrectly applied to all invoice lines with the same VAT rate. The fix now accurately extracts the tax exemption reason from the invoice data, ensuring the correct tax is applied to each line, leading to accurate financial reporting.
Original PR description
In `l10n_it_edi` vendor bill import, the pension fund tax was incorrectly applied to all invoice lines sharing the same VAT rate, even though they have different `l10n_it_tax_exemption_reason`s, resulting in wrong entries and document total. We now extract the Tax Exemption reason from the `DatiCassaPrevidenziale` node, and use it to search the correct tax. Steps to reproduce: 1. Install `account` and `l10n_edi_it` 2. In the `4% INPS` tax, set `TC22` in pension fund type and `N2.2` in exoneration 3. Import bill from the ticket 4. See the pension fund tax is applied to all the lines. It should only be applied only to the first one. Ticket [link](https://www.odoo.com/odoo/project.task/6212975) opw-6212975 Forward-Port-Of: odoo/odoo#267066 Forward-Port-Of: odoo/odoo#265821
This update resolves an issue where Verifactu document generation would fail when invoicing an order after it had been created in the Point of Sale. The fix allows invoicing directly, mirroring the original PoS flow, and ensures the cancellation process works correctly. It's a minor improvement that streamlines invoice generation.
Original PR description
**Steps to reproduce:** - Setup a Verifactu installation and a Spanish company - Go to the PoS, make a Sale - Keep the ticket - Go to the /pos/ticket URL and enter the ticket informations - Last step…
**Steps to reproduce:** - Setup a Verifactu installation and a Spanish company - Go to the PoS, make a Sale - Keep the ticket - Go to the /pos/ticket URL and enter the ticket informations - Last step also works when requesting an invoice in the backend on the order - Go to the order in the backend, an error is shown, the cancellation didn't go through **Veri*Factu documents can only be generated for paid or posted Point of Sale Orders.** **Why the fix:** When we directly invoice an order, we do not go through the verification of being paid and done. This is why is works, but when making the invoice after the sale is done, we cancel the order first, then we register the invoice instead. When trying to cancel the order, we check if the order is either paid or done, but it is currently invoiced as we just generated the invoice. We now allow no errors if the order is in the invoiced state, and let it pass through. With this flow we get the same result as the direct invoice from the PoS. The new cancellation on the order and submission on the invoice may take a bit of time to get accepted but they will be eventually. opw-6139200 Forward-Port-Of: odoo/odoo#267869 Forward-Port-Of: odoo/odoo#264272
This update resolves an issue where PDP reporting flows could fail during form creation when due period dates were initially empty. The fix ensures the system handles missing dates gracefully before comparing them, preventing crashes and improving overall stability. This ensures accurate reporting for new and incomplete PDP flows.
Original PR description
PDP reporting flows compute their period status from the due period dates. On a new or incomplete flow record, those dates can still be empty during form/onchange initialization. The compute then tried to compare today's date with `False`, which could crash generic form creation. This patch makes the compute handle missing period dates before doing date comparisons. runbot.build.error-939459 Forward-Port-Of: odoo/odoo#268002
This update resolves an issue where Romanian E-Factura invoices were being rejected due to exceeding character limits for product names, descriptions, and notes. The system has been updated to enforce a maximum of 100 characters for names, 200 for descriptions, and 300 for notes, ensuring compliance with Romanian regulations. This prevents invoice errors and successful E-Factura transmission.
Original PR description
**Steps to reproduce:** - Install Accounting and l10n_ro_edi - Switch to a Romanian localization (e.g. RO Company) - Configure Romanian E-Factura - Create an invoice with a product having a name…
**Steps to reproduce:** - Install Accounting and l10n_ro_edi - Switch to a Romanian localization (e.g. RO Company) - Configure Romanian E-Factura - Create an invoice with a product having a name longer than 100 chars - Confirm the invoice - Send E-Factura to SPV - Fetch E-Factura status **Issue:** The invoice is rejected with the following error: "[BR-RO-L100]-The allowed maximum number of characters for the Item name (BT-153) is 100." **Similar issue with the product description:** "[BR-RO-L200]-The allowed maximum number of characters for the Item description (BT-154) is 200." **Similar issue with the note (i.e. Terms and Conditions):** "[BR-RO-L300]-The allowed maximum number of characters for the Invoice note (BT-22) is 300." **Solution:** Truncate the name of the product to 100 chars in the electronic invoice, the description of the product to 200 and the note to 300. opw-5964904 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268192 Forward-Port-Of: odoo/odoo#265811
This update resolves a problem where validating delivery costs on confirmed sales orders (with real-cost carrier pricing) would trigger an error. The fix prevents the system from incorrectly updating delivery line prices and names on locked orders, ensuring smooth order processing. This improves the user experience for sales teams managing confirmed orders.
Original PR description
Sale module has setting `Lock Confirmed Sales`, which particularly doesn't allow order line modification on a confirmed order. However, when a delivery carrier is set up with Invoicing Policy = Real cost, validating the picking pushes the actual carrier price onto the delivery line, writing `price_unit` and `name`. On a locked SO this raises a UserError. Fix it by excluding the delivery line's `price_unit` and `name` from the protected fields, only when the write originates from `_add_delivery_cost_to_so`. The code path is identified by the context `allow_delivery_cost_update`, so a regular UI edit of those fields on a locked SO is still blocked. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266511 Forward-Port-Of: odoo/odoo#265721
This update resolves an issue where users were blocked from uploading documents to requests linked to records they didn't have full access to. By adding a special permission bypass, the system now allows uploads regardless of user access rights, streamlining the document request process. This ensures users can contribute documents even when dealing with records requiring specific permissions.
Original PR description
Issue: Users are currently blocked from uploading requested documents if the request is linked to a record they do not have access to (e.g., User A links Record X to a request assigned to User B, but User B lacks read/write access to Record X). The system throws an error because the user cannot create an attachment for that record. Fix: Add .sudo() on the attachment creation process. task-6107099 Forward-Port-Of: odoo/enterprise#113698
This update simplifies how Odoo determines user locations. It reverts a previous change and now defaults to using the user's recorded city if a country cannot be identified. This improves location accuracy and reliability, particularly in areas with incomplete geo-location data.
Original PR description
This reverts commit fd7e3393158fc637c555f612a54f3e8c7c72bd96. Then we provide a simpler fix by defaulting to the city record if a country cannot be resolved. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a performance issue in the Point of Sale interface where a large number of customers in the browser cache could cause slow loading and browser crashes. The change limits the number of partners rendered during searches, improving speed and stability for users.
Original PR description
Currently, it's possible to experience very slow loading speed of the partner list and/or browser crashes in the POS when there are thousands of customers stored in the browser cache. This appears to…
Currently, it's possible to experience very slow loading speed of the partner list and/or browser crashes in the POS when there are thousands of customers stored in the browser cache.
This appears to be caused by a few reasons compounding together:
1. While we limit the number of customers in the initial render of the list, there is no limit during the search. Therefore, if there are thousands of customers matching the search pattern loaded in the browser cache, the browser will attempt to render equally as many `PartnerLine` components.
2. A 100 ms debounce time is fast enough to trigger the render after each key stroke. 200~300ms is the industry standard for Software UI debounce.
3. For each customer rendered in the list, we may perform a search for its parent partner amongst all loaded customers with the function `PosStore.getPartnerCredit()`.
This PR aims at reducing the number of partner lines rendered in a short period of time and thus, at improving speed and avoiding crashes.
Steps to reproduce:
1. Create a fresh db + install the point_of_sale with demo data
2. Populate the res.partner model by a factor of 100 to reach 4000+ partners
3. Update the following system parameter to make sure that we load all partners in the browser cache when we open the POS session:
- `point_of_sale.limited_customer_count` -> 5000
4. Open a POS session and and click on the `Customer` button to render the partner list
5. Type `adm` in the search bar at normal typing speed
6. Crash
Ticket: opw-5435973
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#258667This update resolves an issue where inserting certain website snippets (like alerts) within restricted editable areas created invalid HTML. The fix prevents the snippet from being broken down into smaller elements, ensuring the website builder generates valid and functional code. This improves the reliability and usability of the website design tool.
Original PR description
### [FIX] website: prevent inserting block snippet with powerbox in inlines Inserting block snippet with powerbox when the selection is inside an editable part limited to an element that can only…
### [FIX] website: prevent inserting block snippet with powerbox in inlines Inserting block snippet with powerbox when the selection is inside an editable part limited to an element that can only contain inline nodes leads to invalid html (like `<div>` inside `<span>`). This commit disables insertion of block snippets when the selection is such a part of the document. Steps to reproduce: - Open website builder - Put cursor in "copyright" at the bottom of the footer - Type `/alert` and press enter - Bug: `<div>` element is inserted inside `<span>`, that is invalid html task-6259092 ### [FIX] website: prevent unwrapping `s_blockquote` on insert with powerbox When the snippet `s_blockquote` was inserted with the powerbox or pasted from clipboard in an unbreakable element which does not allow blocks as children, the `<blockquote>` element itself was abandonned and its children were inserted instead. This lead to insertion of a broken snippet. This commit marks the `s_blockquote` snippet as "unsplittable" so that always stays in one piece when inserted. Steps to reproduce: - Open website builder - Put cursor in a link - Type `/blockquote` and press enter - Bug: the snippet's children are inserted, instead of snippet itself task-6259092 Forward-Port-Of: odoo/odoo#267111
This update prevents Odoo from crashing when the Barcode Lookup API returns a broken image URL. Previously, an invalid URL would cause an error. Now, the system safely ignores these errors and continues to function correctly, ensuring a smoother user experience.
Original PR description
[FIX] product_barcodelookup: avoid crash on invalid image URLs **Steps to Reproduce:** - Install Sales module. - Configure a valid Barcode Lookup API key. - Create a product without an image. - Set a…
[FIX] product_barcodelookup: avoid crash on invalid image URLs
**Steps to Reproduce:**
- Install Sales module.
- Configure a valid Barcode Lookup API key.
- Create a product without an image.
- Set a barcode whose returned image URL is broken or returns HTTP 404
(e.g. `8426904171073`).
- Select the product and trigger the server action:
`Action -> Get Pictures from Barcode Lookup`
Issue:
**During image fetching:**
- Barcode Lookup API successfully returns product data and image URLs.
- `_get_image_from_url()` attempts to download the image.
- The image URL responds with HTTP 404.
- `barcode_lookup_request()` returns a dict for non-200 responses.
- `_get_image_from_url()` assumes the response is always a `requests.Response`
object and directly accesses: `response.status_code`
- This causes: `AttributeError: 'dict' object has no attribute 'status_code'`
**Root Cause:**
- `barcode_lookup_request()` returns inconsistent response types:
- `requests.Response` for successful requests
- `dict` for failed requests
- _get_image_from_url() does not handle the dict response before accessing
response attributes.
**Solution:**
- Make barcode_lookup_request() always return a One Response
object.
- Move the response validation to the callers instead of returning custom
dict objects.
**Result:**
- No RPC crash when image URLs are invalid or return 404.
- Broken image URLs are safely ignored.
**OPW-6200749**
Forward-Port-Of: odoo/enterprise#116925This update fixes an issue where discounts entered with a comma (used in some regions) were incorrectly interpreted as zero. The change ensures that discount values, regardless of the decimal separator used, are accurately applied to orders, preventing revenue loss and ensuring correct pricing.
Original PR description
Before this commit, if comma was used as decimal separator, the fixed discount valu was added to the order as zero discount. opw-6268557 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267954
This update optimizes how Odoo recalculates styles in large tables, like the Accounting > Balances Sheets. By using a more targeted approach, the system now responds faster during window resizing, scrolling, and sorting, leading to a smoother user experience.
Original PR description
Avoid using the :has() selector and use a specific class on the body instead to replicate the same behavior. This reduces work during the "Recalculate Style" phase (for example when hovering rows in large tables such as the Accounting > Balances Sheets). It lowers recalculation time during window resizes, heavy scrolling, and table sorting by preventing broad selector matches and limiting style checks to elements with the specific class. similar fix: https://github.com/odoo/enterprise/pull/118535 Forward-Port-Of: odoo/odoo#266954
16 changes
Resolved issues and error corrections
This update streamlines the order placement process in our Point of Sale system by running background syncing instead of waiting for preparation requests. This prevents delays and allows users to seamlessly transition back to the floor screen. The changes also ensure accurate order tracking and prevent users from selecting tables while orders are still syncing.
Original PR description
### Before this commit: - Clicking the Order button waited for preparation-related RPC calls, delaying the transition back to the floor screen. - Tables could still be selected while their orders were syncing. - syncingOrders used order.id, which caused inconsistent tracking. ### After this commit: - Order submission no longer blocks the UI; sync runs in the background. - syncingOrders now uses order.uuid for consistent tracking. - Tables being synced are marked and cannot be selected. - Fixed course deselection to use the correct order instance. - Updated tests to ignore syncing tables. Task:6030427 Forward-Port-Of: odoo/odoo#256883
This update prevents Odoo from crashing when the Barcode Lookup API returns a broken image URL. Previously, an invalid URL would cause an error. Now, the system safely ignores these errors, ensuring the product image retrieval process continues smoothly without disrupting operations.
Original PR description
[FIX] product_barcodelookup: avoid crash on invalid image URLs **Steps to Reproduce:** - Install Sales module. - Configure a valid Barcode Lookup API key. - Create a product without an image. - Set a…
[FIX] product_barcodelookup: avoid crash on invalid image URLs
**Steps to Reproduce:**
- Install Sales module.
- Configure a valid Barcode Lookup API key.
- Create a product without an image.
- Set a barcode whose returned image URL is broken or returns HTTP 404
(e.g. `8426904171073`).
- Select the product and trigger the server action:
`Action -> Get Pictures from Barcode Lookup`
Issue:
**During image fetching:**
- Barcode Lookup API successfully returns product data and image URLs.
- `_get_image_from_url()` attempts to download the image.
- The image URL responds with HTTP 404.
- `barcode_lookup_request()` returns a dict for non-200 responses.
- `_get_image_from_url()` assumes the response is always a `requests.Response`
object and directly accesses: `response.status_code`
- This causes: `AttributeError: 'dict' object has no attribute 'status_code'`
**Root Cause:**
- `barcode_lookup_request()` returns inconsistent response types:
- `requests.Response` for successful requests
- `dict` for failed requests
- _get_image_from_url() does not handle the dict response before accessing
response attributes.
**Solution:**
- Make barcode_lookup_request() always return a One Response
object.
- Move the response validation to the callers instead of returning custom
dict objects.
**Result:**
- No RPC crash when image URLs are invalid or return 404.
- Broken image URLs are safely ignored.
**OPW-6200749**
Forward-Port-Of: odoo/enterprise#116925This update fixes an issue in the Lithuanian tax reporting module (l10n_lt) where certain calculations were incorrectly presented. Specifically, lines 29-34 of the tax report were adjusted to provide accurate tax reporting figures. This ensures compliance with Lithuanian tax regulations.
Original PR description
Lines 29 to 34 in the tax report should be negated opw-5985774 Forward-Port-Of: odoo/odoo#259147
This update resolves an issue where the forum toolbar wasn't consistently visible or repositioning correctly within website forums, specifically when content was displayed in an iframe. The fix ensures scroll events are properly detected within the iframe's view, guaranteeing the toolbar appears and adjusts correctly for all users.
Original PR description
Description of the issue: - In website forums, the toolbar was either not visible or did not reposition correctly after scrolling. Cause: - This issue occurred only in forums when an iframe was present. In that case, scroll events were not triggered on the window visual viewport, preventing toolbar repositioning. Solution: - Attached scroll events to the iframe’s visual viewport instead of the window visual viewport when an iframe is present. task-6201171 Forward-Port-Of: odoo/odoo#265221
This update corrects a bug that prevented quality checks from running correctly when a measure check on a manufacturing order (MO) failed. The change adjusts how the system handles lot references, ensuring compatibility with recent Odoo updates. This resolves an error related to outdated field references and improves the reliability of quality control processes.
Original PR description
## Steps to reproduce: - Install the `quality_mrp` module. - Create a new product. - Create a Quality Point with: Type: Measure, Control per: Product/Operation Operations: Manufacturing - Create and…
## Steps to reproduce: - Install the `quality_mrp` module. - Create a new product. - Create a Quality Point with: Type: Measure, Control per: Product/Operation Operations: Manufacturing - Create and confirm MO for the product. - Update the Quality Point: Remove the 'manufacturing' operation type and add 'receipts' type. Change Control per to 'Quantity'. - Open the MO and start a quality check. - Enter an invalid measure and try to validate it. ## Error: `AttributeError - 'mrp.production' object has no attribute 'lot_producing_id'` ## Cause: Since commit https://github.com/odoo/odoo/commit/4bb4e08066449177f89382718ceadd840ce90d0e, the `lot_producing_id` field on MO was replaced by the Many2many field `lot_producing_ids`. Invalid references to the removed field lead to an error. ## Fix: This commit uses the first lot/serial from the MO. Note: Multiple produced lots are only possible for serial-tracked products. sentry-7511513479 Forward-Port-Of: odoo/enterprise#119231
This update fixes an error in the import of Italian vendor invoices (l10n_it_edi) where pension fund tax was incorrectly applied to all invoice lines with the same VAT rate. The fix extracts the specific tax exemption reason from the invoice data, ensuring the correct tax is applied to each line, improving invoice accuracy and financial reporting.
Original PR description
In `l10n_it_edi` vendor bill import, the pension fund tax was incorrectly applied to all invoice lines sharing the same VAT rate, even though they have different `l10n_it_tax_exemption_reason`s, resulting in wrong entries and document total. We now extract the Tax Exemption reason from the `DatiCassaPrevidenziale` node, and use it to search the correct tax. Steps to reproduce: 1. Install `account` and `l10n_edi_it` 2. In the `4% INPS` tax, set `TC22` in pension fund type and `N2.2` in exoneration 3. Import bill from the ticket 4. See the pension fund tax is applied to all the lines. It should only be applied only to the first one. Ticket [link](https://www.odoo.com/odoo/project.task/6212975) opw-6212975 Forward-Port-Of: odoo/odoo#267066 Forward-Port-Of: odoo/odoo#265821
This update resolves a potential error in the PDP reporting flows that could have caused form creation to fail. The fix ensures the system correctly handles cases where reporting dates are initially empty, preventing crashes during form initialization. This improves the stability and reliability of the reporting process.
Original PR description
PDP reporting flows compute their period status from the due period dates. On a new or incomplete flow record, those dates can still be empty during form/onchange initialization. The compute then tried to compare today's date with `False`, which could crash generic form creation. This patch makes the compute handle missing period dates before doing date comparisons. runbot.build.error-939459 Forward-Port-Of: odoo/odoo#268002
This update resolves a technical error that was preventing the POS HR module from functioning correctly in certain situations. The fix replaces a reliance on a backend-generated session ID with a more reliable session ID, ensuring consistent operation and preventing unexpected errors. This improves the overall stability and reliability of the POS HR feature.
Original PR description
`pos.config.current_session_id` is a computed field from the backend. In some cases, it's possible that we don't have this field causing the following error
```
TypeError: undefined is not an object
(evaluating 'this.config.current_session_id.id')
```
task: https://www.odoo.com/odoo/project/1737/tasks/6253422
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#266858This update resolves an issue where users were unintentionally able to select properties within the field selector widget. The fix adds a new option to the widget and includes a corresponding test to ensure proper functionality. This improves the user experience and prevents potential errors when selecting fields.
Original PR description
- Backporting this [commit], for adding the `allow_properties` option to `field_selector` widget in `saas-18.2` for using the functionality in linked enterprise commit. - Also, added a test for `allow_properties` option. - For forward ports, only the test will be merged, as `allow_properties` is already included in the original commit. [commit]: https://github.com/odoo/odoo/pull/215767/changes/7cd18c07b5e008bff072d10375c908eb77434fde sentry-7378769090 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#257833
This update resolves an issue where users were encountering errors when attempting to use property fields within auto-fields. The fix restricts property field selection, ensuring data integrity and preventing errors in the Sign module. This improves the user experience and stability of the system.
Original PR description
Currently, an error occurs when user tries to select a property field in auto field. Steps to replicate: - Install `sale_management` and `sign`. - Open Sales > Products > Products > Open any product.…
Currently, an error occurs when user tries to select a property field in auto field.
Steps to replicate:
- Install `sale_management` and `sign`.
- Open Sales > Products > Products > Open any product.
- From the Gear icon, Click Edit Properties and save the record.
- Enable Debug mode if you are using a version lower than 19.0 .
- Open Sign > Configuration > Field Types.
- Create a new Field > Give a name > Select model as `Product`.
- Select Field as `Property > Property 1` and click save.
Error:
- saas-18.3 and later:
```
File '/home/odoo/odoo18/enterprise/sign/models/sign_item_type.py', line 57, in _check_auto_field_exists
auto_field_value = record.mapped(sign_type.auto_field)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File '/home/odoo/odoo18/community/odoo/orm/models.py', line 5472, in mapped
field = records._fields[field_name]
^^^^^^^^^^^^^^^
AttributeError: 'Property' object has no attribute '_fields'. Did you mean: 'field'?
```
- saas-18.2:
```
File '/home/odoo/odoo18/enterprise/sign/models/sign_item_type.py, line 41, in _check_auto_field_exists
auto_field_value = record.mapped(sign_type.auto_field)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File '/home/odoo/odoo18/community/odoo/orm/models.py', line 5744, in mapped
if len(records) > PREFETCH_MAX:
^^^^^^^^^^^^
TypeError: object of type 'bool' has no len()
```
Cause:
- As the user gave auto fill field as a Property field the [line] called `mapped()` to access its value, this caused the error to occur.
- This occurs because `mapped()` expects a `recordset` (models.Model), but instead it receives a Property object, which does not have `_fields`.
Solution:
- Using `'allow_properties': 'False'`, the property fields wont appear in the list of field selection.
[line]: https://github.com/odoo/enterprise/blob/cdaeb79e1f623831fffa553dbb658698367c7e19/sign/models/sign_item_type.py#L41
sentry-7378769090
Forward-Port-Of: odoo/enterprise#113091This update resolves an issue preventing Verifactu documents from being generated when invoicing a Point of Sale order after the sale is completed. Previously, the system required a cancellation step, but now it allows invoicing directly, ensuring consistent functionality. The change improves the process of generating Verifactu documents for Spanish businesses.
Original PR description
**Steps to reproduce:** - Setup a Verifactu installation and a Spanish company - Go to the PoS, make a Sale - Keep the ticket - Go to the /pos/ticket URL and enter the ticket informations - Last step…
**Steps to reproduce:** - Setup a Verifactu installation and a Spanish company - Go to the PoS, make a Sale - Keep the ticket - Go to the /pos/ticket URL and enter the ticket informations - Last step also works when requesting an invoice in the backend on the order - Go to the order in the backend, an error is shown, the cancellation didn't go through **Veri*Factu documents can only be generated for paid or posted Point of Sale Orders.** **Why the fix:** When we directly invoice an order, we do not go through the verification of being paid and done. This is why is works, but when making the invoice after the sale is done, we cancel the order first, then we register the invoice instead. When trying to cancel the order, we check if the order is either paid or done, but it is currently invoiced as we just generated the invoice. We now allow no errors if the order is in the invoiced state, and let it pass through. With this flow we get the same result as the direct invoice from the PoS. The new cancellation on the order and submission on the invoice may take a bit of time to get accepted but they will be eventually. opw-6139200 Forward-Port-Of: odoo/odoo#267869 Forward-Port-Of: odoo/odoo#264272
This update fixes a potential error that occurred when calculating rental availability for products with 'Pickup' and 'Return' dates. Specifically, it prevents a traceback error when the start date of a rental period (like a return date) was set to a date that was earlier than the end date. This ensures a smoother experience for customers booking rentals.
Original PR description
Preventing traceback on incompatible dates between the cart and the product page. How to reproduce: 1. Add to cart a product with periodicity Hours/Days with a start date = return date (e.g.: Projector). 2. Go to the product page of a product configured with Pickup > Return (e.g.: Premium Bike, Luxury Room) 3. Traceback, as we try to get the availabilities on a negative period. start date > end date, as both dates are equals and the time is set from the Pickup and Return fields.
This update resolves an issue where validating delivery costs on confirmed sales orders with real-cost carrier invoices caused errors. The fix prevents the system from incorrectly updating delivery line prices and names when a locked order is being processed, ensuring smooth order management. This improves the user experience for sales teams.
Original PR description
Sale module has setting `Lock Confirmed Sales`, which particularly doesn't allow order line modification on a confirmed order. However, when a delivery carrier is set up with Invoicing Policy = Real cost, validating the picking pushes the actual carrier price onto the delivery line, writing `price_unit` and `name`. On a locked SO this raises a UserError. Fix it by excluding the delivery line's `price_unit` and `name` from the protected fields, only when the write originates from `_add_delivery_cost_to_so`. The code path is identified by the context `allow_delivery_cost_update`, so a regular UI edit of those fields on a locked SO is still blocked. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266511 Forward-Port-Of: odoo/odoo#265721
This update resolves an issue where users were blocked from uploading documents to requests linked to records they didn't have full access to. By adding a temporary 'sudo' permission during the attachment creation process, users can now successfully upload documents, regardless of their direct access rights to the associated record. This improves usability and prevents data loss.
Original PR description
Issue: Users are currently blocked from uploading requested documents if the request is linked to a record they do not have access to (e.g., User A links Record X to a request assigned to User B, but User B lacks read/write access to Record X). The system throws an error because the user cannot create an attachment for that record. Fix: Add .sudo() on the attachment creation process. task-6107099 Forward-Port-Of: odoo/enterprise#113698
This update resolves a critical issue where the Point of Sale partner list would slow down or crash when handling a large number of customers in the browser cache. The fix reduces the number of partner lines rendered, improving performance and stability, especially when searching for customers.
Original PR description
Currently, it's possible to experience very slow loading speed of the partner list and/or browser crashes in the POS when there are thousands of customers stored in the browser cache. This appears to…
Currently, it's possible to experience very slow loading speed of the partner list and/or browser crashes in the POS when there are thousands of customers stored in the browser cache.
This appears to be caused by a few reasons compounding together:
1. While we limit the number of customers in the initial render of the list, there is no limit during the search. Therefore, if there are thousands of customers matching the search pattern loaded in the browser cache, the browser will attempt to render equally as many `PartnerLine` components.
2. A 100 ms debounce time is fast enough to trigger the render after each key stroke. 200~300ms is the industry standard for Software UI debounce.
3. For each customer rendered in the list, we may perform a search for its parent partner amongst all loaded customers with the function `PosStore.getPartnerCredit()`.
This PR aims at reducing the number of partner lines rendered in a short period of time and thus, at improving speed and avoiding crashes.
Steps to reproduce:
1. Create a fresh db + install the point_of_sale with demo data
2. Populate the res.partner model by a factor of 100 to reach 4000+ partners
3. Update the following system parameter to make sure that we load all partners in the browser cache when we open the POS session:
- `point_of_sale.limited_customer_count` -> 5000
4. Open a POS session and and click on the `Customer` button to render the partner list
5. Type `adm` in the search bar at normal typing speed
6. Crash
Ticket: opw-5435973
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#258667This update fixes an issue where inserting certain website snippets (like alerts) within limited editable areas resulted in broken HTML. The fix prevents the creation of invalid HTML structures, ensuring snippets insert correctly and reliably within the website builder. This improves the overall user experience and stability of the website building tool.
Original PR description
### [FIX] website: prevent inserting block snippet with powerbox in inlines Inserting block snippet with powerbox when the selection is inside an editable part limited to an element that can only…
### [FIX] website: prevent inserting block snippet with powerbox in inlines Inserting block snippet with powerbox when the selection is inside an editable part limited to an element that can only contain inline nodes leads to invalid html (like `<div>` inside `<span>`). This commit disables insertion of block snippets when the selection is such a part of the document. Steps to reproduce: - Open website builder - Put cursor in "copyright" at the bottom of the footer - Type `/alert` and press enter - Bug: `<div>` element is inserted inside `<span>`, that is invalid html task-6259092 ### [FIX] website: prevent unwrapping `s_blockquote` on insert with powerbox When the snippet `s_blockquote` was inserted with the powerbox or pasted from clipboard in an unbreakable element which does not allow blocks as children, the `<blockquote>` element itself was abandonned and its children were inserted instead. This lead to insertion of a broken snippet. This commit marks the `s_blockquote` snippet as "unsplittable" so that always stays in one piece when inserted. Steps to reproduce: - Open website builder - Put cursor in a link - Type `/blockquote` and press enter - Bug: the snippet's children are inserted, instead of snippet itself task-6259092 Forward-Port-Of: odoo/odoo#267111
3 changes
Resolved issues and error corrections
This update fixes an issue where the ICP export generated inconsistent XML reports by pulling data from multiple company contexts. The change ensures a single, reliable company context is used, reusing precomputed values and preventing conflicting defaults. This improves the accuracy and clarity of the ICP export data.
Original PR description
Description of the issue this commit addresses: The ICP export could mix values from different company contexts. In some cases, the main identifier and the fiscal entity division value did not come from the same source, which could create confusing or inconsistent XML output. --- Desired behavior after this commit is merged: This commit makes the ICP export use one consistent company context for identifier values, reuses precomputed values when available, and avoids overwriting them with unrelated defaults. --- task-6065382 Forward-Port-Of: odoo/enterprise#119282 Forward-Port-Of: odoo/enterprise#112995
This update fixes an issue where check amounts were not being properly rounded when generated in the Philippines (PH). Previously, the check amount in words displayed an incorrect decimal format with 'ONLY' appended. This change ensures that check amounts are rounded to the nearest cent, presenting a more accurate and professional representation for financial reporting.
Original PR description
Current behaviour: --- When paying with checks, the amount is not rounded in the check amount in words string. Steps to reproduce: --- 1. Switch to PH company 2. Set setting Check Layout as "Print Check - PH" 3. Create a new vendor bill 4. Add a product with a specific price like 91490.15 5. Confirm the bill, click on Register Payment 6. Select Payment Method "Checks", Create Payment 7. Go to the payment, Amount in Words is wrong 8. Ninety-One Thousand Four Hundred Ninety And 15000000001/100 ONLY Expected behaviour: --- The decimal amount should be rounded, and "ONLY" shouldn't appear. Fix: --- Rounded the pay amount And backported: https://github.com/odoo/enterprise/commit/bb6c9848665709c14c5113b2c98976f869cd473b opw-6058344 Forward-Port-Of: odoo/enterprise#117679 Forward-Port-Of: odoo/enterprise#116717
This update resolves an issue where users were blocked from uploading documents to requests linked to records they didn't have full access to. By adding a '.sudo()' function to the attachment creation process, users can now upload documents regardless of their access rights to the associated record, improving usability and workflow efficiency.
Original PR description
Issue: Users are currently blocked from uploading requested documents if the request is linked to a record they do not have access to (e.g., User A links Record X to a request assigned to User B, but User B lacks read/write access to Record X). The system throws an error because the user cannot create an attachment for that record. Fix: Add .sudo() on the attachment creation process. task-6107099 Forward-Port-Of: odoo/enterprise#113698
14 changes
Resolved issues and error corrections
This update resolves an issue where the IRN number wasn't being saved when sending invoices via e-invoicing with email in the Indian localization. The fix ensures the attachment ID is saved correctly, guaranteeing accurate IRN recording for e-invoices.
Original PR description
**Issue**: Sending invoice through e-invoicing with email in Indian localization will not save the IRN number on the invoice because of a cache issue on the attachment id. **Steps to reproduce**: Install l10n_in_edi_gstr module. Create an invoice and send it through e-invoicing with email option. The IRN number will not be saved on the invoice. **Causes**: When sending the invoice through e-invoicing with email option, the attachment id is not saved on the invoice before calling the method _l10n_in_edi_send_invoice(). This causes a cache issue and the IRN number is not saved on the invoice. **Fix**: Save the attachment id on the invoice after the creation of the attachement. opw-6243256
This update resolves an issue where users were unintentionally able to select properties within the field selector widget. The fix adds a new option to the widget and includes a corresponding test to ensure proper functionality. This improves the user experience and prevents potential data entry errors.
Original PR description
- Backporting this [commit], for adding the `allow_properties` option to `field_selector` widget in `saas-18.2` for using the functionality in linked enterprise commit. - Also, added a test for `allow_properties` option. - For forward ports, only the test will be merged, as `allow_properties` is already included in the original commit. [commit]: https://github.com/odoo/odoo/pull/215767/changes/7cd18c07b5e008bff072d10375c908eb77434fde sentry-7378769090 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#257833
This update resolves an issue where users were encountering errors when attempting to use property fields within auto-fill fields in the sign module. The fix restricts property field selection, ensuring data integrity and preventing the original error. This improves the usability of the sign module.
Original PR description
Currently, an error occurs when user tries to select a property field in auto field. Steps to replicate: - Install `sale_management` and `sign`. - Open Sales > Products > Products > Open any product.…
Currently, an error occurs when user tries to select a property field in auto field.
Steps to replicate:
- Install `sale_management` and `sign`.
- Open Sales > Products > Products > Open any product.
- From the Gear icon, Click Edit Properties and save the record.
- Enable Debug mode if you are using a version lower than 19.0 .
- Open Sign > Configuration > Field Types.
- Create a new Field > Give a name > Select model as `Product`.
- Select Field as `Property > Property 1` and click save.
Error:
- saas-18.3 and later:
```
File '/home/odoo/odoo18/enterprise/sign/models/sign_item_type.py', line 57, in _check_auto_field_exists
auto_field_value = record.mapped(sign_type.auto_field)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File '/home/odoo/odoo18/community/odoo/orm/models.py', line 5472, in mapped
field = records._fields[field_name]
^^^^^^^^^^^^^^^
AttributeError: 'Property' object has no attribute '_fields'. Did you mean: 'field'?
```
- saas-18.2:
```
File '/home/odoo/odoo18/enterprise/sign/models/sign_item_type.py, line 41, in _check_auto_field_exists
auto_field_value = record.mapped(sign_type.auto_field)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File '/home/odoo/odoo18/community/odoo/orm/models.py', line 5744, in mapped
if len(records) > PREFETCH_MAX:
^^^^^^^^^^^^
TypeError: object of type 'bool' has no len()
```
Cause:
- As the user gave auto fill field as a Property field the [line] called `mapped()` to access its value, this caused the error to occur.
- This occurs because `mapped()` expects a `recordset` (models.Model), but instead it receives a Property object, which does not have `_fields`.
Solution:
- Using `'allow_properties': 'False'`, the property fields wont appear in the list of field selection.
[line]: https://github.com/odoo/enterprise/blob/cdaeb79e1f623831fffa553dbb658698367c7e19/sign/models/sign_item_type.py#L41
sentry-7378769090
Forward-Port-Of: odoo/enterprise#113091This update resolves a potential error in the PDP reporting flows that could occur when new or incomplete flow records are created. The fix ensures the system handles missing due period dates gracefully, preventing form creation failures and improving data reliability. This ensures accurate reporting calculations.
Original PR description
PDP reporting flows compute their period status from the due period dates. On a new or incomplete flow record, those dates can still be empty during form/onchange initialization. The compute then tried to compare today's date with `False`, which could crash generic form creation. This patch makes the compute handle missing period dates before doing date comparisons. runbot.build.error-939459 Forward-Port-Of: odoo/odoo#268002
This update resolves a validation error that occurred during production recording when a subcontractor deleted and recreated a move line. The previous process incorrectly invalidated the cache, leading to missing data. This change ensures data integrity during editing and recording of subcontracting production.
Original PR description
**Issue** In subcontracting, deleting a raw move line and adding a new one in the same editing flow can lead to a validation error during production recording. **Steps to reproduce** - Create a…
**Issue** In subcontracting, deleting a raw move line and adding a new one in the same editing flow can lead to a validation error during production recording. **Steps to reproduce** - Create a subcontracting product with a comp A - Create and confirm a purchase order of that product (with the subcontracting partner) - Open the associated delivery - Open the move details (hamburger button) - Delete the move line linked to the comp A - Create a new move line for a comp B with a quantity of 1 - Record the production -> A validation error occurs: the mandatory field `product_uom_id` is not set. **Cause** The regression comes from this commit: https://github.com/odoo/odoo/commit/54f10b56f577ad9ed5575bd396dba7d20d22fc2e While assigning `move_raw_ids`, the inverse method is triggered: https://github.com/odoo/odoo/blob/9267b2d1a9b2d2d6a33eceab07d572406c68c723/addons/mrp_subcontracting/models/mrp_production.py#L34 At this stage, newly added lines are still virtual records (`line`): https://github.com/odoo/odoo/blob/9267b2d1a9b2d2d6a33eceab07d572406c68c723/addons/mrp_subcontracting/models/mrp_production.py#L38 The previous implementation directly unlinked removed move lines (see commit https://github.com/odoo/odoo/commit/54f10b56f577ad9ed5575bd396dba7d20d22fc2e): https://github.com/odoo/odoo/blob/9267b2d1a9b2d2d6a33eceab07d572406c68c723/addons/mrp_subcontracting/models/mrp_production.py#L40-L43 Which will eventually flush and invalidate all the cache: https://github.com/odoo/odoo/blob/0e78b4fd2ab904f2e12107cb6ff7cc11d512259f/odoo/models.py#L4666 And since `line` is a virtual record (not in db), its associated values will be reset, among those, `product_uom_id`. Later, when the move line is reassigned: https://github.com/odoo/odoo/blob/0e78b4fd2ab904f2e12107cb6ff7cc11d512259f/addons/mrp_subcontracting/models/mrp_production.py#L49 https://github.com/odoo/odoo/blob/0e78b4fd2ab904f2e12107cb6ff7cc11d512259f/odoo/models.py#L5223-L5228 the validation fails because the virtual line no longer contains the required values. **Additional note** An alternative could have been using Command but since this line: https://github.com/odoo/odoo/blob/0e78b4fd2ab904f2e12107cb6ff7cc11d512259f/addons/mrp_subcontracting/models/mrp_production.py#L42 can not be converted to: `Command.set([line.id for line in lines])` because `lines` may also contain virtual records. This causes an invalid quantity for the move. Indeed, even if the command operator would update the quantity on the `move_line` correctly, it won't for the quantity of the `move` because of its associated compute method: https://github.com/odoo/odoo/blob/26ba95ac1c5bbb24975efb1a6f53c1ab47b61532/addons/stock/models/stock_move.py#L399-L400 that relies on `.ids`, which is `[]` on virtual records. Therefore, keep the change minimal. opw-6133281 Forward-Port-Of: odoo/odoo#263058
This update resolves an issue where Peppol XML invoices with tax percentage information were failing to import correctly, resulting in empty bill creation. The fix addresses a parsing error within the UBL invoice processing module, ensuring accurate tax calculations and bill generation from these invoices.
Original PR description
Steps to reproduce: - Upload a Peppol XML bill having the tax percent reported under "TaxTotal/TaxSubtotal/Percent" Issue: Bill will be created empty. The chatter will report the error ``` Error importing attachment 'bill.xml' (type=account.edi.xml.ubl_bis3): This specific error occurred during the import: float() argument must be a string or a real number, not 'lxml.etree._Element' ``` opw-6227637 [Ticket link](https://www.odoo.com/odoo/project/49/tasks/6227637) Forward-Port-Of: odoo/odoo#266307
This update fixes an issue where the ICP export generated inconsistent XML reports by using values from multiple company contexts. The change ensures a single, reliable company context is used, improving the accuracy and clarity of the exported data. This enhances the reliability of financial reporting.
Original PR description
Description of the issue this commit addresses: The ICP export could mix values from different company contexts. In some cases, the main identifier and the fiscal entity division value did not come from the same source, which could create confusing or inconsistent XML output. --- Desired behavior after this commit is merged: This commit makes the ICP export use one consistent company context for identifier values, reuses precomputed values when available, and avoids overwriting them with unrelated defaults. --- task-6065382 Forward-Port-Of: odoo/enterprise#119282 Forward-Port-Of: odoo/enterprise#112995
This update resolves a bug where backorder receipts were incorrectly valued due to inconsistent exchange rate calculations. The fix ensures that receipt values and total invoice amounts are consistently converted to EUR using the correct exchange rate at the time of receipt, regardless of the bill date. This improves accuracy in stock valuation and financial reporting.
Original PR description
Configuration: - Costing method: FIFO, automated valuation - Multi-currency: PO in a foreign currency (e.g. EUR), company currency USD - Two different exchange rates: one active at bill date, one at…
Configuration:
- Costing method: FIFO, automated valuation
- Multi-currency: PO in a foreign currency (e.g. EUR), company currency USD
- Two different exchange rates: one active at bill date, one at receipt date
- Bill posted before any goods are received
Steps to reproduce:
- Set EUR as a secondary currency with two different rates:
- Rate 1 on January 1st: 1 EUR = 1 USD
- Rate 2 on January 8th: 1 EUR = 2 USD
- Create a PO in EUR for 20 units @ 10,000 EUR
- Post the vendor bill dated January 3rd (rate 1 applies: 1 EUR = 1 USD)
- Receive 10 units on a date after January 8th and create a backorder
- Receive the remaining 10 units from the backorder on the same date
- Inspect the stock valuation layers and interim account journal entries for both receipts
Prior to this commit:
The two receipts, identical in quantity, date, and PO price, would produce different unit costs in USD. The backorder receipt would be incorrectly valued due to a wrong exchange rate being used when computing `receipt_value` in `_get_price_unit()`.
Receipt 2 (backorder):
SVL 1 value: $100,000 USD
Converted to EUR at receipt date (1 USD = 0.5 EUR):
receipt_value = $100,000 × 0.5 = 50,000 EUR (wrong rate)
total_invoiced_value = 200,000 EUR
remaining_value = 200,000 - 50,000 = 150,000 EUR
remaining_qty = 20 - 10 = 10
price_unit = 150,000 / 10 = 15,000 EUR
Converted to USD at bill date (1 EUR = 1 USD):
price_unit = $15,000 USD
SVL value = $15,000 × 10 = $150,000
This bug only affects backorder receipts. The first receipt always gets `receipt_value = 0` (no prior SVLs exist), so the problematic conversion never runs.
After this commit:
`receipt_value` is now computed using `_get_currency_convert_date()` instead of `layer.create_date`. This ensures `receipt_value` and `total_invoiced_value` are both expressed in EUR at the same reference rate.
Receipt 2 (backorder):
SVL 1 value: $100,000 USD
Converted to EUR at bill date (1 EUR = 1 USD):
receipt_value = $100,000 × 1.0 = 100,000 EUR (correct rate)
total_invoiced_value = 200,000 EUR
remaining_value = 200,000 - 100,000 = 100,000 EUR
remaining_qty = 20 - 10 = 10
price_unit = 100,000 / 10 = 10,000 EUR
Converted to USD at bill date (1 EUR = 1 USD):
price_unit = $10,000 USD
SVL value = $10,000 × 10 = $100,000
Both receipts now produce identical unit costs regardless of exchange rate differences between bill date and receipt date.
OPW: 5426718
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#267590
Forward-Port-Of: odoo/odoo#262577This update fixes an issue where check amounts weren't being properly rounded in the Philippines (PH) version of Odoo. Previously, the check amount in words displayed with extra decimal places and 'ONLY'. Now, the decimal amounts are rounded correctly, ensuring accurate check formatting for PH transactions.
Original PR description
Current behaviour: --- When paying with checks, the amount is not rounded in the check amount in words string. Steps to reproduce: --- 1. Switch to PH company 2. Set setting Check Layout as "Print Check - PH" 3. Create a new vendor bill 4. Add a product with a specific price like 91490.15 5. Confirm the bill, click on Register Payment 6. Select Payment Method "Checks", Create Payment 7. Go to the payment, Amount in Words is wrong 8. Ninety-One Thousand Four Hundred Ninety And 15000000001/100 ONLY Expected behaviour: --- The decimal amount should be rounded, and "ONLY" shouldn't appear. Fix: --- Rounded the pay amount And backported: https://github.com/odoo/enterprise/commit/bb6c9848665709c14c5113b2c98976f869cd473b opw-6058344 Forward-Port-Of: odoo/enterprise#117679 Forward-Port-Of: odoo/enterprise#116717
This update fixes the visibility of specific fields related to Saudi Arabia's tax regulations within the Odoo system. Now, these fields are only displayed for contacts and companies operating in Saudi Arabia, ensuring data accuracy and compliance. This change prevents irrelevant information from appearing in other company contexts.
Original PR description
This commit fixes the visibility logic of `l10n_sa_edi_additional_identification_*` fields. - `l10n_sa_edi_additional_identification_scheme` is now visible only when both the contact and the current company is Saudi. - `l10n_sa_edi_additional_identification_number` is visible for all contacts, but only when the current company is Saudi. This ensures the fields follow the intended localization scope and prevents them from appearing in non-Saudi company contexts. task-5881754
This update resolves a frustrating issue where carousels would automatically cycle while editing website pages. The fix prevents this behavior in edit mode, ensuring a smoother and more stable editing experience for our users. This improves usability and reduces editing interruptions.
Original PR description
Commit [3ba3e45] paused carousels upon focus, and resumed it upon focusout. However, that behavior should be disabled in edit mode, as cycling is disabled (moving through the slides is only done manually). Otherwise, the carousel cycles and, after each slide, takes the focus, which makes editing the page a nightmare. [3ba3e45]: https://github.com/odoo/odoo/commit/3ba3e45b2ab995412e1a7ced2c46b9294dc353b8 task-6264462 Forward-Port-Of: odoo/odoo#268046
This update optimizes how Odoo processes QWeb templates, specifically addressing a performance issue related to template compilation. The change reverts a recent Markupsafe update that introduced a slower method for handling template tags, resulting in faster processing times. This ensures smoother and more responsive Odoo performance.
Original PR description
Starting version 2.1.4 of markupsafe, they decided to adapt the `striptags` function to use in-python-loops instead of the original implemenation that relied on pre-compiled regex. A problem has been…
Starting version 2.1.4 of markupsafe, they decided to adapt the `striptags` function to use in-python-loops instead of the original implemenation that relied on pre-compiled regex. A problem has been spotted with qweb templates that used `striptags` with large inputs, which led to the investigation of this function and it was found that the old implementation is actually faster. In fact, the PR introducing this change in Markupsafe, made these claims with no benchmarks whatsoever: https://github.com/pallets/markupsafe/pull/413/changes The new implementation of markupsafe is O(N x M), where n is the number of tags and M being the length of the input string. The old regex approach does a single c-level scan to check the existence of the regex which is performing much better for varying input size. The benchmark cases below are in the form `<case_description>_<number_of_tags>`. We can see that in the cases where the current implementation is slightly faster is when there are no tags in the input which can be explained by the fact that the while loops will simply exit early. The time lost in the regex implementation is likely due to the deeper call stack to scan for the regex. Apart from that, in the case of an unclosed tag, the regex implementation is also slower because it still needs to scan the entire line. However, in that case the time taken is a handful of milliseconds, so it's not really a performance regression there either. Apart from that, the old implementation is consistently much more performant, for both small and large inputs. Benchmarks: | Case | Regex ms | Current ms | Speedup | |----------------------------------------------|----------|------------|---------| | plain_text_50k_words | 3.020 | 2.627 | 0.9x ← current_implementation | | unclosed_tag_then_50kb_text | 0.367 | 0.032 | 0.1x ← current_implementation | | unclosed_tag_then_500kb_text | 3.787 | 0.273 | 0.1x ← current_implementation | | multiple_unclosed_open_tags_then_50kb_text | 18.912 | 0.371 | 0.0x ← current_implementation | | multiple_unclosed_open_tags_then_500kb_text | 189.007 | 8.209 | 0.0x ← current_implementation | | unclosed_comment_then_500kb_text | 7.276 | 0.412 | 0.1x ← current_implementation | | 5k_small_tags | 0.986 | 22.096 | 22.4x ← regex_old_implementation | | 20k_small_tags | 4.125 | 492.186 | 119.3x ← regex_old_implementation | | 50k_small_tags | 12.658 | 5499.602 | 434.5x ← regex_old_implementation | | 1k_nested_divs | 0.155 | 0.923 | 5.9x ← regex_old_implementation | | 10k_nested_divs | 1.648 | 48.410 | 29.4x ← regex_old_implementation | | 2k_tags_with_attrs | 1.058 | 12.013 | 11.4x ← regex_old_implementation | | 20k_tags_with_attrs | 13.185 | 6068.755 | 460.3x ← regex_old_implementation | | 2k_multiline_tags | 0.815 | 10.819 | 13.3x ← regex_old_implementation | | 20k_multiline_tags | 8.939 | 4231.768 | 473.4x ← regex_old_implementation | | 1k_comments | 0.222 | 1.292 | 5.8x ← regex_old_implementation | | 1k_comments_hiding_tags | 0.163 | 1.121 | 6.9x ← regex_old_implementation | | 2k_mixed | 0.278 | 2.392 | 8.6x ← regex_old_implementation | | 10k_mixed | 1.400 | 50.959 | 36.4x ← regex_old_implementation | | qweb_shop_200_products | 0.907 | 7.880 | 8.7x ← regex_old_implementation | | qweb_shop_1000_products | 4.296 | 194.647 | 45.3x ← regex_old_implementation | This PR is needed because requirements.txt in Odoo specifies the following dependency: `MarkupSafe==2.1.5 ; python_version >= '3.12' \# (Noble)` This means that all versions running Ubuntu Noble, will be having the same issue introduced in version 2.1.4 of markupsafe. opw-5999688 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#258643 Forward-Port-Of: odoo/odoo#257889
This update resolves an issue where validating delivery costs on confirmed sales orders with real-cost carrier invoices caused an error. The fix prevents the system from incorrectly updating price and name fields on delivery lines when a locked order is being processed, ensuring smooth order management. This improves the user experience for sales teams.
Original PR description
Sale module has setting `Lock Confirmed Sales`, which particularly doesn't allow order line modification on a confirmed order. However, when a delivery carrier is set up with Invoicing Policy = Real cost, validating the picking pushes the actual carrier price onto the delivery line, writing `price_unit` and `name`. On a locked SO this raises a UserError. Fix it by excluding the delivery line's `price_unit` and `name` from the protected fields, only when the write originates from `_add_delivery_cost_to_so`. The code path is identified by the context `allow_delivery_cost_update`, so a regular UI edit of those fields on a locked SO is still blocked. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266511 Forward-Port-Of: odoo/odoo#265721
This update resolves an issue where users were blocked from uploading documents to requests linked to records they didn't have full access to. By adding a special permission bypass, the system now allows uploads regardless of user access rights, streamlining the document request process. This ensures all authorized users can contribute documents to requests.
Original PR description
Issue: Users are currently blocked from uploading requested documents if the request is linked to a record they do not have access to (e.g., User A links Record X to a request assigned to User B, but User B lacks read/write access to Record X). The system throws an error because the user cannot create an attachment for that record. Fix: Add .sudo() on the attachment creation process. task-6107099 Forward-Port-Of: odoo/enterprise#113698
1 change
Resolved issues and error corrections
This update fixes a potential issue where closing a POS session could incorrectly identify and block the cancellation of transactions belonging to other POS terminals. The change now ensures that only transactions associated with the specific POS terminal are retrieved, preventing errors and improving the reliability of session closure. This enhances the overall stability of the POS system.
Original PR description
Before this commit, when closing a POS session, it fetched all active transactions via generic /tx endpoint, which returns transactions across all TSS. Attempting to cancel a transaction belonging to another TSS raised:
"Not a Transaction of TSS <tss_id>"
Fix by scoping the fetch to /tss/<tss_id>/tx so only transactions of the current TSS are returned, and appending client_id as an additional filter to avoid touching transactions from other POS terminals sharing the same TSS. A JS-side client_id check is kept as a defensive safety net before the cancellation loop.
opw-6243187
Forward-Port-Of: odoo/enterprise#1186628 changes
Resolved issues and error corrections
This update addresses a technical issue related to the Spreadsheet Edition's pivot table layout configuration. The changes ensure compatibility with a recent update to the core Odoo spreadsheet functionality, resulting in a smoother and more reliable user experience. This primarily impacts how users customize and manage pivot table layouts.
This update resolves an issue where the Studio sidebar's checkboxes had a broken appearance due to a conflict with Bootstrap's styling. The fix globally applies a background image to indeterminate checkboxes, eliminating the need for a separate workaround and ensuring consistent display across the Enterprise module.
Original PR description
The Studio sidebar had its own `&:indeterminate { background-image: url(...) }` override to work around the broken Bootstrap indeterminate dash. This is now handled globally (see PR #268326 / master-fix-indeterminate-bg-image-jesc): `.form-check-input:indeterminate` sets `background-image` directly, bypassing the Bootstrap CSS variable that carries the broken `stroke='unset'`.
source: `web_enterprise/static/src/scss/bootstrap_overridden.scss` sets `$component-active-color: unset !default;` before `web/bootstrap_overridden.scss` in the bundle, so Bootstrap's indeterminate SVG compiles with `stroke='unset'` and the dash is invisible everywhere except where `background-image` is overridden directly.
fix: the global `.form-check-input:indeterminate { background-image: url(...) }` rule in `web/static/src/core/checkbox/checkbox.scss` now covers all checkboxes, making this local Studio override redundant.This update fixes an issue where the DIAN-compliant electronic invoices generated for Colombia were incorrectly using a generic line number instead of the correct document ID. This prevented the invoices from passing validation checks by the DIAN platform and external systems. The fix ensures invoices now accurately reflect the required document ID, resolving compatibility problems.
Original PR description
### Issue When generating the attached document (AttachedDocument) for Colombia, the parent document reference tag <cbc:ID> incorrectly exported a generic line counter instead of the actual document…
### Issue
When generating the attached document (AttachedDocument) for Colombia, the parent document reference tag <cbc:ID> incorrectly exported a generic line counter instead of the actual document identification number
While the DIAN platform itself accepted the file, this caused rejections in external validation tools and third-party software because they could not resolve the link back to the original invoice
DIAN Documentation: https://www.dian.gov.co/impuestos/factura-electronica/Documents/Anexo_tecnico_factura_electronica_vr_1_7_2020.pdf
On page 213 there is an example for ParentDocumentLineReference
On page 216 there is the specification that does not show any check
Example of the incorrect XML structure:
```xml
<cac:ParentDocumentLineReference>
<cbc:LineID>1</cbc:LineID>
<cac:DocumentReference>
<cbc:ID>1</cbc:ID>
</cac:DocumentReference>
</cac:ParentDocumentLineReference>
```
Expected XML structure:
```xml
<cac:ParentDocumentLineReference>
<cbc:LineID>1</cbc:LineID>
<cac:DocumentReference>
<cbc:ID>SETP990001021</cbc:ID>
</cac:DocumentReference>
</cac:ParentDocumentLineReference>
```
### Cause
In the template, the value for <cbc:ID> was retrieved using `parent_document.get('id')` which fetched the sequential loop index https://github.com/odoo/enterprise/blob/cd25713fd2c35737d98db29df72b2d07ae9146e8/l10n_co_dian/views/templates.xml#L272-L275
The dictionary parsing logic did not extract the true document identifier from the XML tree response or the original XML data https://github.com/odoo/enterprise/blob/13dc30679e382df5845993c880a97df600c39ed4/l10n_co_dian/models/l10n_co_dian_document.py#L429-L432
### Steps to reproduce
- Install `l10n_co_dian`
- Setup DIAN configuration
- Generate an attached document for a commercial event or invoice
- Open the generated XML file
Before the fix, the `<cac:ParentDocumentLineReference>/<cac:DocumentReference>/<cbc:ID>` tag contains a technical integer like "1" instead of the official document sequence number
opw-6164321
Forward-Port-Of: odoo/enterprise#118319This update corrects a previous issue where website forms were incorrectly translated into the user's language instead of the website's default language. Now, all forms displayed on the website will automatically use the website's language setting, ensuring a consistent and accurate experience for users regardless of their browser language.
Original PR description
When the website is in a different language A to the user language B, forms are translated into the language B of the builder. They should be in the website default language. Task-6171271
This update fixes a technical error that prevented refunds in the Colombian Point of Sale (PoS) system. The issue stemmed from outdated code referencing an old function name, which caused a traceback during the refund process. This change ensures refunds are processed correctly for Colombian customers.
Original PR description
**Steps to reproduce:** - Setup a columbian company, DIAN should be in demo mode - Go to the PoS and make a sale with a columbian customer - Refund it - A traceback appears **Why the fix:** Some legacy code was left untouched when we changed the old **get_partner()** to the new **getPartner()** so we got a traceback as this function does not exist anymore. We also change the **set_partner(partner)** to **setPartner(partner)** as it was also forgotten. opw-6231856 Forward-Port-Of: odoo/enterprise#118651 Forward-Port-Of: odoo/enterprise#118054
This update corrects a bug in the appointment Gantt view that caused new bookings to default to midnight instead of the intended start time. The fix replaces a mistaken override with the correct method, ensuring accurate booking start times are used.
Original PR description
The [commit] replaced the `onAddClicked` method with `_onNewClicked`, and updated all related calls and overrides accordingly. However, the appointment Gantt view override was mistakenly changed to override a non-existent `_onAddClicked` method, leaving the custom logic unused. As a result, bookings created through the `New` button in the Gantt view used midnight (12:00 AM) instead of the time derived from the custom logic as the default start datetime. This commit fixes the issue by correctly overriding `_onNewClicked`. [commit]: https://github.com/odoo/enterprise/commit/bc779c9ec5295f8d1fe06e8432c518c78c606ea2 Forward-Port-Of: odoo/enterprise#118799
This update resolves an issue where inserting a prompt banner using the `/prompt` command wouldn't allow users to undo the banner's creation. The fix ensures that undo functionality correctly removes prompt banners, improving usability and preventing unexpected content.
Original PR description
Problem: After inserting a prompt banner, undo does not remove it. Cause: History commands were ignored when the selection was inside the prompt banner, preventing undo from handling banner insertion. Solution: Handle history commands even when the selection is inside the prompt banner. Steps to reproduce: - Insert a prompt banner using `/prompt` + Enter. - Press Ctrl + Z. - Observe that the banner is not removed. task-6230530 Forward-Port-Of: odoo/enterprise#118248 Forward-Port-Of: odoo/enterprise#117845
This update fixes an issue where check amounts weren't being properly rounded in the Philippines (PH) version of Odoo. Previously, the check amount in words displayed with a decimal component and 'ONLY'. Now, the decimal is rounded, ensuring accurate check formatting and compliance with PH regulations.
Original PR description
Current behaviour: --- When paying with checks, the amount is not rounded in the check amount in words string. Steps to reproduce: --- 1. Switch to PH company 2. Set setting Check Layout as "Print Check - PH" 3. Create a new vendor bill 4. Add a product with a specific price like 91490.15 5. Confirm the bill, click on Register Payment 6. Select Payment Method "Checks", Create Payment 7. Go to the payment, Amount in Words is wrong 8. Ninety-One Thousand Four Hundred Ninety And 15000000001/100 ONLY Expected behaviour: --- The decimal amount should be rounded, and "ONLY" shouldn't appear. Fix: --- Rounded the pay amount And backported: https://github.com/odoo/enterprise/commit/bb6c9848665709c14c5113b2c98976f869cd473b opw-6058344 Forward-Port-Of: odoo/enterprise#117679 Forward-Port-Of: odoo/enterprise#116717
11 changes
Resolved issues and error corrections
This update fixes a bug in the bank transaction creation process within the Odoo Enterprise system. When an error occurs during transaction creation, the system now correctly closes the quick create window and displays the error, preventing further issues. This ensures a smoother user experience and prevents data inconsistencies.
Original PR description
**Problem:** When an error is thrown upon creating a bank transaction in the kanban view, a traceback occurs due to trying to access the quickCreateState which does not exist in this context (`this` = BankRecQuickCreateController). **Steps to Reproduce:** - Force the suspense account of the bank journal to be False - Go to bank transactions of that journal in kanban view and try to create a new transaction -> Traceback **Solution:** The expected behavior is for the quick create to be closed, then throw the error. Therefore, onCancel() can be called before throwing the error. opw-6186901
This update resolves a critical issue where the company's XBRL reports were failing validation by the NBB due to missing data disclosures. The fix adds necessary data points to the report, ensuring compliance and successful submission. This prevents potential delays or rejections of the financial reports.
Original PR description
This commit adds missing explanatory disclosure datapoints to the generated XBRL report. The missing disclosures resulted in failing validation when report is submitted to NBB. The datapoints are only added if the original value was non-zero. For example, the tangible assets disclosures are only added if the tangible assets in balance sheet is non-zero. Additionally, only disclosures that were reported as causing a failing validation were added. task-5977199
This update corrects a bug in the VAT record book export that was incorrectly displaying '01' for invoices with 'No Sujeto por reglas de localización' taxes (like Portuguese VAT). The fix ensures the correct '17' operation code is used, aligning with Spanish VAT regulations and the SII data format. This ensures accurate reporting of sales tax.
Original PR description
**Steps to reproduce:** * Install the **l10n_es_edi_sii** module. * Create a **Portuguese customer**. * Go to **Settings** and enable **EU Intra-community Distance Selling**, then refresh the tax…
**Steps to reproduce:** * Install the **l10n_es_edi_sii** module. * Create a **Portuguese customer**. * Go to **Settings** and enable **EU Intra-community Distance Selling**, then refresh the tax mapping. * Create a customer invoice with a **"No Sujeto por reglas de localización"** tax (e.g. **23.0% PT VAT**). * Go to **Accounting → Reporting → Tax Report → OSS Sales**. * Export the **VAT Record Books (XLSX)** file and open it. **Observed behavior:** * The "Clave de Operación" column shows "01" for lines with no_sujeto_loc taxes instead of "17". * The SII JSON for the same invoice correctly shows "ClaveRegimenEspecialOTrascendencia": "17". **Cause:** * In `_l10n_es_libros_get_common_line_vals()`, `operation_code` was computed manually as `'02' if exempt_reason else '01'`, which only handled the E2 exempt case and defaulted everything else to "01". * This missed OSS/no_sujeto_loc taxes (e.g. FR VAT, PT VAT) that should produce "17" per the Spanish VAT regime code table. **Fix:** * Extract operation code computation into a new dedicated method `_l10n_es_libros_get_operation_code()`. * For customer invoices, delegate to the existing `_l10n_es_get_regime_code()` method already used by SII, which correctly returns "17" for OSS-tagged taxes, "02" for E2 exempt, and "01" otherwise. * For vendor bills, mirror the SII logic by checking whether the invoice taxes include tags from `mod_303_casilla_10_balance` or `mod_303_casilla_11_balance` (intra-community indicators), returning "09" if so and "01" otherwise. opw-6197141,6216485 Forward-Port-Of: odoo/enterprise#117236
This update resolves an issue where users were encountering errors when attempting to use property fields within auto-fields in the Sign module. The fix restricts property field selection, ensuring data integrity and preventing errors during configuration.
Original PR description
Currently, an error occurs when user tries to select a property field in auto field. Steps to replicate: - Install `sale_management` and `sign`. - Open Sales > Products > Products > Open any product.…
Currently, an error occurs when user tries to select a property field in auto field.
Steps to replicate:
- Install `sale_management` and `sign`.
- Open Sales > Products > Products > Open any product.
- From the Gear icon, Click Edit Properties and save the record.
- Enable Debug mode if you are using a version lower than 19.0 .
- Open Sign > Configuration > Field Types.
- Create a new Field > Give a name > Select model as `Product`.
- Select Field as `Property > Property 1` and click save.
Error:
- saas-18.3 and later:
```
File '/home/odoo/odoo18/enterprise/sign/models/sign_item_type.py', line 57, in _check_auto_field_exists
auto_field_value = record.mapped(sign_type.auto_field)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File '/home/odoo/odoo18/community/odoo/orm/models.py', line 5472, in mapped
field = records._fields[field_name]
^^^^^^^^^^^^^^^
AttributeError: 'Property' object has no attribute '_fields'. Did you mean: 'field'?
```
- saas-18.2:
```
File '/home/odoo/odoo18/enterprise/sign/models/sign_item_type.py, line 41, in _check_auto_field_exists
auto_field_value = record.mapped(sign_type.auto_field)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File '/home/odoo/odoo18/community/odoo/orm/models.py', line 5744, in mapped
if len(records) > PREFETCH_MAX:
^^^^^^^^^^^^
TypeError: object of type 'bool' has no len()
```
Cause:
- As the user gave auto fill field as a Property field the [line] called `mapped()` to access its value, this caused the error to occur.
- This occurs because `mapped()` expects a `recordset` (models.Model), but instead it receives a Property object, which does not have `_fields`.
Solution:
- Using `'allow_properties': 'False'`, the property fields wont appear in the list of field selection.
[line]: https://github.com/odoo/enterprise/blob/cdaeb79e1f623831fffa553dbb658698367c7e19/sign/models/sign_item_type.py#L41
sentry-7378769090
Forward-Port-Of: odoo/enterprise#113091This update resolves an issue where order data wasn't being synchronized correctly from Point of Sale systems. The fix ensures that the system accurately reflects invoices as 'done' rather than 'invoiced', leading to more reliable data flow. A minor typo was also corrected for improved stability.
Original PR description
In this commit: - Update `read_pos_data` to check `done` state for invoicing instead of `invoiced` state - Load `account.move` model instead of `account_move` (fix typo) Task-5887318 Forward-Port-Of: odoo/enterprise#119317 Forward-Port-Of: odoo/enterprise#105839
This update resolves a bug where cancelled journal entries were incorrectly displayed in the reconciliation view, preventing successful reconciliation and causing data inconsistencies. The fix removes a previous refactor that inadvertently allowed cancelled entries to appear, ensuring accurate reconciliation processes.
Original PR description
Issue: Cancelled journal entries were visible in the "Journal Items to Reconcile" view (action_move_line_posted_unreconciled) because the action domain had no filter to exclude them. This caused…
Issue: Cancelled journal entries were visible in the "Journal Items to Reconcile" view (action_move_line_posted_unreconciled) because the action domain had no filter to exclude them. This caused reconciliation failures, no reconciliation happened, and the cancelled record remained in the view. This regression was introduced during a refactor to allow draft entries in the reconciliation view, where the posted-state condition was removed from the domain: Enterprise commit: https://github.com/odoo/enterprise/commit/003cffabda7d91a6d10d58942ed972ca5e17366d As a result, cancelled journal items also became visible, causing reconciliation attempts to fail while the records remained in the view. Also, we are not allowed to reconcile cancelled move lines, and we already have the validation for this [here](https://github.com/odoo/odoo/blame/a236f67776616f6facdefb0117a6ffdde9b7c84c/addons/account/models/account_move_line.py#L2627) Issue is reproducible on runbot. Here is the video reference: https://drive.google.com/file/d/1ojIDxHn5Yst8gVFy8JyhwtJoDSSSJsmK/view?usp=sharing - OPW: 6247870 Forward-Port-Of: odoo/enterprise#118843 Forward-Port-Of: odoo/enterprise#118773
This update fixes an issue where check amounts weren't being properly rounded in the Philippines (PH) version of Odoo. Previously, the check amount in words displayed with an incorrect decimal format, including 'ONLY'. Now, the decimal amounts are rounded correctly, ensuring accurate check printing and compliance with local regulations.
Original PR description
Current behaviour: --- When paying with checks, the amount is not rounded in the check amount in words string. Steps to reproduce: --- 1. Switch to PH company 2. Set setting Check Layout as "Print Check - PH" 3. Create a new vendor bill 4. Add a product with a specific price like 91490.15 5. Confirm the bill, click on Register Payment 6. Select Payment Method "Checks", Create Payment 7. Go to the payment, Amount in Words is wrong 8. Ninety-One Thousand Four Hundred Ninety And 15000000001/100 ONLY Expected behaviour: --- The decimal amount should be rounded, and "ONLY" shouldn't appear. Fix: --- Rounded the pay amount And backported: https://github.com/odoo/enterprise/commit/bb6c9848665709c14c5113b2c98976f869cd473b opw-6058344 Forward-Port-Of: odoo/enterprise#117679 Forward-Port-Of: odoo/enterprise#116717
This update fixes an issue where the General Ledger and Balance Sheet reports were exporting all accounts instead of the selected one when changing date filters. The fix removes unnecessary filtering logic that was introduced previously, ensuring the report accurately reflects the user's chosen account.
Original PR description
Steps: - Open Balance Sheet report and unfold lines - Open the General Ledger from a line with an account - On GL report, change date filter - Export XLSX report -> We export all accounts instead of the one selected in the search bar Cause: Since f8dceec74e44ffe4aef67655be8811c96da91eba we filter out the filter if a default account is defined in the context which is the case in the `caret_option_open_general_ledger` method Fix: Remove the filtering as the behavior that was fixed by the mentioned commit does not happen anymore. opw-6234427 Forward-Port-Of: odoo/enterprise#119156
This update prevents Odoo from crashing when the Barcode Lookup API returns a broken image URL. Previously, an invalid URL would cause an error. Now, the system safely ignores these errors, ensuring the product picture retrieval process continues without interruption.
Original PR description
[FIX] product_barcodelookup: avoid crash on invalid image URLs **Steps to Reproduce:** - Install Sales module. - Configure a valid Barcode Lookup API key. - Create a product without an image. - Set a…
[FIX] product_barcodelookup: avoid crash on invalid image URLs
**Steps to Reproduce:**
- Install Sales module.
- Configure a valid Barcode Lookup API key.
- Create a product without an image.
- Set a barcode whose returned image URL is broken or returns HTTP 404
(e.g. `8426904171073`).
- Select the product and trigger the server action:
`Action -> Get Pictures from Barcode Lookup`
Issue:
**During image fetching:**
- Barcode Lookup API successfully returns product data and image URLs.
- `_get_image_from_url()` attempts to download the image.
- The image URL responds with HTTP 404.
- `barcode_lookup_request()` returns a dict for non-200 responses.
- `_get_image_from_url()` assumes the response is always a `requests.Response`
object and directly accesses: `response.status_code`
- This causes: `AttributeError: 'dict' object has no attribute 'status_code'`
**Root Cause:**
- `barcode_lookup_request()` returns inconsistent response types:
- `requests.Response` for successful requests
- `dict` for failed requests
- _get_image_from_url() does not handle the dict response before accessing
response attributes.
**Solution:**
- Make barcode_lookup_request() always return a One Response
object.
- Move the response validation to the callers instead of returning custom
dict objects.
**Result:**
- No RPC crash when image URLs are invalid or return 404.
- Broken image URLs are safely ignored.
**OPW-6200749**
Forward-Port-Of: odoo/enterprise#116925This update resolves an issue where users attempting to access archived documents through specific methods (like widgets or direct URLs) would incorrectly display a 'not found' message. This fix ensures that archived documents are correctly handled and accessible, improving the user experience. It's a follow-up to previous improvements related to document management.
Original PR description
When a user tries to access an archived document via * a many2one widget * `/odoo/documents.document/<id>` * a discuss notification they end up in "All" with a toast specifying that the document was not found. Follow-up of Task-6068437 (follow up of Task-5386466). Task-6214488 Forward-Port-Of: odoo/enterprise#119302 Forward-Port-Of: odoo/enterprise#117229
This update fixes an issue where the ICP export generated inconsistent XML reports by using values from multiple company contexts. The change ensures a single, reliable company context is used for identifier values, improving the accuracy and clarity of the exported data. This enhances the reliability of financial reporting.
Original PR description
Description of the issue this commit addresses: The ICP export could mix values from different company contexts. In some cases, the main identifier and the fiscal entity division value did not come from the same source, which could create confusing or inconsistent XML output. --- Desired behavior after this commit is merged: This commit makes the ICP export use one consistent company context for identifier values, reuses precomputed values when available, and avoids overwriting them with unrelated defaults. --- task-6065382 Forward-Port-Of: odoo/enterprise#119282 Forward-Port-Of: odoo/enterprise#112995
7 changes
Resolved issues and error corrections
This update resolves an issue preventing invoicing users from accessing necessary data within the PDP (Point of Departure) reporting flows. Previously, Odoo was blocking access, which prevented users from correctly evaluating e-reporting fields on invoices. This change ensures invoicing users can fully utilize the PDP reporting functionality.
Original PR description
Allow invoicing users to read PDP reporting flows. Invoice views can read PDP flow relations to evaluate e-reporting-related fields or buttons. Users with invoicing access could open the invoice but were blocked when Odoo tried to read the linked PDP flow. runbot.build.error-939457
This update significantly speeds up the process of deleting website-related fields in Odoo. Previously, this check could take minutes, blocking user actions. Now, it completes in milliseconds by focusing only on fields that actually contain website form markup, improving overall system responsiveness.
Original PR description
Summary ======= `_check_if_used_in_website_form`, the ondelete hook on `ir.model.fields` that guards against deleting a field referenced by a website form, performs poorly on realistic databases. It…
Summary
=======
`_check_if_used_in_website_form`, the ondelete hook on
`ir.model.fields` that guards against deleting a field referenced by
a website form, performs poorly on realistic databases. It can take
multiple minutes to validate a single field deletion, blocking user
actions such as removing a Studio field.
This commit restricts the scan to columns that can actually contain
website form markup, bringing the hook from multi-minute to
sub-second without any loss of coverage.
The Problem
===========
Deleting any `ir.model.fields` record triggers this validation hook,
which must ensure the field is not referenced inside any website
form. The implementation iterates every stored HTML column returned
by `website._get_html_fields()` and runs one case-insensitive
`ILIKE '%data-model_name="<model>"%'` search per column against
`<model>.<html_field>`, then parses each match with `lxml` and
validates it with XPath.
Two root issues cause the multi-minute cost:
- **Unbounded scan surface**: all stored HTML columns are scanned
(~95 on realistic databases), even though the vast majority of them
declare `sanitize=True` and `sanitize_form=True` (the defaults).
When both flags are True, `<form>` tags are stripped on write and
the column can never physically contain website form markup.
- **Per-column `ILIKE` cost**: `ILIKE` on large TEXT/JSONB columns
performs a sequential scan. A single large HTML column is enough
to make the hook run for several minutes on its own.
Improvements
============
- Scan only columns that can actually contain forms:
- `ir.ui.view.arch_db` , primary target; all website forms are
stored there.
- HTML fields whose sanitization either is disabled
(`sanitize=False`, e.g. `blog.post.content`,
`website.custom_code_head`) or explicitly allows forms
(`sanitize_form=False`, e.g.
`product.template.website_description`, `hr.job.description`,
`event.event.description`). Any other HTML field strips `<form>`
on write and will never contain a form.
- Batch searches: group the deleted fields by model once and emit a
single `OR`-domain search per candidate column, instead of one
search per (field, column) pair.
- Parse each returned record with `lxml` and validate with XPath
directly. The `ILIKE` domain already filters out non-matching rows
DB-side.
Benchmarks
==========
Profiled on a database containing ~95 stored HTML columns and ~5.2k
views. The hook was invoked read-only via
`field._check_if_used_in_website_form()` on a custom field.
| Metric | Before | After |
| :----------------------------- | ---------: | ---------: |
| Hook wall time | ~444 s | ~173 ms |
| HTML columns scanned | 95 | 5 |
| SQL queries issued | 96 | 6 |
Key results:
- Hook wall time reduced from multi-minute to sub-second
(~2,570× faster on the profiled database).
- Scan surface reduced from ~95 columns to a handful (1 +
the form-capable HTML fields installed on the database, typically
under 10).
opw-6086536This update fixes a bug preventing users from searching for products in the webshop using their 'Ecommerce Description'. Previously, this field wasn't included in the search functionality. This change ensures customers can find products more effectively based on their descriptions, improving the shopping experience.
Original PR description
Steps to produce: --- - Install `website_sale` module. - Create a product and set an `Ecommerce Description` in the Sales tab. - Go to the webshop and search using a term from the ecommerce description. Issue: --- - Products cannot be found when searching by their ecommerce description. The `description_ecommerce` field is not included in the website search fields. In saas-19.3, this issue has already been resolved in [commit], where the same approach was used. [commit]: https://github.com/odoo/odoo/commit/9394e17a07cb125914fba137405c152bee2d7618 Before: --- <img width="558" height="116" alt="image" src="https://github.com/user-attachments/assets/87730a2e-e326-49a6-be4f-04a167b07d53" /> After: --- <img width="560" height="157" alt="image" src="https://github.com/user-attachments/assets/17ed4abe-6abe-4981-aa1e-6069754ca479" /> opw-6260876 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where duplicating a database related to German Point of Sale certification (l10n_de_pos_cert) would cause errors. The change removes specific identifiers during duplication, allowing for proper testing in neutralized databases. This ensures the module functions correctly when creating test environments.
Original PR description
In this commit: -------------------- - On a duplicate database `client_id` and `tss_id` are removed so it works as test in neutralized dbs without throwing errors. task- 5457231
This update fixes an issue where invitation to follow notifications weren't appearing in user inboxes. The change ensures that the notification subject is always displayed, regardless of whether additional comments are added to the invitation. This improves the visibility of important follow requests.
Original PR description
Steps to reproduce: - Configure user A to receive inbox notifications. - As user B, invite user A to follow a record with Notify recipients enabled. - Open the inbox of user A. The Invitation to follow notification is not displayed in the inbox when no additional comment is provided. This happens because the notification body is empty unless extra comments are added. This commit fixes the issue by displaying only the subject when the body is empty. Task-[5485727](https://www.odoo.com/odoo/project/1519/tasks/5485727) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where Android 14 users couldn't access their device's camera when using file input fields. The fix ensures users can now select photos directly from their camera, improving usability on this platform. This change addresses a compatibility problem with recent Android versions.
Original PR description
Since Android 14 we don't have option to take a photo on clicking on file input in Chrome.
This for example will allow only images but no option "Camera"
```html
<input type="file" accept="image/*/>
```
A workaround is to use a dummy mimetype (`*/*`), example `dummy/allowAndroidCamera` The fix will be applied on image widget in addition to the original `acceptedFileExtensions` to not override the existing `accept` attribute
Linked url
- https://blog.addpipe.com/html-file-input-accept-video-camera-option-is-missing-android-14-15/
- https://stackoverflow.com/questions/77876374/html-input-type-file-not-working-to-pull-up-camera-for-pixel-android-14-comb/79163998#79163998
- https://issues.chromium.org/issues/40937303
opw-6040375
backport of https://github.com/odoo/odoo/pull/265750
Forward-Port-Of: odoo/odoo#266850This update resolves inconsistencies in Odoo's lot valuation system when products are valued without assigned lots. Previously, discrepancies arose with negative lot quantities, but this fix now allows for negative lot valuations, enabling more flexible stock management. It ensures accurate valuation even when physical lot quantities don't perfectly match the valued amounts.
Original PR description
There have been multiple issues that happened when enabling/disabling lot valuation. Odoo is flexible with the reservation/consumption of lots on StockQuant without lots. This means that while your…
There have been multiple issues that happened when enabling/disabling lot valuation. Odoo is flexible with the reservation/consumption of lots on StockQuant without lots. This means that while your product is valued by lot/SN, you can still end up with a discrepancy between your lot quantity on hand and your lot quantity valued. You can be in a situation where you don't have any negative lots on hand, but the valuation shows the negative amount. If you tried to fix the discrepancy by setting the StockQuant to zero, you are blocked because a lot/SN is required. If you tried to disable the valuation by lot configuration, it was allowed (because no negative quants on hand), but the valuation remaining data would be broken. This PR aims to fix the methods '_svl_empty_stock' and '_svl_replenish_stock' by supporting negative lots. OPW-4888289 --- One way to break the lot valuation: https://github.com/user-attachments/assets/b5f0d8c5-d798-4110-9564-951d0be9dcc6 --- After this PR: - `_svl_empty_stock` simply set the valuation for the lot/product to 0, it's not an OUT/IN svl, and no need to call `_run_fifo` or `_run_fifo_vacuum` (perf++). - The user can enable/disable lot valuation with negative lots - When enabling the lot valuation, the lot valuation will be replenished even if the global quantity is 0. - The user can disable lot valuation when they have a quant without lot. - The user can NOT enable lot valuation when they have a quant without lot. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr