Wednesday, January 21, 2026
24 changes · 19.0
New functionality added to Odoo
This update adds support for Finnish Intrastat compliance, allowing businesses to generate and submit required reports automatically. The new module creates CSV files for arrivals and dispatches, simplifies agent VAT configuration, and provides a wizard for easy report submission, ensuring adherence to Finnish customs regulations.
Original PR description
Added a new module to support Finnish Intrastat compliance by generating CSV declarations compatible with the Finnish Customs service. This Includes: - Export arrivals and dispatches reports in CSV format (bundled in ZIP). - Configure agent VAT for arrivals when filed via an agent. - Wizard to download and submit periodic Intrastat reports. task-5049047
Resolved issues and error corrections
This update resolves an issue where printers would become unavailable for extended periods after disconnecting, leading to user errors and potential double printing. The change introduces a safeguard to only remove printers from the system after multiple disconnection attempts, ensuring printers are reliably available and jobs are processed correctly.
Original PR description
On the iot box we check the number of printers connected rarely to avoid spamming the network. This leads to some situations where if a printer is disconnected it becomes unusable for the next 2…
On the iot box we check the number of printers connected rarely to avoid spamming the network. This leads to some situations where if a printer is disconnected it becomes unusable for the next 2 minutes or even more if it disconnects again just before the next get_devices call in the interface. The printers are often not listed by cups for short time which currently leads to them being deleted from our list of connected devices on the iot box. However in reality the printer reconnects faster than 2 minutes and often becomes available again within a couple of seconds. Currently if you print something on it you will get an error when checking the job status but the job will still be queud and printed whenever it reconnects. The user in pos can then press "retry" which will lead to a double printing. This PR adds a counter for the printer disconnections and only removes the printer from our list if it wasn't detected 3 times in a row by cups. Now since not deleted from cups the print job is queud and whenever the printer reconnects it's printed. The user will not get an error anymore which will avoid double printing and the printer will remain available unless it's really disconnected Forward-Port-Of: odoo/odoo#244644 Forward-Port-Of: odoo/odoo#244076
This update removes unnecessary integer rounding from monthly VAT reports for Italy. Previously, rounding was incorrectly applied, leading to inaccurate reporting. This change ensures that monthly VAT reports align with the correct accounting standards and provides more reliable financial data.
Original PR description
**Description of the issue/feature this PR addresses**: Integer rounding is only required on annual l10n_it VAT reports. It appears that it was incorrectly added to the monthly report when the two were split in #193662. **Current behavior before PR**: Integer rounding on monthly l10n_it tax reports. **Desired behavior after PR is merged**: No more integer rounding on monthly l10n_it tax reports. [opw-5292310](https://www.odoo.com/odoo/project.task/project.task/5292310) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243671 Forward-Port-Of: odoo/odoo#243100
This update fixes an error in the Vietnamese financial reports that was causing incorrect calculations for key balance sheet codes (420.1 and 420.2). The changes ensure accurate reporting of undistributed profit, improving the reliability of financial data and compliance with Vietnamese accounting standards.
Original PR description
The formulas for 'Undistributed profit after tax brought forward' (420.1) and 'Undistributed profit after tax for the current year' (420.2) were calculating incorrect values. Issues fixed: - Changed date_scope from `from_fiscalyear`/`to_beginning_of_fiscalyear` to `from_beginning` where historical cumulative values are needed. - Added missing negative signs to account code formulas (`-4211`, `-4212`, `-911`) to correctly display credit balances as positive equity. - Removed unnecessary `py_balance` expression with conditional logic. - Added subtraction of `UPATCY.balance` from `UPATBF.balance` to prevent double-counting when aggregating to parent line 420. - Added missing `py_account_codes` expression (`-4212`) to `UPATCY`. task-5492884 Forward-Port-Of: odoo/enterprise#104786 Forward-Port-Of: odoo/enterprise#104373
A bug was preventing users from adding fields to the invoice report within Studio. This was caused by an outdated XPath reference in the report's configuration. The update corrects this by targeting a stable HTML element, ensuring reports can be edited correctly and consistently.
Original PR description
Currently, an error occurs when editing the invoice report in Studio and adding fields to the report table. ### **Steps to reproduce** - Install 'l10n_sa' and Studio with demo data - Open an invoice and switch to Studio mode - Edit the Invoice report and add the 'Products' field & click save. ### **Error:** `ValueError: Element xpath //div[@id=total_payment_term_details_table]` `cannot be located in parent view` ### **Root Cause:** Due to recent updates with [this commit](https://github.com/odoo/odoo/pull/220167/changes/39ba5962923f04eef85174aaf2667481510cfaf4), payment terms are now targeted from `account/report_invoice.xml`. However, the inherited view was still targeting `td` and `indexed t` nodes, which no longer exist in the updated structure. This causes the xpath to fail when the report is altered by Studio. ### **FIX:** Update the xpath expression to target a stable `div` container. **opw-5485437,5498946**
This update resolves a bug where the column layout within the HTML editor would break after undoing column adjustments. Specifically, the system now correctly maintains column structure after multiple column conversions and undo operations, ensuring a stable and predictable user experience. This prevents disruptions to the editor's functionality.
Original PR description
**Current behavior before PR:** Steps to reproduce: - Create 3 columns using powerbox - Convert it into 4 columns - Press ctrl + z to make it 3 columns - Convert it into 4 columns again using powerbox Notice that column structure is broken. This happens because after undo operation, in `changeColumnsNumber` the regex replaces column div className incorrectly leading to invalid colund structure. **Desired behavior after PR is merged:** This PR ensures that column structure doesn't break. task-5468578 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where product prices weren't accurately calculated when using Point of Sale (PoS) journals with different currencies. The change ensures standard prices are converted to the PoS currency, preventing incorrect pricelist calculations and ensuring accurate order totals. This improves the reliability of PoS transactions.
Original PR description
The standard price of the products were not converted to the currency of the PoS journal, which could lead to issues when creating pricelist items based on the standard price. Steps to reproduce: ------------------- * Change the currency of any PoS journal to a different currency than the company currency. * Create a product with a standard price > 0. * Create a pricelist that uses the standard price as a base price. (e.g. price = standard price * 2) * Add this product to a PoS order > Observation: The price is not correctly computed according to the pricelist, because the standard price was not converted to the PoS currency. Why the fix: ------------ We just make sure to convert the standard price of the products when loading the products in the PoS session the same way as we do it for the list price. opw-5124388 Forward-Port-Of: odoo/odoo#241620 Forward-Port-Of: odoo/odoo#241168
This update resolves issues impacting the quality of voice transcriptions within the Odoo Enterprise application. By optimizing audio processing and switching to a new transcription model, the system now delivers more accurate and reliable transcriptions, enhancing the user experience.
Original PR description
This PR fixes some issues with the voice transcription feature that were causing poor quality in the transcription. Among the changes: - Removing filtering on the input audio in the `vad_audio_recorder.js` - Reducing buffer size in the `vad_audio_processor.js` to send data more frequently. Hence, avoiding to send data during the VAD silence cutoff. - Changing the model to `whisper-1`. task-5788331
This update corrects a technical issue preventing the inclusion of crucial terms and conditions (like payment terms) within the electronic invoices generated for Colombian DIAN compliance. The fix removes a previous override that was stripping out this information, ensuring invoices accurately reflect the required data.
Original PR description
**Steps to reproduce:** * Install `l10n_co_dian` and `accounting` modules. * Go to **Accounting → Configuration → Settings** and enable DIAN demo mode under `Colombian Electronic Invoicing` by disabling `test mode`. * Create an Invoice. * Select a Colombian customer and add products. * Fill in the **Terms and Conditions** field (e.g., “Payment due in 30 days”). * Confirm the invoice and generate the electronic invoice XML. **Observed behavior:** * The `<cbc:Note>` tag only contains **CUFE calculation data**. * The **Terms and Conditions** text is missing from the XML. **Cause:** * The `'cbc:Note': None` ovrride the value of Note tag which has value of invoice.narration. ref : https://github.com/odoo/enterprise/pull/87598/changes#diff-2548895191bf05af735ebfc332b3f3f2db9d039630101720ee72feb7b65fa8fcR532 **Fix:** * removed the `'cbc:Note': None` which overrides the value of the note tag. opw-5488663
This update resolves an issue where a specific VAT report line ('VP14b') was missing in the new monthly VAT reports. The fix ensures that this line is correctly handled during the report migration process, preventing a key error and ensuring accurate VAT reporting. This change was triggered by a recent update to the Odoo system.
Original PR description
Handle `carryover_origin_report_line_id` for report line having `code = 'VP14b`, since the line does not exist in the new monthly VAT report after this commit:…
Handle `carryover_origin_report_line_id` for report line having `code = 'VP14b`, since the line does not exist in the new monthly VAT report after this commit: odoo/odoo@51a72ab42d118d6fb0eb3e3545a09e10019b9140
As the line is not present in the monthy vat report while mapping it will raise keyerror:
```py
File "/home/odoo/src/odoo/19.0/addons/l10n_it/migrations/0.7/post-map_carryover_to_new_report.py", line 52, in migrate
data_to_insert = [
File "/home/odoo/src/odoo/19.0/addons/l10n_it/migrations/0.7/post-map_carryover_to_new_report.py", line 53, in <listcomp>
(code2expression_id[report_line_code], old2new_origin[carryover_origin_report_line_id], *other_external_vals)
KeyError: 80
```
```sql
apan_3806634=> select id,carryover_origin_report_line_id,target_report_expression_id from account_report_external_value;
id | carryover_origin_report_line_id | target_report_expression_id
----+---------------------------------+-----------------------------
3 | 80 | 102
4 | 80 | 105
7 | 80 | 102
8 | 80 | 102
9 | 80 | 102
10 | 80 | 102
11 | 80 | 102
(7 rows)
apan_3806634=> select id,name->>'en_US',code from account_report_line where id=80;
id | ?column? | code
----+------------------------------+-------
80 | VP14b - VAT payable (credit) | VP14b
(1 row)
```
Note this error will only appears in the dbs without this commit: odoo/odoo@a220a28595dbfacce2d8322222d1961547bb4b07
opw-5494959
upg-3806634
tbg-2272
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes a discrepancy in eWaybill invoices for Indian exports. It now accurately includes reverse charge (RC) amounts for GST, aligning the eWaybill data with Odoo and the Indian government's requirements. This ensures accurate reporting and compliance for international shipments.
Original PR description
For export invoices, the total invoice value in the eWaybill JSON did not include reverse charge amounts for GST, leading to a mismatch with the value shown in Odoo and the eWaybill generated by the Indian government system. This commit adjusts the JSON computation to include the reverse charge amounts in the total invoice value for exports, aligning it with the government-generated eWaybill, while preserving the existing reverse charge flow. task-5068199 Forward-Port-Of: odoo/odoo#243802 Forward-Port-Of: odoo/odoo#241852
This update resolves an issue preventing regular users from saving Unsplash images within the HTML editor. Previously, write access was restricted, blocking uploads unless the user had administrator privileges. The fix utilizes a temporary superuser context to bypass this restriction, allowing all users to successfully save and utilize Unsplash images.
Original PR description
Issue: A user with User and web editor access cant use unsplash becuase the write is restricted for create_uid == self.env.uid if not admin. When unsplash uploads an image it creates the attachment.url with the attachment id as part of the unsplash source url. When its saved in the editor it trys to modify it and rewrite the url by removing the id of the attachment. The write operation gets blocked becuase they are not admin. Fix: Added "with_user(SUPERUSER_ID)" which is the same flow up the flow and then they turn it back to the current user after some fields are already writen. This one just go missed. opw-5490535 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
Previously, errors from manually run cron jobs weren't displayed in the Odoo interface. This update restores the display of these errors in a modal, allowing system administrators and support to quickly diagnose and fix issues when testing cron jobs via the 'Run Manually' feature. This improves troubleshooting and reduces reliance on server logs.
Original PR description
It is possible to run a cron via the "Run Manually" button of the ir.cron form view. In 18.4 and before, in case the cron failed due to an exception, that exception would appear in the web client.…
It is possible to run a cron via the "Run Manually" button of the ir.cron form view. In 18.4 and before, in case the cron failed due to an exception, that exception would appear in the web client. Since 19.0 and commit 78c00d2, the exception no longer bubbles-up to the web client. It is only logged in the server logs. Many system admins and also the Odoo support use on the "Run Manually" to quickly test a cron and make sure it works. The change done in 19.0 is considered as a nasty surprise. They want their exceptions back! When running a cron manually, we now track the logs that are emitted on the cron logger and search for an error with an exception. May we find one, we raise it with a proper traceback chain, which bubbles up to the web client and is shown in the "An error occured" modal. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a bug where the 'Import Bank Statement' action incorrectly selected a journal in multi-company setups due to elevated server permissions. The fix ensures the action filters by the currently chosen company, preventing incorrect journal selection and improving data accuracy. A new test confirms the fix's functionality.
Original PR description
Issue: when using the server action 'Import Bank Statement' the code would not filter on the currently selected company for choosing the journal on which to encode the bank statement and simply take the first result. Because the server action is running with sudo rights, in a multi-company environment more then one journals are found and the selected one is often wrong. Solution: filter on company during the selection of the journal. Note: a test was added in which we run the function with sudo rights to ensure an error is raised when the journal does not exist on the currently selected company, even if it is present on another company. Task-5494685 Forward-Port-Of: odoo/enterprise#104970 Forward-Port-Of: odoo/enterprise#104326
This pull request updates the core spreadsheet library used in Odoo. It includes several bug fixes and performance improvements related to how spreadsheets are handled, ensuring better stability and efficiency for users. These changes address issues with data handling, chart rendering, and overall spreadsheet functionality.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/bd44f59a66 [REL] 19.0.18 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/bd44f59a66 [REL] 19.0.18 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/7b6469f3de [PERF] evaluation: fast predicate path for empty strings [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/49a8ade732 [FIX] range: add result changeType [Task: 5095364](https://www.odoo.com/odoo/2328/tasks/5095364) https://github.com/odoo/o-spreadsheet/commit/c1d5ddafc9 [FIX] range: adapt string XC on sheet rename [Task: 5095364](https://www.odoo.com/odoo/2328/tasks/5095364) https://github.com/odoo/o-spreadsheet/commit/b148744709 [FIX] range: rename parameter [Task: 5095364](https://www.odoo.com/odoo/2328/tasks/5095364) https://github.com/odoo/o-spreadsheet/commit/dcd419a83e [FIX] range: add range to NONE [Task: 5095364](https://www.odoo.com/odoo/2328/tasks/5095364) https://github.com/odoo/o-spreadsheet/commit/a2e329cfb3 [FIX] Actions: ensure the sequence is applied on action children [Task: 5452669](https://www.odoo.com/odoo/2328/tasks/5452669) https://github.com/odoo/o-spreadsheet/commit/edc5f21755 [FIX] composer: prevent autocomplete from closing on grid icon drag [Task: 5392156](https://www.odoo.com/odoo/2328/tasks/5392156) https://github.com/odoo/o-spreadsheet/commit/8446e90c25 [PERF] evaluation: don't spread single element matrix [Task: 5491138](https://www.odoo.com/odoo/2328/tasks/5491138) https://github.com/odoo/o-spreadsheet/commit/63c002a1ee [FIX] evaluation: remove spread relation [Task: 5491138](https://www.odoo.com/odoo/2328/tasks/5491138) https://github.com/odoo/o-spreadsheet/commit/1642f79973 [FIX] vectorization: fix error message on size mismatch [Task: 5331324](https://www.odoo.com/odoo/2328/tasks/5331324) https://github.com/odoo/o-spreadsheet/commit/c7c2baabfb [FIX] chart: ignore NoChanges in gauge/scorecard side panel errors [Task: 5478288](https://www.odoo.com/odoo/2328/tasks/5478288) https://github.com/odoo/o-spreadsheet/commit/4589afc1fd [IMP] xlsx: export clip [Task: 5368130](https://www.odoo.com/odoo/2328/tasks/5368130) https://github.com/odoo/o-spreadsheet/commit/9f4416e6f1 [IMP] export: export align left when the cell content is a number; [Task: 5368130](https://www.odoo.com/odoo/2328/tasks/5368130) https://github.com/odoo/o-spreadsheet/commit/c8c01a1fe1 [FIX] header_size: wrong row size from wrapped number [Task: 4878338](https://www.odoo.com/odoo/2328/tasks/4878338) Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Ronak Mukeshbhai Bharadiya (rmbh) <rmbh@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com> Co-authored-by: Marceline Thomas (matho) <matho@odoo.com>
This update corrects a critical issue where Moroccan tax reports incorrectly processed taxes based on a cash basis accounting method. The fix ensures accurate reporting of bills and transactions, aligning with standard Moroccan tax regulations. This improves data reliability and export efficiency.
Original PR description
[FIX] l10n_ma_reports: tax report: properly consider cash basis taxes in the XML export Moroccan taxes are cash basis by default. The former version of the XML generation completely disregarded that,…
[FIX] l10n_ma_reports: tax report: properly consider cash basis taxes in the XML export Moroccan taxes are cash basis by default. The former version of the XML generation completely disregarded that, and always reported all bills in the period. Solving this requires using an SQL query so that cash basis can be properly computed, like in the report. This also makes the export much more efficient, and resilient to bigger amount of data. Steps to reproduce: - Install `l10n_ma_reports` and switch to the MA company - Create and confirm a bill: Bill Date: 10/01/2025 Vendor: Azure Interior Invoice Lines: Price 100, Taxes 20% (S 140) - Go to `Bank Reconciliation` - Add a transaction (Vendor: Azure Interior, Amount: -120 DH, any Memo) - Select the transaction and the invoice, then click Validate - Open the Tax Return for November. Section D should show data linked to the created invoice - Export the XML using the Gear → XML The created bill is missing in the XML and others may be present, showing inconsistent data opw-5002779 [IMP] l10n_ma_reports: call the report to compute the prorata value Searching explicitly for external values is a bad practice ; calling the report ensures consistency between the data displayed, and the one exported into the file. Forward-Port-Of: odoo/enterprise#104667 Forward-Port-Of: odoo/enterprise#104619
This update strengthens the file upload process by addressing inconsistencies in how Odoo controllers respond to requests. Previously, the file upload service struggled with different API formats (JSON, JSONRPC, HTML) from the controllers. Now, the service handles a wider range of error responses, leading to a more stable and reliable file upload experience.
Original PR description
Odoo controllers often don't use coherent API they respond with either json, jsonrpc or html. On the client side, we have no reliable way to know this, and sometimes it is not possible to make a guess (rpc.js makes the guess that controllers are of json type -- actually meaning jsonrpc) The file upload service suffered from this and did not handle those error cases well. After this commit, the file upload service handles much of the errors. 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#244704
The picking operations report was previously printing all deliveries on a single page when multiple deliveries were selected. This update corrects a layout change that prevented automatic page breaks, ensuring reports now correctly format multiple deliveries across multiple pages. This improves the readability and usability of the report.
Original PR description
When printing several picking operation at once, they are all in the same page. Steps to reproduce: ------------------- * Inventory>Operations>Deliveries * Create several Deliveries * Open list view to see all the deliveries * Select several deliveries * Print > Picking Operations -> All the picking operation report are on the same page. Observation: ------------- Since the change on the picking report layout https://github.com/odoo/odoo/pull/152280/changes#diff-7542c191def78bd64f54f1c33fde2c73e19e4d27f92b195c464d1d84e55b682fL6-R8 the report now uses a single article container for all records, this don't trigger automatic page break. opw-5481034 Forward-Port-Of: odoo/odoo#243817
This update fixes a problem where preparation printers would incorrectly reprint orders when items from different categories (like food) were added to a table. The fix ensures that preparation tickets are only printed when necessary, streamlining the kitchen workflow and preventing unnecessary paperwork. It also maintains order status updates for accurate restaurant notifications.
Original PR description
When a preparation printer is configured to print only specific product categories (e.g., drinks only), adding items from other categories (e.g., food) would cause the printer to reprint the previous…
When a preparation printer is configured to print only specific product categories (e.g., drinks only), adding items from other categories (e.g., food) would cause the printer to reprint the previous order with a "NEW (DUPLICATE!)" label. Steps to reproduce: ------------------- * Configure a restaurant/bar POS with a preparation printer set to print only drinks * On a table, order a drink item → printer correctly prints "NEW" ticket with the drink * On the same table, add a food item (not in printer categories) * Trigger sending to preparation (e.g., validate order or send to kitchen) > Observation: The printer prints a duplicate of the previous drink order showing "NEW (DUPLICATE!)" instead of staying silent. Why the fix: ------------ The `sendOrderInPreparation` method was automatically reusing `order.uiState.lastPrint` when no preparation category changes were detected, causing an implicit reprint. This behavior is incorrect when the order only contains items outside preparation printer categories - the printer should simply not print anything. The fix: - Prevents automatic reprint when there are no prep category changes - Still calls `updateLastOrderChange()` to mark the order as "sent" and prevent the restaurant popup warning about unsent orders - Only allows explicit reprints via `opts.explicitReprint` flag for future use cases Forward-Port-Of: odoo/odoo#239003
This update resolves an issue that occasionally prevented multiple receipt prints from working correctly using a USB printer. The fix ensures that only one printing method (python-escpos) is used at a time, preventing conflicts and improving the reliability of receipt generation. This enhances the user experience when processing high volumes of receipts.
Original PR description
When printing many receipts quickly using a USB printer, this error was occasinally occuring: ``` WARNING ? odoo.addons.iot_drivers.iot_handlers.drivers.printer_driver_base: Failed to query ESC/POS…
When printing many receipts quickly using a USB printer, this error was occasinally occuring: ``` WARNING ? odoo.addons.iot_drivers.iot_handlers.drivers.printer_driver_base: Failed to query ESC/POS status ERROR ? root: Could not set configuration: [Errno 16] Resource busy ``` This would cause `python-escpos` to be disabled and fallback to just CUPS printing. The issue was caused by two threads trying to access the printer at the same time, which could happen in two ways: - IoT thread with `python-escpos` and CUPS try to access the printer at the same time. - Two IoT threads with `python-escpos` try to access the printer at the same time (this can happen if two receipt actions are received at the same time). Both of these scenarios should now prevented: - Now, if we are using `python-escpos`, we also use it to print the receipt as well as checking the status. CUPS is never used so there should be no interference from it. - We now have an `escpos_lock` (per printer, not global) that is acquired when accessing the printer via `python-escpos`. This ensures that different threads cannot both try to access the printer at the same time. task-5490942 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#244031
This update fixes an issue where VAT reports for reverse charge transactions (8.1% and 7.7%) were incorrectly displaying negative values. The fix involves correcting the formula signs to accurately represent reverse charge taxes, ensuring accurate VAT reporting for Swiss companies.
Original PR description
**Steps to reproduce:** * Install the **l10n_ch** module for a Swiss company. * Create a vendor bill for a **foreign vendor**. * Apply a reverse charge tax: * **8.1% R C** (figure **383a**), or *…
**Steps to reproduce:** * Install the **l10n_ch** module for a Swiss company. * Create a vendor bill for a **foreign vendor**. * Apply a reverse charge tax: * **8.1% R C** (figure **383a**), or * **7.7% R C** (figure **382a**). * Confirm the vendor bill. * Go to **Accounting → Reporting → Tax Report**. * Generate the VAT report for the relevant period. **Observed behavior:** * Figure **383a** (8.1% reverse charge) is reported as **negative**. * Figure **382a** (7.7% reverse charge) is reported as **negative**. * This results in incorrect VAT reporting. **Cause:** * Reverse charge taxes use **negative tax rates** to model the reverse mechanism. * The base amounts were tagged with **positive** signs, leading to negative values in the report. **Fix:** * Invert the base formula signs for 383a and 382a: * **382a**: change base formula from `-382a` to `382a`. * **383a**: change base formula from `-383a` to `383a`. * Reverse charge base amounts now appear as **positive** values in the VAT report. opw-5257445 Forward-Port-Of: odoo/odoo#244707 Forward-Port-Of: odoo/odoo#244452
This update ensures that delivery carriers set on pickings are consistently applied to subsequent transfers, even when not initially defined in the sales order. This change addresses a situation where logistics teams manually set carriers, and previously this wasn't reflected in the delivery process. It improves flexibility and aligns with how carriers are often managed in real-world scenarios.
Original PR description
Issue Before This Commit: ================================ Previously, the delivery carrier was only propagated between pickings when it was set from the sale order. If the carrier was manually set…
Issue Before This Commit: ================================ Previously, the delivery carrier was only propagated between pickings when it was set from the sale order. If the carrier was manually set on a picking (e.g., during the packing step in a multi-step delivery flow), it was not propagated to the consequent pickings, even when the stock rules had `Propagation of carrier` enabled. Steps to reproduce: ================================ 1. Activate Multi-Step Routes and Delivery Methods. 2. Configure a 3-step delivery route in the warehouse and enable Propagate Carrier on all rules. 3. Create a sale order with a product but without setting a delivery carrier. 4. Confirm the sale order to generate picking. 5. On the first picking (i.e., pick), manually set a delivery carrier (e.g., Local Delivery) and validate. 6. On the next transfer (i.e., pack), observe that the delivery carrier is not propagated. After this commit: ================================ The delivery carrier set on any picking is propagated to subsequent transfers when the corresponding stock rule has `Propagation of carrier` enabled and no carrier is already configured on the next picking. This ensures consistent carrier propagation across all routing configurations (all pull rules, all push rules, and mixed push/pull flows), even when the carrier is configured at the picking level rather than on the sale order. This behavior is required because, in many business scenarios, carrier selection is managed by the logistics team rather than the sales team. task-4454313 Forward-Port-Of: odoo/odoo#242334 Forward-Port-Of: odoo/odoo#202700
This update resolves an issue where invoices sent to Viettel's SInvoice system were failing due to incorrect decimal formatting. The change ensures tax amounts are calculated using the correct currency rounding method, preventing API errors and improving invoice processing with this key integration.
Original PR description
When sending an invoice to SInvoice (Viettel), the API raises an `INVALID_DECIMAL_POINT_TAX_MONEY` error if the tax amount contains excessive decimal places (e.g., 100.02999999999997). This occurs because the tax amount is currently calculated using simple subtraction (`total - subtotal`). Due to standard floating-point precision issues, this can result in unrounded values that the API rejects. The tax amount calculation is now updated to explicitly use the currency's rounding method, ensuring the value is accepted by SInvoice. task-[5484845](https://www.odoo.com/odoo/project/967/tasks/5484845) Forward-Port-Of: odoo/odoo#244647
This update refactors the HTML editor's cursor management to handle nested operations more reliably. Previously, nested calls could overwrite or point to incorrect DOM elements. Now, a stack-based approach ensures synchronized cursor updates across contexts, preventing state conflicts and improving editor stability.
Original PR description
Summary: Refactor `preserveSelection()` to use a stack-based approach (`preservedCursors` array) instead of a single cursor reference. This allows nested calls to `preserveSelection()` to operate…
Summary:
Refactor `preserveSelection()` to use a stack-based approach (`preservedCursors` array) instead of a single cursor reference. This allows nested calls to `preserveSelection()` to operate independently while keeping cursor updates synchronized across active contexts.
Problem:
Using a single stored cursor caused issues in nested calls to `preserveSelection()`:
1. **State overwrite:** Inner calls could overwrite or clear the outer cursor.
2. **Stale references:** If an inner function replaced a DOM node, the outer cursor could still point to a removed node and fail on restore.
Solution:
Use an array of cursor subscribers
- **Shared updates:** When calling `remapNode` on a cursor, it iterates over all active subscribers in the stack. This ensures node replacements performed in inner contexts also update outer cursor references.
- **Scoped cleanup:** `restore()` now removes only the corresponding cursor instance from the stack, ensuring proper lifecycle management.
Example:
The key improvement is that outer scopes receive updates performed by inner scopes.
```javascript
// Function A (outer)
function wrapperFunction() {
const cursor = this.preserveSelection();
replaceTextWithSpan();
cursor.restore();
}
// Function B (inner)
function replaceTextWithSpan() {
const innerCursor = this.preserveSelection();
const oldNode = document.querySelector('text');
const newNode = document.createElement('span');
oldNode.replaceWith(newNode);
innerCursor.remapNode(oldNode, newNode);
innerCursor.restore();
}
```
opw-5386862
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#243876
Forward-Port-Of: odoo/odoo#238989