Daily updates from Odoo
Wednesday, August 5, 2026
345 changes
24 changes
New functionality added to Odoo
Adds a Romania-specific EC Sales D390 report so companies can prepare the monthly declaration required by ANAF for EU cross-border transactions. The update includes the required XML export and collection of declarant details, helping Romanian businesses meet electronic filing requirements.
Original PR description
This commit introduces a new module, 'Romania - EC Sales D390 Report'. For the support of Declarația 390 report as an EC List report for Romania in stable versions. Romanian localization has…
This commit introduces a new module, 'Romania - EC Sales D390 Report'.
For the support of Declarația 390 report as an EC List report for Romania in
stable versions.
Romanian localization has different requirements for the
EC Sales List report. So the generic EC Sales List does not work in the case of
Romania.
LEGAL REQUIREMENTS:
- Romanian tax authority accepts the Declarația 390 (Form 390) report for
cross-border transactions within the European Union.
- This declaration is filed on a monthly basis.
- The declaration must be submitted electronically to ANAF by the 25th of the
month following the month in which the transactions occurred. For example,
the declaration for transactions made in July must be filed by August 25th.
- The declaration must include all the intra-community transactions. These
transactions include:
1. Intra-Community acquisition of Goods
2. Intra-Community acquisition of Services
3. Intra-Community triangular trades
4. Intra-Community supplies of Goods
5. Intra-Community supplies of Services
REQUIRED FORMAT:
- Declarația 390 must be submitted electronically in a specific XML format.
The structure of this XML file is defined by ANAF.
- To facilitate compliance, ANAF provides a free software application called
'DUKIntegrator'. This tool allows businesses to:
1. Validate the generated XML file against the official schema to ensure it is
correctly formatted.
2. Generate the final PDF file with the XML attachment, which is the official
format for submission.
TECHNICAL DETAILS:
- Implemented the tax returns for the D390 EC Sales List report filing.
- Implemented XML export file generator, which creates the whole D390 XML report
with the required schema format.
- The D390 report needs to have the declarant's details in the report, the
attributes like 'nume_declar(Middle Name)', 'prenume_declar(First Name)',
'functie_declar(Job Position)' and 'adresa(Fiscal Domicile Address)'.
For collecting these details, we've created a wizard that will be on the
return validation action. Along with these details, we ask the user if the
current return is the corrected/rectified one, with the 'corrective_declaration'
field in this wizard. This wizard will then store these details in the
respective return. And in the XML export file generator, we are retrieving
these details from the return to show in the report.
REFERENCES:
- Drive link for official XML report schema, report structure, 'DUKIntegrator'
software and XML report attribute explanation in English: (
https://drive.google.com/drive/folders/1uzROZAM5Vuiv0HlBXw-vU28x5a9sVOpb)
- Official ANAF sources for D390 report: (
https://static.anaf.ro/static/10/Anaf/Declaratii_R/390.html)
- Official ANAF website for Electronic Declaration: (
https://www.anaf.ro/anaf/internet/ANAF/servicii_online/declaratii_electronice)
Forward-Port-Of: odoo/enterprise#109921Enhancements to existing features
Improves the process that suggests reconciliation rules when assigning accounts to bank statement lines. This prevents memory errors and speeds up handling of long payment references, making bank reconciliation setup more reliable for users with large or detailed transaction descriptions.
Original PR description
When setting an account to an account.bank.statement there is a step to automatically create a reconciliation rule/model if one does not exist already. To do so, we retrieve 5…
When setting an account to an account.bank.statement there is a step to automatically create a reconciliation rule/model if one does not exist already. To do so, we retrieve 5 account.bank.statement.lines and use them to define the reconciliation model config. A matching is done on the payment_ref of the account.bank.statement.lines by finding the longest common substring in the reference. ### Current Implementation The current algorithm does so by first generating all the possible substrings for all the payment_ref before doing the intersection between these sets and returning the max if `len(substring) >=10`. This is reasonable when the payment_ref follows either a SEPA communication national standard like the Belgian one or the Creditor Reference standard (ISO 11649). For transactions with large, unstructured communication with more than 100 chars, the method `_get_common_substrings` quickly overfill the memory, sometimes raising a MemoryErorr, and takes a significant amount of time. That's because the nested function `_generate_all_substrings` generates n*(n+1)/2 substrings, with n being the lenght of a payment_ref, called `label` in `generate_all_substrings`. ### Proposed Fix This commit introduces another algorithm to find the largest common substring. It starts by taking the two smallest labels to find their substrings intersection. We know that for an arbitrary collection of labels, the intersection of their substrings sets A ∩ B ∩...∩ Z is included in the intersection of any two substrings sets. The underlying assumption of the first step is that for an arbitrary collection of labels the intersection of the substrings sets of the two smallest labels will be the smallest intersection of any given pair of substrings sets. This won't hold true everytime and using a metric such as label similarity instead of shortest string might be better. But on average this should be good enough and it's easier to implement + it removes the need of preprocessing the labels to compute the similarity. The point of the new nested function `common_substrings` is to discard common substrings as we build them. Using the current `generate_all_substsrings` on either the smallest label or both smallest labels would still generate and store a lot of substrings, especially for large labels. By yielding the common substrings as we find them, the memory footprint is vastly reduced. Lastly, the next substring in the common_substrings iterable is only checked against the remaining labels if it's longer than the current match. This speeds up the whole process ### speedup In a customer database with some account.bank.statement.line with payment_ref > 500 chars, setting a specific account (code 4970) on transactions goes from MemoryError to < 1Mb memory consumption. Because of the memory consumption it was not possible to gather timing value on the current version. Testing the new algorithm in a shell and using as labels the 5 longest payment_ref in the customer database (831, 831, 1117, 1178, 1300 chars), averaging to 2000 chars once normalised, the average time to execute `_get_common_substrings` is 900 ms ± 10.3 ms. Forward-Port-Of: odoo/enterprise#121575 Forward-Port-Of: odoo/enterprise#118824
Generating the requested business-friendly JSON summary for the pull request.
Original PR description
This commit adds the <BldgNb> node in the iso20022 XML files, as it will be mandatory starting November 2026. Linked: https://github.com/odoo/odoo/pull/271855 task-6317758 Forward-Port-Of: odoo/enterprise#126532 Forward-Port-Of: odoo/enterprise#121674
This update backports additional automated tests and testing tools for marketing automation, including WhatsApp and SMS-related campaign behavior. It helps Odoo detect regressions earlier, especially around failed messages, bounced communications, participant status changes, and synchronization jobs.
Original PR description
Backport various tests added in Odoo 19.4+ in order to better spot potential regressions. Add new tests for synchronization cron behavior, notably in case of failure. Forward-Port-Of: odoo/enterprise#126769 Forward-Port-Of: odoo/enterprise#126334
Resolved issues and error corrections
Rental orders that use a custom make-to-order buying route now correctly generate the expected return transfer alongside the delivery and purchase. This prevents missing return logistics for rental products and helps teams keep rental stock movements accurate.
Original PR description
### Steps to reproduce: - In the settings enable: Multi-Steps Routes and rental transfers - Unarchive the MTO route - Create a rental product P with a buy route and a set vendor - Create a rental…
### Steps to reproduce: - In the settings enable: Multi-Steps Routes and rental transfers - Unarchive the MTO route - Create a rental product P with a buy route and a set vendor - Create a rental order for 1 x P and set the the MTO route on the sol - Confirm the order #### > The delivery as well as the purchase for 1 unit of P was generated but the return was not. ### Cause of the issue: The procurement generated to handle both the delivery and the return rental picking are handled by the `_create_procurements`: https://github.com/odoo/enterprise/blob/b0e48baaf99bdc4faefd2ffdd3bd5637fb548593/sale_stock_renting/models/sale_order_line.py#L353-L374 The `route_ids` set and used is the `mto_route` set on the sol: https://github.com/odoo/odoo/blob/0f061503e26ac8c441d62d91947419119e48c47a/addons/sale_stock/models/sale_order_line.py#L415-L422 https://github.com/odoo/odoo/blob/0f061503e26ac8c441d62d91947419119e48c47a/addons/sale_stock/models/sale_order_line.py#L282-L297 However, in the present case, the mto route does not contain any rule with a relevant `location_src_id` in the rental location so that the return will not be generated. opw-6361322 Forward-Port-Of: odoo/enterprise#126410 Forward-Port-Of: odoo/enterprise#124097
Electronic invoices for Peru now use the address structure required by SUNAT’s current UBL 2.1 standard. This helps invoices pass official validation by correctly formatting districts and urban subdivisions.
Original PR description
Update electronic invoicing address nodes to align with current SUNAT requirements. This transitions the geographic data formatting from the legacy UBL 2.0 schema to the standard UBL 2.1 specification, ensuring proper structural validation for districts and urban subdivisions. Documentation used: https://cpe.sunat.gob.pe/sites/default/files/inline-files/guia+xml+factura+version+2-1+1+0+(2)_0+(2).pdf opw-6282314 Forward-Port-Of: odoo/enterprise#126380 Forward-Port-Of: odoo/enterprise#121390
Users can now generate sample timesheet activity data even when ActivityWatch is connected. This helps teams compare or demonstrate sample entries alongside real activity data without disconnecting the ActivityWatch service.
Original PR description
Before this commit, the Generate Sample Data button only worked when the ActivityWatch server was unavailable. When ActivityWatch was running, users could only load real activity data. After this commit, clicking Generate Sample Data while ActivityWatch is connected injects the generated sample events alongside the real ActivityWatch events, allowing both to be displayed together. task-6373606 Forward-Port-Of: odoo/enterprise#125863 Forward-Port-Of: odoo/enterprise#124981
Users can now duplicate several maintenance requests at once without the system showing an error. This removes an interruption in the maintenance workflow and makes bulk record handling more reliable.
Original PR description
Currently, when a user attempts to duplicate multiple maintenance requests simultaneously, the system throws a ValueError (Expected singleton). This PR fixes that. ### How to reproduce the issue: - Install `mrp_maintenance` module; - Open maintenance request list view; - Select multiple records and try to duplicate them using the Action button; - It will throw a traceback stating a singleton error. ### Expected behavior after PR is merged: Now multiple maintenance requests will be copied without raising any errors. Forward-Port-Of: odoo/enterprise#124255
The planning filters for employees and materials now apply the special open-shift logic only when a shift has no assigned resource. This prevents unrelated assigned shifts from being included or excluded incorrectly, helping planners see more accurate scheduling results.
Original PR description
Before this commit, the domain wrongly assumes that we always search on shifts having no role or a role containing resources of types 'user' or 'material' (1). Additionally to the basic domain which searches on the shifts having resources of types 'user' or 'material' (2). After this commit, we add a condition on domain (1) to only apply it for open shifts (shifts having no resource_id). no-task Forward-Port-Of: odoo/enterprise#126616 Forward-Port-Of: odoo/enterprise#126247
Cancelled Mexican CFDI invoices now reprint with their required fiscal details, including QR codes, digital stamps, and fiscal folio information. This helps businesses keep legally relevant invoice records complete even after cancellation.
Original PR description
### Issue before this commit: When an invoice's CFDI cancellation request is confirmed (state moves from sent to cancel), reprinting the invoice PDF no longer displays the fiscal information (QR…
### Issue before this commit: When an invoice's CFDI cancellation request is confirmed (state moves from sent to cancel), reprinting the invoice PDF no longer displays the fiscal information (QR code, digital stamps, fiscal folio/UUID, etc.), even though the signed CFDI attachment is still present on the invoice. ### Steps to reproduce the issue: 1. Download Accounting and l10n_mx 2. Create an invoice and send it to CFDI 3. Select 'Request for cancel' 4. Wait and click retry button in the CFDI tab until the invoice is marked as cancelled 5. Print the invoice again 6. See PDF does not show fiscal information (QR, fiscal folio, etc.) ### Cause of the issue: https://github.com/odoo/enterprise/blob/f6c94d4ca3ef4211a5ab00bf0b39f6a7675c8f79/l10n_mx_edi/models/account_move.py#L904-L909 Once the CFDI is cancelled, the computed field switches to 'cancel', so the condition fails and the method falls back to the generic account.report_invoice_document template, which has no knowledge of CFDI fiscal fields. ### Reason to introduce the fix: A cancelled CFDI invoice is still a legally relevant fiscal document in Mexico and must be reprintable with its fiscal data intact (to prove it was issued and later cancelled). The fix extends the condition to also cover the 'cancel' state, ensuring the CFDI-specific report template is used whenever a valid attachment exists, regardless of whether the CFDI is currently signed or cancelled. opw-6393656 Forward-Port-Of: odoo/enterprise#126466
The timesheet assistant now shows the correct color indicator when comparing recorded time with expected working hours. It highlights totals in green only when hours are below expected time and avoids coloring flexible-hour cases, reducing confusion for users reviewing timesheets.
Original PR description
Fix the wrong color selection of total hours on the timesheet assistant page before: green if total time > working hours after: - green if total time < working hours - no color for flexible hours --- task-6409938 Forward-Port-Of: odoo/enterprise#125915 Forward-Port-Of: odoo/enterprise#125177
The Italian balance sheet reports now use corrected field names in the Italian language version. This improves readability and reduces confusion for users reviewing statutory financial reports in Italy.
Original PR description
### Steps to reproduce the issue: 1. Download Accounting and l10n_it 2. Install and switch to italian language 3. Go to Balance Sheets and select Balance Sheet (IT) 4. Some words are not correct [Here]( https://docs.google.com/spreadsheets/d/1-w83oAHTxDRIi-W_VSJiscNclw-yijzQUHOgMnTq7jE/edit?gid=0#gid=0) the wrong fields with their correct translations. opw-6424609 Forward-Port-Of: odoo/enterprise#126253
Attachments added to employee records and leave requests now create documents in the correct employee-related folders instead of the general Employees root folder. Sick leave attachments also reliably create the expected document, making HR document organization more consistent and easier to manage.
Original PR description
Before this commit, when adding an attachment to a leave or a employee version the mixin was configured to create the document in the root folder of Employees which was not very convenient. In addition, when creating a Sick leave with an attachment, no document was ever created. This commit fix both those bugs. Task-6095811 Forward-Port-Of: odoo/enterprise#121942 Forward-Port-Of: odoo/enterprise#112993
The appointment booking page no longer shows empty months when a minimum booking delay pushes the first available slot into a later month. This ensures customers can reliably see and choose valid appointment times when navigating the calendar.
Original PR description
On the website booking page, moving to a later month can show no available times even though the weekly schedule clearly has some. ### Steps to reproduce - Install Appointments. - Create a recurring…
On the website booking page, moving to a later month can show no available times even though the weekly schedule clearly has some. ### Steps to reproduce - Install Appointments. - Create a recurring appointment type available on a single weekday (say Monday), with a user or resource assigned and a date range spanning a few months. - Set `Allow bookings at least` (the minimum booking delay) so that the current time plus the delay falls after this month's last Monday. Close to the end of a month, a day or two of delay is enough. - Open the booking page: the first month shown is next month, because the delay skipped this month's last slot. - Click the arrow to move forward one more month. => the reached month shows no slots, even though it has Monday availability. ### Cause The calendar computes availability one month at a time. It builds a list of months, and the browser refers to each month by its position in that list (0, 1, 2, ...). Clicking the next arrow sends that position back to the server. The server turns the position into a real month by adding it to a start month, which it computes as `now` plus the minimum booking delay. But the list shown to the visitor does not start there: it starts at the month of the first slot that can actually be booked. These two are usually the same, so the position lines up. They stop matching when the delay moves the earliest bookable time past the last availability day of the current month. In the steps above, `now` plus the delay lands after the month's last Monday, so the first bookable slot is a Monday in the next month. The visitor's list then starts one month later than the server assumes, every position points one month too early, and the server computes availability for a month the visitor is not looking at. The reached month comes back empty. ### Fix Count the visitor's month position from the same first bookable slot the list starts from, instead of from `now` plus the delay. The navigation offset is passed to the slot computation and resolved against that slot, so the filled month always matches the month the visitor sees. opw-6353569 Forward-Port-Of: odoo/enterprise#123994 Forward-Port-Of: odoo/enterprise#122494
Bank statement lines opened from in-app notifications now show the chatter panel. This ensures users can see the comment or mention that brought them to the record, improving follow-up on reconciliation discussions.
Original PR description
Problem: When navigating to a bank statement line through a notification, the chatter doesn't appear. Steps to reproduce: 1. Set in app notifications for one of the users 2. Open Accounting > Bank > To Reconcile 3. Select any bank statement line 4. Tag the user from step 1 in a comment 5. Log in as that user 6. Check notifications and click the new notification 7. Notice how the chatter does not appear on the bank statement line after navigating there Cause: The chatter was not enabled on the bank statement line form view. opw-6410186 Forward-Port-Of: odoo/enterprise#125777
Date and datetime fields now disappear from the pivot popup once all available time breakdowns have already been used. This prevents users from adding duplicate entries, avoiding confusing drag-and-drop behavior and keeping spreadsheet pivots consistent.
Original PR description
Current behavior before PR: - Date and datetime fields remained visible even when all their granularities were already added to the pivot. - Users could add the same field with the same granularity multiple times, creating duplicate IDs and causing unexpected drag and drop behavior. Desired behavior after PR is merged: - Hide date and datetime fields from the popup once all available granularities have already been added to the pivot. - This prevents duplicate field IDs and keeps the popup behavior consistent with spreadsheet pivots during drag-and-drop. Task: [6295794](https://www.odoo.com/odoo/project/2328/tasks/6295794) Forward-Port-Of: odoo/enterprise#126772 Forward-Port-Of: odoo/enterprise#123280
Accrual list reports now remember the user's selected "As of" date when they open a line and return using the breadcrumb. This prevents reports from unexpectedly reverting to today's date, helping accounting teams keep their review context and avoid confusion.
Original PR description
Issue: In accrual list reports (Billed Not Received / Invoiced Not Delivered), selecting an "As of" date, opening a line, and returning with the breadcrumb resets the date filter to the default value…
Issue: In accrual list reports (Billed Not Received / Invoiced Not Delivered), selecting an "As of" date, opening a line, and returning with the breadcrumb resets the date filter to the default value (today's date) Steps to reproduce: 1) Open an accrual list report ( Accounting > Audit > Purchases > Bill to receive / Billed Not Received OR Invoices to be issues / invoiced Not delivered) 2) Pick any "As of" date 3) Open any row 4) Click breadcrumb to return to the accrual list 5) Observe the "As of" date has been reset to today's date To generate some data you could: create a PO, then upload the bill, validate the receipt, then you'll find it in bills received Cause: `AccrualListController.setup()` always initialized state.date with a fresh default date and did not re-put the previously saved `accrual_entry_date` from restored context https://github.com/odoo/enterprise/blob/899f0d45b2ae1dc4e5e06a2e0acb3d006d12d563/account_reports/static/src/views/accrual_list_controller.js#L10-L16 Although `setDate()` stored the selected date in context, `setup()` overwrote the UI state on controller recreation https://github.com/odoo/enterprise/blob/899f0d45b2ae1dc4e5e06a2e0acb3d006d12d563/account_reports/static/src/views/accrual_list_controller.js#L61-L65 Solution: - Persist `accrual_entry_date` in `AccrualListSearchModel` via `exportState()` / `_importState()`, so the date is restored in search context before the list model loads on breadcrumb navigation. - Initialize the date picker through `setDate()` in `onWillStart()` instead of hardcoding `DateTime.now()` in `setup()`, so restoration and user changes share the same code path. - In `setDate()`, reset grouped list caches (`currentGroups` and `groups`) before `root.load()`, because those caches are not keyed on `accrual_entry_date` and would otherwise show stale vendor groups after a date change or breadcrumb restore. opw-6232263 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#126371 Forward-Port-Of: odoo/enterprise#118669
When an order from a closed session is invoiced, a misc reversal move is created to "extract" the order from the session closing entry. When the PoS config uses a currency different from the company currency, posting that reversal move could fail with "The entry is not balanced.", making it impossible to invoice the order. Steps to reproduce: - company in currency A, PoS config in currency B, with a conversion rate producing rounding drift (e.g. 0.4007) - sell a product of 20.0 B + 15% t
Original PR description
When an order from a closed session is invoiced, a misc reversal move is created to "extract" the order from the session closing entry. When the PoS config uses a currency different from the company…
When an order from a closed session is invoiced, a misc reversal move is created to "extract" the order from the session closing entry. When the PoS config uses a currency different from the company currency, posting that reversal move could fail with "The entry is not balanced.", making it impossible to invoice the order. Steps to reproduce: - company in currency A, PoS config in currency B, with a conversion rate producing rounding drift (e.g. 0.4007) - sell a product of 20.0 B + 15% tax (23.0 B), paid by bank, without invoicing - close the session - set a partner on the order and invoice it => UserError: "The entry is not balanced." Cause: in `_prepare_aml_values_list_per_nature`, the product and tax lines each get their balance converted and rounded individually (20.0 * 0.4007 -> 8.01, 3.0 * 0.4007 -> 1.20), while the payment term line was converted from the payment total, without rounding (23.0 * 0.4007 -> 9.2161). Per-line rounding does not distribute over the sum, so the balances could differ by a few cents (8.01 + 1.20 != 9.22) and the move could not be posted. The closing entry has the balancing-account wizard as an escape valve for such differences; the reversal move had none. Fix, following what is done for regular invoices (see `account.move._compute_needed_terms`, where the payment term balance is derived from the sum of the already rounded lines): - round the payment term conversions - put the conversion residual on the last payment term line so the payment terms exactly counterbalance the other lines, but only when the amounts in currency are balanced, so it can only absorb rounding drift - include the cash rounding amounts in the accumulated totals - fix the swapped `amount_currency`/`balance` values when merging two non-split payments on the same receivable account opw-6375309 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#279874 Forward-Port-Of: odoo/odoo#275673
Before this commit: The info, 'You can choose how you want us to send your invoices, and with which electronic format.' was never visible because `invoice_edi_format` is always None. After this commit: Update condition from `invoice_edi_format` to `invoice_edi_formats` to make condition correct and will display info if there are multiple invoice_sending_methods and at-least one edi format. Forward-Port-Of: odoo/odoo#278870
Original PR description
Before this commit: The info, 'You can choose how you want us to send your invoices, and with which electronic format.' was never visible because `invoice_edi_format` is always None. After this commit: Update condition from `invoice_edi_format` to `invoice_edi_formats` to make condition correct and will display info if there are multiple invoice_sending_methods and at-least one edi format. Forward-Port-Of: odoo/odoo#278870
Issue: Every change of the selected order makes the PoS call `pos.config.update_customer_display`, which publishes the order on the bus for the customer display paired with this browser. The device uuid identifying that pairing is only generated when the customer display dialog is opened, so a PoS whose customer display was never opened sends `device_uuid: null` and the server publishes on `UPDATE_CUSTOMER_DISPLAY-null`, a channel nobody can listen to. Steps to reproduce: Open a PoS session
Original PR description
Issue: Every change of the selected order makes the PoS call `pos.config.update_customer_display`, which publishes the order on the bus for the customer display paired with this browser. The device…
Issue: Every change of the selected order makes the PoS call `pos.config.update_customer_display`, which publishes the order on the bus for the customer display paired with this browser. The device uuid identifying that pairing is only generated when the customer display dialog is opened, so a PoS whose customer display was never opened sends `device_uuid: null` and the server publishes on `UPDATE_CUSTOMER_DISPLAY-null`, a channel nobody can listen to. Steps to reproduce: Open a PoS session, never open the customer display, and add a product to an order. Current behaviour: An rpc is sent for each change of the order, and each of them ends up as a bus notification that no customer display can ever receive. Expected behaviour: Nothing is sent as long as no customer display was ever opened. Solution: Skip the rpc while no device uuid exists. A customer display opened in the same browser as the PoS is served by the BroadcastChannel, which is unaffected. task-6408513 Forward-Port-Of: odoo/odoo#277687
Steps to reproduce: - Install `l10n_sa_edi` and `Accounting`> Change Company - Accounting > Customers > Invoices > Select an invoice > Click `Print` - `ValueError: can only parse strings` When printing a simplified Saudi invoice, the QR code is generated from the invoice XML. If the invoice has no taxes, `_l10n_sa_generate_zatca_template()` returns an error instead of the XML. The QR code generation tried to parse this error as XML, which caused a `ValueError: can only parse strings` an
Original PR description
Steps to reproduce: - Install `l10n_sa_edi` and `Accounting`> Change Company - Accounting > Customers > Invoices > Select an invoice > Click `Print` - `ValueError: can only parse strings` When printing a simplified Saudi invoice, the QR code is generated from the invoice XML. If the invoice has no taxes, `_l10n_sa_generate_zatca_template()` returns an error instead of the XML. The QR code generation tried to parse this error as XML, which caused a `ValueError: can only parse strings` and hid the actual reason for the failure. This commit checks for the error before generating the QR code and raises the original Error so the user sees the correct validation message. opw-6372454 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#275581
'_getEmptyOrder' could reuse an order whose background sync was still processing; the stale sync response then wiped is_refund and detached the refund line. We now skip orders currently in `syncingOrders` when picking the refund destination so the refund always lands on a clean order and syncs fresh. runbot error : 242604 Forward-Port-Of: odoo/odoo#273703
Original PR description
'_getEmptyOrder' could reuse an order whose background sync was still processing; the stale sync response then wiped is_refund and detached the refund line. We now skip orders currently in `syncingOrders` when picking the refund destination so the refund always lands on a clean order and syncs fresh. runbot error : 242604 Forward-Port-Of: odoo/odoo#273703
Code cleanup and technical improvements
The live chat helpdesk panel was simplified to avoid a duplicated check when showing open tickets. This reduces the risk of crashes or inconsistent behavior and adds test coverage to keep the ticket information block reliable.
Original PR description
Enterprise counterpart of "[FIX] crm_livechat, *: prevent crash in the info panel", which explains why the condition of the caller goes away. This commit drops the same condition on the "Open tickets" block, and covers that block with a test. https://github.com/odoo/odoo/pull/280430 Forward-Port-Of: odoo/enterprise#126715
Miscellaneous changes
This is in preparation for forcefully recommending the use of `execute_query` and `SQL` as early as 19.0. While `execute_query` is the primary recommendation, `execute(SQL(...))` is an OK alternative, but static checking limitations mean queries constructed in function calls, or callers (that includes the implementation of `execute_query` itself), or using conditionals, will be flagged. In that case the easiest pattern is execute(SQL("%s", query)) which we do not want to penalize overl
Original PR description
This is in preparation for forcefully recommending the use of `execute_query` and `SQL` as early as 19.0. While `execute_query` is the primary recommendation, `execute(SQL(...))` is an OK alternative, but static checking limitations mean queries constructed in function calls, or callers (that includes the implementation of `execute_query` itself), or using conditionals, will be flagged. In that case the easiest pattern is
execute(SQL("%s", query))
which we do not want to penalize overly.
- Add fast path for `SQL("%s", arg: SQL)`.
- Improve fast-path for `SQL(SQL())` to do ~nothing when possible.
- Allow overriding `to_flush` in both case, fix site which needs that
- Update type dispatches to check for `Iterable` instead of `__iter__`. this both helps type checkers and is actually correct.
Forward-Port-Of: odoo/odoo#280324
Forward-Port-Of: odoo/odoo#25893010 changes
Enhancements to existing features
Backport various tests added in Odoo 19.4+ in order to better spot potential regressions. Forward-Port-Of: odoo/odoo#279677
Original PR description
Backport various tests added in Odoo 19.4+ in order to better spot potential regressions. Forward-Port-Of: odoo/odoo#279677
Resolved issues and error corrections
Before this commit: The info, 'You can choose how you want us to send your invoices, and with which electronic format.' was never visible because `invoice_edi_format` is always None. After this commit: Update condition from `invoice_edi_format` to `invoice_edi_formats` to make condition correct and will display info if there are multiple invoice_sending_methods and at-least one edi format. Forward-Port-Of: odoo/odoo#278870
Original PR description
Before this commit: The info, 'You can choose how you want us to send your invoices, and with which electronic format.' was never visible because `invoice_edi_format` is always None. After this commit: Update condition from `invoice_edi_format` to `invoice_edi_formats` to make condition correct and will display info if there are multiple invoice_sending_methods and at-least one edi format. Forward-Port-Of: odoo/odoo#278870
Issue: Every change of the selected order makes the PoS call `pos.config.update_customer_display`, which publishes the order on the bus for the customer display paired with this browser. The device uuid identifying that pairing is only generated when the customer display dialog is opened, so a PoS whose customer display was never opened sends `device_uuid: null` and the server publishes on `UPDATE_CUSTOMER_DISPLAY-null`, a channel nobody can listen to. Steps to reproduce: Open a PoS session
Original PR description
Issue: Every change of the selected order makes the PoS call `pos.config.update_customer_display`, which publishes the order on the bus for the customer display paired with this browser. The device…
Issue: Every change of the selected order makes the PoS call `pos.config.update_customer_display`, which publishes the order on the bus for the customer display paired with this browser. The device uuid identifying that pairing is only generated when the customer display dialog is opened, so a PoS whose customer display was never opened sends `device_uuid: null` and the server publishes on `UPDATE_CUSTOMER_DISPLAY-null`, a channel nobody can listen to. Steps to reproduce: Open a PoS session, never open the customer display, and add a product to an order. Current behaviour: An rpc is sent for each change of the order, and each of them ends up as a bus notification that no customer display can ever receive. Expected behaviour: Nothing is sent as long as no customer display was ever opened. Solution: Skip the rpc while no device uuid exists. A customer display opened in the same browser as the PoS is served by the BroadcastChannel, which is unaffected. task-6408513 Forward-Port-Of: odoo/odoo#277687
This commit fix the regex used in `street_split` to be more complient. Before: address format was "street_name street_number - street_number2" Now, street_number can be in front of street_name. Format is also less strict, allowing multiple numbers in the street_name without skipping the building number. Linked: https://github.com/odoo/enterprise/pull/121674 task-6317758 Forward-Port-Of: odoo/odoo#280081 Forward-Port-Of: odoo/odoo#271855
Original PR description
This commit fix the regex used in `street_split` to be more complient. Before: address format was "street_name street_number - street_number2" Now, street_number can be in front of street_name. Format is also less strict, allowing multiple numbers in the street_name without skipping the building number. Linked: https://github.com/odoo/enterprise/pull/121674 task-6317758 Forward-Port-Of: odoo/odoo#280081 Forward-Port-Of: odoo/odoo#271855
'_getEmptyOrder' could reuse an order whose background sync was still processing; the stale sync response then wiped is_refund and detached the refund line. We now skip orders currently in `syncingOrders` when picking the refund destination so the refund always lands on a clean order and syncs fresh. runbot error : 242604 Forward-Port-Of: odoo/odoo#273703
Original PR description
'_getEmptyOrder' could reuse an order whose background sync was still processing; the stale sync response then wiped is_refund and detached the refund line. We now skip orders currently in `syncingOrders` when picking the refund destination so the refund always lands on a clean order and syncs fresh. runbot error : 242604 Forward-Port-Of: odoo/odoo#273703
Steps to reproduce: - Open any PoS session - Click on Orders and filter by "Paid" orders - Select an order and click on "Details" - Open the "Payments" tab and click on the "View" button of a payment - Click on the payment method link Traceback: OwlError: The following error occurred in onWillStart: "Cannot find key "pos_payment_provider_cards" in the "view_widgets" registry" Backend views opened from within the PoS UI (order details dialog, drill-down on many2one links, ...) share t
Original PR description
Steps to reproduce: - Open any PoS session - Click on Orders and filter by "Paid" orders - Select an order and click on "Details" - Open the "Payments" tab and click on the "View" button of a payment…
Steps to reproduce: - Open any PoS session - Click on Orders and filter by "Paid" orders - Select an order and click on "Details" - Open the "Payments" tab and click on the "View" button of a payment - Click on the payment method link Traceback: OwlError: The following error occurred in onWillStart: "Cannot find key "pos_payment_provider_cards" in the "view_widgets" registry" Backend views opened from within the PoS UI (order details dialog, drill-down on many2one links, ...) share their arch with the backend, but `point_of_sale._assets_pos` excludes everything under `static/src/backend/`, so widgets defined there (e.g. `pos_payment_provider_cards`, `lna_checklist`, `point_of_sale_test_epos`) are never registered in the PoS UI. Unlike missing field widgets, which fall back to the default widget with a warning, an unknown `<widget>` node makes the whole view crash since `Widget.parseWidgetNode` reads the registry without a fallback. Those widgets are backend configuration helpers that are irrelevant in a PoS session, so instead of bundling each of them (and any future one) in the PoS assets, patch `Widget.parseWidgetNode` in the PoS bundle to skip unknown widgets with a warning, like missing field widgets do. This covers the form, list and kanban arch parsers at once. opw-6382156 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#279823 Forward-Port-Of: odoo/odoo#276912
### Steps to reproduce the issue: 1. Download Accounting and l10n_de 2. Set VAT number for DE company and another company you will use for the invoice 3. Switch to german language 4. Create an invoice and send it 5. Download the PDF and upload it on www.portinvoice.com 6. See the following error: the PDF metadata incorrectly states the conformance level as "ERWEITERT" (German), which directly clashes with the correct "EXTENDED" (English) profile declared inside the embedded XML file. ##
Original PR description
### Steps to reproduce the issue: 1. Download Accounting and l10n_de 2. Set VAT number for DE company and another company you will use for the invoice 3. Switch to german language 4. Create an invoice and send it 5. Download the PDF and upload it on www.portinvoice.com 6. See the following error: the PDF metadata incorrectly states the conformance level as "ERWEITERT" (German), which directly clashes with the correct "EXTENDED" (English) profile declared inside the embedded XML file. ### Cause of the issue: Issue comes from this commit 9396790e9cc1ce1c6e5c29b71b5629b31fb16458 where it has been forgotten to disable the translation. ### Reason to introduce the fix: Meet the requirements of the electronic invoice. opw-6023971 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#273042
Use "VAT" instead of "TAX" for the default UK tax groups. Also set "Subtotal" as their preceding subtotal label so that it replaces "Untaxed Amount". task-[6413495](https://www.odoo.com/odoo/project/967/tasks/6413495) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#280144 Forward-Port-Of: odoo/odoo#278351
Original PR description
Use "VAT" instead of "TAX" for the default UK tax groups. Also set "Subtotal" as their preceding subtotal label so that it replaces "Untaxed Amount". task-[6413495](https://www.odoo.com/odoo/project/967/tasks/6413495) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#280144 Forward-Port-Of: odoo/odoo#278351
Description of the issue/feature this PR addresses: Mail server ports are identifiers rather than quantities. The incoming and outgoing mail server views use the unsupported `format` option, so locale-based integer formatting remains enabled. Steps to reproduce: 1. Enable developer mode. 2. Go to Settings > Technical > Email > Outgoing Mail Servers. 3. Create a server and set SMTP Port to `8069`. 4. Move focus away from the field. 5. The same issue occurs on an Incomin
Original PR description
Description of the issue/feature this PR addresses: Mail server ports are identifiers rather than quantities. The incoming and outgoing mail server views use the unsupported `format` option, so…
Description of the issue/feature this PR addresses: Mail server ports are identifiers rather than quantities. The incoming and outgoing mail server views use the unsupported `format` option, so locale-based integer formatting remains enabled. Steps to reproduce: 1. Enable developer mode. 2. Go to Settings > Technical > Email > Outgoing Mail Servers. 3. Create a server and set SMTP Port to `8069`. 4. Move focus away from the field. 5. The same issue occurs on an Incoming Mail Server with a port such as `10143`. Current behavior before PR: Ports are displayed with thousands separators, e.g. `8,069` and `10,143`. Desired behavior after PR is merged: Mail server ports remain unformatted, e.g. `8069` and `10143`. Fixes #275937 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr "As a recent Computer Engineering graduate, I made my first open-source contribution to Odoo." :) Forward-Port-Of: odoo/odoo#278329
The test for `hr_leave_attendance_report` failed Runbot's faketime tests for two reasons: * The report's view use SQL's reserved syntax `CURRENT_DATE` which always resolves to real system clock, and ignores Odoo's faketime mechanism. * The three tests used hardcoded dates. Since the report is exclusively concerned with the window of last 13 months. Faking the time in a future date further than this led to wrong results. This commit fixes both issues by: 1. Using `now()::date`
Original PR description
The test for `hr_leave_attendance_report` failed Runbot's faketime tests for two reasons: * The report's view use SQL's reserved syntax `CURRENT_DATE` which always resolves to real system clock, and ignores Odoo's faketime mechanism. * The three tests used hardcoded dates. Since the report is exclusively concerned with the window of last 13 months. Faking the time in a future date further than this led to wrong results. This commit fixes both issues by: 1. Using `now()::date` in the view instead of `CURRENT_DATE`. 2. Replacing the hardcoded dates in the tests by dates computed relative to `fields.Date.today()`. Runbot Errors: [1](https://runbot.odoo.com/odoo/runbot.build.error/944585), [2](https://runbot.odoo.com/odoo/runbot.build.error/944585/runbot.build.error/runbot.build.error/944584) Forward-Port-Of: odoo/odoo#280380 Forward-Port-Of: odoo/odoo#279337
4 changes
Resolved issues and error corrections
Before this commit: The info, 'You can choose how you want us to send your invoices, and with which electronic format.' was never visible because `invoice_edi_format` is always None. After this commit: Update condition from `invoice_edi_format` to `invoice_edi_formats` to make condition correct and will display info if there are multiple invoice_sending_methods and at-least one edi format. Forward-Port-Of: odoo/odoo#278870
Original PR description
Before this commit: The info, 'You can choose how you want us to send your invoices, and with which electronic format.' was never visible because `invoice_edi_format` is always None. After this commit: Update condition from `invoice_edi_format` to `invoice_edi_formats` to make condition correct and will display info if there are multiple invoice_sending_methods and at-least one edi format. Forward-Port-Of: odoo/odoo#278870
## Issue When generating an invoice for a service product with an invoicing policy based on timesheets, the amount of hours invoiced is wrong if there exists a credit note linked to that SO. ## Steps to reproduce 1. Install *Sales Timesheet* (`sale_timesheet`) 2. Create a Product P - Product Type: Service - Create on Order: Task - Project: Any project - Invoicing Policy: Based on Timesheets 3. Create a SO - Any Customer - Product P (any quantity) - Confi
Original PR description
## Issue When generating an invoice for a service product with an invoicing policy based on timesheets, the amount of hours invoiced is wrong if there exists a credit note linked to that SO. ## Steps…
## Issue
When generating an invoice for a service product with an invoicing policy based on timesheets, the amount of hours invoiced is wrong if there exists a credit note linked to that SO.
## Steps to reproduce
1. Install *Sales Timesheet* (`sale_timesheet`)
2. Create a Product P
- Product Type: Service
- Create on Order: Task
- Project: Any project
- Invoicing Policy: Based on Timesheets
3. Create a SO
- Any Customer
- Product P (any quantity)
- Confirm the SO
4. In the created task, add a timesheet entry
- Date: Today
- Time Spent: 10:00 (10 hours)
5. Create and confirm the invoice for the SO
6. Create a Credit Note from the invoice, set the quantity to 4 hours, and confirm it
7. From the created task, add a second timesheet entry
- Date: Any future date (e.g., today + 7)
- Time Spent: 15:00 (15 hours)
8. Create a second invoice, but set a Timesheets Period that only covers the second timesheet entry
9. **The quantity on the newly created invoice is 9 hours, even though we're clearly trying to invoice the 15 hours from the second timesheet entry.**
## Cause
The second invoice is impacted by the credit note generated from the first one. When generating that second invoice, the [`_recompute_qty_to_invoice`](https://github.com/odoo/odoo/blob/0512ebd4c8cc277fdb4fbe0f57619a0bd61192c2/addons/sale_timesheet/models/sale_order_line.py#L149) method incorrectly computes the amount to invoice by taking into account `account.analytic.line` from outside the provided range.
The delivered quantity is correctly calculated by taking into account the provided range (through the `start_date` and `end_date` added to the domain passed to `_get_delivered_quantity_by_analytic`:
https://github.com/odoo/odoo/blob/0512ebd4c8cc277fdb4fbe0f57619a0bd61192c2/addons/sale_timesheet/models/sale_order_line.py#L176-L180
But then, for each `sale.order.line`, we look at the related `account.analytic.line` without taking into account the provided dates, which leads to lines outside of the range impacting the invoice.
https://github.com/odoo/odoo/blob/0512ebd4c8cc277fdb4fbe0f57619a0bd61192c2/addons/sale_timesheet/models/sale_order_line.py#L182-L193
In the example described in the *Steps to reproduce*, we start with a (correct) amount delivered of 15.0, we find two `invoice_lines_to_calculate` (the invoice of 10 hours, and the credit note of 4 hours), which leads to the quantity to invoice being set to `15 - (-4 + 10) = 9`. This seems like an odd behavior as it:
- doesn't invoice all the hours within the provided range (15 hours within the range, and we're only invoicing 9)
- doesn't invoice **all** the hours left to be invoiced (6 hours are already invoiced, 25 should be in total, and we're invoicing 9)
opw-6373870
Forward-Port-Of: odoo/odoo#277727Issue: Every change of the selected order makes the PoS call `pos.config.update_customer_display`, which publishes the order on the bus for the customer display paired with this browser. The device uuid identifying that pairing is only generated when the customer display dialog is opened, so a PoS whose customer display was never opened sends `device_uuid: null` and the server publishes on `UPDATE_CUSTOMER_DISPLAY-null`, a channel nobody can listen to. Steps to reproduce: Open a PoS session
Original PR description
Issue: Every change of the selected order makes the PoS call `pos.config.update_customer_display`, which publishes the order on the bus for the customer display paired with this browser. The device…
Issue: Every change of the selected order makes the PoS call `pos.config.update_customer_display`, which publishes the order on the bus for the customer display paired with this browser. The device uuid identifying that pairing is only generated when the customer display dialog is opened, so a PoS whose customer display was never opened sends `device_uuid: null` and the server publishes on `UPDATE_CUSTOMER_DISPLAY-null`, a channel nobody can listen to. Steps to reproduce: Open a PoS session, never open the customer display, and add a product to an order. Current behaviour: An rpc is sent for each change of the order, and each of them ends up as a bus notification that no customer display can ever receive. Expected behaviour: Nothing is sent as long as no customer display was ever opened. Solution: Skip the rpc while no device uuid exists. A customer display opened in the same browser as the PoS is served by the BroadcastChannel, which is unaffected. task-6408513 Forward-Port-Of: odoo/odoo#277687
**Issue** Selling a kit with dropshipping in AVCO/FIFO could wrongly set the standard_price of the component product to 0 after validating the dropship transfer. **Steps to reproduce** - Create a kit and component product - Activate MTO and dropship route for the kit - Activate dropship route for the component - Add a vendor for the component (ex: 100 dollars) - Set component to AVCO valuation - Create and confirm a sale order - Confirm the associate purchase order and the dropship tr
Original PR description
**Issue** Selling a kit with dropshipping in AVCO/FIFO could wrongly set the standard_price of the component product to 0 after validating the dropship transfer. **Steps to reproduce** - Create a kit…
**Issue** Selling a kit with dropshipping in AVCO/FIFO could wrongly set the standard_price of the component product to 0 after validating the dropship transfer. **Steps to reproduce** - Create a kit and component product - Activate MTO and dropship route for the kit - Activate dropship route for the component - Add a vendor for the component (ex: 100 dollars) - Set component to AVCO valuation - Create and confirm a sale order - Confirm the associate purchase order and the dropship transfer - Go to the product -> The standard price is still 0 instead of being updated from the supplier price. **Cause** While confirming the PO, a picking is created: https://github.com/odoo/odoo/blob/43f5ceadbc1f7df9898c327bf65bffdbe9860c1c/addons/purchase_stock/models/purchase_order.py#L371 With its associated moves: https://github.com/odoo/odoo/blob/43f5ceadbc1f7df9898c327bf65bffdbe9860c1c/addons/purchase_stock/models/purchase_order.py#L383 During the move preparation, the `cost_share` is not propagated on the generated move values, so it remains equal to 0. The `cost_share` is computed while exploding the kit BOM: https://github.com/odoo/odoo/blob/43f5ceadbc1f7df9898c327bf65bffdbe9860c1c/addons/purchase_mrp/models/purchase.py#L94 https://github.com/odoo/odoo/blob/43f5ceadbc1f7df9898c327bf65bffdbe9860c1c/addons/mrp/models/mrp_bom.py#L463 https://github.com/odoo/odoo/blob/43f5ceadbc1f7df9898c327bf65bffdbe9860c1c/addons/purchase_mrp/models/mrp_bom.py#L62 https://github.com/odoo/odoo/blob/43f5ceadbc1f7df9898c327bf65bffdbe9860c1c/addons/purchase_mrp/models/mrp_bom.py#L70 However, only the `bom_line_id` is propagated on the move values: https://github.com/odoo/odoo/blob/43f5ceadbc1f7df9898c327bf65bffdbe9860c1c/addons/purchase_mrp/models/purchase.py#L94-L99 Later, while validating the dropship transfer: https://github.com/odoo/odoo/blob/43f5ceadbc1f7df9898c327bf65bffdbe9860c1c/addons/stock_account/models/stock_move.py#L177 the move value is used to recompute the standard price: https://github.com/odoo/odoo/blob/43f5ceadbc1f7df9898c327bf65bffdbe9860c1c/addons/stock_account/models/product.py#L651 While `move.value` is not zero, `move._get_value` is: https://github.com/odoo/odoo/blob/cac987867b083355d3366228d0c551b34f366d92/addons/stock_account/models/product.py#L485-L487 since it depends on the move `cost_share`: https://github.com/odoo/odoo/blob/43f5ceadbc1f7df9898c327bf65bffdbe9860c1c/addons/purchase_mrp/models/stock_move.py#L25 Since the move `cost_share` is 0, the AVCO/FIFO recomputation uses an incorrect value and the component standard price is not updated. **Solution** No need to use `cost_share` to compute the value if the price_unit is already given for the component opw-6176571 Forward-Port-Of: odoo/odoo#264341
6 changes
Enhancements to existing features
Before this commit, expect.waitForSteps and expect.waitForErrors gave 2 seconds, less than the 3 seconds of the DOM waits sitting next to them, on the same page and the same RPCs. Over 340 call sites in addons tests reach waitForSteps and not one of them passes an explicit timeout, so 2 seconds is what every step wait gets. The problem is that the RPC chain a step wait sits on takes longer than that on a loaded machine. Measured from openDiscuss resolving to the message being in the DOM: -
Original PR description
Before this commit, expect.waitForSteps and expect.waitForErrors gave 2 seconds, less than the 3 seconds of the DOM waits sitting next to them, on the same page and the same RPCs. Over 340 call sites…
Before this commit, expect.waitForSteps and expect.waitForErrors gave 2 seconds, less than the 3 seconds of the DOM waits sitting next to them, on the same page and the same RPCs. Over 340 call sites in addons tests reach waitForSteps and not one of them passes an explicit timeout, so 2 seconds is what every step wait gets. The problem is that the RPC chain a step wait sits on takes longer than that on a loaded machine. Measured from openDiscuss resolving to the message being in the DOM: - 250 to 460ms on an idle machine; - 867 to 5258ms over 10 runs with the CPU throttled 4x, which is what a busy runbot looks like, 3 of the 10 over 2 seconds; - 1474 to 6912ms with the CPU throttled 6x, 5 of 6 over 3 seconds. Note that a longer timeout costs nothing on a green build: the timer is cleared as soon as the steps are in, so it only delays the report of a test that was going to fail anyway. This commit raises both to 10 seconds, the delay a tour step already gets in macro.js. test_js.py runs the presets with timeout=15000, so hoot fails the test itself at 15 seconds and 10 leaves room for the rest of the test. Companion of https://github.com/odoo/odoo/pull/279983 to fix https://runbot.odoo.com/odoo/error/944188 kind of issues. Forward-Port-Of: odoo/odoo#279984
Resolved issues and error corrections
**PROBLEM** When using fixed tax not affecting the base on line with discount, the xml generated is invalid and refused by peppol. **STEP TO REPRODUCE** 1. Install l10n_be. 2. Create an invoice with the following line: - qty: 2, price_unit: 100, discount: 10%, taxes: 21% + fixed tax 1€ - qty: -2, price_unit: 0, taxes: fixed tax 1€ 3. Generate an xml, and try validating it on peppol. 4. The validation fails with the error: [BR-27]-The Item net price (BT-146) shall NOT be negative.
Original PR description
**PROBLEM** When using fixed tax not affecting the base on line with discount, the xml generated is invalid and refused by peppol. **STEP TO REPRODUCE** 1. Install l10n_be. 2. Create an invoice with…
**PROBLEM** When using fixed tax not affecting the base on line with discount, the xml generated is invalid and refused by peppol. **STEP TO REPRODUCE** 1. Install l10n_be. 2. Create an invoice with the following line: - qty: 2, price_unit: 100, discount: 10%, taxes: 21% + fixed tax 1€ - qty: -2, price_unit: 0, taxes: fixed tax 1€ 3. Generate an xml, and try validating it on peppol. 4. The validation fails with the error: [BR-27]-The Item net price (BT-146) shall NOT be negative. **CAUSE** Fixed tax not affecting the base of other tax are dispatched into new base lines and then merged into one line per fixed tax. The new base lines they are dispatched to are created as a copy of the line they originated from. It means we copy the discount from the original lines. The fixed tax amount is the unit price of each new base lines. When reducing the base lines into one line, we take the unit prices of the line, and apply the discount to the unit price. But, since the unit price is the fixed tax amount, and fixed tax are not affected by discounts, we shouldn't apply discount. **PROBLEM 2** fixed division by 0 traceback when the aggregation of invoice lines is 0 **STEP TO REPRODUCE** 1. Install l10n_be. 2. Create the following invoice: - qty: 1, unit_price: 100, tax:0% + fixed tax 1€, set an analytic distribution account - qty: -1, unit_price: 50, tax:0% + fixed tax 1€, set the same analytic distribution account 3. Send the invoice to peppol. 4. A division by 0 should occur. opw-6388219 Forward-Port-Of: odoo/odoo#276945
Before this commit: The info, 'You can choose how you want us to send your invoices, and with which electronic format.' was never visible because `invoice_edi_format` is always None. After this commit: Update condition from `invoice_edi_format` to `invoice_edi_formats` to make condition correct and will display info if there are multiple invoice_sending_methods and at-least one edi format. Forward-Port-Of: odoo/odoo#278870
Original PR description
Before this commit: The info, 'You can choose how you want us to send your invoices, and with which electronic format.' was never visible because `invoice_edi_format` is always None. After this commit: Update condition from `invoice_edi_format` to `invoice_edi_formats` to make condition correct and will display info if there are multiple invoice_sending_methods and at-least one edi format. Forward-Port-Of: odoo/odoo#278870
## Issue When generating an invoice for a service product with an invoicing policy based on timesheets, the amount of hours invoiced is wrong if there exists a credit note linked to that SO. ## Steps to reproduce 1. Install *Sales Timesheet* (`sale_timesheet`) 2. Create a Product P - Product Type: Service - Create on Order: Task - Project: Any project - Invoicing Policy: Based on Timesheets 3. Create a SO - Any Customer - Product P (any quantity) - Confi
Original PR description
## Issue When generating an invoice for a service product with an invoicing policy based on timesheets, the amount of hours invoiced is wrong if there exists a credit note linked to that SO. ## Steps…
## Issue
When generating an invoice for a service product with an invoicing policy based on timesheets, the amount of hours invoiced is wrong if there exists a credit note linked to that SO.
## Steps to reproduce
1. Install *Sales Timesheet* (`sale_timesheet`)
2. Create a Product P
- Product Type: Service
- Create on Order: Task
- Project: Any project
- Invoicing Policy: Based on Timesheets
3. Create a SO
- Any Customer
- Product P (any quantity)
- Confirm the SO
4. In the created task, add a timesheet entry
- Date: Today
- Time Spent: 10:00 (10 hours)
5. Create and confirm the invoice for the SO
6. Create a Credit Note from the invoice, set the quantity to 4 hours, and confirm it
7. From the created task, add a second timesheet entry
- Date: Any future date (e.g., today + 7)
- Time Spent: 15:00 (15 hours)
8. Create a second invoice, but set a Timesheets Period that only covers the second timesheet entry
9. **The quantity on the newly created invoice is 9 hours, even though we're clearly trying to invoice the 15 hours from the second timesheet entry.**
## Cause
The second invoice is impacted by the credit note generated from the first one. When generating that second invoice, the [`_recompute_qty_to_invoice`](https://github.com/odoo/odoo/blob/0512ebd4c8cc277fdb4fbe0f57619a0bd61192c2/addons/sale_timesheet/models/sale_order_line.py#L149) method incorrectly computes the amount to invoice by taking into account `account.analytic.line` from outside the provided range.
The delivered quantity is correctly calculated by taking into account the provided range (through the `start_date` and `end_date` added to the domain passed to `_get_delivered_quantity_by_analytic`:
https://github.com/odoo/odoo/blob/0512ebd4c8cc277fdb4fbe0f57619a0bd61192c2/addons/sale_timesheet/models/sale_order_line.py#L176-L180
But then, for each `sale.order.line`, we look at the related `account.analytic.line` without taking into account the provided dates, which leads to lines outside of the range impacting the invoice.
https://github.com/odoo/odoo/blob/0512ebd4c8cc277fdb4fbe0f57619a0bd61192c2/addons/sale_timesheet/models/sale_order_line.py#L182-L193
In the example described in the *Steps to reproduce*, we start with a (correct) amount delivered of 15.0, we find two `invoice_lines_to_calculate` (the invoice of 10 hours, and the credit note of 4 hours), which leads to the quantity to invoice being set to `15 - (-4 + 10) = 9`. This seems like an odd behavior as it:
- doesn't invoice all the hours within the provided range (15 hours within the range, and we're only invoicing 9)
- doesn't invoice **all** the hours left to be invoiced (6 hours are already invoiced, 25 should be in total, and we're invoicing 9)
opw-6373870
Forward-Port-Of: odoo/odoo#277727Issue: Every change of the selected order makes the PoS call `pos.config.update_customer_display`, which publishes the order on the bus for the customer display paired with this browser. The device uuid identifying that pairing is only generated when the customer display dialog is opened, so a PoS whose customer display was never opened sends `device_uuid: null` and the server publishes on `UPDATE_CUSTOMER_DISPLAY-null`, a channel nobody can listen to. Steps to reproduce: Open a PoS session
Original PR description
Issue: Every change of the selected order makes the PoS call `pos.config.update_customer_display`, which publishes the order on the bus for the customer display paired with this browser. The device…
Issue: Every change of the selected order makes the PoS call `pos.config.update_customer_display`, which publishes the order on the bus for the customer display paired with this browser. The device uuid identifying that pairing is only generated when the customer display dialog is opened, so a PoS whose customer display was never opened sends `device_uuid: null` and the server publishes on `UPDATE_CUSTOMER_DISPLAY-null`, a channel nobody can listen to. Steps to reproduce: Open a PoS session, never open the customer display, and add a product to an order. Current behaviour: An rpc is sent for each change of the order, and each of them ends up as a bus notification that no customer display can ever receive. Expected behaviour: Nothing is sent as long as no customer display was ever opened. Solution: Skip the rpc while no device uuid exists. A customer display opened in the same browser as the PoS is served by the BroadcastChannel, which is unaffected. task-6408513 Forward-Port-Of: odoo/odoo#277687
The bugfix introduced in https://github.com/odoo/odoo/commit/01d11a770f89c391f7c6a2c46a3d770d10afb428 made it so that "personal" outgoing mail servers are blocked/ignored from being used in email marketing as dedicated servers. In doing so, it missed the fact that while in *Email Marketing > Settings*, the "Dedicated Server" picker now correctly ignores personal OMS entries, the selection widget for `mail_server_id` in `view_mail_mass_mailing_form` still let's you manually select a OMS with a
Original PR description
The bugfix introduced in https://github.com/odoo/odoo/commit/01d11a770f89c391f7c6a2c46a3d770d10afb428 made it so that "personal" outgoing mail servers are blocked/ignored from being used in email…
The bugfix introduced in https://github.com/odoo/odoo/commit/01d11a770f89c391f7c6a2c46a3d770d10afb428 made it so that "personal" outgoing mail servers are blocked/ignored from being used in email marketing as dedicated servers.
In doing so, it missed the fact that while in *Email Marketing > Settings*, the "Dedicated Server" picker now correctly ignores personal OMS entries, the selection widget for `mail_server_id` in `view_mail_mass_mailing_form` still let's you manually select a OMS with an owner set. As there is not warning or an explicit error, this can lead to accidental miss configurations on an email marketing campaign, where the selected OMS will be actually ignored by the backend.
To align the changes introduced by the bugfix, we add a search domain to the selection field, so that only OMS with `('owner_user_id', '=', False)` will be presented as a choice.
OPW-6388562
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#2785951 change
Resolved issues and error corrections
## Issue When generating an invoice for a service product with an invoicing policy based on timesheets, the amount of hours invoiced is wrong if there exists a credit note linked to that SO. ## Steps to reproduce 1. Install *Sales Timesheet* (`sale_timesheet`) 2. Create a Product P - Product Type: Service - Create on Order: Task - Project: Any project - Invoicing Policy: Based on Timesheets 3. Create a SO - Any Customer - Product P (any quantity) - Confi
Original PR description
## Issue When generating an invoice for a service product with an invoicing policy based on timesheets, the amount of hours invoiced is wrong if there exists a credit note linked to that SO. ## Steps…
## Issue
When generating an invoice for a service product with an invoicing policy based on timesheets, the amount of hours invoiced is wrong if there exists a credit note linked to that SO.
## Steps to reproduce
1. Install *Sales Timesheet* (`sale_timesheet`)
2. Create a Product P
- Product Type: Service
- Create on Order: Task
- Project: Any project
- Invoicing Policy: Based on Timesheets
3. Create a SO
- Any Customer
- Product P (any quantity)
- Confirm the SO
4. In the created task, add a timesheet entry
- Date: Today
- Time Spent: 10:00 (10 hours)
5. Create and confirm the invoice for the SO
6. Create a Credit Note from the invoice, set the quantity to 4 hours, and confirm it
7. From the created task, add a second timesheet entry
- Date: Any future date (e.g., today + 7)
- Time Spent: 15:00 (15 hours)
8. Create a second invoice, but set a Timesheets Period that only covers the second timesheet entry
9. **The quantity on the newly created invoice is 9 hours, even though we're clearly trying to invoice the 15 hours from the second timesheet entry.**
## Cause
The second invoice is impacted by the credit note generated from the first one. When generating that second invoice, the [`_recompute_qty_to_invoice`](https://github.com/odoo/odoo/blob/0512ebd4c8cc277fdb4fbe0f57619a0bd61192c2/addons/sale_timesheet/models/sale_order_line.py#L149) method incorrectly computes the amount to invoice by taking into account `account.analytic.line` from outside the provided range.
The delivered quantity is correctly calculated by taking into account the provided range (through the `start_date` and `end_date` added to the domain passed to `_get_delivered_quantity_by_analytic`:
https://github.com/odoo/odoo/blob/0512ebd4c8cc277fdb4fbe0f57619a0bd61192c2/addons/sale_timesheet/models/sale_order_line.py#L176-L180
But then, for each `sale.order.line`, we look at the related `account.analytic.line` without taking into account the provided dates, which leads to lines outside of the range impacting the invoice.
https://github.com/odoo/odoo/blob/0512ebd4c8cc277fdb4fbe0f57619a0bd61192c2/addons/sale_timesheet/models/sale_order_line.py#L182-L193
In the example described in the *Steps to reproduce*, we start with a (correct) amount delivered of 15.0, we find two `invoice_lines_to_calculate` (the invoice of 10 hours, and the credit note of 4 hours), which leads to the quantity to invoice being set to `15 - (-4 + 10) = 9`. This seems like an odd behavior as it:
- doesn't invoice all the hours within the provided range (15 hours within the range, and we're only invoicing 9)
- doesn't invoice **all** the hours left to be invoiced (6 hours are already invoiced, 25 should be in total, and we're invoicing 9)
opw-6373870
Forward-Port-Of: odoo/odoo#27772741 changes
New functionality added to Odoo
Adds a new Romania-specific D390 EC Sales report so businesses can prepare the required monthly declaration for intra-EU transactions in the ANAF XML format. It also improves report audit drill-downs so users see only relevant tax-tagged entries when reviewing EC Sales report totals.
Original PR description
This commit introduces a new module, 'Romania - EC Sales D390 Report'. For the support of Declarația 390 report as an EC List report for Romania in stable versions. Romanian localization has…
This commit introduces a new module, 'Romania - EC Sales D390 Report'.
For the support of Declarația 390 report as an EC List report for Romania in
stable versions.
Romanian localization has different requirements for the
EC Sales List report. So the generic EC Sales List does not work in the case of
Romania.
LEGAL REQUIREMENTS:
- Romanian tax authority accepts the Declarația 390 (Form 390) report for
cross-border transactions within the European Union.
- This declaration is filed on a monthly basis.
- The declaration must be submitted electronically to ANAF by the 25th of the
month following the month in which the transactions occurred. For example,
the declaration for transactions made in July must be filed by August 25th.
- The declaration must include all the intra-community transactions. These
transactions include:
1. Intra-Community acquisition of Goods
2. Intra-Community acquisition of Services
3. Intra-Community triangular trades
4. Intra-Community supplies of Goods
5. Intra-Community supplies of Services
REQUIRED FORMAT:
- Declarația 390 must be submitted electronically in a specific XML format.
The structure of this XML file is defined by ANAF.
- To facilitate compliance, ANAF provides a free software application called
'DUKIntegrator'. This tool allows businesses to:
1. Validate the generated XML file against the official schema to ensure it is
correctly formatted.
2. Generate the final PDF file with the XML attachment, which is the official
format for submission.
TECHNICAL DETAILS:
- Implemented the tax returns for the D390 EC Sales List report filing.
- Implemented XML export file generator, which creates the whole D390 XML report
with the required schema format.
- The D390 report needs to have the declarant's details in the report, the
attributes like 'nume_declar(Middle Name)', 'prenume_declar(First Name)',
'functie_declar(Job Position)' and 'adresa(Fiscal Domicile Address)'.
For collecting these details, we've created a wizard that will be on the
return validation action. Along with these details, we ask the user if the
current return is the corrected/rectified one, with the 'corrective_declaration'
field in this wizard. This wizard will then store these details in the
respective return. And in the XML export file generator, we are retrieving
these details from the return to show in the report.
REFERENCES:
- Drive link for official XML report schema, report structure, 'DUKIntegrator'
software and XML report attribute explanation in English: (
https://drive.google.com/drive/folders/1uzROZAM5Vuiv0HlBXw-vU28x5a9sVOpb)
- Official ANAF sources for D390 report: (
https://static.anaf.ro/static/10/Anaf/Declaratii_R/390.html)
- Official ANAF website for Electronic Declaration: (
https://www.anaf.ro/anaf/internet/ANAF/servicii_online/declaratii_electronice)
Forward-Port-Of: odoo/enterprise#109921Enhancements to existing features
SEPA direct debit batch validation has been optimized for large payment batches. This reduces processing time and avoids timeouts when validating thousands of payments, improving reliability for finance teams.
Original PR description
- Replace the `id:recordset` aggregation in `_get_expiry_date_per_mandate()` with `date:max` to compute the latest payment date directly in SQL. - Render `email_from` for all payments in batch and cache the computed authors by sender email to avoid repeated partner lookups during SDD pre-notification. This reduces ORM/cache overhead when validating large SEPA batches containing thousands of payments. Measured on a production-sized database: | metric | before | after | factor | |--------|-------:|------:|-------:| | `_get_expiry_date_per_mandate` (500 payments) | 564 ms | 111 ms | ~5x | | `_send_after_validation` notification (500 payments) | 92.9 s | 55.7 s | ~1.7x | | `_get_expiry_date_per_mandate` (1000 payments) | 890 ms | 178 ms | ~5x | | `_send_after_validation` notification (1000 payments) | timed out (>159 s) | 108.9 s | completed | OPW-6377340 Forward-Port-Of: odoo/enterprise#126429 Forward-Port-Of: odoo/enterprise#125439
Employees can now be associated with more than one company car, improving support for benefits and payroll scenarios where multiple vehicles are provided. This helps Belgian payroll and salary contract processes calculate and display company car benefits more accurately.
Original PR description
WIP to allow multiple company cars per employee
Archived tax returns now hide the actions that would validate, submit, or fetch e-invoices for them. This prevents users from accidentally continuing work on returns that have been closed or archived, reducing the risk of incorrect tax processing.
Original PR description
Hide validate and Submit button on tax returns when the return is archived, and hide the 'Fetch E-Invoice' button on the return check in case of GSTR-2B report when the return is archived. Previously, an archived return could still be validated and processed further. Since validation is the entry point for all subsequent actions on a return, blocking it at this stage prevents any further processing of archived returns. Related Pr: PR community - https://github.com/odoo/odoo/pull/270669 task-6303338
The Timesheet Assistant now supports keyboard navigation for reviewing and selecting suggested timesheet entries. This improves accessibility and helps users work faster without relying only on a mouse.
Original PR description
Implement full keyboard controls for managing timesheet suggestions to improve accessibility and user efficiency. This adds support for the following interactions: - ArrowUp / ArrowDown to navigate focus through rows - Space to select/deselect the focused item (and set the selection anchor) - Shift + Arrows to select continuous ranges of suggestions task: 6267620 Forward-Port-Of: odoo/enterprise#126143 Forward-Port-Of: odoo/enterprise#120437
Payroll warning messages now open directly in a detailed view when there is only one warning and no custom action is defined. This reduces extra clicks for users, while still showing a list when multiple warnings need review.
Original PR description
When the warning doesn't have a specific action implementation and it returns a single warning record, we display it in a form view instead of the list view. List view will be displayed only in multiple warning records. task-6425861
Appointment kanban cards now open the calendar view focused on today, making navigation more predictable. The separate upcoming meetings button now correctly opens the next scheduled meeting, while confirmation-related actions only load meetings that need confirmation.
Original PR description
Before, a click on an appointment kanban card lead to the gantt view of calendar.event, using the first next event as the initial_date of the gantt view. It was also the case when using the dedicated 'upcoming meetings' button on the card, which was pretty much a fake button. Now, use today as the default, next upcoming meeting when using 'upcoming meetings', using a new dedicated action, and only request meetings when using 'to confirm', as before. The tour is updated accordingly as well. Task-6344764
This draft improves the reliability of Knowledge article comments by adding tests for creating comments, handling large selections, deleting commented text, undo/redo behavior, keyboard navigation, and invalid comment placement. It helps ensure comment markers behave consistently before the feature is finalized, though the work is still described as needing cleanup.
Original PR description
This commit creates a test environment for article comments; it mounts a limited version of the Knowledge form view and mocks the necessary services and routes to allow for comment creation. It still needs to be heavily cleaned up, as many artifacts of earlier versions still linger, or have yet to be used. Many tests have also yet to be written; and the current version keeps them all in the same file. task-4235306
This update adds richer demo data for Belgian payroll testing, including employees, contracts, work schedules, attendance records, and a vehicle. It helps teams manually test payroll scenarios that better reflect real customer situations, and employee search now also works with external codes.
Original PR description
Add demo data records to match more realistic real world scenarios of employees, contracts, resource calendars and attendances. task-6364398
A new assistant rule was added for Timesheet Grid to help track runbot testing and the related branch. This improves internal testing visibility with minimal direct impact on end users.
Original PR description
Add an assistant rule to track runbot testing and which branch. --- task-6410639
Payroll warnings can now automatically apply only to records for the relevant country when company information is available. This reduces irrelevant warnings across multi-country payroll setups and helps teams focus on the alerts that apply to their local rules.
Original PR description
* = l10n_{be, ch, hk, in, sa}_hr_payroll
With this commit, by default when a warning will be defined on a specific country, if this warning is defined with a warning_domain and if the model linked to this warning have company field a sub domain to restrict this warning to model's record defined in this country will be automatically added.
task-6425987Tax return cards have been redesigned to be narrower and less tall, making long lists easier to review. This helps users scan return statuses and actions more quickly, using a layout aligned with other Odoo card views.
Original PR description
Returns are worked through as a list, but the cards were too wide and tall to scan. Reviewed the design following payroll's narrower kanban cards design. task-6088472
The data cleaning merge details popup has been redesigned to make it easier to understand how duplicate records will be combined. Improved views, field display, hover behavior, and keyboard focus help users review merges more confidently before confirming them.
Original PR description
Before this PR, the merge details popup needed a redesign, now the different views showcase the merge better to the user. | Before | Before | After | |--------|--------|--------| | First section |…
Before this PR, the merge details popup needed a redesign, now the different views showcase the merge better to the user. | Before | Before | After | |--------|--------|--------| | First section | <img width="1023" height="985" alt="Screenshot 2026-06-26 at 11 10 44" src="https://github.com/user-attachments/assets/81faaad4-f950-4031-bd1c-66b46c1e61c3" /> | <img width="1023" height="985" alt="Screenshot 2026-06-26 at 11 07 59" src="https://github.com/user-attachments/assets/46895709-3575-4bae-864e-f33a96a7737b" /> | | Second section | <img width="1023" height="985" alt="Screenshot 2026-06-26 at 11 10 47" src="https://github.com/user-attachments/assets/1fd3381c-d93c-4a2e-892b-134633279677" /> | <img width="1023" height="985" alt="Screenshot 2026-06-26 at 11 08 05" src="https://github.com/user-attachments/assets/0400e9f4-00ee-4d8b-9d77-a1566b1242f5" /> | | Third section | <img width="1023" height="985" alt="Screenshot 2026-06-26 at 11 10 52" src="https://github.com/user-attachments/assets/dce3590c-4f16-473a-abd7-611f781f70f3" /> | <img width="1023" height="985" alt="Screenshot 2026-06-26 at 11 08 13" src="https://github.com/user-attachments/assets/a8315904-0067-4794-b48d-6b357445d1c7" /> | | Record hover | <img width="1023" height="985" alt="Screenshot 2026-06-26 at 11 11 02" src="https://github.com/user-attachments/assets/1fa8fa2e-e9e0-45a6-a8c0-6dd4a8e6fa9b" /> | <img width="1023" height="985" alt="Screenshot 2026-06-26 at 11 08 17" src="https://github.com/user-attachments/assets/78434801-f34e-4e8f-87d9-bc9841a1628a" /> | | Field display | <img width="1023" height="985" alt="Screenshot 2026-06-26 at 11 10 52" src="https://github.com/user-attachments/assets/d410867c-3013-4b90-99a2-b26bbab22e86" /> | <img width="1023" height="985" alt="Screenshot 2026-06-26 at 11 12 02" src="https://github.com/user-attachments/assets/38b1e359-02b5-4586-990e-f11805390ddd" /> | | Tab focus (accessibility) | <img width="1023" height="985" alt="Screenshot 2026-06-26 at 11 10 44" src="https://github.com/user-attachments/assets/162b0a57-5138-45f7-b595-76337a5793dc" /> | <img width="1023" height="985" alt="Screenshot 2026-06-26 at 11 09 18" src="https://github.com/user-attachments/assets/3b79e21a-ab1c-47a8-874a-0f9f157938f3" /> | task-6196149
HR users can now confirm, reset, or mark multiple appraisals as done in one action. This reduces repetitive work and helps teams process appraisal workflows faster when managing many records.
Original PR description
Before this: HR users had to perform appraisal actions one by one, such as Confirm, Reset and Mark as Done. This was slow and repetitive when managing many appraisals. After this commit: Added bulk server actions to Confirm, Reset, and Mark as Done for multiple appraisals at once, making the appraisal process faster and easier for HR users. Task-6368348
The Sign app now only retrieves the single role record it needs instead of loading every role and all related details. This reduces unnecessary data fetching and should improve performance when opening sign template actions, especially in databases with many roles.
Original PR description
This `search_read` is done - without `domain` which means it fetches the entire table - without `fields` which means it fetches all fields And the business code only actually needs the id of the very first record which is returned. See `SignTemplateIframe`'s constuctor: `this.props.signRoles[0].id;` AFAICS, that's the only place where it's used. This will be better refactored in master. Forward-Port-Of: odoo/enterprise#126835
Resolved issues and error corrections
Automatic bank transaction matching now ignores archived bank accounts when identifying the related customer or vendor. This prevents old or inactive bank details from assigning transactions to the wrong partner, improving reconciliation accuracy.
Original PR description
Steps to reproduce: - Have a partner with a bank account, then archive the res.partner.bank record (keep the partner active). - Import or create a bank transaction (e.g. via bank sync) whose account number matches that archived bank account, and whose label/payment_ref would otherwise match a reconciliation model for a different partner. - Let the transaction go through automatic partner retrieval. => The archived bank account's partner is assigned, even though a normal manual entry (which skips the account-number match) would have used the label instead. Cause of the issue: `AccountBankStatementLine._retrieve_partner()` matches statement lines to partners in batch using raw SQL joining `res_partner_bank`. The query's WHERE clause filters out archived partners (`AND partner.active`) but never filters `res_partner_bank.active`. opw-6340479 Forward-Port-Of: odoo/enterprise#124748 Forward-Port-Of: odoo/enterprise#124537
This fixes an issue in Studio approval requests where a reference field could be created without a valid related model. Ensuring the reference always points to a defined record type helps prevent approval setup errors and improves reliability for users configuring workflows.
Original PR description
studio.approval.request Many2oneReference must have a valid model field.
The Helpdesk unanswered filter no longer treats automatic acknowledgement emails as customer replies needing attention. This keeps support queues cleaner by showing only tickets that genuinely require a response from the team.
Original PR description
Steps to reproduce: --------- - install website_helpdesk - set an email address on the company partner if it is empty ( it is empty in a database without demo data). - generate a ticket from the website. - apply the Unanswered filter. Issue: ------ system generated acknowledgement message is considered an unanswered customer reply. Fix: -------- system generated acknowledgement messages are now considered answered. task-5138678 Forward-Port-Of: odoo/enterprise#125977
This fixes an issue that blocked companies using Avalara Brazil from confirming several customer invoices at once. Users can now validate multiple affected invoices in one action without the process failing.
Original PR description
**_Steps to reproduce:_** * Install `l10n_br_avatax` and configure Avalara Brazil. * Create at least two customer invoices. * Ensure the fiscal position is set to **Automatic Tax Mapping (Avalara…
**_Steps to reproduce:_** * Install `l10n_br_avatax` and configure Avalara Brazil. * Create at least two customer invoices. * Ensure the fiscal position is set to **Automatic Tax Mapping (Avalara Brazil)**. * Select the invoices and click **Action → Confirm Entries**. **_Observed behavior:_** * A traceback is raised with `ValueError: Expected singleton: account.move(...)` and the invoices cannot be validated. **_Cause:_** * During tax extraction, `_extract_tax_values_from_l10n_br_avatax_detail` accesses `self.invoice_filter_type_domain` while `self` may contain multiple `account.move` records. * Accessing `invoice_filter_type_domain` on a multi-recordset raises an `Expected singleton` error, preventing the validation of multiple invoices. **_Fix:_** * Build the returned tax values by iterating over each invoice in the recordset and using the corresponding `invoice_filter_type_domain`. * This ensures `_extract_tax_values_from_l10n_br_avatax_detail` correctly handles multiple invoices during validation without raising a singleton error. opw-6334761 Forward-Port-Of: odoo/enterprise#126437 Forward-Port-Of: odoo/enterprise#124993
The aged payable and receivable drill-down now filters out bills and invoices that were already fully settled for the selected report date. This gives finance teams a cleaner and more accurate view of outstanding balances, especially when reviewing historical aging reports.
Original PR description
Steps to Reproduce: 1. Create a vendor/customer with multiple bills/invoices. 2. Fully pay one or more, leaving at least one still open for the same partner. 3. Open Accounting > Reporting > Partner…
Steps to Reproduce:
1. Create a vendor/customer with multiple bills/invoices.
2. Fully pay one or more, leaving at least one still open for the same partner.
3. Open Accounting > Reporting > Partner Reports > Aged Payable/Receivable.
4. Set to any date and click into an aging bucket for that partner.
Issue:
The drill-down list shows fully settled bills (residual = 0.00) alongside genuinely outstanding ones. Only surfaces when the partner has at least one open balance — if everything is paid, there is no bucket to click into.
Root Cause:
aged_partner_balance_audit builds the drill-down domain filtering only by reconcile flag, journal type, and date range — never checking residual. Additionally it completely overwrites the XML action domain (account.action_amounts_to_settle) which already had ('amount_residual', '!=', 0), losing that protection entirely.
Fix:
Added ('residual_at_date', '!=', 0) to the domain in aged_partner_balance_audit and set recon_limit in the action context so residual_at_date computes as of the report's 'as of' date rather than today's value:
action['context'] = {
'recon_limit': options['date']['date_to'],
}
Without recon_limit, residual_at_date falls back to amount_residual (today's value) which incorrectly excludes bills that were genuinely open on the report date but paid after it.
Result:
The drill-down now correctly shows only genuinely outstanding items regardless of whether the report is run as of today or a historical date.
opw 6333699
Forward-Port-Of: odoo/enterprise#126021This fix prevents an error that could occur when appraisal survey settings were missing or empty. It helps ensure appraisal survey functionality continues working reliably during setup or upgrade scenarios.
Original PR description
Avoid a TypeError in _compute_allowed_survey_types when allowed_survey_types is False by falling back to an empty list before unpacking and appending the appraisal survey type.
```py
File "/home/odoo/src/enterprise/saas-19.3/hr_appraisal_survey/models/survey_survey.py", line 33, in _compute_allowed_survey_types
survey.allowed_survey_types = [*survey.allowed_survey_types, 'appraisal']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Value after * must be an iterable, not bool
```
Ref: https://github.com/odoo/odoo/pull/268125
Bug introduced in: https://github.com/odoo/enterprise/commit/896f54532338b07265722cb4a4161131d408f58c
upg-[4458975](https://upgrade.odoo.com/odoo/request/4458975?debug=1)
Forward-Port-Of: odoo/enterprise#124417Peruvian electronic invoices now format address details according to SUNAT's current UBL 2.1 requirements. This helps prevent validation issues for invoices involving districts and urban subdivisions, supporting smoother legal invoice submission in Peru.
Original PR description
Update electronic invoicing address nodes to align with current SUNAT requirements. This transitions the geographic data formatting from the legacy UBL 2.0 schema to the standard UBL 2.1 specification, ensuring proper structural validation for districts and urban subdivisions. Documentation used: https://cpe.sunat.gob.pe/sites/default/files/inline-files/guia+xml+factura+version+2-1+1+0+(2)_0+(2).pdf opw-6282314 Forward-Port-Of: odoo/enterprise#126380 Forward-Port-Of: odoo/enterprise#121390
The Time Off Gantt view now only shows time off types that are currently available for selection. This prevents managers from accidentally choosing outdated or disabled leave types when planning time off.
Original PR description
Steps to reproduce: - In Time Off, create a leave with any selectable time off type - Modify this time off type so that it is not selectable anymore - Go to "Management" -> "Time Off" and select the gantt view - When clicking on a day, the now non selectable time off type still shows in the list of available time off types Reason: When fetching time off types to display, the code did not check if the time off type was selectable, leading to this issue. How it was fixed: Added a condition when fetching time off types to only get those that are selectable. Task ID: 6314831
Planning filters for employees and materials now apply the open-shift rule only to shifts without an assigned resource. This prevents assigned shifts from being incorrectly included or excluded, helping teams view the right planning data.
Original PR description
Before this commit, the domain wrongly assumes that we always search on shifts having no role or a role containing resources of types 'user' or 'material' (1). Additionally to the basic domain which searches on the shifts having resources of types 'user' or 'material' (2). After this commit, we add a condition on domain (1) to only apply it for open shifts (shifts having no resource_id). no-task Forward-Port-Of: odoo/enterprise#126616 Forward-Port-Of: odoo/enterprise#126247
Users can now duplicate several maintenance requests at the same time without the system showing an error. This makes bulk work in the maintenance app smoother and avoids interruptions for teams managing equipment requests.
Original PR description
Currently, when a user attempts to duplicate multiple maintenance requests simultaneously, the system throws a ValueError (Expected singleton). This PR fixes that. ### How to reproduce the issue: - Install `mrp_maintenance` module; - Open maintenance request list view; - Select multiple records and try to duplicate them using the Action button; - It will throw a traceback stating a singleton error. ### Expected behavior after PR is merged: Now multiple maintenance requests will be copied without raising any errors. Forward-Port-Of: odoo/enterprise#124255
The cart now prevents customers from increasing rental product quantities beyond what is available for the selected dates. Availability is also rechecked when rental dates are changed, reducing overbooking risk for planned services.
Original PR description
From the cart, it is possible to increase the amount ordered of a rental product that synchronizes shifts depending on a specific service Steps to reproduce: 1. Install website_sale_renting_planning…
From the cart, it is possible to increase the amount ordered of a rental product that synchronizes shifts depending on a specific service Steps to reproduce: 1. Install website_sale_renting_planning module 2. Go to Rental > Products and create a new product "test" with Sales enabled, Product Type "Service", Plan Services enabled as "Developer", in the Sales tab, enable Is Published and in the Rental prices tab, create a pricing for Daily period 3. In the General Information tab, click on the internal link to "Developer" 4. Enable Sync Shifts and Rental Orders 5. Go to the eCommerce website and search for product "test" 6. Add as much product "test" to the cart as possible (the quantity is limited) 7. Open the cart 8. You can increase the amount of the product regardless of its availability Issue: We don't check the renting availabilities to limit the maximum quantity of the product Solution: Check that the new quantity of the product is available in `_verify_updated_quantity` for the specified dates. We also need to check the availability of the product when we modify the rental dates opw-6274035 Forward-Port-Of: odoo/enterprise#126497 Forward-Port-Of: odoo/enterprise#123056
This fix prevents sale orders linked to point-of-sale planning from receiving duplicate lines when an order syncs multiple times. Sale order lines are now created only once when the POS order is paid, reducing billing and order accuracy issues.
Original PR description
Before this commit, the creation of sale order lines was in sync_from_ui and was executed every time we would enter the method. Since this method is called everytime we sync the order with the backend, it would create duplicated lines on the sale order. The logic is now moved to action_pos_order_paid, which is only called once when the order is paid. Forward-Port-Of: odoo/enterprise#124813
Preparation tickets in Point of Sale now load the required styling again after a receipt printing refactor caused some formatting to disappear. The update also restores missing receipt information, improves receipt display, and ensures customer notes are printed correctly.
Original PR description
..., pos_restaurant, pos_self_order, pos_urban_piper --- During the refactor of the receipt printing system, some CSS classes were no longer loaded with preparation tickets. As a result, preparation tickets lost part of their original styling. To restore the expected rendering, ensure all required classes are properly loaded while keeping the loading minimal. Additionally, some receipt data were missing after the refactor and some UI elements could be improved. This commit restores the missing data and improves the overall UI. It also fixes an issue where customer notes were not printed on the receipt. Templates checked: * point_of_sale.pos_order_change_receipt * point_of_sale.pos_order_change_receipt_line --- Task: https://www.odoo.com/odoo/project/1737/tasks/6133403 Refacto: https://github.com/odoo/odoo/pull/244395 Forward-Port-Of: odoo/enterprise#124898 Forward-Port-Of: odoo/enterprise#118782
A small issue in the accounting journal report was fixed by cleaning up unused date information in the report line actions. This helps keep the report interface consistent and reduces the chance of confusing or incorrect behavior for users.
Original PR description
Forward-Port-Of: odoo/enterprise#126603 Forward-Port-Of: odoo/enterprise#125266
The manufacturing planning tests were adjusted to match the corrected handling of demand for the current day. This helps ensure replenishment suggestions include same-day activity scheduled later in the day, reducing the risk of misleading planning checks.
Original PR description
Updated the forecast suggestion test expectations after monthly demand was updated to count the full current day, so same-day orderpoint replenishment moves scheduled later in the day are also included Community PR: odoo/odoo#262435 TaskID-5490137 Forward-Port-Of: odoo/enterprise#126732 Forward-Port-Of: odoo/enterprise#115944
Updated the Italian Balance Sheet report labels to use the correct Italian wording. This helps Italian-speaking accounting users read and interpret the report more accurately without changing the report's calculations or workflow.
Original PR description
### Steps to reproduce the issue: 1. Download Accounting and l10n_it 2. Install and switch to italian language 3. Go to Balance Sheets and select Balance Sheet (IT) 4. Some words are not correct [Here]( https://docs.google.com/spreadsheets/d/1-w83oAHTxDRIi-W_VSJiscNclw-yijzQUHOgMnTq7jE/edit?gid=0#gid=0) the wrong fields with their correct translations. opw-6424609 Forward-Port-Of: odoo/enterprise#126253
Users opening a bank statement line from an in-app notification will now see the related conversation and activity panel. This ensures tagged users can view the comment context immediately, reducing confusion during bank reconciliation work.
Original PR description
Problem: When navigating to a bank statement line through a notification, the chatter doesn't appear. Steps to reproduce: 1. Set in app notifications for one of the users 2. Open Accounting > Bank > To Reconcile 3. Select any bank statement line 4. Tag the user from step 1 in a comment 5. Log in as that user 6. Check notifications and click the new notification 7. Notice how the chatter does not appear on the bank statement line after navigating there Cause: The chatter was not enabled on the bank statement line form view. opw-6410186 Forward-Port-Of: odoo/enterprise#125777
Cancelled Mexican electronic invoices can now be reprinted with their required fiscal information, including QR codes, digital stamps, and fiscal folio details. This ensures legally relevant cancelled invoices remain complete and usable for audit or compliance purposes.
Original PR description
### Issue before this commit: When an invoice's CFDI cancellation request is confirmed (state moves from sent to cancel), reprinting the invoice PDF no longer displays the fiscal information (QR…
### Issue before this commit: When an invoice's CFDI cancellation request is confirmed (state moves from sent to cancel), reprinting the invoice PDF no longer displays the fiscal information (QR code, digital stamps, fiscal folio/UUID, etc.), even though the signed CFDI attachment is still present on the invoice. ### Steps to reproduce the issue: 1. Download Accounting and l10n_mx 2. Create an invoice and send it to CFDI 3. Select 'Request for cancel' 4. Wait and click retry button in the CFDI tab until the invoice is marked as cancelled 5. Print the invoice again 6. See PDF does not show fiscal information (QR, fiscal folio, etc.) ### Cause of the issue: https://github.com/odoo/enterprise/blob/f6c94d4ca3ef4211a5ab00bf0b39f6a7675c8f79/l10n_mx_edi/models/account_move.py#L904-L909 Once the CFDI is cancelled, the computed field switches to 'cancel', so the condition fails and the method falls back to the generic account.report_invoice_document template, which has no knowledge of CFDI fiscal fields. ### Reason to introduce the fix: A cancelled CFDI invoice is still a legally relevant fiscal document in Mexico and must be reprintable with its fiscal data intact (to prove it was issued and later cancelled). The fix extends the condition to also cover the 'cancel' state, ensuring the CFDI-specific report template is used whenever a valid attachment exists, regardless of whether the CFDI is currently signed or cancelled. opw-6393656 Forward-Port-Of: odoo/enterprise#126750 Forward-Port-Of: odoo/enterprise#126466
Date and datetime fields are now hidden from the pivot setup popup once all available time groupings have already been added. This prevents users from accidentally creating duplicate entries and keeps drag-and-drop behavior predictable in spreadsheets.
Original PR description
Current behavior before PR: - Date and datetime fields remained visible even when all their granularities were already added to the pivot. - Users could add the same field with the same granularity multiple times, creating duplicate IDs and causing unexpected drag and drop behavior. Desired behavior after PR is merged: - Hide date and datetime fields from the popup once all available granularities have already been added to the pivot. - This prevents duplicate field IDs and keeps the popup behavior consistent with spreadsheet pivots during drag-and-drop. Task: [6295794](https://www.odoo.com/odoo/project/2328/tasks/6295794) Forward-Port-Of: odoo/enterprise#126830 Forward-Port-Of: odoo/enterprise#123280
Dropdown fields in account reports now show the text cursor aligned to the right instead of appearing in the middle. This improves the visual polish and usability of report filters without changing any business logic or report data.
Original PR description
Dropdown inputs inside of an account report show the cursor in the center of the input field. The cursor has been changed to be right-aligned. task-6247454 Forward-Port-Of: odoo/enterprise#120728
Code cleanup and technical improvements
This update modernizes part of the Documents app so it remains compatible with the next version of the underlying interface framework. It preserves existing behavior for document selection and topbar actions, reducing the risk of stale or incorrect action buttons for users.
Original PR description
Replaced `useLayoutEffect` (from `@web/owl2/utils`) with `onMounted` + `onPatched` because `useLayoutEffect` is deprecated in OWL3. `useLayoutEffect`'s shim is literally `onMounted + onPatched` with…
Replaced `useLayoutEffect` (from `@web/owl2/utils`) with `onMounted` + `onPatched` because `useLayoutEffect` is deprecated in OWL3. `useLayoutEffect`'s shim is literally `onMounted + onPatched` with a deps-diff guard; a native reactive `useEffect` does NOT work here — it runs outside OWL's patch lifecycle and stops re-running once the first selection settles, leaving topbar actions stale. A manual diff of `[this.props.targetRecords, this.ui.isSmall]` inside `onPatched` reproduces the post-patch, gated recompute the original shim performed. The useLayoutEffect refactored in this PR had test coverage — below are some tests that failed when the effect was commented out, and are now passing: - @documents/kanban_view/Check actions with preview - @documents/kanban_view/Download button availability - @documents/list_view/only show common available actions see commented-out runbot build: https://runbot.odoo.com/runbot/batch/2593680/build/114734104 `useEffect` from `@odoo/owl` is NOT an equivalent replacement — despite both `this.props.targetRecords` and `this.ui.isSmall` being reactive signals, the effect stops firing after the first selection settles. Only patch-tied lifecycle hooks sustain the subscription.
The Documents module was updated to use a newer internal approach that aligns with the next version of Odoo's interface framework. This reduces maintenance risk and adds test coverage to help ensure document selection actions continue working correctly.
Original PR description
Replaced `useLayoutEffect` with `computed()` signals because `useLayoutEffect` is deprecated in OWL3. Both `recordsToDelete` and `recordsToArchive` are pure derived values from `this.selection`. Using `computed()` removes the effect entirely, making the reactive dependency explicit with no layout-effect overhead. When commenting out the useLayoutEffect there was no error, the code we refactored had NO TEST coverage. A test was written to ensure our fix was correct, and it was tested against the previous useLayoutEffect: - Passed with previous useLayoutEffect. - Failed with previous useLayoutEffect commented. - Passed with our OWL3 replacement.
Manufacturing work orders and VoIP calling screens were updated to use Odoo's newer overlay framework. This is an internal modernization that helps keep these interfaces compatible with the latest platform changes, with no expected functional change for users.
Original PR description
`overylayService` has been converted to an OWL3 Plugin, so existing useService("overlay") call sites need to be rewritten.
This commit is the result of the owl3-migration script.The Documents app’s drag-and-drop area was updated to use the current supported framework approach, reducing future maintenance risk. A new automated test was added to confirm the drop zone still reacts correctly while scrolling and dragging files.
Original PR description
Replaced the `useLayoutEffect` in `DocumentsDropZone` that registered dragover, dragleave, and scroll listeners on `props.parentRoot()` and tracked `scrollTop` for overlay positioning. Used…
Replaced the `useLayoutEffect` in `DocumentsDropZone` that registered dragover, dragleave, and scroll listeners on `props.parentRoot()` and tracked `scrollTop` for overlay positioning. Used `useListener` from `@odoo/owl` and a class-level `signal(0)` for the scroll offset. `useLayoutEffect` is deprecated in OWL3. `useListener` is the idiomatic OWL3 API for external listeners: it accepts the ref getter directly as its target, subscribes to it reactively, and handles add/remove lifecycle automatically — no manual cleanup or `onMounted`/`onUnmounted` pairing required. The `proxy` state property for `topOffset` was replaced with a `signal(0)` so the template reads `this.topOffset()` with fine-grained reactivity. When commenting out the useLayoutEffect there was no error, the code we refactored had NO TEST coverage. A test was written to ensure our fix was correct, and it was tested against the previous useLayoutEffect: - Passed with previous useLayoutEffect. - Failed with previous useLayoutEffect commented. - Passed with our OWL3 replacement.
Point of Sale orders now receive their required references before the order is created. This helps prevent initialization issues in localized invoicing, payment settlement, and connected POS flows, making order processing more reliable.
Original PR description
Before this commit: ==== - In the createNewOrder method, the pos.order was created first, and the references were set afterward using getNextOrderRefs. After this commit: ==== - References are now set before creating the pos.order instance, ensuring proper initialization. task-4677391 Community PR - https://github.com/odoo/odoo/pull/205859
The Luxembourg reporting test data has been moved into separate XML files, making the test suite easier to navigate and maintain. This is an internal cleanup that does not change product behavior for users.
Original PR description
Each expected FAIA content is around 700 lines long. It is cumbersome to navigate the file. This commit moves the expected FAIA content to their own files. This has the added bonus of adding xml syntax highlighting to the file if one uses VSCode or a similar program.
13 changes
Resolved issues and error corrections
Accounting reports now ignore repeated rapid clicks while a report line is still expanding. This prevents duplicate lines from appearing and ensures users can reliably collapse expanded report sections afterward.
Original PR description
Steps to reproduce:- - Open any report. - Click on a particular line to unfold more than once very fast(or throttle network to 3G) - Once line is unfolded click again to fold that line. - Line is not…
Steps to reproduce:- - Open any report. - Click on a particular line to unfold more than once very fast(or throttle network to 3G) - Once line is unfolded click again to fold that line. - Line is not folding. Cause:- - When we clicked multiple times to unfold line, duplicate child lines were created(as many times as many times we clicked). - Because when first promise was not resolved so `unfolded = false` and we clicked again so new promise also tries to unfold the same line, resulting in unfolding the same line multiple times. - In version 17.0 these duplicate child lines are created but somehow not visible but it breaks `foldLine`. From version 18.0 onwards these duplicate child lines are visible. Solution: In `unfoldLine` set the flag `unfolding`. So in all clicks other than first, we get `unfolding = true` and don't proceed further, preventing unfolding the same line multiple times. task-6260425 Forward-Port-Of: odoo/enterprise#126504 Forward-Port-Of: odoo/enterprise#120392
Users can now duplicate several maintenance requests at once without the system showing an error. This prevents interruptions when teams need to quickly create similar maintenance records from existing ones.
Original PR description
Currently, when a user attempts to duplicate multiple maintenance requests simultaneously, the system throws a ValueError (Expected singleton). This PR fixes that. ### How to reproduce the issue: - Install `mrp_maintenance` module; - Open maintenance request list view; - Select multiple records and try to duplicate them using the Action button; - It will throw a traceback stating a singleton error. ### Expected behavior after PR is merged: Now multiple maintenance requests will be copied without raising any errors. Forward-Port-Of: odoo/enterprise#124255
Replacing a document in the Sign app now keeps multiple signature fields correctly linked to the same signer. This prevents Odoo from mistakenly creating separate signers for each field, reducing confusion and preserving the intended signing flow.
Original PR description
### Description of the issue/feature this PR addresses: This PR fixes an issue in the Sign module where replacing a document breaks the link between a signer and their multiple signature fields,…
### Description of the issue/feature this PR addresses: This PR fixes an issue in the Sign module where replacing a document breaks the link between a signer and their multiple signature fields, causing Odoo to erroneously generate separate signers for each individual field. ### Current behavior before PR: When a document with multiple signature fields assigned to the same person is replaced, the _copy_sign_items_to function duplicates the sign.item records. During this duplication process, Odoo duplicates the old responsible_ids, creating copies with new ids. These new copies overwrite the old responsible_ids, ensuring that the newly created sign_items have entirely new responsible_ids. Because a shared responsible_id is the primary key Odoo uses to group multiple signature items under a single signer, this change in ID causes the system to lose the grouping. As a result, Odoo treats each copied field as belonging to a completely new, separate signer. _Note_: Because of the limitation mentioned before, any responsible_id that is passed through the copy function, and thereby the copy_data function, is overwritten with new ids. The only work-around then is to update the responsible_id value attached to the new_sign_item after the copy_data function has completed and the new_sign_item has been created. ### Desired behavior after PR is merged: The original responsible_id is explicitly carried over and assigned to the newly copied sign.item immediately after the copy operation completes. This ensures the copied signature fields retain their original role IDs and grouping, keeping them correctly assigned to the single original signer. opw-6354334 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an issue in Odoo Sign where signatures could disappear from downloaded signed PDFs when the original PDF had an unusual page origin. Signed documents now place fields correctly in the visible page area, matching what users saw in the preview.
Original PR description
Steps to reproduce (version 16+): 1) Obtain a pdf with a negative origin point: This can occur when a customer exports a pdf from another software, or it can be made manually using a python script 2) In the sign app, upload the pdf and create a new template, add a signature field to the document. 3) Sign the document. The preview will load correctly and the signature will be visible 4) Download and open the signed pdf. The signature is not on the document Notes: Issue occurs because the signature was added to the pdf outside of the visible area. The preview works because the signature is rendered on top of the unsigned document in the correct location. The issue can be fixed applying a translation to the canvas. Ticket: [6317223](https://www.odoo.com/odoo/project/49/tasks/6317223?debug=assets)
Peruvian electronic invoices now calculate down payment amounts consistently when withholding tax is involved. This prevents mismatched invoice XML totals and avoids references to cancelled down payment invoices, reducing validation or reporting issues.
Original PR description
### Issue: When an invoice has a down payment on a line with a withholding tax, the `PrepaidPayment/PaidAmount` in the UBL XML included the withholding tax amount, causing a mismatch with…
### Issue: When an invoice has a down payment on a line with a withholding tax, the `PrepaidPayment/PaidAmount` in the UBL XML included the withholding tax amount, causing a mismatch with `LegalMonetaryTotal/PrepaidAmount` which correctly excludes it ### Cause: `PrepaidPayment/PaidAmount` was set directly from `prepayment_move.amount_total`, which includes all taxes `LegalMonetaryTotal/PrepaidAmount` uses `_aggregate_base_line_tax_details` to exclude withholding taxes, but this was not applied to the `PrepaidPayment` node ### Fix: Using `prepayment_move.amount_total` directly includes all taxes and does not match the rounding logic of `LegalMonetaryTotal` Instead, `_aggregate_base_line_tax_details` is used with the same `total_grouping_function` as `LegalMonetaryTotal`, ensuring both nodes use the same rounding logic and exclude withholding taxes Reversed down payment moves are also excluded from `AdditionalDocumentReference` to avoid referencing cancelled invoices ### Steps to reproduce: - Install `l10n_pe_edi` and `sale_management` with demo data - Switch to the PE company - Create and confirm a Sale Order (Customer: PE Company, Product: Any, Unit Price: 200, Taxes: VAT 18% and 3% IGV Withholding) - Create, confirm and pay a Down Payment Invoice (Fixed: 28.92) - Go back to the SO and create the Regular Invoice - Confirm it and click Process Now - Open the EDI Document tab and download the XML Before the fix, the sum of `PrepaidPayment/PaidAmount` did not match `LegalMonetaryTotal/PrepaidAmount` opw-6273903 Forward-Port-Of: odoo/enterprise#121733
This fix ensures the Website Helpdesk Knowledge module includes the required website knowledge dependency, so installation succeeds even when automatic dependency installation is skipped. It prevents setup failures for teams deploying the module in controlled or automated environments.
Original PR description
Trying to install website_helpdesk_knowledge with the flag --skip-auto-install would fail due to website_helpdesk_knowledge/views/helpdesk_views.xml referencing `is_published` which is only defined in `website` https://github.com/odoo/odoo/blob/4d60d5693f3d0253a28dd38412125b2fc6d6b41f/addons/website/models/mixins.py#L184 Reproduciton steps: odoo/odoo-bin --addons-path odoo/addons,odoo/odoo/addons,enterprise,design-themes -d oes_runbot --stop-after-init --log-level=test --max-cron-threads=0 -i website_helpdesk_knowledge --skip-auto-install Adding `website_knowledge` pulls in the relevant dependencies resulting in the field being found and valid Affects **18.0** and **19.0**, **nothing in between** Forward-Port-Of: odoo/enterprise#126260
UrbanPiper orders with tax-included prices now calculate the per-item price correctly when customers order more than one unit. This prevents inflated Point of Sale order totals and improves billing accuracy for online orders.
Original PR description
Steps to reproduce: --- - Configure a Point of Sale with UrbanPiper credentials. - Create a product priced at 100 with a 5% GST (Tax Included). - Sync the product with UrbanPiper. - Place an online order with a quantity greater than 1. Issue: --- - `total_with_tax` was incorrectly treated as the unit price for multi-quantity tax-included orders. Fix: --- - Calculate the unit price by dividing `total_with_tax` by the ordered quantity before creating the POS order line. task-6427634 Forward-Port-Of: odoo/enterprise#126585 Forward-Port-Of: odoo/enterprise#125989
Account transfers using destination percentages below 100% now keep journal entries balanced even when rounding is involved. This prevents small one-cent differences from blocking or distorting automated transfer postings.
Original PR description
Before this commit, _get_transfer_move_lines_values computed the amount for the last destination line from the global transferred balance, instead of reusing the amount already removed from the source accounts. The two values are rounded independently and can differ by a cent whenever the removed amount comes from more than one rounded source, producing an unbalanced journal entry. Removing that condition the last destination line always absorbs the remainder fixes it. Steps to reproduce: 1. Transfer model with 2 source accounts and 1 destination line at 15%. 2. Post moves for the period: account A balance 395.88, account B balance 252.16 (total 648.04). 3. Run `action_perform_auto_transfer()`. Before: source lines -59.38 (395.88*15%) and -37.82 (252.16*15%), destination line +97.21 (648.04*15% rounded) -> entry off by 0.01. After: destination line takes the exact remainder, 97.20 -> balanced. OPW-6443928
Mobile self-orders in Belgian certified POS setups are now signed using the configured self-ordering user when no cashier is logged in. This prevents rejected orders at the fiscal device and aligns mobile self-order behavior with kiosk ordering.
Original PR description
Signing a mobile self-order while no cashier is connected (login screen) was rejected by the FDM: `signExternalOrder` took the INSZ number from `getCashier()`, so `signSale` was sent without its required `employeeId`. Self-orders are now signed with the INSZ number of the self-ordering default user, like the kiosk already does.
Users can now disconnect a Belgian CodaBox connection using either the fiduciary password or a valid saved IAP token. This fixes a gap between the server and client behavior, making account disconnection smoother and reducing support friction.
Original PR description
The user should be able to revoke the CodaBox connection by either entering the fidu password or by using a valid iap_token. This was implemented in the iap server but not in the client side, after this commit the user should be able to either revoke by using the fidu password or by using the iap_token. task-6348433
Portal users can now view and edit existing voice transcription text in Knowledge articles without being shown the voice recording controls. This keeps article editing available while ensuring the recording feature remains limited to internal users.
Original PR description
Portal users can edit Knowledge articles but should not have access to the voice recording feature, which is reserved for internal users. The readonly component is already used in read-only views, so reusing it in the editor for portal users is safe, it still renders the existing transcription content correctly without exposing any recording controls. Portal users can still edit the text content inside the component thanks to the editable descendants concept, which allows the editor to manage specific editable areas even within a readonly component. Task-6320461
This fix prevents Odoo Studio from crashing when users edit fields that are added dynamically in accounting-related views. It also hides those technical fields from Studio editing where appropriate, so users can continue customizing views without unexpected errors.
Original PR description
* = account_invoice_extract, l10n_nl_reports Example of steps: - Install web_studio and `accountant` - Open the corresponding form view in Studio - With debug mode toggle "Show invisible Elements"…
* = account_invoice_extract, l10n_nl_reports Example of steps: - Install web_studio and `accountant` - Open the corresponding form view in Studio - With debug mode toggle "Show invisible Elements" and edit "Invisible" on the second partner_id field - Traceback `normalize()` compares the combined arch without the studio customization to the one with it, in order to compute the smallest possible set of xpaths. To do so, it calls `apply_inheritance_specs` (the low-level function from `odoo.tools.template_inheritance`) directly on the statically combined arch. Some models add or duplicate nodes dynamically in `_get_view()` (Python postprocessing, run after the static view combination). A studio operation can target such a node, since it is what the user actually sees and clicks on. But that node has no counterpart in the purely static combined arch used by `normalize()`, so `apply_inheritance_specs` raises a ValueError. `edit_view()` only catches `ValidationError` to fall back to an un-optimized (but valid) studio arch instead of failing the request. Since the low-level function raises a plain `ValueError` here, that fallback never triggers, and the exception is not caught anywhere. To fix this, we will keep the behavior from version 18.0 and catch the ValueError raised by `apply_inheritance_specs` in `normalize_with_keyed_tree` and re-raise it as a ValidationError, like `ir.ui.view.apply_inheritance_specs` already does elsewhere. This lets `edit_view()`'s existing fallback handle the case gracefully instead of crashing. Additionally, the two models responsible for the dynamically-added nodes described above are fixed at the source. `account_invoice_extract`'s duplicated `partner_id` field and `l10n_nl_reports`'s injected `company_id` field are now marked with `data-used-by`, the same attribute `_add_missing_fields` already sets in `ir_ui_view.py` for the fields it adds. Studio already skip rendering and computing xpaths for any node carrying this attribute (since https://github.com/odoo/enterprise/pull/92862), so these nodes are no longer exposed to the user and can no longer produce a studio operation that `normalize()` is unable to locate. opw-6332911
This change reverts a dependency update in the Helpdesk Knowledge website module because dependency changes are not allowed in stable versions. It helps keep the stable release predictable and reduces the risk of unintended installation or upgrade behavior.
Original PR description
Changes to depends are not allowed in stable Merge through saas-19.1 https://github.com/odoo/enterprise/pull/126260 Forward-Port-Of: odoo/enterprise#126892
1 change
Resolved issues and error corrections
MyInvois expects the CountrySubentityCode to be fixed as '17' for customers located outside Malaysia, since Malaysian state codes don't apply to them. Set it to '17' instead of the raw state name for non-Malaysian customers. task-6388521 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Original PR description
MyInvois expects the CountrySubentityCode to be fixed as '17' for customers located outside Malaysia, since Malaysian state codes don't apply to them. Set it to '17' instead of the raw state name for non-Malaysian customers. task-6388521 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr