Daily updates from Odoo
Monday, December 15, 2025
69 changes
19 changes
Enhancements to existing features
This update restricts access to version forms within the HR module, ensuring that only HR users and managers can view them. Previously, all users could access these forms, and this change enhances security and streamlines workflows by limiting access based on user roles.
Original PR description
*= hr_payroll, hr_contract_salary Purpose of this PR: - Make version quick access open employee form with selected version if the user has access. - Only HR users/managers can access version form, others can not see quick access. This PR includes: - Added new helper action on hr.version to open the employee form. - Override get_formview_action in payslip and offer models to redirect quick access to employee form with selected version. - Adjusted view fields to restrict version access: - Users with access can open the version from quick access. - Others can see it without the quick access (using no_open option). task-4963805
This update restricts access to employee version quick access based on user roles. HR managers and employees can now directly access the employee version form, while other users will continue to see the standard view. This enhances security and streamlines workflows for HR personnel.
Original PR description
*= hr_payroll Purpose of this PR: - Make version quick access open employee form with selected version if the user has access. - Only HR users/managers can access version form, others can not see quick access. This PR includes: - Added new helper action on hr.version to open the employee form. - Override get_formview_action in payslip and offer models to redirect quick access to employee form with selected version. - Adjusted view fields to restrict version access: - Users with access can open the version from quick access. - Others can see it without the quick access (using no_open option). task-4963805
This update enhances the Point of Sale system by automatically saving log messages to the user's browser for 24 hours. This allows our support team to quickly diagnose and resolve issues by providing clients with easy access to these logs. A download button has been added to simplify the process of sharing these logs with our support team.
Original PR description
Enterprise PR: https://github.com/odoo/enterprise/pull/100183 This commit extends the `logPosMessage` function in the POS to also save each log message to a `Logger` instance (which persists the logs for 24 hours in the browser storage). A download button is added to download these logs, which the client could then send on to the support team. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#236927
This update adds logging to the blackbox communication process, which helps our clients troubleshoot issues more effectively. Combined with a related change to save and download logs, this enhances our ability to diagnose and resolve problems quickly. This improves client support and reduces downtime.
Original PR description
Community PR: https://github.com/odoo/odoo/pull/236927 This commit adds several log messages for the communication with the blackbox. In combination with the associated Community PR to save and download these logs, this should enable easier debugging when clients experience problems. Forward-Port-Of: odoo/enterprise#100183
Resolved issues and error corrections
This update resolves an issue where applying discount codes would cause errors when a loyalty program was archived and then unarchived. The fix ensures the system checks for duplicate discount codes, even when records are archived, preventing conflicting rules and ensuring smooth discount code application.
Original PR description
Currently, an error occurs when a user applies a discount code to the cart. Steps to reproduce: - Install the `website_sale_loyalty` module. - Go to `Discount & Loyalty` and create a new program with…
Currently, an error occurs when a user applies a discount code to the cart. Steps to reproduce: - Install the `website_sale_loyalty` module. - Go to `Discount & Loyalty` and create a new program with `Program Type = Discount Code`. - Under the `Rules & Rewards` tab, add a rule with a `code (e.g., demo)`. - `Archive` the program record. - Repeat `steps 2 and 3`. - `Unarchive` the first record. - Go to `Website` > `Shop`, add a product to the cart, and go to the cart page. - Apply the code `demo`. `ValueError: Expected singleton: loyalty.program(2, 3)` This error occurs when a user creates a sale loyalty program and adds a loyalty rule with a code, then archives that record. If the user creates the same record again and later unarchive the first record, there will be two rules with the same code, resulting in two loyalty programs [1], which raises the error [2]. This commit ensures that the system also checks archived records when unarchiving and verifies that there are no two or more programs with the same code being unarchived, so that no conflicting rules are activated. [1]- https://github.com/odoo/odoo/blob/76a8d6bc28eb5998bd976b3c41bf9772d325c8bf/addons/sale_loyalty/models/sale_order.py#L1351 [2]- https://github.com/odoo/odoo/blob/76a8d6bc28eb5998bd976b3c41bf9772d325c8bf/addons/sale_loyalty/models/sale_order.py#L1371 sentry-6871330244 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#239713 Forward-Port-Of: odoo/odoo#226801
This update fixes an issue where subscription products weren't displaying prices with tax, even when the website setting was enabled for tax-inclusive pricing. The change ensures that the correct company ID is used to determine tax applicability, resulting in accurate tax-inclusive prices for subscriptions.
Original PR description
subscriptions Despite enabling the website setting to display tax-inclusive prices, subscription products show prices without tax when a recurring pricelist is configured. In `_get_sales_prices`, the product’s company ID is compared to the website’s company, but products visible to all have a false company ID, and products assigned to a parent company retain the parent’s company ID. As a result, when the product’s company ID does not match the website’s company ID, no taxes are applied.Instead, _filter_taxes_by_company should be used to determine whether the company can access the product’s tax_id. opw-5222411
This update fixes a confusing issue on the POS receipt in India where all tax columns (CGST, SGST, IGST) were displayed together. Now, the receipt correctly shows only the relevant tax column – either CGST+SGST or IGST – based on the transaction, improving clarity for users and ensuring accurate reporting.
Original PR description
Description of the issue/feature this PR addresses: - The POS receipt shows CGST, SGST, and IGST together, even when IGST is applicable. - This is incorrect because only CGST+SGST or IGST should be…
Description of the issue/feature this PR addresses: - The POS receipt shows CGST, SGST, and IGST together, even when IGST is applicable. - This is incorrect because only CGST+SGST or IGST should be displayed, not all three. Current behavior before PR: - The receipt always displays CGST, SGST, and IGST columns at the same time. <img width="250" height="400" alt="image" src="https://github.com/user-attachments/assets/5c8487c7-c497-4c82-ad80-8cf0e98fbf38" /> Desired behavior after PR is merged: - The receipt shows only the correct tax columns based on the transaction: - Shows CGST and SGST when GST applies. - Shows IGST when IGST applies. <img width="250" height="400" alt="image" src="https://github.com/user-attachments/assets/68d2fb58-9e15-4861-a71f-ccb2d978e544" /> Changes implemented in this commit: - Added `t-if="l10n_in_hsn_summary.has_gst"` to CGST and SGST headers. - Added the same condition to CGST and SGST values in the item rows. task-5268935 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#236243
This update corrects a bug in the l10n_es_edi_tbai module that prevented the correct 'FechaOperacion' field from being generated in TBAI XML invoices when the invoice date and delivery date were set to a past date. This ensures compliance with Spanish tax regulations and accurate invoice generation.
Original PR description
With l10n_es_tbai: - Create an invoice with an `invoice_date` and `delivery_date` that are the same and earlier than today. - In the generated TBAI XML, `FechaOperacion` is missing. In the TBAI XML, `FechaExpedicionFactura` corresponds to the date on which the XML is generated. `FechaOperacion` corresponds to the `delivery_date` and should appear whenever it differs from the issue date. The TicketBAI specs define `FechaOperacion` as: > “Date on which the transaction was carried out, whenever it differs from the issue date.” So when the invoice date and delivery date are equal but set in the past, `FechaOperacion` is not generated, even though it should be. opw-4477135 opw-4477135 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#239189
This update fixes an issue where scanning a lot in a batch transfer would incorrectly update a different line instead of the intended one. Previously, the system prioritized completed lines, leading to inaccurate inventory tracking. This change ensures that scanning a lot updates the correct line, maintaining accurate stock levels.
Original PR description
…f related line is complete ### Steps to reproduce: - In the settings enable Lots & Serials and Batch transfers - On the delivery operation types enable show reserved lots in the barcode tab - Create…
…f related line is complete ### Steps to reproduce: - In the settings enable Lots & Serials and Batch transfers - On the delivery operation types enable show reserved lots in the barcode tab - Create a storable product tracked by lots and put 10 x lot1 in stock - Create and confirm a delivery for 10 units - Create a batch transfer with your delivery - Process your transfer from the barcode app - Scan one unit of LOT1 and put in pack - Toggle sublines select the 0/9 subline without lots nor package - Scan LOT1 #### > The 1/1 LOT1 line with a pack is updated to 2/1 rather than the 0/9 ### Cause of the issue: Since e45249c2f6883d743a4e7d19e736c622e26a3d58 and 27bfb985a29e9f0abe94dec8a76bf6d08560fbc9 an override of the `_findLine` method has been introduced in `BarcodePickingBatchModel` to ensure that scanning a lot referenced by an already existing line of the batch transfer triggers an update of that line rather than an override of the lot of an other line. However, these lines should not priorities a completed line when there is line without a set lot. opw-5340865 Forward-Port-Of: odoo/enterprise#101908 Forward-Port-Of: odoo/enterprise#101611
This update fixes a bug where credit notes weren't properly accounted for when settling invoices. The change ensures credit notes are now correctly processed, allowing them to reduce the total amount settled. This improves the accuracy of financial reporting and reconciliation.
Original PR description
We had a bug when settling invoices and credit notes of a customer. The credit notes where not correctly computed. Steps to reproduce: ------------------- In accounting: * Create and confirm a customer invoice for a total of 10$. * Create and confirm for the same customer a credit note for a total of 2$. In POS: * In a seesion, open the customer selection menu. * In the burger menu at the right of our customer, select Settle invioces. * Select our invoice and credit note. > Observation: The credit note was previously seen as an amount to pay. Why the fix: ------------ Recomputing updates existing credit notes to use the signed residual logic. The domain change allows credit notes with negative pos_amount_unsettled to appear. After these changes, credit notes should appear in the "Settle invoices" dialog with negative amounts, and selecting them will create negative lines that reduce the total. opw-5257884 Forward-Port-Of: odoo/enterprise#101186
This update fixes a calculation error in the MRR evolution dashboard that was causing 'Contraction' figures to be double-counted. The change ensures the dashboard accurately reflects MRR trends by properly incorporating contraction data, which was previously included in the 'Up/Downgrade' calculation. This improves the accuracy of the dashboard's reporting.
Original PR description
…traction **Issue** The formula defined for the "Net new" in the MRR evolution dashboard double counted the "Contraction", as it is already included in the "Up/Downgrade" (cell B6, equal to B4+B5, "Contraction" + "Expansion"). <img width="360" height="354" alt="image" src="https://github.com/user-attachments/assets/0a19a86a-f1b9-462f-812c-71a283f6fe89" /> opw-4925930 Forward-Port-Of: odoo/enterprise#101598 Forward-Port-Of: odoo/enterprise#96878
This update fixes issues where changes to nested card images were incorrectly applied to other cards, or where cards without cover images incorrectly displayed cover image options. The fix ensures that image settings are applied only to the specific card being edited, improving the user experience and consistency.
Original PR description
This commit fixes three issues occurring when editing nested `s_card` snippets. **Problem 1 - Incorrect cover image detection** Issue: An `s_card` without a cover image displayed the cover image…
This commit fixes three issues occurring when editing nested `s_card` snippets. **Problem 1 - Incorrect cover image detection** Issue: An `s_card` without a cover image displayed the cover image option if it contained a child `s_card` with a cover image. Cause: The `querySelector` in `CardImageOption` could detect images inside child snippets. Fix: Now the `querySelector` only searches among direct children of the snippet root element. **Problem 2 - Ratio settings applied to all child cards** Issue: Changing the cover image ratio on an `s_card` applied the setting to all nested cards. Cause: The `we-select` in `s_card` options targeted `.o_card_img_wrapper`, causing the class to apply to all descendants. Fix: The selector is now `>.o_card_img_wrapper`, so the option acts only on the current snippet. **Problem 3 - Parent image positioning leaking to children** Issue: Adjusting the cover image position on a parent `s_card` affected the rendering of all child card images. Cause: CSS rules for `.o_card_img_horizontal` applied to all descendant elements matching `.o_card_img_wrapper`. Fix: The rules now apply only to direct children of `.o_card_img_horizontal`. The same correction was applied to `.o_card_img_ratio_custom`. task-5349540 Forward-Port-Of: odoo/odoo#239503 Forward-Port-Of: odoo/odoo#237587
This update fixes an issue where the system incorrectly processed vendor bills with a zero price in Italian e-invoicing XML. The fix ensures that the system now accurately reflects the zero price from the XML, preventing incorrect pricing calculations and improving compliance with Italian tax regulations. This ensures accurate e-invoicing submissions.
Original PR description
**Steps to reproduce:** * Install the **Italy – E-invoicing (l10n_it_edi)** module. * Create a product with a non-zero cost price. * Create a **vendor bill** for an Italian vendor using the **RC…
**Steps to reproduce:** * Install the **Italy – E-invoicing (l10n_it_edi)** module. * Create a product with a non-zero cost price. * Create a **vendor bill** for an Italian vendor using the **RC fiscal position**. * Add the product with **unit price = 0**, apply **RC tax**, and set the **Origin Document Type**. * Confirm the bill and click **Send to Tax Integration** to generate the XML in the chatter. * Upload the generated XML through **Accounting → Vendors → Bills → Upload**. **Observed behavior:** * The imported bill ignores the XML value **0.00** and uses the product's default price instead. **Cause:** * The XML’s `<PrezzoUnitario>` value is mandatory and may be **0**, but the code skipped it because `0.0` evaluates as falsy in the walrus assignment. **Fix:** * Always set the parsed `PrezzoUnitario` value (including **0.0**) on the invoice line. ref: https://fex-app.com/FatturaElettronica/FatturaElettronicaBody/DatiBeniServizi/DettaglioLinee/PrezzoUnitario opw-5322187 Forward-Port-Of: odoo/odoo#239904 Forward-Port-Of: odoo/odoo#239419
This update ensures that Luxembourg (`l10n_lu`) companies generating FAIA XML reports for their general ledger correctly include the 'PurchaseInvoices' tag, as required by the latest FAIA version 2.01. Previously, vendor bills weren't correctly identified, but this change implements a standardized template to resolve this issue and ensure accurate reporting.
Original PR description
Since version 2.01 of FAIA, it is a requirement to include the `PurchaseInvoices` tag in the FAIA XML. With a `l10n_lu` company: - Create a vendor bill. - In the general ledger, download the FAIA XML report. In the generated XML document, the vendor bill will not appear under `PurchaseInvoices`. The `PurchaseInvoices` section is meant to mirror the `SalesInvoices` section and contains the exact same structure. This PR implements a generic template for both. **Specs and source** (in `FAIA_v2.01_full`): https://pfi.public.lu/dam-assets/backup/FAIA/FAIA/XSD_Files.zip opw-5360572 Forward-Port-Of: odoo/enterprise#101958 Forward-Port-Of: odoo/enterprise#100697
This update fixes an issue where the VAT summary report in the Argentinian localization incorrectly calculated totals when invoices had both VAT (price included) and multiple IIBB taxes. The fix ensures that VAT amounts are counted accurately, matching the totals displayed in the accounting form, preventing inflated totals.
Original PR description
**Issue** When using a VAT tax marked as price included, together with multiple IIBB taxes on the same invoice, the VAT summary report displays an incorrect total. Specifically, the VAT amount is…
**Issue** When using a VAT tax marked as price included, together with multiple IIBB taxes on the same invoice, the VAT summary report displays an incorrect total. Specifically, the VAT amount is counted multiple times, once for each IIBB tax, leading to an inflated total. **Steps to Reproduce** 1. Install the Accounting app and the Argentinian localization (l10n_ar) 2. Set the 21% VAT Purchase tax as Included in Price 3. Create a vendor bill applying the 21% VAT tax and at least two IIBB taxes 4. Open the VAT summary report for that bill Expected Behaviour: The total in the VAT summary should match the total shown in the accounting form view, with each tax counted only once. **Root Cause** The VAT summary report in the Argentinian localization relies on an SQL query to aggregate tax information for each `account.move`. The query joins `account_move_line` with `account_tax`, `account_tax_group`, and the many-to-many relation table `account_move_line_account_tax_rel`. Each `account_move_line` related to a VAT tax line (via `tax_line_id`) is joined with the `account_move_line_account_tax_rel` table. If that base line is related to multiple IIBB taxes, the join multiplies the VAT line once per IIBB tax since multiple matching rows exist. **Fix** The solution separates the logic for computing tax lines and base lines into two distinct subqueries. Each is aggregated independently to prevent duplication caused by one-to-many and many-to-many joins. The results are then joined using the unique `account_move_line.id`, ensuring each tax amount is counted exactly once in the final totals. opw-4776861 Forward-Port-Of: odoo/enterprise#98933 Forward-Port-Of: odoo/enterprise#85873
This update fixes an issue where flexible employee leave durations were incorrectly calculated due to timezone differences. The fix uses date ranges (request_date_from and request_date_to) to ensure accurate duration calculations, regardless of the employee's timezone. This ensures leave requests are processed correctly and accurately reflect the intended working hours.
Original PR description
### Steps to reproduce: - Create an employee with Flexible working schedule - Set the timezone for this employee very far from yours - Create an Unpaid leave with Custom Hours for this employee - Set the hours of the leave from 8 to 21 - Notice the duration is just 8 hours ### Cause: When calculating the duration of the flexible employee leave we check if the date_from and the date_to has the same date and if so we get the difference between the hour_to - hour_from but sometime when the tz is different when we convert it to UTC the dates overlap in two days so the condition sets to false so we get the working hours of the employee. ### Fix: Using the request_date_from and request_date_to in this condition where it will always be accurate in terms of days opw-5118689 Forward-Port-Of: odoo/odoo#239581 Forward-Port-Of: odoo/odoo#230366
This update optimizes how Odoo searches for products based on names, significantly speeding up the process. The change addresses a performance bottleneck caused by how Odoo handles complex search queries, particularly when searching across multiple product tables. This results in faster product searches, especially with large product catalogs.
Original PR description
When doing a name_search with positive operators (=, ilike, in) the resulting query combines domains with the OR operator. This works fine when the leaves are all on the same table (product_product…
When doing a name_search with positive operators (=, ilike, in) the resulting query combines domains with the OR operator. This works fine when the leaves are all on the same table (product_product or product_template) as postgresql uses a Bitmap OR when everything is properly indexed.
When leaves are on multiple tables however postgresql has to plan a Seq Scan. For instance, let's take a simple domain on product.product of the form `['|', ('name', 'ilike', 'test'), ('default_code', 'ilike', 'test')]`. Because `name` is an inherited field via `product_tmpl_id`, the resulting query has the where clause `join_table.name ilike %s OR product_product.default_code ilike %s` with `join_table` the table you get after joining product_product and product_template. Since it's an `OR` condition, postgresql does not know in advance whether a given row will pass this condition. There's no way to filter the tables before the join. The condition moves therefore to a `Join Filter` node and postgresql has to scan the whole join table to fetch the correct tuples.
Same thing when there's a subquery. In case of a where clause `cond OR cond OR subquery`, postgresql does not know in advance whether or not a given row is gonna pass the subquery condition. So it has to scan the whole table.
In both cases this becomes a bottlneck when the number of products increaases. This commit introduces the use of `UNION ALL` instead of `OR`. There's one SubPlan for each individual table in the domain. The results are then appended to get the final products matching the conditions. Thanks to each table having its own SubPlan postgresql can now properly hit indexes for each table, greatly improving the performances.
#### speedup
In a database with 2.5M product_product, the name_search on product with a partner_id in the context and the ilike operator goes from 8s -> 5ms.
In another database with 500k product_template, the name_search on template with a partner_id in the context and the ilike operator goes from 1.8s -> 5ms.
opw-4921944
opw-5103287
opw-5049054
opw-5256691
opw-5221753
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#238901
Forward-Port-Of: odoo/odoo#229275This update resolves an issue in Firefox where scheduling multiple messages would cause the application to freeze. The problem stemmed from an incorrect date sorting algorithm within the chat functionality, leading to an infinite loop. The fix ensures consistent date sorting across browsers, preventing the freeze and improving stability.
Original PR description
**Steps to reproduce:** - (Firefox only) - Go to any record which uses a chatter (e.g. Contact) - Send message > Full composer > click the schedule message icon (lower right corner) - Schedule the…
**Steps to reproduce:**
- (Firefox only)
- Go to any record which uses a chatter (e.g. Contact)
- Send message > Full composer > click the schedule message icon (lower right corner)
- Schedule the message in the future and click send
- You should see now a post in the chatter indicating that the message will be sent
- Now click Send message and repeat the above steps again to schedule a second message
- Whole page will be freezed
- Reloading doesn't help
**Issue:**
Infinite loop in reactive callback on firefox.
The code gets stuck in
```js
for (const callback of [...callbacks]) {
clearReactivesForCallback(callback);
callback();
}
```
because of
```js
const sortProxy2 = reactive(recordProxy, function sortObserver() {
self.requestSort(record, fieldName);
});
this.fieldsSortProxy2.set(fieldName, sortProxy2);
```
which loops over `store._.ADD_QUEUE("sort", record, fieldName);`
(Forcing the `requestSort` only change the infinite loop into a recursion error)
The recomputation seems to be caused by a bad sorting here:
```js
this.scheduledMessages = Record.many("ScheduledMessage", {
sort: (a, b) => {
if (a.scheduled_date === b.scheduled_date) {
return a.id - b.id;
}
return a.scheduled_date < b.scheduled_date ? -1 : 1;
},
```
In the case both datetimes are equal the first condition doesn't properly catches it:
```
> a.scheduled_date - b.scheduled_date
> 0
> a.scheduled_date === b.scheduled_date
> false
> a.scheduled_date < b.scheduled_date
> false
> a.scheduled_date > b.scheduled_date
> false
```
Which make the ordering change on each sort iteration:
```
> Array [ "ScheduledMessage,14", "ScheduledMessage,13" ]
> recordsFullProxy.sort(func);
> Array [ "ScheduledMessage,13", "ScheduledMessage,14" ]
> recordsFullProxy.sort(func);
> Array [ "ScheduledMessage,14", "ScheduledMessage,13" ]
```
Chromium based browsers probably use a different sorting algorithm than Firefox, which seems to prevent the issue.
**Fix:**
Use `compareDatetime` to ensure the ordering is constant for the same datetime values.
opw-5367371
Forward-Port-Of: odoo/odoo#239745
Forward-Port-Of: odoo/odoo#239199This update fixes a problem where loyalty discounts weren't accurately applying based on the quantity of items purchased. By using the quantity on each line, the system now correctly calculates and applies the cheapest line discount, ensuring accurate loyalty program rewards. This resolves issues with maximum discount limits.
Original PR description
Discounts based on the cheapest line were not accounting for the quantity on the line and this was causing issues with the computations when using a maximum discount amount. Changing the discountable value to be a ratio of the quantity on the line allows the cheapest product to be discounted at the correct amount without messing with the discount factor. opw-4998557 Forward-Port-Of: odoo/odoo#239349 Forward-Port-Of: odoo/odoo#222564
10 changes
Resolved issues and error corrections
This update resolves an issue where applying discount codes would cause errors when a loyalty program was previously archived and then unarchived. The change ensures the system checks for duplicate discount codes, even when records are archived, preventing conflicting rules and ensuring smooth discount code application.
Original PR description
Currently, an error occurs when a user applies a discount code to the cart. Steps to reproduce: - Install the `website_sale_loyalty` module. - Go to `Discount & Loyalty` and create a new program with…
Currently, an error occurs when a user applies a discount code to the cart. Steps to reproduce: - Install the `website_sale_loyalty` module. - Go to `Discount & Loyalty` and create a new program with `Program Type = Discount Code`. - Under the `Rules & Rewards` tab, add a rule with a `code (e.g., demo)`. - `Archive` the program record. - Repeat `steps 2 and 3`. - `Unarchive` the first record. - Go to `Website` > `Shop`, add a product to the cart, and go to the cart page. - Apply the code `demo`. `ValueError: Expected singleton: loyalty.program(2, 3)` This error occurs when a user creates a sale loyalty program and adds a loyalty rule with a code, then archives that record. If the user creates the same record again and later unarchive the first record, there will be two rules with the same code, resulting in two loyalty programs [1], which raises the error [2]. This commit ensures that the system also checks archived records when unarchiving and verifies that there are no two or more programs with the same code being unarchived, so that no conflicting rules are activated. [1]- https://github.com/odoo/odoo/blob/76a8d6bc28eb5998bd976b3c41bf9772d325c8bf/addons/sale_loyalty/models/sale_order.py#L1351 [2]- https://github.com/odoo/odoo/blob/76a8d6bc28eb5998bd976b3c41bf9772d325c8bf/addons/sale_loyalty/models/sale_order.py#L1371 sentry-6871330244 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#239713 Forward-Port-Of: odoo/odoo#226801
This update fixes a confusing issue on the POS receipt where all tax columns (CGST, SGST, IGST) were displayed together. Now, the receipt correctly shows only the relevant tax column – either CGST+SGST or IGST – based on the transaction, ensuring accurate and clear reporting for Indian businesses.
Original PR description
Description of the issue/feature this PR addresses: - The POS receipt shows CGST, SGST, and IGST together, even when IGST is applicable. - This is incorrect because only CGST+SGST or IGST should be…
Description of the issue/feature this PR addresses: - The POS receipt shows CGST, SGST, and IGST together, even when IGST is applicable. - This is incorrect because only CGST+SGST or IGST should be displayed, not all three. Current behavior before PR: - The receipt always displays CGST, SGST, and IGST columns at the same time. <img width="250" height="400" alt="image" src="https://github.com/user-attachments/assets/5c8487c7-c497-4c82-ad80-8cf0e98fbf38" /> Desired behavior after PR is merged: - The receipt shows only the correct tax columns based on the transaction: - Shows CGST and SGST when GST applies. - Shows IGST when IGST applies. <img width="250" height="400" alt="image" src="https://github.com/user-attachments/assets/68d2fb58-9e15-4861-a71f-ccb2d978e544" /> Changes implemented in this commit: - Added `t-if="l10n_in_hsn_summary.has_gst"` to CGST and SGST headers. - Added the same condition to CGST and SGST values in the item rows. task-5268935 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#236243
This update resolves a problem where Odoo's IoT Box connections were failing due to a change in how response data was handled. The team adjusted the controller to correctly look for a key session ID in the websocket response, ensuring stable connections for IoT Box users. This prevents disruptions to critical data access.
Original PR description
In odoo/odoo#237586 we removed the `action_args` dict in the action response. As a result, websocket responses are ignored when using a stable IoT Box: the controller looked for `session_id` in `action_args`.
This update ensures that Luxembourg companies using the general ledger correctly generate FAIA XML reports. A recent requirement from FAIA (version 2.01) now mandates the inclusion of a 'PurchaseInvoices' tag, which this change adds to the report. This ensures accurate reporting for Luxembourg VAT compliance.
Original PR description
Since version 2.01 of FAIA, it is a requirement to include the `PurchaseInvoices` tag in the FAIA XML. With a `l10n_lu` company: - Create a vendor bill. - In the general ledger, download the FAIA XML report. In the generated XML document, the vendor bill will not appear under `PurchaseInvoices`. The `PurchaseInvoices` section is meant to mirror the `SalesInvoices` section and contains the exact same structure. This PR implements a generic template for both. **Specs and source** (in `FAIA_v2.01_full`): https://pfi.public.lu/dam-assets/backup/FAIA/FAIA/XSD_Files.zip opw-5360572 Forward-Port-Of: odoo/enterprise#101958 Forward-Port-Of: odoo/enterprise#100697
This update resolves an issue where work orders were sometimes incorrectly marked due to a flaw in how their state was being evaluated. By adjusting the state check to occur at the 'button_mark_done' stage, the system now accurately reflects the correct work order status, ensuring data integrity for production planning.
Original PR description
Previous fix was not sufficient (https://github.com/odoo/odoo/pull/238832) In some cases, evaluating state and reservation_state within _post_inventory's override in mrp_account leads to incorrect workorders state. By evaluating them at end of button_mark_done, the workorders states are correct. task: 5247116 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#239839
This update resolves an issue preventing users from assigning analytic distributions to batch payments during bank reconciliation. The fix removes a restriction that was blocking edits to these payments, now allowing accurate tracking of financial data. This ensures validation errors are avoided and improves reconciliation processes.
Original PR description
**Issue** Users were unable to set analytic distributions on batch payments via the bank reconciliation widget. This limitation could lead to validation errors. **Steps to Reproduce** 1. Create two customer payments 2. Group them into a batch and validate it 3. Open the bank reconciliation widget 4. Create a bank statement line 5. Navigate to the batch payment tab and click on the batch payment 6. Attempt to click on the batch payment line **Root Cause** The method handleLineClicked was overridden in a way that prevented the call to the parent implementation when the flag was 'new_batch', disabling interactivity for these lines. **Fix** The restrictive override of handleLineClicked was removed. All fields in the Manual Operations tab are made read-only, except for analytic distributions, as this is the only field users should be allowed to edit in this context. Opw-4757131 Forward-Port-Of: odoo/enterprise#98874 Forward-Port-Of: odoo/enterprise#89858
This update fixes a bug where import errors weren't shown during batch processing. Now, when an import fails due to incorrect data (like a missing value), users will receive a clear notification, ensuring data integrity and preventing silent import issues. This improves the reliability of the contact import process.
Original PR description
Steps to reproduce ================== - Go to contact, - Import the following file ```csv id,name,active __import__.res_partner_SV_test_01,Name 1,TRUE __import__.res_partner_SV_test_02,Name 2,TRUE __import__.res_partner_SV_test_03,Name 3,TRUE __import__.res_partner_SV_test_04,Name 4,TRUE __import__.res_partner_SV_test_05,Name 5,incorrect value __import__.res_partner_SV_test_06,Name 6,TRUE __import__.res_partner_SV_test_07,Name 7,TRUE __import__.res_partner_SV_test_08,Name 8,TRUE ``` - Set the batch size to 4 - Click on the import button => Only 4 records have been imported and no error is displayed Cause of the issue ================== Errors were only checked in test mode opw-5242285 Forward-Port-Of: odoo/odoo#239632 Forward-Port-Of: odoo/odoo#239109
This update fixes an issue where the VAT summary report in the Argentinian localization incorrectly calculated totals when invoices included both VAT (price included) and multiple IIBB taxes. The fix ensures that VAT amounts are counted accurately, matching the totals displayed in the accounting form, preventing inflated totals.
Original PR description
**Issue** When using a VAT tax marked as price included, together with multiple IIBB taxes on the same invoice, the VAT summary report displays an incorrect total. Specifically, the VAT amount is…
**Issue** When using a VAT tax marked as price included, together with multiple IIBB taxes on the same invoice, the VAT summary report displays an incorrect total. Specifically, the VAT amount is counted multiple times, once for each IIBB tax, leading to an inflated total. **Steps to Reproduce** 1. Install the Accounting app and the Argentinian localization (l10n_ar) 2. Set the 21% VAT Purchase tax as Included in Price 3. Create a vendor bill applying the 21% VAT tax and at least two IIBB taxes 4. Open the VAT summary report for that bill Expected Behaviour: The total in the VAT summary should match the total shown in the accounting form view, with each tax counted only once. **Root Cause** The VAT summary report in the Argentinian localization relies on an SQL query to aggregate tax information for each `account.move`. The query joins `account_move_line` with `account_tax`, `account_tax_group`, and the many-to-many relation table `account_move_line_account_tax_rel`. Each `account_move_line` related to a VAT tax line (via `tax_line_id`) is joined with the `account_move_line_account_tax_rel` table. If that base line is related to multiple IIBB taxes, the join multiplies the VAT line once per IIBB tax since multiple matching rows exist. **Fix** The solution separates the logic for computing tax lines and base lines into two distinct subqueries. Each is aggregated independently to prevent duplication caused by one-to-many and many-to-many joins. The results are then joined using the unique `account_move_line.id`, ensuring each tax amount is counted exactly once in the final totals. opw-4776861 Forward-Port-Of: odoo/enterprise#98933 Forward-Port-Of: odoo/enterprise#85873
This update fixes an issue where public holidays were incorrectly added to leave duration calculations after a leave was confirmed. The fix recomputes the leave duration before confirmation, ensuring accurate tracking of leave time, especially when public holidays overlap with allocations. This prevents users from being incorrectly flagged for exceeding their leave balances.
Original PR description
### Steps to reproduce: - Install Time off apps - Create two consecutive allocations (e.g. one for 2025 and one for 2026) - Create a leave that overlap with the two allocation (e.g. from 8th Dec to…
### Steps to reproduce: - Install Time off apps - Create two consecutive allocations (e.g. one for 2025 and one for 2026) - Create a leave that overlap with the two allocation (e.g. from 8th Dec to 3rd Jan) - Create a public holiday at the beginning of the second allocation (e.g. on 1st Jan 2026) ### Cause: When we are checking the leave duration after having a public holiday the will return the attendance without the public holidays duration so when subtracting the attendance duration from the leave duration we will have a remaining amout equals to the public holiday duration and it will be considered as excess days. https://github.com/odoo/odoo/blob/06e47d8601ba56b1650eeaeef71ebd7a4af39b8b/addons/hr_holidays/models/hr_employee_base.py#L228-L230 https://github.com/odoo/odoo/blob/06e47d8601ba56b1650eeaeef71ebd7a4af39b8b/addons/hr_holidays/models/hr_employee_base.py#L246-L254 ### Fix: We compute the leave duration before confirming it instead of computed them after opw-5006119 Forward-Port-Of: odoo/odoo#239926 Forward-Port-Of: odoo/odoo#235575
This update fixes an issue where loyalty discounts weren't correctly applying quantity-based discounts, leading to inaccurate calculations and potential discount limits. The change ensures that discounts are calculated proportionally to the quantity of each item purchased, resulting in more accurate and reliable loyalty program discounts.
Original PR description
Discounts based on the cheapest line were not accounting for the quantity on the line and this was causing issues with the computations when using a maximum discount amount. Changing the discountable value to be a ratio of the quantity on the line allows the cheapest product to be discounted at the correct amount without messing with the discount factor. opw-4998557 Forward-Port-Of: odoo/odoo#239349 Forward-Port-Of: odoo/odoo#222564
4 changes
Resolved issues and error corrections
This update fixes an issue where rental price calculations were inconsistent due to how relativedelta handled time-zoned dates. The change ensures accurate price calculations by correctly accounting for time zone differences, preventing discrepancies in rental durations. This improves the reliability of rental pricing displayed to customers.
Original PR description
Relativedelta on UTC dates or time-zoned dates doesn't return the same result. In order to calculate consistent prices (price for 1 month in December = price for 1 month in January), we need to work…
Relativedelta on UTC dates or time-zoned dates doesn't return the same result. In order to calculate consistent prices (price for 1 month in December = price for 1 month in January), we need to work on time-zoned dates. Example: Consider a website in UTC+1 (Brussels timezone DST off). And a rental from the 01/12/2025 to the 31/12/2025 = by design, from the 01/01/2025 00h00 (start_date) to the 31/12/2025 23h59 (end_date). Converted in UTC for the back-end, we have: from the 30/11/2025 23h00 to the 31/12/2025 22h59. relativedelta(end_date, start_date) = time between the 2 dates is calculated as follow: 30/11/2025 23h00 + 1 month = 30/12/2025 23h00 +23h59 = 31/12/2025 22h59. Time difference = 1 month, 23 hours, 59 minutes. Price = 2 months. Consider a second rental from the 01/01/2026 to the 31/01/2026. 31/12/2025 23h00 + 30 days = 30/01/2026 23h + 23h59 = 31/01/2026 22h59. Time difference = 30 days, 23 hours, 59 minutes. Price = 1 month. opw-5130762 Forward-Port-Of: odoo/enterprise#98571
This update resolves an issue where users couldn't adjust prices within the POS system when utilizing the Swedish blackbox integration. Now, price control is enabled, aligning with the requirements for the Swedish blackbox, unlike the Belgian version where it was previously mandatory. This ensures accurate pricing for Swedish POS transactions.
Original PR description
Before this commit, user couldn't control the price in the POS if using the swedish blackbox. After this commit, user can control the price. It's not clear why the behavior at integration was set to this but it appears that it's not mandatory for swedish blackbox unlike the belgian one. opw-5253401 Forward-Port-Of: odoo/enterprise#100984
This update corrects an issue where subscription products incorrectly displayed both recurring and list prices on their product cards. Now, subscription products show only the recurring price, ensuring accurate pricing information for our customers. This improves clarity and simplifies product selection.
Original PR description
Version - 18.0 Steps to Reproduce: Issue 1: Incorrect tooltip text 1. Go to Products → Products in subscription app. 2. Open a product page and select goods product type 3. observe product_tooltip…
Version
- 18.0
Steps to Reproduce:
Issue 1: Incorrect tooltip text
1. Go to Products → Products in subscription app.
2. Open a product page and select goods product type
3. observe product_tooltip show incorrect wording:
* "Based on order" showed end of the period.
* "Based on delivered" showed beginning of the period.
Issue 2: Product card shows both recurring and sales price
1. Go to Products → Products in subscription app.
2. Observe that the product card displays both recurring price and sales price
After this PR:
- Tooltip now correctly states:
* for "based on order" invoice_policy -> beginning of period
* for "based on delivery" invoice_policy -> end of period
- Product cards show only the recurring price when applicable.
task-5156390
<img width="1002" height="436" alt="image" src="https://github.com/user-attachments/assets/39f00555-e37a-44a5-8786-d7f8d6882de7" />
<img width="968" height="262" alt="image" src="https://github.com/user-attachments/assets/0d6d5c2d-d5ab-4376-bc03-dba243abce8b" />
Forward-Port-Of: odoo/enterprise#95010This update resolves an issue where users were encountering errors when creating reports in Web Studio, specifically when adding fields to the report layout. The fix prevents the generation of invalid field nodes, ensuring reports render correctly and avoiding disruptions to the reporting process. This improves the stability and usability of Web Studio for creating custom reports.
Original PR description
cf commit Forward-Port-Of: odoo/enterprise#101970 Forward-Port-Of: odoo/enterprise#99385
11 changes
Enhancements to existing features
This update enhances the Odoo Enterprise system by making all relevant benefits fields visible for hourly wage contracts. This change ensures that all necessary information is easily accessible, improving clarity and streamlining the management of hourly employee benefits. The update corrects a previous limitation in the system.
Original PR description
The purpose of this update is to ensure that all relevant fields are visible for hourly wage contracts, improving clarity and ensuring all necessary information is easily accessible. This PR includes the following changes: - Made all relevant benefits fields visible for hourly wage contracts, similar to fixed wage contracts. - Removed ir.ui.view from hr_contract_salary_payroll to make some fields visible for hourly wage. - Updated the visibility logic for contract fields to ensure they are displayed appropriately for hourly wage contracts. Task - 4421240
This update corrects a calculation error in employee EPF contributions. As of October 2025, a new flat rate schedule is being implemented. This change ensures accurate EPF calculations based on the correct flat rate, preventing discrepancies in payroll processing.
Original PR description
Previous behavior applies a dynamic rate on employee's salary rather than using the flat rate schedule. As of Oct 2025 there is a flat rate schedule to follow for computing the EPF contributions. For example for a wage of 6250, a 12% rate would be 750 (which is now incorrect) and according to the flat rate schedule is 756. task-5286179
This update enables users to export multiple BR invoices as XML files in a single batch, streamlining the process for generating required reports. Previously, users could only export invoices individually. Additionally, the system now intelligently handles errors during export, excluding problematic invoices from the batch without disrupting the entire process.
Original PR description
Add a new button in account.move list view for BR companies, allowing the user to export xml files of multiple moves in batch. If any selected moves is not valid, raise a RedirectError to open a list view with all problematics moves. Linked:https://github.com/odoo/odoo/pull/235532 task-5105859
Resolved issues and error corrections
This update fixes an issue where global discounts on online orders weren't correctly calculating taxes. Now, discounts accurately reflect tax amounts based on the order line, aligning with standard Point of Sale and Sales tax calculations. This ensures accurate tax reporting and pricing for global discount orders.
Original PR description
Before this commit: --- - When an online order with an order-level (global) discount was placed, the discount line did not properly include tax calculations. After this commit: --- - Global discounts now compute taxes based on the order line taxes. - The discount line includes accurate tax details. - Uses the same standard tax computation flow as in Point of Sale and Sales. task-5047965 Forward-Port-Of: odoo/enterprise#96981
This update corrects misleading tooltip text on product forms related to subscription invoices and ensures that product cards display only the recurring price for subscription products. This improves clarity and accuracy for users managing subscription orders, aligning with the expected presentation of recurring charges.
Original PR description
Steps to Reproduce: Issue 1: Incorrect tooltip text 1. Go to Products -> Products in subscription app. 2. Open a product page and select goods product type 3. observe product_tooltip show incorrect…
Steps to Reproduce:
Issue 1: Incorrect tooltip text
1. Go to Products -> Products in subscription app.
2. Open a product page and select goods product type
3. observe product_tooltip show incorrect wording:
- "Based on order" showed "end of the period."
- "Based on delivered" showed "beginning of the period."
Issue 2: Product card shows both recurring and sales price
1. Go to Products -> Products in subscription app.
2. Observe that the product card displays both recurring price and list price
Solution:
- Remove `product_template_form_view` from `sale_subscription_stock` and move
it to `sale_subscription`, as the tooltip logic now applies to both goods and
service-type products.
- In subscription product display only recurring price
task-5156390
---
<img width="1002" height="436" alt="image" src="https://github.com/user-attachments/assets/487fa076-264d-4565-a048-343c7317db42" />
<img width="968" height="262" alt="image" src="https://github.com/user-attachments/assets/d4fc4543-c7f4-4a98-be8f-b898057de896" />This commit corrects a recent pricing error affecting products with multiple plans and variants. The previous changes removed crucial logic, leading to incorrect price calculations. Reverting the changes restores the accurate price computation for these products, ensuring correct sales pricing.
Original PR description
This commit reverts the modifications introduced in the one-time sale [PR](https://github.com/odoo/enterprise/pull/77981). Those changes caused incorrect pricing behavior for products with variants, as the necessary logic for handling multiple plans and variants was removed. By reverting, we restore the correct price computation for products that have both multiple plans and variants. opw-5224319 Forward-Port-Of: odoo/enterprise#100654 Forward-Port-Of: odoo/enterprise#93463
This update fixes an issue where scanning a lot in a batch transfer incorrectly updated line quantities. Specifically, when a subline without a lot was scanned after a related line was completed, the quantity was miscalculated. This change ensures that lotless lines are correctly updated during barcode scanning, improving inventory accuracy.
Original PR description
…f related line is complete ### Steps to reproduce: - In the settings enable Lots & Serials and Batch transfers - On the delivery operation types enable show reserved lots in the barcode tab - Create…
…f related line is complete ### Steps to reproduce: - In the settings enable Lots & Serials and Batch transfers - On the delivery operation types enable show reserved lots in the barcode tab - Create a storable product tracked by lots and put 10 x lot1 in stock - Create and confirm a delivery for 10 units - Create a batch transfer with your delivery - Process your transfer from the barcode app - Scan one unit of LOT1 and put in pack - Toggle sublines select the 0/9 subline without lots nor package - Scan LOT1 #### > The 1/1 LOT1 line with a pack is updated to 2/1 rather than the 0/9 ### Cause of the issue: Since e45249c2f6883d743a4e7d19e736c622e26a3d58 and 27bfb985a29e9f0abe94dec8a76bf6d08560fbc9 an override of the `_findLine` method has been introduced in `BarcodePickingBatchModel` to ensure that scanning a lot referenced by an already existing line of the batch transfer triggers an update of that line rather than an override of the lot of an other line. However, these lines should not priorities a completed line when there is line without a set lot. opw-5340865 Forward-Port-Of: odoo/enterprise#101908 Forward-Port-Of: odoo/enterprise#101611
This update resolves an issue where the OCR process incorrectly assigned foreign currencies (like Convertible Marks) to expense items linked to products with standard prices. Now, users can correct the currency and total amount after the OCR, ensuring accurate reimbursements and preventing disruptions to the expense workflow. This fix improves the reliability of expense data.
Original PR description
Fixes a bug where the OCR would sometimes put a foreign currency on an expense with a product having a cost. Making it impossible to switch back to the company currency (because the currency cannot be changed). This also allows the user to change the total amount after the OCR pass, so it can be corrected if needed task-4873236 Forward-Port-Of: odoo/enterprise#101822 Forward-Port-Of: odoo/enterprise#89093
A recent update introduced errors in the XML format for exporting batch payments with mixed IBAN and Swedish payment methods. This fix reverts the problematic changes and simplifies the process by only generating the necessary zip file, ensuring accurate XML formatting for these payments. This resolves an issue impacting payment processing.
Original PR description
Here https://github.com/odoo/enterprise/pull/95463, we add the possibility to export
batch payments with mixed IBAN and Bankgiro/Plusgiro/BBAN payments, but this introduced
few bug in the xml format.
The reason is, we were using new custom logics and not the main one. The problem is
the custom logics is wrong, not the main one.
This commit remove most of the custom logics we added and use all the main one.
This has been done by:
1 - Reverting the original commit
2 - Adding only the zip file generation, passing a context key to know if we are
with bban or iban payments.
opw-5181340
Forward-Port-Of: odoo/enterprise#102050
Forward-Port-Of: odoo/enterprise#100014This update fixes a calculation error in the MRR evolution dashboard that was causing 'Contraction' figures to be double-counted. The change ensures that MRR projections accurately reflect the true changes in recurring revenue by properly accounting for contraction and expansion trends. This improves the dashboard's reliability for financial reporting.
Original PR description
…traction **Issue** The formula defined for the "Net new" in the MRR evolution dashboard double counted the "Contraction", as it is already included in the "Up/Downgrade" (cell B6, equal to B4+B5, "Contraction" + "Expansion"). <img width="360" height="354" alt="image" src="https://github.com/user-attachments/assets/0a19a86a-f1b9-462f-812c-71a283f6fe89" /> opw-4925930 Forward-Port-Of: odoo/enterprise#101598 Forward-Port-Of: odoo/enterprise#96878
This update fixes a bug where credit notes weren't being properly accounted for when settling invoices through the POS system. The change ensures credit notes are now correctly processed, allowing them to reduce the total amount settled, improving accuracy in financial reporting. This resolves a previous issue where credit notes were incorrectly interpreted as payments.
Original PR description
We had a bug when settling invoices and credit notes of a customer. The credit notes where not correctly computed. Steps to reproduce: ------------------- In accounting: * Create and confirm a customer invoice for a total of 10$. * Create and confirm for the same customer a credit note for a total of 2$. In POS: * In a seesion, open the customer selection menu. * In the burger menu at the right of our customer, select Settle invioces. * Select our invoice and credit note. > Observation: The credit note was previously seen as an amount to pay. Why the fix: ------------ Recomputing updates existing credit notes to use the signed residual logic. The domain change allows credit notes with negative pos_amount_unsettled to appear. After these changes, credit notes should appear in the "Settle invoices" dialog with negative amounts, and selecting them will create negative lines that reduce the total. opw-5257884 Forward-Port-Of: odoo/enterprise#101186
12 changes
Enhancements to existing features
This update ensures that tax information, which the company pays to the government and later claims as a refund, is included in the invoice data sent for government reporting. This aligns with current tax regulations for India (l10n_in_edi) and provides accurate financial data for government transactions. It improves the reliability of exported data.
Original PR description
Following the task- https://www.odoo.com/odoo/project.task/4878805 and PR- https://github.com/odoo/odoo/pull/213931 Here we are not collecting tax from the customer but the company has pay taxes to the goverment and after that the company can claim refund for the taxes. So when we are sending data to goverment then we need to include tax part into the invoice total task-5369117 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#238942 Forward-Port-Of: odoo/odoo#238641
This update ensures that the total tax amount paid by the company is included when generating reports for government tax filings (GSTR). Previously, only sales revenue was reported. This change accurately reflects the company's tax obligations and provides a complete picture for reporting purposes.
Original PR description
Here we are not collecting tax from the customer but the company has pay taxes to the goverment and after that the company can claim refund for the taxes. So when we are sending report data to goverment then we need to include tax part into the invoice total task-5369117 Forward-Port-Of: odoo/enterprise#101525 Forward-Port-Of: odoo/enterprise#101308
This update adds detailed logging for communication with the Odoo blackbox. Combined with a related feature for saving and downloading logs, this will significantly simplify troubleshooting client issues and improve support efficiency. It's a key step in proactively addressing potential problems.
Original PR description
Community PR: https://github.com/odoo/odoo/pull/236927 This commit adds several log messages for the communication with the blackbox. In combination with the associated Community PR to save and download these logs, this should enable easier debugging when clients experience problems. Forward-Port-Of: odoo/enterprise#102041 Forward-Port-Of: odoo/enterprise#100183
Resolved issues and error corrections
This update resolves an issue where saving changes to the website footer template caused errors due to how customizations were being applied. The fix ensures that necessary CSS classes are always present, allowing users to successfully save their footer designs after making changes like switching templates or editing company names. This improves the overall stability and usability of the website builder.
Original PR description
The new footer templates had xpath selectors that were breaking in case the user changed some things in the footer. This is caused by a different order of evaluation after the copy is made to save the customized website view. This commit patches the view to add the class on which the xpath relies so that it is always present, thus the xpath always apply. Steps to reproduce: - Open website builder (on an new db) - Click on the footer - Change "Template" to "Mega" (or "Mega Columns", or "Mega Links") - Click on "Company Name" in the footer, and edit the text - Save - Bug: save fails because an xpath does not apply Commit adding "Mega": f252e096a3c8c432e601f6bae6fc1c11cd92c90b Commit adding "Mega Columns": aa0e653b5f641c735b4b6e25f80ae5d1d0a6dd94 Commit adding "Mega Links": 97ab0bc41bd3e5bd48b7e35e7d6918017d66004d task-5181309
This update ensures that rental products are correctly unavailable when their associated employees are on time off. Previously, the system didn't account for employee absences, leading to incorrect availability displays. This fix improves the accuracy of rental product availability, enhancing the customer experience.
Original PR description
…navailabilties Before this commit, when an human resource is linked to rental product thanks to his role and take a time off at a certain day. The user inside ECommerce should be able to add that product when the resource is off (since there is no resource available) at the period chosen. However, that check does not take into account the time off taken by the resources linked to that service rental product. This commit makes sure the time off of the resources linked to the product are correctly taken into account to know if the service rental product is available at a specific period. task-5075698 Forward-Port-Of: odoo/enterprise#98165
This update resolves an issue where multi-step manufacturing processes involving by-products weren't correctly registering the by-product lines in the system. The fix ensures that by-products are properly added to the manufacturing process, creating the necessary pre-production and production lines. This improvement streamlines the 3-step manufacturing workflow.
Original PR description
### Steps to reproduce: - In the settings enable By-Products an Multi-step routes - Put your warehouse in manufacturing in 3 steps - Create two storable products: - Final Product (FP) with an empty…
### Steps to reproduce:
- In the settings enable By-Products an Multi-step routes
- Put your warehouse in manufacturing in 3 steps
- Create two storable products:
- Final Product (FP) with an empty bom
- By Product (BP)
- Go to the barcode app > Operations > Manufacturing > New
- Scan FP > Register By-Products
- Scan BP
#### > The line is created with pre-prod as location and prod as destination
### Cause of the issue:
Since no existing line refers to the by product, a new line is created and its `location_id` and `location_dest_id` are provided by the `_getNewLineDefaultValues`:
https://github.com/odoo/enterprise/blob/17fd46b04d87585b7ed46c00d9559414daa17384/stock_barcode/static/src/models/barcode_model.js#L562-L566 However, at this point nothing had set the `params.newByProduct` in the `processBarcode`:
https://github.com/odoo/enterprise/blob/17fd46b04d87585b7ed46c00d9559414daa17384/stock_barcode_mrp/static/src/models/barcode_mrp_model.js#L375-L383 In fact, the only thing indicating that we are creating a by prodcut line at this point is the `displayByProduct`.
### Note:
The issue is no longer reproducible in 18.0+ as this change has already been applied in 2d5dbb93e6b33c2be786f9b2361c993f715d1a7f
opw-5350222
Forward-Port-Of: odoo/enterprise#101861
Forward-Port-Of: odoo/enterprise#101087This update fixes a bug where credit notes weren't being accurately accounted for when settling invoices. The change allows credit notes to be properly deducted from totals, ensuring accurate financial reporting. This improves the reliability of the POS settlement process.
Original PR description
We had a bug when settling invoices and credit notes of a customer. The credit notes where not correctly computed. Steps to reproduce: ------------------- In accounting: * Create and confirm a customer invoice for a total of 10$. * Create and confirm for the same customer a credit note for a total of 2$. In POS: * In a seesion, open the customer selection menu. * In the burger menu at the right of our customer, select Settle invioces. * Select our invoice and credit note. > Observation: The credit note was previously seen as an amount to pay. Why the fix: ------------ Recomputing updates existing credit notes to use the signed residual logic. The domain change allows credit notes with negative pos_amount_unsettled to appear. After these changes, credit notes should appear in the "Settle invoices" dialog with negative amounts, and selecting them will create negative lines that reduce the total. opw-5257884 Forward-Port-Of: odoo/enterprise#101186
This update ensures that users are prevented from adding rental products to their cart when the resource is unavailable during the selected rental period. Previously, the system didn't check availability if the ‘website_sale_renting_stock’ module wasn't installed, leading to incorrect booking attempts. This change improves the user experience by accurately reflecting resource availability.
Original PR description
Before this commit, when the user goes to the webshop to take a rental service with rental service unavailable at a certain period, the system does not block the user when the resource is not available during 2 hours in the period chosen by the user. The reason is because the hours are not checked when website_sale_renting_stock is not installed. This commit moves the code checking the time of the rental period made in website_sale_renting_stock in website_sale_renting to be able to have that verification for rental service used with planning to make sure the system will prevent the user to add the product in his cart when the resource is unavailable. task-5123239 Forward-Port-Of: odoo/enterprise#96241
This update fixes a calculation error in the MRR evolution dashboard that was causing 'Contraction' figures to be double-counted. The change ensures the dashboard accurately reflects the true net new MRR by properly accounting for contraction trends. This improves the accuracy of revenue forecasting.
Original PR description
…traction **Issue** The formula defined for the "Net new" in the MRR evolution dashboard double counted the "Contraction", as it is already included in the "Up/Downgrade" (cell B6, equal to B4+B5, "Contraction" + "Expansion"). <img width="360" height="354" alt="image" src="https://github.com/user-attachments/assets/0a19a86a-f1b9-462f-812c-71a283f6fe89" /> opw-4925930 Forward-Port-Of: odoo/enterprise#101598 Forward-Port-Of: odoo/enterprise#96878
This update prevents delays when the IoT connection fails. Previously, WebRTC would repeatedly attempt to connect, causing a 6-second fallback to longpolling. Now, if WebRTC fails, it's disabled for 20 minutes, ensuring smoother and faster communication with IoT devices.
Original PR description
Before this commit, WebRTC was always used as the first protocol when communicating with the IoT box. However, in an environment where it was not working, it would take 6 seconds to fallback to longpolling on every request. After this commit, if WebRTC fails, we don't try to use it again for 20 minutes. task-5412223
This update resolves an issue where a key calculation related to account reconciliation was unintentionally removed during a recent system update. This fix ensures accurate reporting of financial transactions and prevents potential discrepancies in accounting data. It's a necessary correction to maintain the integrity of our financial records.
Original PR description
During the forward port of: https://github.com/odoo/enterprise/pull/94552 the recompute of the checked field was removed. It needs to be added back no task id Forward-Port-Of: odoo/enterprise#102086
This update fixes an issue where the VAT summary report for Argentinian invoices was incorrectly calculating totals when multiple IIBB taxes were applied. The fix ensures that VAT amounts are counted accurately, aligning the report totals with the accounting form view. This improves the reliability of financial reporting for Argentinian customers.
Original PR description
**Issue** When using a VAT tax marked as price included, together with multiple IIBB taxes on the same invoice, the VAT summary report displays an incorrect total. Specifically, the VAT amount is…
**Issue** When using a VAT tax marked as price included, together with multiple IIBB taxes on the same invoice, the VAT summary report displays an incorrect total. Specifically, the VAT amount is counted multiple times, once for each IIBB tax, leading to an inflated total. **Steps to Reproduce** 1. Install the Accounting app and the Argentinian localization (l10n_ar) 2. Set the 21% VAT Purchase tax as Included in Price 3. Create a vendor bill applying the 21% VAT tax and at least two IIBB taxes 4. Open the VAT summary report for that bill Expected Behaviour: The total in the VAT summary should match the total shown in the accounting form view, with each tax counted only once. **Root Cause** The VAT summary report in the Argentinian localization relies on an SQL query to aggregate tax information for each `account.move`. The query joins `account_move_line` with `account_tax`, `account_tax_group`, and the many-to-many relation table `account_move_line_account_tax_rel`. Each `account_move_line` related to a VAT tax line (via `tax_line_id`) is joined with the `account_move_line_account_tax_rel` table. If that base line is related to multiple IIBB taxes, the join multiplies the VAT line once per IIBB tax since multiple matching rows exist. **Fix** The solution separates the logic for computing tax lines and base lines into two distinct subqueries. Each is aggregated independently to prevent duplication caused by one-to-many and many-to-many joins. The results are then joined using the unique `account_move_line.id`, ensuring each tax amount is counted exactly once in the final totals. opw-4776861 Forward-Port-Of: odoo/enterprise#98933 Forward-Port-Of: odoo/enterprise#85873
12 changes
Enhancements to existing features
This update automatically marks UrbanPiper orders as paid in Odoo when they are marked as 'dispatched' within the UrbanPiper system. This prevents orders from being accidentally cancelled during POS closing, ensuring smoother order processing and reducing potential revenue loss due to cashier oversight.
Original PR description
In this commit: =============== - When UrbanPiper updates an order to `dispatched`, we now automatically mark the order as paid in Odoo. - This prevents the order from being cancelled during the POS session closing if the cashier forgot to mark it as ready. Task: 5261892
Resolved issues and error corrections
This update corrects a bug in the expense import process for Odoo 18 and 19. Previously, the system incorrectly displayed a zero tax amount when importing expenses with a total amount including tax. The fix ensures that the tax amount is automatically calculated and accurately reflected in the expense record, aligning with the behavior of Odoo 17.
Original PR description
This commit adds expense import test when using total_amount_currency with price_unit missing. opw-5211041 --- **Workaround:** Use `total_amount_currency` instead of `total_amount`. Original bug…
This commit adds expense import test when using total_amount_currency with price_unit missing. opw-5211041 --- **Workaround:** Use `total_amount_currency` instead of `total_amount`. Original bug complaint described below. **Version:** Odoo 18.0, 18.4, and 19.0. The feature works as expected in Odoo 17. **Steps:** 1. On an Odoo 18 or 19 database, ensure an Expense Category (e.g., "Meals") is configured with a tax (e.g., 12% VAT, Price Included). 2. Prepare an import file (XLSX/CSV) with columns for Total (tax-included amount) and Category. 3. Go to Expenses > My Expenses > Actions > Import records. 4. Upload the file. Map the Total column to the "Total" field and the Category column to the "Category" field. 5. Complete the import and open the newly created expense. 6. Result: The Total is correct, the Category is correct, and the 12% tax is listed, but the **`Tax Amount`** field shows 0.00. 7. Expected Result (from Odoo 17): The system should auto-calculate and populate the Tax Amount based on the Total and the tax rate from the Category. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a bug where purchase orders weren't appearing in search results when linked to a vendor bill created by a company partner. The fix normalizes the search criteria to account for the difference between how purchase orders and vendor bills store partner information, ensuring accurate matching.
Original PR description
There are two issues: 1) When making a purchase matching, and adding a vendor bill to a PO, when searching for the corresponding purchase order, it will not find it if the purchase order is an user…
There are two issues:
1) When making a purchase matching, and adding a vendor bill to a PO, when searching for the corresponding purchase order, it will not find it if the purchase order is an user with a company
2) When making a bill matching, the vendors bill will not appear.
Steps to reproduce:
-------------------
* Create a company A
* Create a partner A of type individual as a sub-partner to the company A
* Create a purchase order with partner A and confirm it
* Create a vendor bill corresponding to the purchase order
1)
* Click on the purchase matching smart button the vendor bill and try to add to PO
* Search for the purchase order
-> Issue, the purchase order does not appear.
2)
* Go on the purchase order
* Click on Bill matching smart button
-> Issue the vendor bills will not appear
Observation:
-----------
The issue is that purchase Orders store the partner exactly as selected (individual contact), while Vendor Bills are normalized internally to the parent company ("commercial_partner_id'). This creates a mismatch when making the search.
https://github.com/odoo/odoo/blob/9e9e992698946b75212040ca0ff812194200a8bf/addons/account/models/account_move_line.py#L480-L483
1) The domain of the search is
https://github.com/odoo/odoo/blob/58b888992f80a58fecdb92e23fea0050f2178faf/addons/purchase/wizard/bill_to_po_wizard_views.xml#L10-L11
The domain on the search does not take into consideration the missmatch between Vendor Bill and PO.
2) When calling action_bill_matching, the domain is:
https://github.com/odoo/odoo/blob/73590e017e9f2861b0852952e14261e57eb67f70/addons/purchase/models/purchase_order.py#L609-L621
This is a similar issue as 1) and https://github.com/odoo/odoo/commit/c0e86ba6d31708fb16765ba0e0596adc2f29dcd8
Why the fix:
------------
Commercial_partner_id is always set, adding it in the search will allow to normalize the search on the parent_company if there is one.
https://github.com/odoo/odoo/blob/18.0/odoo/addons/base/models/res_partner.py#L450-L455
opw-5067995This fix resolves an issue where the system incorrectly used the main company during translation loading, leading to a ValueError when attempting to process VAT numbers for the BE localization. The update ensures the correct company context is used during translation loading, preventing this error and enabling proper localization functionality.
Original PR description
``` File "/home/odoo/src/odoo/19.0/addons/account/models/ir_module.py", line 100, in _register_hook self.env.registry._delayed_account_translator(self.env) File…
```
File "/home/odoo/src/odoo/19.0/addons/account/models/ir_module.py", line 100, in _register_hook
self.env.registry._delayed_account_translator(self.env)
File "/home/odoo/src/odoo/19.0/addons/account/models/ir_module.py", line 90, in load_account_translations
env['account.chart.template']._load_translations(langs=langs)
File "/home/odoo/src/odoo/19.0/addons/account/models/chart_template.py", line 1449, in _load_translations
._get_chart_template_data(chart_template)
File "/home/odoo/src/enterprise/19.0/account_accountant/models/account_chart_template.py", line 31, in _get_chart_template_data
data = super()._get_chart_template_data(chart_template)
File "/home/odoo/src/odoo/19.0/addons/account/models/chart_template.py", line 803, in _get_chart_template_data
data = func(self, template_code)
File "/home/odoo/src/odoo/19.0/addons/account/models/chart_template.py", line 59, in wrapper
return func(*args, **kwargs)
File "/home/odoo/src/enterprise/19.0/l10n_be_reports/models/account_chart_template.py", line 52, in _get_be_account_reconcile_model
prepayment_communication = self.env['qr.code.payment.wizard']._be_company_vat_communication(self.env.company).replace('+++', '')
File "/home/odoo/src/enterprise/19.0/l10n_be_reports/models/qr_code_payment_wizard.py", line 14, in _be_company_vat_communication
number = int(vat)
ValueError: invalid literal for int() with base 10: 'LU19038918'
```
```sql
kmod_3311837=> select id,name,chart_template,parent_id from res_company;
id | name | chart_template | parent_id
----+---------------------+----------------+-----------
3 | C.R.O.Qu.E.T. S.A. | be_comp |
2 | KG5380 | be_comp |
1 | KNOWLEDGE GATE S.A. | lu |
(3 rows)
kmod_3311837=> select id,model,module,res_id from ir_model_data where name = 'main_company';
id | model | module | res_id
----+-------------+--------+--------
2 | res.company | base | 1
(1 row)
```
```
> /home/odoo/src/enterprise/19.0/l10n_be_reports/models/account_chart_template.py(52)_get_be_account_reconcile_model()
-> if template_code in ['be', 'be_comp', 'be_asso']:
(Pdb) template_code
'be_comp'
(Pdb) self.env.company
res.company(1,)
(Pdb) self.env.company.chart_template
'lu'
(Pdb)
```
- The traceback occurs because during the translation loading process, the system calls [_get_chart_template_data](https://github.com/odoo/odoo/blob/38cffd1d1580693c56f0d897b8c8e60b938a8e85/addons/account/models/chart_template.py#L1465) for all available template codes. In the customer’s database, there are three companies: Company 2 and Company 3 use the BE_COMP localization, while Company 1 uses the LU localization.
- When _get_chart_template_data is executed for the BE_COMP chart template, it eventually calls [_get_be_account_reconcile_mode](https://github.com/odoo/enterprise/blob/d13dc2d7b54d7e43f3b27b19131d0a277d0498b8/l10n_be_reports/models/account_chart_template.py#L49) During this call, the function receives the correct template code (be_comp) as an argument. However, self.env.company returns Company 1, because Company 1 is set as the main_company.
- As a result, [_be_company_vat_communication](https://github.com/odoo/enterprise/blob/d13dc2d7b54d7e43f3b27b19131d0a277d0498b8/l10n_be_reports/models/qr_code_payment_wizard.py#L14) is called with Company 1, even though this company uses the LU localization. Since LU localization does not support the BE VAT communication logic, an error is raised from this method.
- There is no context of the company passed when calling _get_chart_template_data from _load_translations, so I have applied with_company, so _get_chart_template_data is called in the context of a specific company.
opw-5342498
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#239809This update corrects a bug where a procurement group wasn't consistently linked to sales orders when creating deliveries with multiple moves. The fix ensures that a procurement group is always associated with the picking, streamlining the process of managing delivery groups and improving order fulfillment accuracy. This resolves an issue impacting order processing efficiency.
Original PR description
### Steps to reproduce: - Create a picking with a move for any product #### Issue 1: > A procurement group is created and linked to the transfer - Add a second move on the picking and save #### Issue 2: > The procurement group of the picking is lost ### Cause of the issue: The `_set_sale_id` set method creates a procurment group and links it to the picking no matter if the `sale_id` is set or not. https://github.com/odoo/odoo/blob/842025976ab65e92551366def88cdd243549e5ee/addons/sale_stock/models/stock.py#L90-L93 https://github.com/odoo/odoo/blob/842025976ab65e92551366def88cdd243549e5ee/addons/sale_stock/models/stock.py#L100-L113 opw-5386424 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue preventing users from controlling prices within the POS system when utilizing the Swedish blackbox integration. Previously, this was a limitation, but now price control is enabled, aligning with requirements for the Swedish blackbox. The change reflects a difference in regulatory requirements compared to the Belgian blackbox.
Original PR description
Before this commit, user couldn't control the price in the POS if using the swedish blackbox. After this commit, user can control the price. It's not clear why the behavior at integration was set to this but it appears that it's not mandatory for swedish blackbox unlike the belgian one. opw-5253401 Forward-Port-Of: odoo/enterprise#100984
This update fixes an issue where duplicate downpayment lines were being created when settling POS orders with Avatax. The change ensures that a downpayment line is only created once, regardless of multiple sync operations, improving order accuracy and reducing potential accounting discrepancies. This resolves a bug impacting order settlement processes.
Original PR description
Step to reproduce: - configure pos for Avatax from settings - create a SO in draft - open POS and and settle this SO (set a 10% down-payment line) - settle this order - open this SO Observation: - there are 2 down-payment lines for same tax Cause: - `sync_from_ui` from pos_sale keeps creating sol on each call to `sync_from_ui` Fix: - we check if there is already a line or not before creating a new line opw-5089351 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where users could create invalid fields within Odoo's Web Studio report editor, specifically when designing the 'hr_timesheet' report. The fix prevents the generation of these invalid field nodes, ensuring reports render correctly and consistently. This improves the stability and usability of the Web Studio tool.
Original PR description
cf commit Forward-Port-Of: odoo/enterprise#99385
This update resolves an issue where documents accessed through the 'Activities' icon were not displaying the correct custom view, preventing features like document previews from working. The fix ensures the custom document view is loaded consistently, regardless of navigation, improving the user experience.
Original PR description
When navigating to documents from the 'Activities' systray icon, the system would load an action that correctly filtered for "My Activities" but lacked the specific view definitions of the main Documents app. This caused the 'List' view-switcher to load the default list view instead of the custom one, breaking features like document preview that depend on the custom view's JavaScript. This patch fixes the issue by ensuring that the correct, custom view definitions from the main Documents app are loaded. This guarantees that the custom list view and all its features work correctly, regardless of how the user navigates to it. This ensures the correct custom list view is loaded while preserving the "My Activities" filter. Task-5187045
This update resolves an issue where adding the same product multiple times to a Point of Sale order would create duplicate orderlines due to price precision rounding. The fix ensures that orderlines are correctly merged, regardless of the product's price decimal places, leading to more accurate order totals and a better customer experience. This improves the reliability of the POS system.
Original PR description
Before this commit, when a product had a price with more decimals than the currency, adding it multiple times to the order would create multiple orderlines instead of merging them. This was due to rounding issue when comparing the prices of the orderlines. opw-5341735 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where deleting a shopfloor instruction suggestion caused errors when adding a new one. The fix ensures that the system correctly handles the removal of quality points associated with instructions, allowing users to seamlessly add new suggestions without encountering technical problems. This improves the usability of the shopfloor management feature.
Original PR description
**BUG:** Traceback when **suggesting** deleting a BOM step from the shopfoor. **STEPS TO REPRODUCE:** - Open a shopfloor MO (with PLM installed) -- Add a suggestion step (MO > cog> Update…
**BUG:** Traceback when **suggesting** deleting a BOM step from the shopfoor. **STEPS TO REPRODUCE:** - Open a shopfloor MO (with PLM installed) -- Add a suggestion step (MO > cog> Update instructions > Improvement Suggestion > Add a step). -- Add a second suggestion step after the first one. -- Delete the second suggestion step (MO > cog> Update instructions > Improvement Suggestion > Delete a step). -- Add a third suggest suggestion step after the second one we just suggested deleting. -- > Traceback **ORIGIN:** First, when adding the suggestions: - 2 Quality Check (QC) are created on the **new_bom_id** in `add_quality_check_from_tablet.save()` - 2 Quality Point (QP) are also created in `add_check_in_chain()`, (only in mrp_workorder_plm override) - The 2nd new QC is linked to previous QC in `_insert_in_chain` Secondly, when deleting the 2nd added suggestion (_on the same MO, as suggestions are linked to the new bom_id and wont appear on other MOs until ECO is validated_): - The QP of the second QC is deleted (but the QC itself is not deleted) here: https://github.com/odoo/enterprise/blob/f91b0c8c41f40a71cbea3cd4f5ccc6873af3c004/mrp_workorder_plm/wizard/propose_change.py#L72-L74 Finally, when adding a new suggestion after the one we just suggested deleting, in `_add_check_in_chain`, a traceback happens by trying to access the QP point we deleted in the resequencing part of `_add_check_in_chain` here: https://github.com/odoo/enterprise/blob/eb716c18944ec50c9c8c74a2888ed5f3032a7b08/mrp_workorder_plm/models/mrp_workorder.py#L62-L63 **FIX:** We accept that not all QCs must have QPs `[0]` -> `[:1]` (see note on another approach idea) changing ```diff - point = check.point_id if check.point_id.operation_id == operation else points.filtered(lambda p: p._get_sync_values() == check.point_id._get_sync_values())[0] + point = check.point_id if check.point_id.operation_id == operation else points.filtered(lambda p: p._get_sync_values() == check.point_id._get_sync_values())[:1] ``` **NOTES:** -1 Another fix could have been to delete the QC at the same time as the QP but I did not find any `remove_from_chain` function to safely remove the QC from the chain of QC. Along those lines we could rethink the sequencing / resequencing of QC and QP as the logic seems to differ between both. -2 Added some comments to remove the field and the line setting the `is_deleted` field in master as it was not used anywhere in the code (the color highlighting in the ECO is done with `<list decoration-danger="change_type=='remove'" ...>`) ticket #5180122
This update speeds up the calculation of product quantities, particularly for databases with many products where most have zero stock. By optimizing the computation process, the system now performs significantly faster – reducing the time by over 30% when dealing with a large number of products. This improves overall system responsiveness and efficiency.
Original PR description
In databases with a large number of products, most of them will have 0 quantities on hand. This commit fast-tracks the computation of 0 qty products, skipping unnecessary `uom_id` and `float_round()` computations in _compute_quantities_dict and skipping unnecessary `__set_item__` in _compute_quantities. Benchmark | `product.product` count | Before this PR | After this PR | | ----------------------- | -------------- | ------------- | | 700,000 | 52.84s | 28.33s | opw-4930856 Forward-Port-Of: odoo/odoo#239687
1 change
Resolved issues and error corrections
This update resolves a problem where invoices posted very early in the day (Chilean time) were incorrectly interpreted as being in the previous day, causing errors. The fix ensures invoice dates are handled correctly by freezing the test time and setting a fixed, compatible date, preventing this issue.
Original PR description
**Issue:** ```python File "/data/build/enterprise/l10n_cl_edi/models/account_move.py", line 744, in _l10n_cl_edi_post_validation raise UserError( odoo.exceptions.UserError: The stamp date and time…
**Issue:**
```python
File "/data/build/enterprise/l10n_cl_edi/models/account_move.py", line 744, in _l10n_cl_edi_post_validation
raise UserError(
odoo.exceptions.UserError: The stamp date and time cannot be prior to the invoice issue date and time. TIP: check in your user preferences if the timezone is "America/Santiago"
```
**Cause:**
Posting an invoice at early local hours (e.g., 2025-12-11 04:00) is converted by the [Chilean timezone (America/Santiago)](https://github.com/odoo/enterprise/blob/ac3f333d97eda5c86a0813490ac6204d4ec5721f/l10n_cl_edi/models/l10n_cl_edi_util.py#L117-L120) to the previous day (e.g., 2025-12-10 19:30).
**Solution:**
- Freeze the test time at a stable CL-safe hour
- Add a fixed `invoice_date` aligned with the frozen timestamp
Reference : [timezone converter](https://dateful.com/time-zone-converter?t=730pm&d=2025-12-10&tz2=Santiago-Chile)
Runbot error: [234755](https://runbot.odoo.com/odoo/runbot.build.error/234755)
Related PR: https://github.com/odoo/enterprise/pull/99518