Daily updates from Odoo
Friday, May 29, 2026
245 changes
5 changes
Resolved issues and error corrections
This update resolves an issue that caused temporary problems during Odoo upgrades. It replaces a complex workaround with a more direct method of managing group settings for the service timesheet, preventing the creation of unnecessary temporary records. This ensures smoother and more reliable Odoo upgrades.
Original PR description
Replace the `res.config.settings transient record + execute()` hack with a direct group implication on `group_field_service_allow_material` to avoid orphan transient records during upgrade. see: https://github.com/odoo/upgrade/pull/10310#issuecomment-4518235969 Forward-Port-Of: odoo/enterprise#118178
This update fixes a previous issue where payment transaction details weren't consistently saved in Odoo, regardless of whether the payment was triggered by a webhook or polling. The change ensures that all relevant payment information, including card details, is now correctly recorded, improving the accuracy of financial reporting and reconciliation. This resolves a critical data capture problem.
Original PR description
After odoo/odoo#236454, a bug was introduced where the transaction details would only be saved if the payment was resolved via webhook, not via polling. This commit fixes the issue by using the same field names in the webhook payload as is received from the polling endpoint. In addition, the card number and card brand fields are now saved too. opw-6244960 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266788 Forward-Port-Of: odoo/odoo#266629
This update corrects a bug where duplicated manufacturing orders automatically linked to their original sales order. The fix prevents this linking, ensuring that duplicated orders are independent and don't incorrectly display a connection to the original sale. This improves data accuracy and simplifies order management.
Original PR description
Version: --------- - 19.0+ Steps to reproduce: -------------------- 1.Install modules `sale_management`, `purchase`, and `mrp`. 2. Go to Settings and enable the MTO (Replenish on Order) route. 3.…
Version:
---------
- 19.0+
Steps to reproduce:
--------------------
1.Install modules `sale_management`, `purchase`, and `mrp`.
2. Go to Settings and enable the MTO (Replenish on Order) route.
3. Create a product with:
i. Configure a Vendor under the Purchase tab.
ii. Set the route to MTO.
iii. Create a Bill of Materials for the product.
5. Create a Sale Order with the configured product and confirm it.
6. Open the generated Manufacturing Order.
7. Duplicate the Manufacturing Order.
Issue:
------
* The duplicated Manufacturing Order shows a smart button
linked with the Sale Order, which is incorrect.
Root Cause:
------------
This issue is coming form this [Commit](https://github.com/odoo/odoo/commit/2713876dbc70d3984e584a9037a2206dcda4e84a#diff-2b9de2e50ff5e1dc0362b825bac2b07623770fb3275b3257ef972f255f3ccb8b)
* During Sale Order confirmation, the flow
`action_confirm` → `_action_confirm` → `_action_launch_stock_rule`
→ `run` → `_run_pull` → `_action_confirm` calls
`_prepare_procurement_values`.
which gather all procurement values.
In sale_stock, the super call adds `sale_line_id` to the
generated Manufacturing Order when using MTO:
https://github.com/odoo/odoo/blob/0352c5e8543b75083cf555c3d5b4f164f949b465/addons/sale_stock/models/stock.py#L138-L140
* So, when the Sale Order is confirmed, the generated
Manufacturing Order contains sale_line_id, and when this
Manufacturing Order is duplicated, the sale_line_id is also
copied.
* In sale_mrp, the smart button uses sale_line_id to compute
the linked Sale Order count:
https://github.com/odoo/odoo/blob/0352c5e8543b75083cf555c3d5b4f164f949b465/addons/sale_mrp/models/mrp_production.py#L19
Solution:
-----------
* Prevent copying of sale_line_id when duplicating a
Manufacturing Order, ensuring duplicated records are not
linked to any Sale Order.
---
opw-6113149
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#259128This update resolves an error that occurred when the Salary Increase wizard was used with a past date for the salary increase. The issue stemmed from how the system identified compatible employee versions, particularly for new employees. The fix ensures the system handles past dates correctly, preventing the error and allowing users to accurately adjust salaries.
Original PR description
Currently, an error will occur when user puts Date of Salary Increase in the past on the salary increase wizard. Steps to replicate: - Install `hr_payroll` and create a new employee. - From the cog…
Currently, an error will occur when user puts Date of Salary Increase in the past on the salary increase wizard.
Steps to replicate:
- Install `hr_payroll` and create a new employee.
- From the cog menu click `Salary Increase`.
- Put any date from the past in the `Date of Salary Increase` field.
Error:
```py
File '/home/odoo/src/enterprise/saas-19.3/hr_payroll/wizard/hr_payroll_salary_increase_wizard.py', line 43, in _get_affected_version_ids
increase_base_version = employee.version_ids.filtered_domain([('date_version', '<=', self.increase_date)])[-1]
File '/home/odoo/src/odoo/saas-19.3/odoo/orm/models.py', line 6135, in __getitem__
ids = (self._ids[key],)
IndexError: tuple index out of range
```
Cause:
- When the user changes the salary increase date, it triggers the [compute], which calls `_get_affected_version_ids()`. In this method, employee versions [1] are filtered to keep only those whose `date_version` is less than or equal to the selected increase date.
- For newly created employees, version_ids typically contain only an initial version with date_version set to today's date. Therefore, when the selected salary increase date is earlier than today, the filter returns an empty recordset, which later causes the crash when accessing the last record of that recordset.
Solution:
- Early returned empty recordsets when no matching employee versions are found for the selected increase date.
[compute]: https://github.com/odoo/enterprise/blob/2a86967c1754f9c703a87c5d9ceb1d5f5d0ec26f/hr_payroll/wizard/hr_payroll_salary_increase_wizard.py#L34-L39
[1]: https://github.com/odoo/enterprise/blob/2a86967c1754f9c703a87c5d9ceb1d5f5d0ec26f/hr_payroll/wizard/hr_payroll_salary_increase_wizard.py#L43
sentry-7498213478This update corrects a bug preventing new users with broader timesheet access (e.g., 'All Timesheets') from appearing in the Assistant Rules sharing dropdown. The fix adjusts how the system identifies eligible users, ensuring all authorized personnel can be selected. This improves the usability of the timesheet sharing feature.
Original PR description
Steps to Reproduce: - Create a user with "All Timesheets" access. - Open the Timesheets app and navigate to Assistant Rules. - Attempt to share any rule with the newly created user. Current Behavior: - The new user is missing from the dropdown selection list. Cause: - The domain on the user selection field filters based on explicitly assigned groups (using group_ids for "Own Timesheets" access). Users with higher-level access, such as "All Timesheets" or "Timesheets Admin", have this access implied rather than explicitly assigned, meaning it only registers in `all_group_ids`. Fix: - Update the field domain to evaluate `all_group_ids` instead of `group_ids`. This ensures users with implied group access are correctly populated in the dropdown list. task-6236300
18 changes
Resolved issues and error corrections
This update resolves a problem where the Canadian Localization module was missing essential tax group settings, preventing proper accounting configuration. The fix updates data files and runs a migration script to ensure all necessary tax and account information is correctly populated, improving tax reporting accuracy.
Original PR description
**Steps to reproduce:** * Install the *Canadian Localization* module (*l10n_ca*). * Go to *Accounting* module. * Navigate to *Configuration -> Settings*. * In the *Taxes Configuration* section, click on *Configure Tax Groups*. * Open the tax groups list view and review the available records. **Observed behavior:** * Default tax groups accounts are missing or not visible for taxes, leading to incomplete tax configuration. **Cause:** * The tax and account data files were missing required fields: * *tax_receivable_account_id* * *tax_payable_account_id* * *non_trade* (for accounts) * In *Accounts* , for some places *account_type* was missing * This resulted in improperly configured tax groups and accounts. **Fix:** * Updated CSV data files for tax groups. * Added the missing required fields for taxes and accounts. * Added a migration script to update existing records accordingly. opw-6069621
This update optimizes a key database query used to generate reconciliation reports. By correcting a wildcard issue in the query, we've significantly reduced the time it takes to process these reports, particularly when the database's data cache is not fully warmed up. This results in faster reporting and a better user experience.
Original PR description
The CTE `model_fees` is supposed to get the reconciliation models that match conditions that involves a join with the ir.model.data table. One of these conditions is filtering based on the `name`…
The CTE `model_fees` is supposed to get the reconciliation models that match conditions that involves a join with the ir.model.data table. One of these conditions is filtering based on the `name` field with an `LIKE` operator. On databases that has a GIST index on the field `name`, the planner will prefer to filter the records based using the GIST index and add the extra filters as a filtering criteria after the index condition if the index-condition wasn't possible to be switched to a range-query. The condition is supposed to be a prefix-matching, which can be evaluated directly by a B-TREE if the field had an index and the planner can convert the condition to a range-query. Apparently the `_` in `account_reco_models_fees_%%` was evaluated as a wild-card, making the condition a substring-matching rather than direct prefix-matching. In this PR, I have modified the condition to escape the '_' wildcards. The benchmark done below was on a database that has around **10^7** `ir.model.data` records and 1K `account.reconciliation.model` records. I have split the benchmark into two cases, a case where the buffer-pool of postgres warmed-up and a case where it is not. After Worst case -> https://explain.dalibo.com/plan/975geg1f1h109d5c Before Worst case -> https://explain.dalibo.com/plan/0ce9bf3g0ad8f98b After Best Case -> https://explain.dalibo.com/plan/1a77459dadb0gfc4 Definition of ir_model_data_name_idx2 -> CREATE INDEX ir_model_data_name_idx2 ON public.ir_model_data USING gist (name gist_trgm_ops) Definition of ir_model_data_module_name_uniq_index -> CREATE UNIQUE INDEX ir_model_data_module_name_uniq_index ON public.ir_model_data USING btree (module, name) | PostgreSQL Buffer Pool Status | Before | After | | :--- | :--- | :--- | | Not warmed up (Cold) | 11s | 130ms | | Warmed up (Hot) | 0.022ms | 0.097ms |
This update resolves a technical issue that prevented users from adding multiple loan lines to French company accounting records. The fix ensures that the system correctly handles date comparisons when creating and editing loan records, improving the user experience. This change is a critical fix for accurate financial reporting.
Original PR description
**Steps to reproduce:** - Install the `l10n_fr_account_loans` module and switch to a `FR Company`. - Navigate to Accounting > Accounting > Assets & Liabilities > Loans. - Create a new loan record. -…
**Steps to reproduce:** - Install the `l10n_fr_account_loans` module and switch to a `FR Company`. - Navigate to Accounting > Accounting > Assets & Liabilities > Loans. - Create a new loan record. - Click `Add a line`, set a `Date`, and `save` the record. - Click `Add a line` again. **Error:** `TypeError: '>' not supported between instances of 'datetime.date' and 'bool'` **Root Cause:** At [1], when adding a line after the record has already been saved with at least one existing line, the existing line has a valid `datetime.date` value for `l.date`, while the newly created unsaved line still has `line.date` set to `False`. This results in a comparison between a `datetime.date` object and a boolean value, causing an error. **Fix:** This commit prevents the errors when adding multiple lines after saving the record by applying a fix similar to [2]. [1]: https://github.com/odoo/enterprise/blob/54eef93f295eaebd98d24730d108b1203ca7b35a/l10n_fr_account_loans/models/account_loan_line.py#L21 [2]: https://github.com/odoo/enterprise/blob/54eef93f295eaebd98d24730d108b1203ca7b35a/account_loans/models/account_loan_line.py#L61-L63 opw-6244973
This update fixes several issues related to the Field Service module, including improved Gantt scheduling functionality, automated email reports for completed interventions, and streamlined customer access. These changes enhance the user experience and ensure timely communication for field service operations.
Original PR description
## [FIX] web_gantt,planning: apply hasGroup before compute params Before this commit, some actions like drag and drop gantt pills are blocked for planning manager instead of being allowed only for…
## [FIX] web_gantt,planning: apply hasGroup before compute params Before this commit, some actions like drag and drop gantt pills are blocked for planning manager instead of being allowed only for them. The reason is because the compute params is something made before checking if the user is a planning manager and so the system will consider the user is not a planning manager. The compute params is something made before because the methods are executed inside 2 distincts onWillStart hook and so OWL framework cannot know one hook depends on the other one. This commit creates a method `onWillStart` in the main gantt controller to be able to override it and be able to wait a rpc before processing the compute params. ## [FIX] planning_field_service_sale_timesheet: don't count unscheduled intervention This commit filters the interventions counted to display the field service stat button in the form view of Sale Order. Now the intervention unscheduled will no longer be counted and also the one linked to plannable SOL. ## [FIX] planning_field_service: send email to customer when intervention published Before this commit, the template "Field Service Scheduled" was unsused. This commit uses that template to send an email to the customer once the intervention is scheduled. ## [FIX] planning_field_service: send report when intervention completed and signed Before this commit, the customer signs the intervention completed and does not received any email with the intervention report. He has to create an account in the DB as portal user to be able to see his intervention or ask to contact person to send him the report by mail. This commit will automatically send the intervention report by mail to the customer once the intervention is completed and signed by the customer. ## [FIX] planning_field_service: fix label and record_name in email sent for Field service Before this commit, the button sent to the customer to see the intervention is `View Planning Slot` and the record name used inside the same email is the display name which is not useful for the customer. This commit changes the label of the button displayed to see `View Report` and change the record_name to show `Field Service - <intervention date>` as shown in the portal view. ## [FIX] planning_field_service: no login required to access to intervention Before this commit, the customer cannot access to the intervention without begin log in even if he has the access token. This commit changes the route access to let the user access to the intervention completed and he can also sign it. ## [FIX] planning: hide duplicated name field in kanban displayed in gantt This commit hides the duplicated name field displayed in the popover of the gantt view in the planning.slot model. ## [FIX] planning_field_service: rename module name This commit renames the module to call it `Field Service` instead of `Planning - Field Service`. ## [FIX] worksheet: only show property warning message in mobile ## [FIX] planning: define employee_public_ids field in planning.slot Before this commit, when a planning user goes to a shift he will see Assign to me button on a shift assigned to another human resource which is normally not allowed. The reason because the button is visible is because `employee_ids` field is always empty for users who are not HR user. This commit adds `employee_public_ids` field which is also a computed field non stored to get the employee for the user who is not a HR user. ## [FIX] planning_field_service: always compute break_time This commit removes the default value on break_time field to always trigger the compute of that field, the reason is because by default the allocated_hours computed when we create a shift, will not always cover the whole duration of the shift, the allocated hours of the shift is computed based on the working schedule of the shift and so the break_time field has to be computed afterwards to make sure the break time is correctly set instead of having 0 by default when we create a shift. task-6060493
This update corrects a bug where the default company scrap location was being used instead of the user-specified scrap location during scrap move confirmation. Previously, enabling location tracking in the warehouse caused the system to consistently use the company's scrap location. This fix ensures the user-selected scrap location is correctly applied, improving accuracy in scrap tracking.
Original PR description
**Issue** The scrap location provided by the user may be overridden while confirming a scrap move **Steps to reproduce** - In settings, enable the tracking of location in the warehouse - Have two…
**Issue** The scrap location provided by the user may be overridden while confirming a scrap move **Steps to reproduce** - In settings, enable the tracking of location in the warehouse - Have two location of type 'Inventory loss' - Create a scrap move and change the scrap location - confirm the move -> The scrapped move will be created using the scrap location already present before the user changes it **Cause** The regression has been introduce by this refactoring commit: https://github.com/odoo/odoo/commit/1c7d80a10b5d7db1c4163166bf52b3f3c77044ba While confirming the scrap move: https://github.com/odoo/odoo/blob/f68473898b97db55a1ef5bee1d4f7865fb6b6d8a/addons/stock/models/stock_move.py#L2726 https://github.com/odoo/odoo/blob/f68473898b97db55a1ef5bee1d4f7865fb6b6d8a/addons/stock/models/stock_move.py#L2731 It needs to access the `stock.move` record: https://github.com/odoo/odoo/blob/f68473898b97db55a1ef5bee1d4f7865fb6b6d8a/addons/stock/models/stock_move.py#L2133 Since this is the first access, it triggers the compute method of `location_dest_id`: https://github.com/odoo/odoo/blob/f68473898b97db55a1ef5bee1d4f7865fb6b6d8a/addons/stock/models/stock_move.py#L227-L228 Which sets it to the company's scrap location, regardless of the value provided by the user: https://github.com/odoo/odoo/blob/f68473898b97db55a1ef5bee1d4f7865fb6b6d8a/addons/stock/models/stock_move.py#L237-L238 This value is compute here: https://github.com/odoo/odoo/blob/f68473898b97db55a1ef5bee1d4f7865fb6b6d8a/addons/stock/models/res_company.py#L62-L65 This value is computed by taking the first scrap location found for this company opw-6125152
This update resolves a bug where the HTML editor shortcut incorrectly removed empty lines after inserting inline commands. The issue stemmed from how the system handled `<br>` tags, leading to the deletion of preceding lines. This change ensures that empty lines are preserved when using the shortcut, improving the user experience.
Original PR description
…r <br> Problem: Typing "->" + Space after a Shift+Enter on an empty line correctly inserts the → character, but removes the empty line above it. Cause: - Consecutive `<br>` elements were not preserved when determining the old block boundary; the preceding `<br>` was incorrectly deleted. - Inline commands were wrapped in a block element instead of being inserted inline. Steps to reproduce: 1. Type "a" 2. Press Shift+Enter twice 3. Type "->" then Space 4. The empty line above is removed when the shortcut is applied task-6229525 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update adjusts the timeout for Epson printer connections in the Point of Sale system. Previously, a popup would appear unnecessarily, especially on iPads, while the print job completed. Increasing the timeout to 15 seconds ensures the system doesn't prematurely alert customers to issues that aren't actually occurring, improving the user experience.
Original PR description
[FIX] point_of_sale: increase epson printer timeout Extend the timeout duration for the Epson printer integration to avoid the "RetryPrintPopup" keep appearing on users' devices, especially iPads, while the ticket is properly printed. Previously, the popup was displayed after 3 seconds. In reality, it can take 8 seconds for the printer to respond, which is considered normal. After this fix, the timeout at 15 seconds covers worst cases as well. The printer will take the time it needs to print and the POS won't rush to warn the customer about an issue that has not actually occurred yet. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where the system wasn't accurately calculating the total value and average cost of stock when a warehouse location was archived. Previously, archived locations were excluded from these calculations, leading to potentially inaccurate inventory reporting. This change ensures that all stock locations, including archived ones, are properly accounted for when determining valuation figures.
Original PR description
When a receipt dest location or delivery source location get archived, the corresponding move may not be taken into account when computing the total_value / avg_cost at date. OPW-6099192 --- ### Test…
When a receipt dest location or delivery source location get archived, the corresponding move may not be taken into account when computing the total_value / avg_cost at date.
OPW-6099192
---
### Test result without fix
```
2026-04-23 06:30:34,016 10516 INFO oes_test_19 odoo.addons.stock_account.tests.test_stockvaluation: Starting TestStockValuation.test_archived_location_valuation ...
2026-04-23 06:30:34,255 10516 INFO oes_test_19 odoo.addons.stock_account.tests.test_stockvaluation: ======================================================================
2026-04-23 06:30:34,255 10516 ERROR oes_test_19 odoo.addons.stock_account.tests.test_stockvaluation: FAIL: TestStockValuation.test_archived_location_valuation
Traceback (most recent call last):
File "/home/odoo/Odoo/src/19.0/odoo/addons/stock_account/tests/test_stockvaluation.py", line 3326, in test_archived_location_valuation
self.assertEqual(self.product_avco.with_context(to_date=date_1).avg_cost, 10)
AssertionError: 20.0 != 10
```
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#263354
Forward-Port-Of: odoo/odoo#260922This update replaces the older PostgreSQL 12 version in the Windows installer with the more current and supported PostgreSQL 16. This change improves security and ensures compatibility with future Odoo releases. Additionally, the installer now uses a dedicated Odoo user for the database connection, enhancing security.
Original PR description
The Windows installer installs PostgreSQL 12. That version was chosen for its small size, but now in 2026 the size doesn't matter as much anymore. Also, version 12 is no longer supported, so it's time to bump to version 16. While at it, this commit adds an Odoo user for the PostgreSQL connection instead of using the superuser. Forward-Port-Of: odoo/odoo#266059 Forward-Port-Of: odoo/odoo#265134
This update fixes a technical issue that could cause CFDI invoices to be rejected due to multiple Addenda nodes. The change ensures the CFDI structure adheres to official standards, preventing errors when the invoice generation process is run repeatedly. This improves the reliability of our Mexican invoicing functionality.
Original PR description
Before this commit, if the `_l10n_mx_edi_cfdi_invoice_append_addendas` method was executed more than once on the same invoice, the resulting CFDI would contain multiple `<cfdi:Addenda>` nodes. This…
Before this commit, if the `_l10n_mx_edi_cfdi_invoice_append_addendas` method was executed more than once on the same invoice, the resulting CFDI would contain multiple `<cfdi:Addenda>` nodes.
This occurred because the method manually injects the new Addenda string at the end of the XML without checking if one was already present from a previous execution.
According to the SAT's Anexo 20 and the CFDI 4.0 XSD, the Addenda must be a single node and the last element of the Comprobante. Duplicating root-level nodes like `cfdi:Addenda` is a bad XML formation practice that can cause rejection by the recipient's automated systems.
This fix ensures the CFDI structure remains valid by:
1. Searching for an existing `{*}Addenda` node in the CFDI string.
2. Removing the old node before reconstructing the XML.
3. Preventing the string replacement logic from stacking multiple Addenda blocks.
This ensures that the CFDI remains clean and compliant with the official standard even if the process is triggered multiple times.
Forward-Port-Of: odoo/enterprise#109760This update streamlines the initial setup for users accessing the timesheet assistant. Previously, users needed to manually start a server each login; this step has been removed due to an update in the activity watch installer. This simplifies the onboarding process and improves user experience.
Original PR description
Before this commit, the wizard to onboard the user to correctly install activity watch for timesheet assistant, mentioned the user has to start the server each time he logs in on his computer. This step is not longer needed thanks to an update on the odoo activity watch installer. This commit removes the line saying the user has to start the server each time he starts his working day. task-6081636 Forward-Port-Of: odoo/enterprise#115373
This update fixes an issue where employees on flexible schedules were incorrectly flagged for overtime. The change adjusts how overtime rules calculate hours worked, now accurately considering the employee's flexible calendar hours and any scheduled leaves. This ensures accurate overtime reporting for employees with varied work arrangements.
Original PR description
**Steps to reproduce:** - Create a flexible 32h/week calendar (8h/day, 4 days) - Assign it to an employee with the Default Ruleset - Create attendances: 8h on Monday, Tuesday, Friday, and Saturday…
**Steps to reproduce:** - Create a flexible 32h/week calendar (8h/day, 4 days) - Assign it to an employee with the Default Ruleset - Create attendances: 8h on Monday, Tuesday, Friday, and Saturday (32h total, matching the weekly budget) - Select the list view and go to the month of the attendances - Employee shows 16:00 Worked Extra Hours (8h on Fri + 8h on Sat) **Cause:** `resource.calendar._attendance_intervals_batch` generates work intervals for flexible calendars by front loading the weekly hour budget onto the first days of the week (Mon 8h, Tue 8h, Wed 8h, Thu 8h for a 32h calendar), But days beyond the budget (Fri, Sat, Sun) get zero hours. The two overtime rule paths relies on these synthetic intervals: 1) The quantity rule: `_get_daterange_overtime_undertime_intervals_for_quantity_rule()` computed `expected_duration` by intersecting the synthetic schedule with each day. For Fri/Sat the intersection was empty (expected = 0) -> all worked hours counted as overtime. https://github.com/odoo/odoo/blob/b31fd6816521ff43fb3a9ec37e79e9a9d628d357/addons/hr_attendance/models/hr_attendance_overtime_rule.py#L302-L304 **update** solved by: https://github.com/odoo/odoo/pull/265120/changes/94d4bfffa053cd78ce07ff07ab14b53e8d931053 2) The timing rule: `_get_rules_intervals_by_timing_type()` derived "work_days" from the synthetic schedule and inverted them to get "non_work_days". (Fri, Sat, Sun) were classified as non-working days, therefore, any attendance on those days triggered full overtime. https://github.com/odoo/odoo/blob/b31fd6816521ff43fb3a9ec37e79e9a9d628d357/addons/hr_attendance/models/hr_attendance_overtime_rule.py#L421-L433 **Solution:** For flexible calendars in the overtime rule consumer: - Quantity rules: read expected hours directly from the calendar's `hours_per_day` / `hours_per_week` instead of the synthetic schedule intervals, subtracting any leaves in the period - Timing rules: treat the entire attendance date range (minus leaves) as potential work days, so that `non_work_days` is empty for flexible employees (they can work any day of the week) opw-6067063 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263840
This update prevents the automatic generation of OIOUBL XML files for users who do not have a VAT number when using Nemhandel. Previously, this could create unnecessary complexity and potential issues. This change ensures Nemhandel functionality aligns with Danish VAT regulations.
Original PR description
Users with no VAT number shouldn't be able to use Nemhandel and shouldn't have a OIOUBL xml generated. task-6196225 Forward-Port-Of: odoo/odoo#266670 Forward-Port-Of: odoo/odoo#263244
This update addresses a technical issue related to how Odoo retrieves VIES identifiers for VAT calculations. Specifically, a race condition was preventing accurate updates, which could lead to incorrect VAT reporting. The fix includes improved testing and ensures data integrity for IAP integrations.
Original PR description
- Avoid race condition while getting the IAP VIES identifiers - Clarify to which state the Intra-Community value has been updated - Increment validity of the webhook_token while waiting for a push update - Add more tests, especially for the controller and the cron - Remove no-longer-relevant tests task-none Forward-Port-Of: odoo/odoo#266814 Forward-Port-Of: odoo/odoo#260440
This update corrects an issue where property search filters were not working correctly, leading to inaccurate search results. The problem stemmed from a misunderstanding of how boolean values are treated during database query construction. This fix ensures property searches return the expected results based on the specified criteria.
Original PR description
# How to reproduce - Go to the Form view of a model to which you can Add Properties (e.g. Project > Tasks) - Click on the gear icon > Add Properties - Create a property field with : - Name : X -…
# How to reproduce
- Go to the Form view of a model to which you can Add Properties
(e.g. Project > Tasks)
- Click on the gear icon > Add Properties
- Create a property field with :
- Name : X
- Field Type : Decimal
- Create two records for that model and set the value of the property to 1 & 2
- Go back and Add a custom filter with ('Properties.X', '=', 1)
# The problem
We see both records even tho we should only see one
# Cause of the issue
When doing the search, we transform the domain into the where clause of a
query. This transformation is done with the `condition_to_sql()`
function of the concerned field (`fields_properties` in our case):
https://github.com/odoo/odoo/blob/ba9e18688cc9c6e0d4da5ab60acf08d4c49b99d7/odoo/orm/fields_properties.py#L589
In this function, we manipulate a bit the condition depending on the value,
notably if the value is/contains True. To check it does, we do this :
https://github.com/odoo/odoo/blob/ba9e18688cc9c6e0d4da5ab60acf08d4c49b99d7/odoo/orm/fields_properties.py#L601
The issue is that in python, True in [1] and evaluates to True
because bool is a subset of int. This changes the condition and replaces it in
our case with ('Properties.X', '!=', 'False'), which is obviously not what
was initially asked for.
opw-6224811
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#266231
Forward-Port-Of: odoo/odoo#265835This update fixes a bug that prevented purchase matching from working correctly when vendor bills only used a description for identification, rather than a product. The change ensures that purchase matching processes vendor bills accurately, regardless of whether a product is specified, improving data consistency and reducing potential errors.
Original PR description
### Issue before this commit: Opening the Purchase Matching wizard would crash if the vendor bill contained lines with a description and a Unit of Measure (UoM), but no product selected. ### Steps to…
### Issue before this commit: Opening the Purchase Matching wizard would crash if the vendor bill contained lines with a description and a Unit of Measure (UoM), but no product selected. ### Steps to reproduce the issue: 1. Enable Units of Measure in Settings 2. Create and confirm a Vendor Bill setting a description and a UoM, but leave the Product field empty. 3. Click on "Purchase matching" smart button 4. The system throws a traceback with the error: "The unit of measure Unit defined on the order line doesn't belong to the same category as the unit of measure False defined on the product." ### Cause of the issue: In the purchase.bill.line.match model, the field product_uom_qty was computed by calling _compute_quantity using line.product_uom_id. Since product_uom_id is a related field on product_id.uom_id, it returns False when no product is set. The UoM conversion logic cannot handle a False destination category, leading to the crash. ### Reason to introduce the fix: Make purchase matching robust when imported vendor bills contain lines identified only by their description and not by a product. Note that for `purchase.bill.line.match` corresponding to an account.move.line but not related to any product, the `product_uom_qty` should match the quantity of the `aml_id` instead of attempting a UoM conversion based on a missing product UoM for the behavior to be consistent with the inverse method: https://github.com/odoo/odoo/blob/59d6232979b8499fde6cb700df1870e2e38d0d3e/addons/purchase/models/purchase_bill_line_match.py#L45-L54 opw-5911526 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266269 Forward-Port-Of: odoo/odoo#257827
This update fixes a previous issue where payment transaction details weren't consistently saved in Odoo, particularly when payments were received via polling instead of webhooks. The fix ensures all relevant payment information, including card details, is now captured and stored correctly, improving the reliability of payment processing for Viva Wallet transactions.
Original PR description
After odoo/odoo#236454, a bug was introduced where the transaction details would only be saved if the payment was resolved via webhook, not via polling. This commit fixes the issue by using the same field names in the webhook payload as is received from the polling endpoint. In addition, the card number and card brand fields are now saved too. opw-6244960 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266788 Forward-Port-Of: odoo/odoo#266629
This update fixes an issue where adding a component move to a validated stock move didn't always result in a fully validated move. The change replicates a necessary check to ensure that component moves, which have different identifiers than standard moves, are correctly validated, maintaining accurate inventory tracking.
Original PR description
Unlocking a validated MO to add a new component move should, naturally, bring about a validated move. Although there exists a `state` check in `stock.move`'s `create()` as of odoo/odoo#196161, it only checks for `picking_id`, whereas a component move has a `raw_material_production_id` (and a finished (by)product has a `production_id`), so we replicate the check here. Task ID: [6226710](https://www.odoo.com/odoo/project/966/tasks/6226710)
16 changes
Resolved issues and error corrections
This update corrects a technical issue impacting US reporting by properly configuring the chart of accounts (CoA) format. Previously, a duplicated file caused incorrect settings, now the configuration is correctly applied, ensuring accurate US financial reports. This resolves a longstanding problem with US reporting accuracy.
Original PR description
In 19.1, when `account_reports_negative_format` was introduced, the PR created a new `template_us` file for `l10n_us_reports` to set the new field, not realizing that `account_chart_template` already existed. Since both files were to the same template and had the exact same method name, one shadowed the other which means all this time the `negative_format` was not properly set for US CoA. Since most other countries keep their CoA in a `template_TEMPLATE_NAME.py` file, move the deferred accounts to `template_us` and remove the `account_chart_template` file. task-none
This update fixes an issue where the sidebar menu wouldn't scroll properly when it contained a large number of items. The fix adds scrolling functionality to the sidebar, ensuring users can access all menu options regardless of the number of items displayed. This improves usability for users navigating the website with extensive menus.
Original PR description
Scenario: - set menu bar as sidebar - adds lot of menu item (or decrease page height) - try to scroll to bottom menu item that are not shown Result: you can't see the bottom of the menu Cause: there is no overflow auto on sidebar elements so the default visible is used without possible scroll. This issue doesn't happen for hamburger menu (hamburger template or on mobile) because it wraps the menu in an .offcanvas-body element that has in bootstrap overflow-y: auto Fix: add vertical overflow to o_header_sidebar menu. opw-5486934 --- __pr note__: I'm not sure if there is a reason this was not done yet or if this has just not been reported. The behavior happen from 16.0 to now. Since the query is from 19.0 to lower risk (and since it's not really broken, just not working with a big number of menu) I've targeted 19.0 but I could go lower if wanted. Forward-Port-Of: odoo/odoo#252047
This update resolves an issue where creating a new stock picking type resulted in an error when trying to generate a receipt. The fix disables quick creation of picking types to address a requirement for a unique sequence code, which was previously missing. This ensures smoother operation and prevents the error.
Original PR description
Currently an error occurs when user quick creates a picking type and tries to create a receipt with it. **Steps to replicate:** - Install stock. - Go to Inventory > Receipts and create a new receipt…
Currently an error occurs when user quick creates a picking type and tries to create a receipt with it. **Steps to replicate:** - Install stock. - Go to Inventory > Receipts and create a new receipt > Save it. - Clear the Operation Type field, type `test` and quick create it. - Save and the error will occur. **Error:** ``` UndefinedFunction: operator does not exist: integer = boolean LINE 1: SELECT number_next FROM ir_sequence WHERE id=false FOR UPDAT... ``` **Cause:** - As the user quick created the picking type, the `sequence_code` field was not set and it is a required field [1], when we try to get `next_number` to create the name for the current stock picking this error occurs. - In the versions before `saas-19.1` trying to quick create picking type will lead to a `Not-Null Violation` as `sequence_code` is a required field and then stock picking type form view will open up. - This error occurs only after `saas-19.1` and above versions because this [PR] made the `sequence_code` field into a related field so its required constraint was removed and hence quick create creates a new picking type. **Solution:** - Disabled quick create for stock picking type in multiple views. [1]: https://github.com/odoo/odoo/blob/fe0550ad23ff9128099e7e4994938879a971dcc8/addons/stock/views/stock_picking_type_views.xml#L93 [PR]: https://github.com/odoo/odoo/pull/190305/changes#diff-79cbc763115661182c02285c07320098510f5686700359ddee67443b4893dc30L32-R32 sentry-7203804886 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where global invoices created after a POS order at the end of the month were incorrectly displaying the following month. The fix converts POS order dates to the correct Mexican timezone to ensure accurate invoice month calculations. This ensures invoices reflect the true order date and avoids potential accounting discrepancies.
Original PR description
**PROBLEM** When creating a global invoice, with the last order being at the end of the last day of the month, the month of the global invoice will not be correct. (e.g, order made at the end of May and global invoice created for June). date_order is stored in utc. To compute the day the order was made, we need to convert to a MX timezone. **STEP TO REPRODUCE** 1. Create an pos order at the end of the last day of a month (for example, at 10PM in local MX time). 2. Create a global invoice with this order. 3. Notice the global invoice month will be the month after the one of the order. opw-6221049 Forward-Port-Of: odoo/enterprise#118170
This update resolves a previous issue where payment transaction details weren't consistently saved after payments were processed via polling. The fix ensures that all payment data, including card details, is now captured regardless of the payment method (webhook or polling), improving the reliability of payment records. This enhancement supports accurate financial reporting and reconciliation.
Original PR description
After odoo/odoo#236454, a bug was introduced where the transaction details would only be saved if the payment was resolved via webhook, not via polling. This commit fixes the issue by using the same field names in the webhook payload as is received from the polling endpoint. In addition, the card number and card brand fields are now saved too. opw-6244960 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266788 Forward-Port-Of: odoo/odoo#266629
This update resolves an issue where delivered sales orders with subsequent reimbursements (credit notes) continued to incorrectly impact customer credit limits. The fix adds a 'closed invoicing' flag to sale orders, allowing them to be excluded from credit limit calculations once invoicing is finalized, ensuring accurate credit limit tracking.
Original PR description
### Issue: When a Sale Order is delivered but later reimbursed (e.g., via a credit note without a return), it is still considered as to invoice As a result, it continues to impact the partner’s…
### Issue: When a Sale Order is delivered but later reimbursed (e.g., via a credit note without a return), it is still considered as to invoice As a result, it continues to impact the partner’s credit limit ### Cause: Sale Orders remain included in the `credit_to_invoice` computation even when invoicing is manually considered finished There was no way to exclude such orders from the credit limit calculation ### Fix: Use the `invoicing_closed` field to mark Sale Orders as fully processed When set, the order is excluded from the credit limit computation ### Steps to reproduce: - Install `sale_management` - In Settings, enable Sales Credit Limit (default: 3000) - Create, confirm, and deliver a Sale Order for a new customer (any product, price: 2000) - Duplicate the Sale Order → a credit warning is displayed - Go back to the original Sale Order and use Close Invoicing from the gear menu - Return to the duplicated Sale Order The warning disappears as the closed order is no longer included in the credit computation ### Note: For a complete business scenario, refer to the steps described in the related ticket opw-6013369
This update corrects a bug where duplicated Manufacturing Orders, created using the 'Replenish on Order' feature, incorrectly linked to the original Sales Order. The fix prevents the duplication of the Sales Order ID, ensuring that new Manufacturing Orders are independent and don't show a link to the original order. This improves data accuracy and simplifies order management.
Original PR description
Version: --------- - 19.0+ Steps to reproduce: -------------------- 1.Install modules `sale_management`, `purchase`, and `mrp`. 2. Go to Settings and enable the MTO (Replenish on Order) route. 3.…
Version:
---------
- 19.0+
Steps to reproduce:
--------------------
1.Install modules `sale_management`, `purchase`, and `mrp`.
2. Go to Settings and enable the MTO (Replenish on Order) route.
3. Create a product with:
i. Configure a Vendor under the Purchase tab.
ii. Set the route to MTO.
iii. Create a Bill of Materials for the product.
5. Create a Sale Order with the configured product and confirm it.
6. Open the generated Manufacturing Order.
7. Duplicate the Manufacturing Order.
Issue:
------
* The duplicated Manufacturing Order shows a smart button
linked with the Sale Order, which is incorrect.
Root Cause:
------------
This issue is coming form this [Commit](https://github.com/odoo/odoo/commit/2713876dbc70d3984e584a9037a2206dcda4e84a#diff-2b9de2e50ff5e1dc0362b825bac2b07623770fb3275b3257ef972f255f3ccb8b)
* During Sale Order confirmation, the flow
`action_confirm` → `_action_confirm` → `_action_launch_stock_rule`
→ `run` → `_run_pull` → `_action_confirm` calls
`_prepare_procurement_values`.
which gather all procurement values.
In sale_stock, the super call adds `sale_line_id` to the
generated Manufacturing Order when using MTO:
https://github.com/odoo/odoo/blob/0352c5e8543b75083cf555c3d5b4f164f949b465/addons/sale_stock/models/stock.py#L138-L140
* So, when the Sale Order is confirmed, the generated
Manufacturing Order contains sale_line_id, and when this
Manufacturing Order is duplicated, the sale_line_id is also
copied.
* In sale_mrp, the smart button uses sale_line_id to compute
the linked Sale Order count:
https://github.com/odoo/odoo/blob/0352c5e8543b75083cf555c3d5b4f164f949b465/addons/sale_mrp/models/mrp_production.py#L19
Solution:
-----------
* Prevent copying of sale_line_id when duplicating a
Manufacturing Order, ensuring duplicated records are not
linked to any Sale Order.
---
opw-6113149
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#259128This update resolves a crash that occurred when generating ZATCA invoices for sale orders with multiple down-payment references. The fix prevents errors caused by attempting to process reversed down-payment invoices, ensuring accurate ZATCA reporting. It prioritizes non-reversed down payments where possible, improving the reliability of invoice generation.
Original PR description
Sending the final invoice of a sale order to ZATCA crashed with `ValueError: Expected singleton: account.move(a, b)` when the sale order had multiple down-payment references. Steps to reproduce: 1.…
Sending the final invoice of a sale order to ZATCA crashed with `ValueError: Expected singleton: account.move(a, b)` when the sale order had multiple down-payment references. Steps to reproduce: 1. Configure a SA company and setup ZATCA 2. Create a sale order and confirm it 3. Deliver the product line. 3. From the sale order, create a down-payment invoice (fixed amount, e.g. 115) and post it (DP1). 4. On DP1, click "Credit Note" and choose "Full refund and new draft invoice"; validate. DP1 becomes `reversed` and a new draft down-payment DP2 is created. Post DP2. 5. From the sale order, create the final regular invoice and post it. 6. Send the final invoice to ZATCA (or generate its XML) -> `ValueError: Expected singleton: account.move(a, b)`. Root cause: _l10n_sa_get_line_prepayment_vals looks up the related down-payment move through the down-payment sale order line shared with the product line. The filter matched any out_invoice with _is_downpayment() == True, so the reversed DP1 and the active DP2 both ended up in the recordset, and reading .name raised the singleton error. Prefer non-reversed down-payment moves when available, but fall back to reversed ones if no alternative exists (e.g. when generating a credit note of the final invoice after the original down-payment was itself reversed). opw-6116265 Forward-Port-Of: odoo/odoo#264435 Forward-Port-Of: odoo/odoo#259384
This update resolves an issue where the text color button in the HTML editor wasn't correctly reflecting the selected color from the color picker. The fix ensures the button's active state is consistently synchronized with the color picker, providing a smoother and more reliable user experience when editing text formatting.
Original PR description
Problem: The state of the text color button is not synchronized with the color picker state. When the picker is open, the button is sometimes not shown as active. Cause: The `.active` class depends on `colorPicker.isOpen`, which does not trigger a rerender when updated. As a result, Owl does not refresh the button state when the picker opens or closes. Solution: Use a component state for the picker visibility and update it through `onOpen` and `onClose` callbacks so Owl rerenders and properly adds or removes the `active` class. Steps to reproduce: - Select some text and expand the toolbar. - Click the text color button to open the color picker. - Observe that the text color button is not active. - Click on the "Custom" tab in the color picker. - Observe that the text color button becomes active. task-6205286 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263754
This update fixes an issue where purchase bills were created in the company's default currency, regardless of the original purchase order's currency. Now, bills automatically inherit the currency of the purchase order, ensuring accurate financial reporting and reducing potential discrepancies. This improves the reliability of our accounting processes.
Original PR description
**Steps to reproduce:** - create a storable product - confirm a PO in another currency than the main for this product - click on the "bill matching" smart button - select only the purchase order line from your PO - click on match **Current behavior:** this creates on Bill in the main currency **Expected behavior:** the currency should be inherited from the POL **Cause of the issue:** Inside action_match_lines() if there is no amls selected we call _action_create_bill_from_po_lines(). https://github.com/odoo/odoo/blob/e3b0ca11d99b2ef819cdad68b169112cd73668b6/addons/purchase/models/purchase_bill_line_match.py#L157 Inside this method, there's currently no mechanism to take the currency from the POL when we create the bill. **fix:** If multiple different other currencies we take the main currency of the company opw-6131314 Forward-Port-Of: odoo/odoo#266013
This update resolves a technical problem related to how Odoo handles PDF compression. The issue was caused by missing code and has now been reintroduced to ensure proper functionality. This fix improves the reliability of PDF processing within Odoo.
Original PR description
This [FW PR] was missing a few diffs, including the compatibility layer with pypdf. This commit re-introduces those diffs. FW PR: https://github.com/odoo/odoo/pull/266192 runbot-937761
This update resolves a technical issue related to compression within the Odoo tools. The previous fix was incomplete, and this commit reintroduces the necessary changes to ensure proper functionality. This ensures the tools continue to operate correctly.
Original PR description
This [FW PR] was missing a few diffs, including the compatibility layer with pypdf. This commit re-introduces those diffs. FW PR: https://github.com/odoo/odoo/pull/266192 runbot-937761
This update corrects a bug in the overtime calculation process. Previously, overlapping overtime rules were incorrectly combined, leading to inaccurate overtime intervals. This fix ensures accurate overtime calculations by preserving original rule boundaries until the final overlap resolution step.
Original PR description
**Issue:** When computing timing overtime rules, overlapping intervals from different rules were accidentally merged before the overlap resolution step. As a result, the overlap generation logic no longer had access to the original rule boundaries and could not correctly create the final overtime intervals. **Solution:** Keep the original intervals from each rule untouched until the final overlap resolution step so overlaps can be properly sliced and resolved when generating the final overtime intervals. Task: 6168492 Forward-Port-Of: odoo/odoo#266096
This update fixes a potential issue where users could incorrectly select inactive Intrastat codes when configuring products. The system now displays a warning message to the user if they attempt to select an invalid code, ensuring data accuracy and preventing errors in reporting. This improves data integrity and reduces the risk of incorrect reporting.
Original PR description
Problem: When choosing an intrastat code on a product, all the codes are shown, even the ones that are expired or not yet active. Users can select an intrastat code that is not active. Steps to reproduce: 1. Check the intrastat code list and find a code with a start date in the future or an expiry date in the past 2. Note the code description 3. Open a product form view and try to set/change the intrastat code 4. Search for the code description noted in step 2 5. Note that the code is proposed while it should not be proposed Solution: When an intrastat code is selected, if the code is not active, a warning message is shown to the user. opw-6217915 Forward-Port-Of: odoo/enterprise#118569 Forward-Port-Of: odoo/enterprise#117884
This update prevents a frustrating 'Invalid Operation' error during bill matching when no new purchase order lines need to be added. Previously, Odoo would attempt to update a bill, even with zero residual lines, causing a block in the process. Now, the system correctly skips the update if no new lines are required, ensuring smooth bill matching.
Original PR description
**Description of the issue/feature this PR addresses:** This PR fixes an "Invalid Operation" UserError during the Bill Matching process. The error occurs when Odoo attempts to call the line addition…
**Description of the issue/feature this PR addresses:** This PR fixes an "Invalid Operation" UserError during the Bill Matching process. The error occurs when Odoo attempts to call the line addition method on a Posted Vendor Bill, even when there are no new residual lines to add. This triggers a write attempt on read-only fields (such as invoice_line_ids) of a validated account move, which is prohibited by Odoo’s ORM. Furthermore, this addresses a functional inconsistency: Odoo allows users to select "Posted" bills in the matching view, but the underlying code is not prepared to handle a "zero residual" scenario on a validated move. If Odoo intends to prevent matching on posted bills, they should be filtered out from the view; since they are available to select, the system must be able to process them when no further modifications to the accounting entries are required. **Current behavior before PR:** When performing a match between a posted Vendor Bill and Purchase Order lines where the "residual" (lines left to add) is zero: The system executes _add_purchase_order_lines() regardless of whether the recordset of lines is empty. Odoo's ORM detects an update attempt on a posted record. A UserError is raised: "You cannot modify the following readonly fields on a posted move: invoice_line_ids". This blocks the user from completing the matching process even if the lines are already technically accounted for. **Desired behavior after PR is merged:** The system will check if residual_purchase_order_lines contains any records before attempting to update the bill. If there are no lines to add, the method call is skipped. The matching process completes successfully without attempting an illegal write on a posted move. **Steps to Reproduce** 1) Create a Purchase Order (PO): Add a product (e.g., "Acoustic Bloc Screens") and confirm the order. 2) Create a Vendor Bill manually: Do not use the "Create Bill" button from the PO. Instead, go to Accounting -> Vendors -> Bills and create a new bill for the same vendor and product. 3) Post the Bill: Set a bill date and click Confirm to move it to the "Posted" state. 4) Open Bill Matching: Go back to the Purchase Order and click the Bill Matching button (or navigate to the matching view). 5) Select Lines: Select the PO line and the corresponding Bill line (which are already equal in quantity/price). 6) Trigger the Match: Click on the Match button. Observe Error: An "Invalid Operation" popup appears, preventing the link because Odoo tries to "add" zero lines to a posted invoice. **Video:** https://drive.google.com/file/d/12aeZIx1JRRSKA9TaWfXy0TeSOgMUMQcg/view --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#241171
This update fixes a recent change that removed the ability to use checklists within email messages. The checklist functionality has been re-enabled, ensuring users can now format their emails with bulleted lists, improving the clarity and flexibility of email communications. This ensures consistent formatting across all outgoing emails.
Original PR description
Purpose: - The checklist command was removed from the activity html field. This change re-enables the checklist command for the activity html field. - When sending mail, convert checklist into a normal list. task-6144663 Forward-Port-Of: odoo/odoo#263287
3 changes
Resolved issues and error corrections
This update fixes an issue where global invoices created after a POS order at the end of the month were incorrectly displaying the following month. The system now accurately converts POS order dates to the correct Mexican timezone to ensure accurate invoice month calculations. This prevents discrepancies in reporting and invoicing for Mexican businesses using the POS module.
Original PR description
**PROBLEM** When creating a global invoice, with the last order being at the end of the last day of the month, the month of the global invoice will not be correct. (e.g, order made at the end of May and global invoice created for June). date_order is stored in utc. To compute the day the order was made, we need to convert to a MX timezone. **STEP TO REPRODUCE** 1. Create an pos order at the end of the last day of a month (for example, at 10PM in local MX time). 2. Create a global invoice with this order. 3. Notice the global invoice month will be the month after the one of the order. opw-6221049 Forward-Port-Of: odoo/enterprise#118170
This update fixes an issue where commission plans were incorrectly listed in the 'Other Plans' section for salespeople, even when their assignment periods didn't overlap. The system now accurately checks if salesperson assignment dates intersect with plan effective dates, ensuring only relevant plans are displayed. This improves the accuracy of sales reporting and commission calculations.
Original PR description
Version - 18.0 Steps to reproduce: 1. Create a commission plan A with effective period 2025–2026 2. Assign salesperson to plan A from 01/01/2025 to 31/12/2025 3. Create another commission plan B with effective period 2026 4. Assign the same salesperson to plan B from 01/01/2026 to 31/12/2026 5. Open plan B and check the 'Other Plans' section in the salespeople tab Issue: Plans are shown in 'Other Plans' even when salesperson assignment periods do not overlap. System incorrectly relies on plan effective dates instead of salesperson-specific assignment dates Fix: A plan is now considered overlapping only if the salesperson assignment periods intersect. Non-overlapping plans are properly excluded from 'Other Plans'. Taskid-6055253 Forward-Port-Of: odoo/enterprise#118559 Forward-Port-Of: odoo/enterprise#112694
This update fixes a technical issue that caused a traceback when attempting to mark workorders as done in certain scenarios, specifically when no workorders were open. The fix ensures the system handles empty recordsets gracefully, preventing errors and maintaining stability.
Original PR description
When calling on a empty recordset action_mark_as_done, it creates a traceback. **Observation** When calling action_mark_as_done, the method first loops over each workorder to perform various safety…
When calling on a empty recordset action_mark_as_done, it creates a traceback. **Observation** When calling action_mark_as_done, the method first loops over each workorder to perform various safety checks, and then calls button_finish to close all workorders: https://github.com/odoo/enterprise/blob/24008b550c5e7cf04cde2028c40f8a32d5b0e504/mrp_workorder/models/mrp_workorder.py#L881-L888 Inside button_finish, it retrieves all open workorders and marks them as done: - Retrieve open workorders: https://github.com/odoo/odoo/blob/36a1c6300f52f408b6af3f769e26686e07810e5a/addons/mrp/models/mrp_workorder.py#L659 - mark them as done: https://github.com/odoo/odoo/blob/36a1c6300f52f408b6af3f769e26686e07810e5a/addons/mrp/models/mrp_workorder.py#L675-L678 Returning to action_mark_as_done, it attempts to set the state to 'done' on the last workorder outside of the loop, referencing the loop variable: https://github.com/odoo/enterprise/blob/24008b550c5e7cf04cde2028c40f8a32d5b0e504/mrp_workorder/models/mrp_workorder.py#L894 -> If self is empty, the loop never executes. This leaves the loop variable empty, which ultimately triggers a traceback. opw-6239910 Forward-Port-Of: odoo/enterprise#118403
9 changes
Resolved issues and error corrections
This update fixes an issue where the pension fund tax was incorrectly applied to all invoice lines with the same VAT rate, leading to inaccurate accounting. The fix now correctly extracts the tax exemption reason from the XML data to ensure the pension fund tax is applied accurately to the first invoice line.
Original PR description
In `l10n_it_edi` vendor bill import, the pension fund tax was incorrectly applied to all invoice lines sharing the same VAT rate, even though they have different `l10n_it_tax_exemption_reason`s, resulting in wrong entries and document total. We now extract the Tax Exemption reason from the `DatiCassaPrevidenziale` node, and use it to search the correct tax. Steps to reproduce: 1. Install `account` and `l10n_edi_it` 2. In the `4% INPS` tax, set `TC22` in pension fund type and `N2.2` in exoneration 3. Import bill from the ticket 4. See the pension fund tax is applied to all the lines. It should only be applied only to the first one. Ticket [link](https://www.odoo.com/odoo/project.task/6212975) opw-6212975 Forward-Port-Of: odoo/odoo#265821
This update fixes an issue where payments for Mexican invoices were being sent to CFDI multiple times, leading to inaccurate reporting. The fix ensures the 'Update Payments' button only appears after the invoice payment is fully reconciled, preventing duplicate submissions and maintaining accurate financial records.
Original PR description
Issue: Sending payments to SAT before its full amount is reconciled allow sending the same invoice payment several times to CFDI. Steps to reproduce: - In a Mexican company - Create an invoice A of…
Issue: Sending payments to SAT before its full amount is reconciled allow sending the same invoice payment several times to CFDI. Steps to reproduce: - In a Mexican company - Create an invoice A of $40 to Inmobiliaria CVA - Confirm and send to CFDI - Go to bank, create a new Bank transaction of $80 - reconcile with Invoice A - Go to invoice A => click on button "Update payments" (it doesn't appear in previous versions) - Then sheet CFDI and Download There is the first XML sent to CFDI with payment for invoice A - Create an invoice B of $40 to Inmobilira CVA - Confirm and send to CFDI - reconcile the transaction with Invoice B - Go to invoice B - Click on button "Update payments" - Then sheet CFDI and Download There is the second XML sent to CFDI with payment for invoices A and B Invoice A payment was sent twice to CFDI Expected behavior: - The "Update payment" button should appear only once the invoice payment is fully reconciled. Current behavior: - The update payment button appear once the invoice is reconciled with a payment. The method `_l10n_mx_edi_cfdi_invoice_get_payments_diff` is called twice, once to check whether it's needed to display the "Update button" and once when you try to update the payment (called only after clicking on said button). opw-5432421
This update resolves an issue where Odoo failed to import simplified Italian electronic invoices (TD08) when a line consisted entirely of taxes. The fix prevents a division-by-zero error, ensuring that valid tax-only EDI documents from the Italian tax authority (Agenzia delle Entrate) can now be successfully imported. This improves the reliability of invoice processing for Italian businesses.
Original PR description
### Issue before this commit: Importing a simplified Italian electronic invoice or credit note (e.g., TD08) fails with a float division by 0 traceback if a document line consists entirely of taxes…
### Issue before this commit: Importing a simplified Italian electronic invoice or credit note (e.g., TD08) fails with a float division by 0 traceback if a document line consists entirely of taxes (where the total line amount equals the tax amount). ### Steps to reproduce the issue: 1. Download Accounting and l10n_it 2. Switch to IT company 3. Go to Vendors > Refunds 4. Try to import the xml from the ticket ### Cause of the issue: The XML parser attempts to dynamically calculate the tax percentage using the formula tax_amount / (amount - tax_amount). When a line is purely a tax adjustment, the taxable base (amount - tax_amount) evaluates to exactly zero, triggering the critical division by zero crash. https://github.com/odoo/odoo/blob/e3b0ca11d99b2ef819cdad68b169112cd73668b6/addons/l10n_it_edi/models/account_move.py#L1863-L1867 ### Reason to introduce the fix: To ensure Odoo successfully imports valid, tax-only EDI documents already accepted by the Agenzia delle Entrate. Ticket [link](https://www.odoo.com/odoo/project.task/6217373) opw-6217373 Forward-Port-Of: odoo/odoo#266930 Forward-Port-Of: odoo/odoo#266374
This update fixes an issue where global invoices created after a POS order at the end of the month were incorrectly displaying the following month. The system now accurately converts POS order dates to the correct Mexican timezone, ensuring invoices reflect the order's true date and preventing month discrepancies.
Original PR description
**PROBLEM** When creating a global invoice, with the last order being at the end of the last day of the month, the month of the global invoice will not be correct. (e.g, order made at the end of May and global invoice created for June). date_order is stored in utc. To compute the day the order was made, we need to convert to a MX timezone. **STEP TO REPRODUCE** 1. Create an pos order at the end of the last day of a month (for example, at 10PM in local MX time). 2. Create a global invoice with this order. 3. Notice the global invoice month will be the month after the one of the order. opw-6221049 Forward-Port-Of: odoo/enterprise#118170
This update fixes an issue where commission plans were incorrectly shown in a salesperson's 'Other Plans' list even when their assignment periods didn't overlap. The system now accurately checks for overlapping assignment dates, ensuring that only relevant plans are displayed, improving the accuracy of commission reporting.
Original PR description
Version - 18.0 Steps to reproduce: 1. Create a commission plan A with effective period 2025–2026 2. Assign salesperson to plan A from 01/01/2025 to 31/12/2025 3. Create another commission plan B with effective period 2026 4. Assign the same salesperson to plan B from 01/01/2026 to 31/12/2026 5. Open plan B and check the 'Other Plans' section in the salespeople tab Issue: Plans are shown in 'Other Plans' even when salesperson assignment periods do not overlap. System incorrectly relies on plan effective dates instead of salesperson-specific assignment dates Fix: A plan is now considered overlapping only if the salesperson assignment periods intersect. Non-overlapping plans are properly excluded from 'Other Plans'. Taskid-6055253 Forward-Port-Of: odoo/enterprise#118559 Forward-Port-Of: odoo/enterprise#112694
This update resolves an issue where Odoo Enterprise would generate a traceback when attempting to mark workorders as done in scenarios with no open workorders. The fix ensures the system handles empty recordsets gracefully, preventing errors and maintaining stability.
Original PR description
When calling on a empty recordset action_mark_as_done, it creates a traceback. **Observation** When calling action_mark_as_done, the method first loops over each workorder to perform various safety…
When calling on a empty recordset action_mark_as_done, it creates a traceback. **Observation** When calling action_mark_as_done, the method first loops over each workorder to perform various safety checks, and then calls button_finish to close all workorders: https://github.com/odoo/enterprise/blob/24008b550c5e7cf04cde2028c40f8a32d5b0e504/mrp_workorder/models/mrp_workorder.py#L881-L888 Inside button_finish, it retrieves all open workorders and marks them as done: - Retrieve open workorders: https://github.com/odoo/odoo/blob/36a1c6300f52f408b6af3f769e26686e07810e5a/addons/mrp/models/mrp_workorder.py#L659 - mark them as done: https://github.com/odoo/odoo/blob/36a1c6300f52f408b6af3f769e26686e07810e5a/addons/mrp/models/mrp_workorder.py#L675-L678 Returning to action_mark_as_done, it attempts to set the state to 'done' on the last workorder outside of the loop, referencing the loop variable: https://github.com/odoo/enterprise/blob/24008b550c5e7cf04cde2028c40f8a32d5b0e504/mrp_workorder/models/mrp_workorder.py#L894 -> If self is empty, the loop never executes. This leaves the loop variable empty, which ultimately triggers a traceback. opw-6239910 Forward-Port-Of: odoo/enterprise#118403
This update ensures that General Ledger exports accurately reflect search filters applied in the user interface. Previously, the export didn't consistently include all accounts matching the search criteria due to a difference in how the UI and backend search functions were implemented. This change aligns the export with the standard account search behavior, providing more reliable reporting.
Original PR description
When applying a search filter in the General Ledger, the lines displayed in the UI differ from the ones exported. The discrepancy comes from the fact that the UI search bar filters lines using a simple "contains" logic on the displayed line name, while the backend export relies on the account model’s `_name_search` behavior, just as in the chart of accounts. For example, searching for "40" displays the accounts 400000, 400010, and 124000 but the last one (124000) is not is in the export results. task: 5917435 Forward-Port-Of: odoo/enterprise#117002 Forward-Port-Of: odoo/enterprise#107928
This update prevents a critical error during bill matching in Odoo when no new purchase order lines need to be added. Previously, attempting to match a 'Posted' bill with zero residual lines would trigger a system error. Now, the system correctly handles this scenario, ensuring smooth bill matching and preventing data inconsistencies.
Original PR description
**Description of the issue/feature this PR addresses:** This PR fixes an "Invalid Operation" UserError during the Bill Matching process. The error occurs when Odoo attempts to call the line addition…
**Description of the issue/feature this PR addresses:** This PR fixes an "Invalid Operation" UserError during the Bill Matching process. The error occurs when Odoo attempts to call the line addition method on a Posted Vendor Bill, even when there are no new residual lines to add. This triggers a write attempt on read-only fields (such as invoice_line_ids) of a validated account move, which is prohibited by Odoo’s ORM. Furthermore, this addresses a functional inconsistency: Odoo allows users to select "Posted" bills in the matching view, but the underlying code is not prepared to handle a "zero residual" scenario on a validated move. If Odoo intends to prevent matching on posted bills, they should be filtered out from the view; since they are available to select, the system must be able to process them when no further modifications to the accounting entries are required. **Current behavior before PR:** When performing a match between a posted Vendor Bill and Purchase Order lines where the "residual" (lines left to add) is zero: The system executes _add_purchase_order_lines() regardless of whether the recordset of lines is empty. Odoo's ORM detects an update attempt on a posted record. A UserError is raised: "You cannot modify the following readonly fields on a posted move: invoice_line_ids". This blocks the user from completing the matching process even if the lines are already technically accounted for. **Desired behavior after PR is merged:** The system will check if residual_purchase_order_lines contains any records before attempting to update the bill. If there are no lines to add, the method call is skipped. The matching process completes successfully without attempting an illegal write on a posted move. **Steps to Reproduce** 1) Create a Purchase Order (PO): Add a product (e.g., "Acoustic Bloc Screens") and confirm the order. 2) Create a Vendor Bill manually: Do not use the "Create Bill" button from the PO. Instead, go to Accounting -> Vendors -> Bills and create a new bill for the same vendor and product. 3) Post the Bill: Set a bill date and click Confirm to move it to the "Posted" state. 4) Open Bill Matching: Go back to the Purchase Order and click the Bill Matching button (or navigate to the matching view). 5) Select Lines: Select the PO line and the corresponding Bill line (which are already equal in quantity/price). 6) Trigger the Match: Click on the Match button. Observe Error: An "Invalid Operation" popup appears, preventing the link because Odoo tries to "add" zero lines to a posted invoice. **Video:** https://drive.google.com/file/d/12aeZIx1JRRSKA9TaWfXy0TeSOgMUMQcg/view --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#241171
This update resolves a bug where formatting applied to inline code selections (like bold or italics) couldn't be consistently removed. The fix ensures that formatting nodes are correctly considered when checking for existing formatting, leading to accurate removal of applied styles. This improves the user experience when working with inline code within the To-Do module.
Original PR description
Problem: When selecting text containing `o_inline_code` and applying formatting such as bold, italic, or underline, the formatting cannot be removed. Cause: When applying formatting, nodes matching…
Problem: When selecting text containing `o_inline_code` and applying formatting such as bold, italic, or underline, the formatting cannot be removed. Cause: When applying formatting, nodes matching `is_formattable_node_predicates` are ignored. However, when checking whether the selection is already formatted, those nodes are not ignored, so the selection is erroneously considered to be only partially formatted. Solution: Take `is_formattable_node_predicates` into account when checking whether a selection is formatted. Steps to reproduce: - Go to To-Do → Create New. - Type some text and add inline code on the same line. - Select all content using Ctrl + A. - Apply formatting such as bold, italic, or underline using keyboard shortcuts (Ctrl + B / Ctrl + I / Ctrl + U). - Press the same shortcut again to remove the formatting. - Observe that the formatting is not removed. task-6229228 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265183
2 changes
Resolved issues and error corrections
This update resolves a critical issue causing OOM crashes when generating the Swedish SIE 4 report with large datasets. By optimizing the database query and leveraging efficient data processing techniques, the report now executes much faster and with significantly reduced memory usage, ensuring reliable performance for users.
Original PR description
### Description of the issue/feature this PR addresses: Prevent Out of Memory (OOM) crashes and drastically improve execution speed when generating the Swedish SIE4 verification export for massive…
### Description of the issue/feature this PR addresses: Prevent Out of Memory (OOM) crashes and drastically improve execution speed when generating the Swedish SIE4 verification export for massive datasets. ### Current behavior before PR: When exporting a large volume of journal entries (e.g., 190,000+ account moves), the `_export_l10n_se_sie4_verification` method relies on iterating through heavy ORM recordsets and accessing relational child fields (move.line_ids) inside a loop. This triggers a severe N+1 query problem, maxing out server RAM and causing an OOM crash. ### Desired behavior after PR is merged: The method now utilizes a hybrid data extraction approach: - The ORM is used strictly to safely evaluate domains (multi-company rules, dates, states) and fetch a lightweight list of valid move_ids. - A single SQL query with JOIN statements fetches all parent moves, child lines, and account codes in exactly one database query. - itertools.groupby chunks the flat, lightweight dictionary results back into their respective journal entries. The export now handles massive datasets in seconds with minimal memory overhead, while remaining perfectly secure. ### Benchmark: For Memory: | # Input Data | Before PR | After PR | | -------- | -------- | -------- | | ~190,000 moves | MemoryError | 407MB| | ~200,000 moves | 1.8GB | 174.8 MB| For Speed: | # Input Data | Before PR | After PR | | -------- | -------- | -------- | | ~190,000 moves | MemoryError | 5.10s | | ~200,000 moves | 1m29s| 5.3s| ### Reference: opw-6067999 Forward-Port-Of: odoo/enterprise#117577 Forward-Port-Of: odoo/enterprise#113227
This update fixes an issue where global invoices created after a POS order at the end of the month were incorrectly displaying the following month. The system now accurately converts POS order dates to the correct Mexican timezone, ensuring invoices reflect the actual order date and preventing month discrepancies.
Original PR description
**PROBLEM** When creating a global invoice, with the last order being at the end of the last day of the month, the month of the global invoice will not be correct. (e.g, order made at the end of May and global invoice created for June). date_order is stored in utc. To compute the day the order was made, we need to convert to a MX timezone. **STEP TO REPRODUCE** 1. Create an pos order at the end of the last day of a month (for example, at 10PM in local MX time). 2. Create a global invoice with this order. 3. Notice the global invoice month will be the month after the one of the order. opw-6221049 Forward-Port-Of: odoo/enterprise#118170
36 changes
Resolved issues and error corrections
This update fixes a technical issue that caused an error when a contract's start date was left blank. The fix automatically uses today's date in these situations, ensuring calculations and reporting functions work correctly. This prevents unexpected errors and maintains data integrity.
Original PR description
Version: - saas-19.4 Steps to reproduce: - Generate an offer - Empty the contract_start_date field - Click away to change the focus so that computations are triggered - You should get a traceback Issue: - When empty contract start date occure error. Cause: - When contract_start_date is empty, it returns False instead of a date. This causes max() to fail as it cannot compare a boolean with a date. Fix: - Added a fallback to use today's date when contract_start_date is empty, so max() always receives valid date values. Task-6235072
This update addresses broken templates within the social module following the recent owl3 migration. The migration caused several visual issues and inconsistencies in the social feed display. This fix restores the correct functionality and appearance of the social templates.
Original PR description
Bug === Since the owl3 migration, a lot of templates are broken in social. Task-6241607
This update fixes an issue where a key system call was incorrectly placed within the wrong module. The call is now correctly routed to the `pos_restaurant_preparation_display` module, ensuring proper functionality for preparation display within the restaurant point-of-sale system. This resolves a technical error impacting the display of preparation details.
Original PR description
Issue: The implementation of the call fire course for the preparation display, was done in the wrong module pos_restaurant. Fix: The call is now done in the right module pos_restaurant_preparation_display. rb-error-939014
This update resolves a minor technical issue where a file name was incorrectly spelled ('fitlers' instead of 'filters'). This change ensures proper functionality within the Spreadsheet Edition module and avoids potential errors. The fix was implemented as part of a larger task to improve code quality.
Original PR description
File were named `fitlers` instead of `filters`. Task: [6246338](https://www.odoo.com/web#id=6246338&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form)
This update fixes a problem where tax predictions were incorrectly blocking useful suggestions on invoices. Now, predictions only run when a new description is entered, ensuring accurate suggestions. Additionally, the prediction logic has been simplified and consolidated for better performance and easier future updates.
Original PR description
The confidence threshold (requiring a 10% ranking advantage to confirm a prediction) was a poor proxy for its actual goal: avoiding unwanted overwrites of values the user had already set. It blocked…
The confidence threshold (requiring a 10% ranking advantage to confirm a prediction) was a poor proxy for its actual goal: avoiding unwanted overwrites of values the user had already set. It blocked helpful predictions in ambiguous cases while still allowing unwanted ones. Replace it with a direct check: disable prediction entirely when the line already carried a label before the current edit. This is implemented by overriding `onchange` to inspect the pending form values and inject a context key before `_onchange_name_predictive` fires. Predictions now only run on a blank slate — the first time a description is typed — which is exactly when they are useful. The "anything is better than nothing" philosophy then applies freely, without needing an artificial threshold. At the same time, consolidate all field predictions (account, taxes, product, deductible amount) into a single SQL query via a `_predictive_field_getter` registry, making the feature cheaper to run and straightforward to extend. Note: the previous implementation seeded account predictions with account names from the chart of accounts, improving cold-start accuracy for partners with no history. This is dropped as a trade-off for the simpler design. task-6138749
This update fixes a performance issue that slowed down Odoo's rendering, particularly when viewing large reports or navigating complex tables. By simplifying the CSS rules, the system now recalculates styles faster, leading to a smoother user experience and quicker response times.
Original PR description
Avoid using `:has` selector with using a class on body to replace the has behavior. This change made a gain of in the `(re)calculate style` step when we hover a node on large table like a `report selector` on `Accounting`. The recalculation time during actions like window resize, heavy scrolling, or table sorting. Replacing it with using the specific class reduces those global checks and improves rendering performance. Forward-Port-Of: odoo/enterprise#118464 Forward-Port-Of: odoo/enterprise#118362
This update corrects a flaw in the FAIA report generation where a supplier's ID was incorrectly linked to a customer record. This issue arose due to differing criteria used to determine customer vs. supplier status within the accounting system. The fix ensures the FAIA report accurately reflects supplier relationships as defined by the company's financial data.
Original PR description
## Steps to reproduce: 1. Install `l10n_lu_reports`, swap to the LU company 2. Look at the partner Azure Interior. 1. They have no open balances on `asset_receivable` or `liability_payable` accounts.…
## Steps to reproduce:
1. Install `l10n_lu_reports`, swap to the LU company
2. Look at the partner Azure Interior.
1. They have no open balances on `asset_receivable` or `liability_payable` accounts.
2. Their `supplier_count` is higher than their `customer_count`.
3. Navigate to Accounting > Reporting > General Ledger.
4. Select the 2026 fiscal year.
5. Select gear > FAIA report.
6. Open the downloaded file. Notice:
1. Azure Interior is listed under /MasterFiles/Customers/Customer.
2. There are no /MasterFiles/Suppliers.
3. Azure Interior's ID (14 in this case) is referenced in a /SupplierID section.
7. Take a gander at the official XSD for LU [1]. The SupplierID must match an element in /MasterFiles/Suppliers.
Video: [2]
## Explanation
This is one of several errors found with the FAIA export. See PR #113316 for more.
It's possible to have a /SupplierID listed on a /Transaction/Line element but not have a /Suppliers/Supplier element that it refers to. This is not valid according to the FAIA report's schema [1].
This happens because /Transaction/Line and /MasterFiles use different criteria to determine if a partner is a Customer or a Supplier.
The element /Transaction/Line [3] determines this from the `partner_vals['type']` value [4]. This value is 'customer' or 'supplier' and is determined by comparing the ResPartner fields `customer_rank` and `supplier_rank`. In case of a tie, the partner is assigned as a 'supplier'.
The element /MasterFiles allows a partner to be both a Customer and a Supplier via `partner_vals['types']` [5]. Partners with an open `asset_receivable` balance at the start or end of the reporting period are listed as Customers [6]. Likewise, partners with an open `liability_payable` balance are listed as Suppliers [7]. If there are no open balances, partners are put in the Customer list by default.
The XSD validation error will not show up in a standard Runbot database because the namespace for the XSD is incorrect. If you manually fix the XSD namespace (`xmlns:doc` instead of `xmlns`) and use xmllint to check a generated XML against the XSD, it will raise the following error.
> No match found for key-sequence ['14'] of keyref 'RefGLTransactionLineSupplier'. Downloads/general_ledger (5).xml fails to validate
[1] https://pfi.public.lu/dam-assets/backup/FAIA/FAIA/XSD_Files.zip. I will note that there are three XSDs. Version A has a different namespace and appears to be more restrictive. The "full" XSD document does not raise these errors.
[2] https://drive.google.com/file/d/1xeULpCcGgZk-kYcCjBTKxcfv4ICYRzaB/view?usp=sharing
[3] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L244-L248
[4] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/models/account_general_ledger.py#L299
[5] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/models/account_general_ledger.py#L303-L309
[6] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L153
[7] https://github.com/odoo/enterprise/blob/434d88960abb5e424fdc1106fc93935d328bff78/account_saft/data/saft_report.xml#L173
opw-6107107
Forward-Port-Of: odoo/enterprise#117799This update corrects a bug where certain quality control test types were incorrectly displayed during work order creation. The change ensures that these test types are only available for manufacturing operations, improving data accuracy and preventing users from selecting inappropriate options. This resolves an issue caused by an optimization in Odoo's domain filtering.
Original PR description
### Issue: The `Print Label`, `Register Production`, `Register By-products`and `Register Consumed Materials` are all available in the test types at control point creation. ### Expected behavior:…
### Issue:
The `Print Label`, `Register Production`, `Register By-products`and `Register Consumed Materials` are all available in the test types at control point creation.
### Expected behavior:
These test types are only meant for manufacturing operations and are supposed to be hidden by the field domain:
https://github.com/odoo/enterprise/blob/f56aa85b4ad32c5d9ad5593df1366d72e88da0e4/mrp_workorder/models/quality.py#L102-L104 https://github.com/odoo/enterprise/blob/00d6cccd75c402378698a6fd11ee2692f2361c7f/mrp_workorder/models/quality.py#L20-L24
### Cause of the issue:
Since saas-18.1: 5ef007a2116e528b796ebe80fb291ba5f1a94c8f domains are optimised into equivalents SQL clause with better sql performances. This optimization results in the following match for boolean fields:
`('field', '=', True)` -> `('field', 'in', OrderedSet([True]))`
`('field', '=', False)` -> `('field', ' not in', OrderedSet([True]))`
Because of these:
https://github.com/odoo/odoo/blob/82b16e8feb3d60a9a3855e3adb3164ae5a6c041d/odoo/orm/domains.py#L1058-L1079 https://github.com/odoo/odoo/blob/82b16e8feb3d60a9a3855e3adb3164ae5a6c041d/odoo/orm/domains.py#L1215-L1236
Now the issue is that the specific `search_method` of the `allow_registration` field is then called with this optimized domain: https://github.com/odoo/odoo/blob/82b16e8feb3d60a9a3855e3adb3164ae5a6c041d/odoo/orm/domains.py#L860-L866 https://github.com/odoo/enterprise/blob/00d6cccd75c402378698a6fd11ee2692f2361c7f/mrp_workorder/models/quality.py#L20-L24
And since `value` is defined as a non empty ordered set in both cases it the search method returns a True leaf as search domain.
opw-5915197
Forward-Port-Of: odoo/enterprise#118212
Forward-Port-Of: odoo/enterprise#117068This update optimizes how the system tracks subscription usage, leading to faster reporting and a smoother experience for users managing subscriptions. The change addresses a performance issue related to query counts, ensuring the system remains responsive even with a large number of subscriptions. This improves overall efficiency for sales and subscription management.
Original PR description
runbot-163667 Forward-Port-Of: odoo/enterprise#117266
This update resolves an issue where setting Intrastat fields on product templates without associated products would trigger an error. The fix ensures that the system correctly handles product templates without variants, preventing unexpected errors and improving data integrity. This ensures accurate Intrastat reporting.
Original PR description
Problem: The Intrastat fields on product.template are computed without being stored. They are stored in product.product and the same values are used when computing the values on product.template. When trying to set the Intrastat fields on a product template without any product, an RPC error is raised without specifying the reason. Steps to reproduce: 1. Create a new product (product.template) 2. Add an attribute to the product with Variant Creation set to Dynamic, this will set no product variants (product.product) for the product template. 3. Try to set the Intrastat Commodity Code on the product template 4. Save the product template 5. Notice the RPC error raised without any explanation opw-6179705 Forward-Port-Of: odoo/enterprise#117856
This update corrects a rounding error that previously caused the withholding base amount on invoices to exceed the total invoice amount. The fix ensures accurate calculations by limiting the withholding base amount to prevent over-reporting. This improves invoice accuracy and compliance.
Original PR description
**PROBLEM** In some case, because of rounding issues, the withholding base amount can be bigger than the total amount of the invoice, which should not be the case. **STEP TO REPRODUCE** 1. Install…
**PROBLEM** In some case, because of rounding issues, the withholding base amount can be bigger than the total amount of the invoice, which should not be the case. **STEP TO REPRODUCE** 1. Install l10n_pe_edi 2. Create an invoice with those 2 lines: qty: 300, unit_price: 0.481936, tax: VAT 18% + 3% IGV Withholding qty: 300, unit_price: 0.747376, tax: VAT 18% + 3% IGV Withholding 3. Confirm the invoice, and send the xml (if this fail, you may have to change the name of the invoice, using odoo inspector or other means). 4. Open the xml, and notice the base amount for the allowance on the document level is 435.18 which is bigger than the invoice payable amount. **CAUSE** We exclude the withholding taxes to compute the invoice taxInclusiveAmount. When computing this amount, we round the line base and the tax total of the VAT 18% tax leading to the result of 435.17. When creating the allowance node for the Withholding taxes, the base used for the withholding taxes is the sum of the line base, and the tax total of previous tax NOT rounded. There is no easy way to change the withholding tax computation, so we just limit the base to not be bigger than the invoice total when there is rounding issues. opw-6010388 Forward-Port-Of: odoo/enterprise#113689
This update fixes a bug that prevented accurate IT tax closing validation, particularly when dealing with quarterly reporting across year boundaries. The changes ensure correct handling of debit/credit reporting and prevent system errors, leading to more reliable tax calculations.
Original PR description
Description of the issue this commit addresses: The IT tax closing validation compared month numbers only, which broke across year boundaries and could reject valid quarterly progressions. It also assumed a balance column existed in monthly VAT report lines, but this report uses debit/credit columns, which could trigger a traceback. --- Desired behavior after this commit is merged: This commit computes the period gap with year-aware month deltas and aligns the allowed gap with periodicity (monthly or quarterly). It also checks VP lines using balance when present, or debit/credit as fallback, preventing crashes and ensuring consistent tax closing validation. --- opw-6131080 Forward-Port-Of: odoo/enterprise#118450 Forward-Port-Of: odoo/enterprise#117428
This update replaces the term 'VAT' with 'Tax ID' across Odoo Enterprise, addressing a previous incomplete change. This ensures clarity and accuracy when handling tax information for users in the US and other countries where 'VAT' is not commonly understood, improving data consistency.
Original PR description
Similar changes were made before but were incomplete [1]. In the US and many other countries the term VAT is not understood. Use the universally understood Tax ID instead. [1] https://github.com/odoo/odoo/pull/239362 task-6231891 Forward-Port-Of: odoo/enterprise#117955
This update resolves a crash when generating PDF reports for Vietnamese tax declarations, particularly Appendix 142. It also corrects data references and ensures reports are named and ordered correctly to align with Vietnamese tax form standards, improving data accuracy and reliability.
Original PR description
This commit resolves multiple issues in the Vietnamese accounting reports module: 1. Appendix 142 PDF Export Crash: - Extracted the PDF sectioning logic into a new `_get_pdf_sections` method. - Added…
This commit resolves multiple issues in the Vietnamese accounting reports module: 1. Appendix 142 PDF Export Crash: - Extracted the PDF sectioning logic into a new `_get_pdf_sections` method. - Added safeguards to gracefully handle cases where the report has no lines, preventing an `IndexError` when attempting to access `lines[-1]`. - Added unit tests to ensure empty lines are correctly parsed without crashing. 2. XML Data and Dependency Fixes: - Fixed an invalid `report_id` reference in `account_return_data.xml` by correctly pointing it to `l10n_vn_reports.l10n_vn_tax_report` instead of `l10n_vn.form_01_gtgt_report`. - Reordered the `__manifest__.py` data loading sequence. `account_tax_report_data.xml` now loads before `account_return_data.xml` to prevent "External ID not found" errors during module installation/upgrades. 3. Naming and Sequencing Improvements: - Renamed "Vietnamese Tax Report" to "VAT Declaration - 01/GTGT" to reflect the actual Vietnamese tax form accurately. - Added explicit `sequence` fields to the tax reports (VAT Declaration: 10, Appendix 142: 20) to ensure proper UI ordering. Task-6216318 Forward-Port-Of: odoo/enterprise#117974
This update corrects a dependency issue within the Italian reporting module (l10n_it_reports). Specifically, a new filter was added to address a conflict related to pension fund types, originally defined in a separate module. This ensures the Italian reporting functionality operates correctly and reliably.
Original PR description
Commit: 0a5657297f312cb3e5f6c3ab6a281acf71fbee3b added a filter for the field l10n_it_pension_fund_type which is defined in l10n_it_edi_withholding and not l10n_it_reports runbot-242217 Forward-Port-Of: odoo/enterprise#113185
This update resolves an issue where a test for the tax return journal failed because the test database lacked a related module. The fix ensures the journal is always visible during testing, preventing the test from timing out and streamlining the development process.
Original PR description
The tour clicks a Tax Returns button rendered on the tax-return journal's kanban card on the accounting dashboard. That button only appears when show_on_dashboard is True on the journal, which is flipped by an inverse defined in the accountant module. Since account_reports does not depend on accountant, running this test on a database without accountant installed (e.g. account_reports only) leaves the journal hidden and the tour times out on the first step. To fix this we force the journal to be shown in this test rather than relying on accountant. runbot-error-242120 Forward-Port-Of: odoo/enterprise#116806
A recent update to the l10n_be_coda module incorrectly commented out a test instead of updating it. This fix ensures that tests are properly updated, maintaining the reliability of the module's functionality for Belgian accounting processes. This resolves a minor issue that could have impacted test reporting.
Original PR description
Test was commented instead of updated in this commit https://github.com/odoo/enterprise/commit/f1fafe0060c221e4a268c897af30455cc3d029ef task-none Forward-Port-Of: odoo/enterprise#118428 Forward-Port-Of: odoo/enterprise#117924
This update fixes an issue where the 'Send Report' action was removed from the planning slot views. This change ensures users can easily generate reports directly from the planning slot form, improving workflow efficiency. The fix mirrors a previous enhancement to maintain consistency across related views.
Original PR description
Issue: ---------------------------------------- Some actions that were in Field Service task form view app aren't anymore in planning slot form view. Steps to reproduce: ---------------------------------------- - Go to the list view of planning view and select some slots - In the cog the action "Send Report" is there - Go in the slot's form view - In the cog, the action is not there Cause: ---------------------------------------- During the merge of Field Srevice in Planning. The action was removed from the form view. Solution: ---------------------------------------- Like in [saas-19.1](https://github.com/odoo/enterprise/blob/62b11599d08afa93cb9391f0b5aee3c610a754c8/industry_fsm_report/views/project_task_views.xml#L135-L146) we add "Send report" to the cog menu in list view. opw-6227745 Forward-Port-Of: odoo/enterprise#117744
This update resolves an issue preventing accurate employee attendance filtering within the Saudi HR Payroll module. The change grants necessary access to read employee country codes, ensuring correct filtering based on location. This improves the reliability of attendance tracking for employees in Saudi Arabia.
Original PR description
/hr_attendance:TestAttendanceManager.test_attendance_manager_rights uses write function defined in l10n_sa_hr_payroll_attendance which in some cases requires to read the country_code of an employee to filter. Access rights on employees blocked it from reading country_code. Added sudo on employee for reading and filtering on country_code. task-6226413 Forward-Port-Of: odoo/enterprise#117718
This update corrects a bug where the Email Alias helper wasn't visible in Helpdesk teams when the default external email server was disabled. The issue stemmed from a misinterpretation of the system parameter, which was incorrectly treated as a boolean value. This fix ensures the helper is correctly displayed regardless of the server configuration.
Original PR description
**Steps to reproduce:**
- Go to Settings > System parameters
- Set the `base_setup.default_external_email_server` to `False`
- Install Helpdesk app
- Go to any Helpdesk Team
- Email alias helper is not visible
**Issue:**
`has_external_mail_server` is a Boolean field computed from the `base_setup.default_external_email_server` system parameter.
After [1] it is parsed as a string with `get_str`, which means that the conversion from string to boolean will return `True` when the value is set and not null.
```py
bool('False') -> True
```
(It also seems that on saas this value is set by default)
**Fix:**
Properly parse it as a boolean using `get_bool`.
[1] https://github.com/odoo/enterprise/commit/c710031215c76a9e7ddb694d2a2787c8cca40dcd
opw-6229696
Forward-Port-Of: odoo/enterprise#118425This update fixes an issue where CFDI (Mexican electronic invoice) documents were being generated with incorrect length limits for key attributes like 'Folio' and 'Serie'. Swapping these values ensures the documents comply with Mexican regulations and prevents generation of invalid invoices. This change does not impact existing valid invoices.
Original PR description
Issue: length limits for attributes `Folio` and `Serie` of the `<cfdi:Comprobante>` elements were swapped, which could result in generation of invalid documents. Solution: swapping the values. This should not affect anything for existing valid documents. task-6046738 Forward-Port-Of: odoo/enterprise#118452 Forward-Port-Of: odoo/enterprise#116955
This update resolves a potential issue that caused Out of Memory errors during the installation of the `sale_subscription` module on databases with many sales orders. The change ensures that newly added fields are correctly initialized to 'null' during installation, preventing performance bottlenecks and installation failures.
Original PR description
### Description: Installing `sale_subscription` on databases with a large number of `sale.order` and `sale.order.line` can cause Out of Memory (OOM) errors. The issue comes from two stored compute fields, `last_invoiced_date` and `plan_id`. Since these depend on newly added fields, they should default to `null` during installation. ### Reference: opw-6201267 Forward-Port-Of: odoo/enterprise#118419 Forward-Port-Of: odoo/enterprise#118008
This update resolves an issue where incorrect data in payslips could cause warnings. The change improves how the system handles these errors, preventing potential disruptions to payroll processing. This ensures more reliable and accurate payroll calculations.
Original PR description
…ta and versions Task: 6133111 Forward-Port-Of: odoo/enterprise#117752 Forward-Port-Of: odoo/enterprise#114778
This update resolves an issue where the 'Info & Tags' button was hidden in the mobile Documents app's kanban view. The fix adjusts CSS styling to ensure the chatter section is always visible and accessible, improving usability on mobile devices. This ensures users can easily access important document details.
Original PR description
**Steps to reproduce:** - Go to Documents app in mobile - Go to the kanban view - Add some files and select one - Click on `Info & Tags` button in the control panel - Reload the page - Chatter is not…
**Steps to reproduce:** - Go to Documents app in mobile - Go to the kanban view - Add some files and select one - Click on `Info & Tags` button in the control panel - Reload the page - Chatter is not displayed but the button is still enabled - Switching to the list view properly shows it **Issue:** We have two conflicting css styling on mobile: - `overflow-hidden` was added for mobile to avoid multiple scroll bars - `min-height: 100%` which is due to the default `o_kanban_ungrouped` in the controller css This means that the element is present at the bottom of the page, but we can't get to it manually. When re-enabling the action we are properly moved to the existing chatter (but we can't go back to the top). Also the documents panel should have a single scrollbar to display all the records, but we still need a way to scroll the messages of the chatter. **Fix:** Set `min-height: 0;` for documents kanban to ensure the chatter is still visible and accessible on mobile by default. This makes the chatter take the full available height when displayed. original overflow fix: https://github.com/odoo/enterprise/commit/945b9e2b1c6752bd905695aa40b0babcf38c50cd opw-6061993 Forward-Port-Of: odoo/enterprise#118134 Forward-Port-Of: odoo/enterprise#113168
This update resolves a problem where users couldn't link invoices to the chatter feature in Odoo. The fix prevents a security check from failing when copying attachments, ensuring users with appropriate permissions can successfully link documents. This improves the usability of the documents module.
Original PR description
**Steps to reproduce:** 1. Create user with role: User. Sales: Administrator, Accounting: Administrator and Documents: System Administrator. 2. Create a SO, create invoice, confirm, and send. 3. Now…
**Steps to reproduce:** 1. Create user with role: User. Sales: Administrator, Accounting: Administrator and Documents: System Administrator. 2. Create a SO, create invoice, confirm, and send. 3. Now go back to the SO, and try to link the INV document to the chatter. **Cause:** When linking an existing document to the composer, the underlying attachment is copied. If the source attachment is bound to a specific field (e.g., `res_field = 'invoice_pdf_report_file'`), the `copy()` operation duplicates this field reference. Odoo's native security checks then attempt to verify access to that specific field on the target model (`mail.compose.message`). Because the composer does not have this field, the check fails and throws an AccessError, even if the user has full rights to the source document. **Solution:** Explicitly set `"res_field": False` during the copy operation. This strips the original field binding, cleanly converting the file into a standard, generic chatter attachment for the composer without bypassing the standard security framework. opw-5916364 Forward-Port-Of: odoo/enterprise#117347 Forward-Port-Of: odoo/enterprise#107723
This update resolves an issue where Selection fields in dark mode sign templates appeared unreadable due to white-on-white text. The fix ensures that form controls within PDF sign templates consistently display with appropriate contrast, regardless of the user's dark mode preference. This improves the user experience for all sign templates.
Original PR description
**Problem:** When the user has dark mode enabled and a sign template contains a Selection field, both the displayed value and the dropdown option list are unreadable: the selected value renders…
**Problem:** When the user has dark mode enabled and a sign template contains a Selection field, both the displayed value and the dropdown option list are unreadable: the selected value renders white-on-white in the field, and clicking the dropdown shows an empty-looking popup (white options on white system menu). **Steps to reproduce:** 1. Enable dark mode in user preferences 2. Open Sign > Templates > duplicate any template 3. Add a Selection field with a few options (e.g. Low / Medium / High) 4. Save and Sign Now 5. Reach the Selection field and click it 6. Observe: the dropdown options are invisible (white on white) and, after picking one, the selected value in the field is also invisible **Cause of the issue:** The Selection sign item is rendered with a native `<select>` element inside the PDF.js iframe (`sign_items.xml`, `t-if="type == 'selection'"` branch). The iframe's stylesheet (`sign/static/src/css/iframe.css`) declares the `select` rule with `background: transparent` but no explicit `color`, and never styles `<option>` at all. When the OS or the user activates dark mode, the iframe document resolves to a `color-scheme: light dark` root, so the browser's UA stylesheet paints form controls with the dark palette (white text). The popup background stays white (`<option>` has no explicit background), so options render white-on-white. The same UA-white propagates to the displayed value of the `<select>` inside the pink-tinted sign item, which is also nearly white. **Fix:** Pinning the `<select>` text color and the `<option>` color/background to fixed light-mode values restores predictable contrast inside the iframe regardless of the surrounding color scheme. We deliberately do not rely on `color-scheme: dark` here — that would only swap which side of the contrast issue we land on (browsers don't reliably honor it for `<option>` background painting), and the sign item background (the pink dashed default style) is itself light, so dark option text on a white popup is the readable target in all themes. opw-6197638 Forward-Port-Of: odoo/enterprise#117697
This update resolves a printing problem reported by a client who was unable to print without LNA. The fix addresses a missing check within the system, preventing errors during the printing process. This ensures consistent and reliable printing functionality.
Original PR description
Based on the ticket below the client is experiencing an issue when printing without LNA. This PR fixes the missing key check opw-https://www.odoo.com/odoo/project/49/tasks/6232008 Forward-Port-Of: odoo/enterprise#118101 Forward-Port-Of: odoo/enterprise#118005
This update fixes a confusing naming convention for quarterly returns. Previously, returns were labeled with 'Q1,' 'Q2,' etc., regardless of the company's fiscal year. Now, returns are named with the actual month and year range (e.g., 'January 2024 - March 2024'), making them easier to understand and use.
Original PR description
Currently, if the company fiscal year doesnot align with calender year, i.e Fiscal year end is not december and any month in between like India (March 31), while creating quarterly returns, the return name has Q1 for Jan - Mar, Q2 for Apr - Jun, and so on, which is not aligned with the fiscal year quarters. This commit fixes that issue by naming it like "From Month Year - To Month Year" for quarterly returns. task-6124692 Forward-Port-Of: odoo/enterprise#117298 Forward-Port-Of: odoo/enterprise#114438
This update resolves an issue where benefit calculations incorrectly processed property fields within employee contracts. The fix prevents property fields from being used as cost inputs, ensuring accurate benefit cost computations. This ensures consistent and reliable payroll processing.
Original PR description
**Steps to Reproduce:** 1. Install `hr_contract_salary_payroll` with demo data. 2. Open Employee (e.g; Abigail Peterson) > Payroll tab > Gear Icon > Edit Properties. 3. Add a new property for Payroll…
**Steps to Reproduce:** 1. Install `hr_contract_salary_payroll` with demo data. 2. Open Employee (e.g; Abigail Peterson) > Payroll tab > Gear Icon > Edit Properties. 3. Add a new property for Payroll and fill in the value also. 4. Go to Payroll > Configuration > Benefits. 5. Create a new benefit with: Salary Structure Type: Worker Cost Field: Payroll Properties (Employee Contract) 6. Save the record. Video: https://drive.google.com/file/d/1gHRkDW5G0bURlo9_IRgCnvqpE-8Fk1xa/view?usp=drive_link **Error:** `TypeError - unsupported operand type(s) for +: 'int' and 'Property'` **Cause:** The method `_get_benefits_costs()` directly sums values using: ``` self[benefit.cost_field] ``` When the selected cost field is a property field, it returns a **fields_properties.Property** object instead of a numeric value, and this object is not directly compatible with the arithmetic sum operation. Before 19.0, property fields were not allowed to be selected as a cost field - [1]. **Fix:** This commit prevents selecting property fields as cost fields from the list of supported field types. [1] : https://github.com/odoo/enterprise/blob/04224abcc7eec1c81df7ad57a9213fd091774888/hr_contract_salary/models/hr_version.py#L183 sentry-7388663038 Forward-Port-Of: odoo/enterprise#116511 Forward-Port-Of: odoo/enterprise#113238
This update corrects a technical issue where multiple executions of a process could create invalid CFDI invoices with duplicate Addenda nodes. The fix ensures CFDI invoices comply with SAT standards, preventing potential rejection by recipient systems. This maintains data integrity and avoids errors in invoice processing.
Original PR description
Before this commit, if the `_l10n_mx_edi_cfdi_invoice_append_addendas` method was executed more than once on the same invoice, the resulting CFDI would contain multiple `<cfdi:Addenda>` nodes. This…
Before this commit, if the `_l10n_mx_edi_cfdi_invoice_append_addendas` method was executed more than once on the same invoice, the resulting CFDI would contain multiple `<cfdi:Addenda>` nodes.
This occurred because the method manually injects the new Addenda string at the end of the XML without checking if one was already present from a previous execution.
According to the SAT's Anexo 20 and the CFDI 4.0 XSD, the Addenda must be a single node and the last element of the Comprobante. Duplicating root-level nodes like `cfdi:Addenda` is a bad XML formation practice that can cause rejection by the recipient's automated systems.
This fix ensures the CFDI structure remains valid by:
1. Searching for an existing `{*}Addenda` node in the CFDI string.
2. Removing the old node before reconstructing the XML.
3. Preventing the string replacement logic from stacking multiple Addenda blocks.
This ensures that the CFDI remains clean and compliant with the official standard even if the process is triggered multiple times.
Forward-Port-Of: odoo/enterprise#109760This update optimizes the performance of large spreadsheet tables, particularly in areas like the Accounting > Balances Sheets. By streamlining how the system checks styles, it reduces loading times during actions like hovering, resizing, and sorting, leading to a smoother user experience.
Original PR description
Avoid using the :has() selector and use a specific class on the body instead to replicate the same behavior. This reduces work during the "Recalculate Style" phase (for example when hovering rows in large tables such as the Accounting > Balances Sheets). It lowers recalculation time during window resizes, heavy scrolling, and table sorting by preventing broad selector matches and limiting style checks to elements with the specific class. Forward-Port-Of: odoo/enterprise#118600 Forward-Port-Of: odoo/enterprise#118535
This update resolves an issue that prevented users from expanding depreciation schedule reports for assets without depreciation. The fix ensures the system handles assets with the 'no_depreciation' method correctly, preventing a technical error and improving report functionality. This ensures all asset reports are accurate and accessible.
Original PR description
When a user expands the report line of a no-depreciation asset in the depreciation schedule report, a traceback is raised. Steps to reproduce the error: - Install ``account_asset`` module with demo…
When a user expands the report line of a no-depreciation asset in the depreciation schedule report, a traceback is raised. Steps to reproduce the error: - Install ``account_asset`` module with demo data - Go to Accounting > Accounting > Assets > Create a new asset > Set Depreciation Model: No depreciation and Fixed Asset Account > Confirm - Go to Accounting > Review > Depreciation Schedule - Select the current fiscal year in filters - Expand the asset report line Traceback: ```py UnboundLocalError cannot access local variable 'period_suffix' where it is not associated with a value ``` https://github.com/odoo/enterprise/blob/5edd033ce05d65a79bc5b21ad2d1559a1af78056/account_asset/models/account_assets_report.py#L388-L390 Here, ``period_suffix`` is only assigned when the asset method is ``linear`` or ``degressive``, For assets using the ``no_depreciation`` method, the variable remains undefined, leading to the traceback when returning the depreciation rate string. sentry-7504906018 Forward-Port-Of: odoo/enterprise#118485
This update ensures Knowledge articles always print correctly, regardless of how printing is initiated. The changes involved standardizing asset loading and refining CSS rules to prevent unintended styling issues in other Odoo modules. This improves the overall printing experience for users.
Original PR description
Previously, the file containing the Knowledge print assets was lazy-loaded when the user triggered a print action through the UI. However, printing can also be initiated through other mechanisms…
Previously, the file containing the Knowledge print assets was lazy-loaded when the user triggered a print action through the UI. However, printing can also be initiated through other mechanisms (keyboard shortcuts, contextual menu, etc.), which prevented us from consistently detecting when to load the assets. In those cases, the assets were not loaded and the article appeared blank (see: odoo/enterprise#70243). To ensure the assets are always loaded regardless of how printing is triggered, we moved them to the common print bundle and adopted the standard asset-loading approach. This change also simplifies the codebase by removing JavaScript workarounds previously used to load the assets dynamically. However, some CSS rules in the Knowledge print stylesheet target global elements such as the web client container. Since the stylesheet is now included in a global asset bundle and always loaded, these rules apply to all modules and may cause rendering issues when printing views outside of Knowledge. To prevent such side effects, the CSS rules in `knowledge_print.scss` will be updated to use more specific selectors. The rules will be scoped so they only apply when the container includes the Knowledge view (using the `:has`). This PR also refactors the stylesheet by removing outdated rules that no longer match any elements. Several of these rules predate the major UI refactoring introduced in Odoo 16. Task-5999878 Forward-Port-Of: odoo/enterprise#118448 Forward-Port-Of: odoo/enterprise#109379
This update fixes an issue where users weren't notified when an expense authorization status changed (e.g., cancelled). The system now correctly responds to authorization updates, ensuring users are informed about the status of their expenses. This improves transparency and accuracy in expense management.
Original PR description
## [FIX] hr_expense_stripe: Fix error messages coherence Fix the incoherent punctuation ## [FIX] hr_expense_stripe: Fix reversed and expired authorizations Before this, when receiving an `issuing_authorization.updated` event, the event would be ignored and the user would never know that the expense had been cancelled opw-6210055 Forward-Port-Of: odoo/enterprise#118650 Forward-Port-Of: odoo/enterprise#117257
This update resolves an issue that caused temporary problems during Odoo upgrades. It replaces a complex workaround with a simpler method of managing settings related to service timesheets, preventing the creation of unnecessary data records and ensuring smoother upgrades.
Original PR description
Replace the `res.config.settings transient record + execute()` hack with a direct group implication on `group_field_service_allow_material` to avoid orphan transient records during upgrade. see: https://github.com/odoo/upgrade/pull/10310#issuecomment-4518235969 Forward-Port-Of: odoo/enterprise#118178
This update corrects a technical issue related to how currency rates are configured in Odoo. The change ensures that the system correctly retrieves configuration data, preventing a potential error that could have impacted functionality. This is a routine maintenance update.
Original PR description
Since saas-19.1, get_param has been removed from ir.config_parameter and replaced by typed helpers such as get_int, get_float, and get_bool, etc. This commit replaces the deprecated get_param call with get_int to prevent an AttributeError. Forward-Port-Of: odoo/enterprise#118621
2 changes
Resolved issues and error corrections
This update fixes an issue where selecting the start date first would incorrectly set both the start and end dates for deferred accounting periods. Previously, selecting the end date first resulted in dates appearing in reverse order. This change ensures the system correctly handles date selection for postponement periods, improving data accuracy and reducing potential errors.
Original PR description
The issue is when selecting deferred dates, if the start date is selected first, the system will set both the start and end dates. However, when selecting the end date first, the period appears backwards example ( 2026 - 2025 ). task: 6140024
This update fixes an issue where split orders sent to the preparation display incorrectly canceled existing items. The change prevents line cancellations and ensures that split orders create new preparation cards with accurate quantities, maintaining the integrity of the initial order and preventing quantity aggregation errors. This improves the reliability of the preparation display process.
Original PR description
*= pos_restaurant_preparation_display, pos_enterprise Steps to Reproduce ================== - Create an order with Product A ×2 and Product B ×2 - Send the order to the preparation display - Split…
*= pos_restaurant_preparation_display, pos_enterprise Steps to Reproduce ================== - Create an order with Product A ×2 and Product B ×2 - Send the order to the preparation display - Split the order and pay for one unit of each product - On the remaining order, add another product - Send the order to the preparation display - The preparation display incorrectly cancels previously sent products Fix === - Prevent cancellation of existing preparation order lines - Avoid duplication of preparation lines when split orders are sent to the kitchen Covered Scenario ================ 1. Send an order with Coca-Cola ×2, Minute Maid ×2, Water ×1 to the kitchen. 2. Split 1 qty of each product into a new order, increase split quantities, and send it. 3. Increase quantities on the original order and send it again. Expected Behavior ================= - Initial preparation order remains unchanged (no line cancellations) - Split order creates a new preparation card with only unsend split quantities - Original order creates a new preparation card with only newly added quantities - No preparation line incorrectly aggregates quantities across orders Task-5355899 Related Comm. PR: https://github.com/odoo/odoo/pull/244195
7 changes
Resolved issues and error corrections
This update resolves a technical issue preventing the Instagram snippet on our website from displaying correctly in iOS Chrome browsers. The problem stemmed from a change in how Chrome sends data, requiring a simple adjustment in our code to handle the data format. This ensures consistent functionality across different browsers.
Original PR description
Scenario:
- insert Instagram Page snippet
- using iOS chrome browser (reproduced in iOS 26.3, google chrome 146)
visit that page logged in as a internal user or in ?debug=assets (so
traceback are shown)
Result: 3 tracebacks errors are shown with error "Uncaught Promise >
JSON Parse error: Unexpeced identifier "object".
Cause: probably since this change:
https://chromium.googlesource.com/chromium/src/+/9629a16a7ab0b91c59ecaa9fc8934db3d6c83ba3%5E%21/
chrome on iOS is sending message with this object as data:
{ "command": "registerAsChildFrameAck", "remoteFrameId": "d905013d…" }
but the instagram code is expecting a stringified JSON.
Fix: ignore message data that are object.
opw-5930717
Forward-Port-Of: odoo/odoo#254664This update fixes an issue where check amounts weren't being properly rounded when generating the check amount in words for Philippine companies. Previously, the check displayed an incorrect decimal format with 'ONLY' appended. The fix rounds the payment amount to ensure accurate check formatting, improving the user experience for Philippine vendors.
Original PR description
Current behaviour: --- When paying with checks, the amount is not rounded in the check amount in words string. Steps to reproduce: --- 1. Switch to PH company 2. Set setting Check Layout as "Print Check - PH" 3. Create a new vendor bill 4. Add a product with a specific price like 91490.15 5. Confirm the bill, click on Register Payment 6. Select Payment Method "Checks", Create Payment 7. Go to the payment, Amount in Words is wrong 8. Ninety-One Thousand Four Hundred Ninety And 15000000001/100 ONLY Expected behaviour: --- The decimal amount should be rounded, and "ONLY" shouldn't appear. Fix: --- Rounded the pay amount And backported: https://github.com/odoo/enterprise/commit/bb6c9848665709c14c5113b2c98976f869cd473b opw-6058344 Forward-Port-Of: odoo/enterprise#116717
This update fixes a crash during Odoo 18 upgrades when archiving incoming operation types. The issue stemmed from a requirement for a specific picking type, which wasn't being met for archived types. The fix ensures that archived picking types are considered, allowing the upgrade process to complete successfully.
Original PR description
### Steps to Reproduce: 1) Create a database on v17.4 or earlier with purchase_requisition_stock installed. 2) Archive the incoming operation type of root company (i.e. base.main_company). 3) Upgrade…
### Steps to Reproduce:
1) Create a database on v17.4 or earlier with purchase_requisition_stock
installed.
2) Archive the incoming operation type of root company (i.e. base.main_company).
3) Upgrade to v18.
### Issue:
Upgrade crashes with RedirectWarning, aborting the process entirely.
```python3
Traceback (most recent call last):
File "/home/odoo/src/odoo/18.0/odoo/service/server.py", line 1366, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "<decorator-gen-13>", line 2, in new
File "/home/odoo/src/odoo/18.0/odoo/tools/func.py", line 97, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/18.0/odoo/modules/registry.py", line 129, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/src/odoo/18.0/odoo/modules/loading.py", line 485, in load_modules
processed_modules += load_marked_modules(env, graph,
File "/home/odoo/src/odoo/18.0/odoo/modules/loading.py", line 365, in load_marked_modules
loaded, processed = load_module_graph(
File "/home/odoo/src/odoo/18.0/odoo/modules/loading.py", line 206, in load_module_graph
registry.init_models(env.cr, model_names, {'module': package.name}, new_install)
File "/home/odoo/src/odoo/18.0/odoo/modules/registry.py", line 605, in init_models
model._auto_init()
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 3474, in _auto_init
new = field.update_db(self, columns)
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 3269, in update_db
return super(Many2one, self).update_db(model, columns)
File "/tmp/tmpy3l3l_un/migrations/base/0.0.0/pre-models-no-orm-table-change.py", line 170, in update_db
return orig_update_db(self, model, columns)
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 1098, in update_db
self.update_db_notnull(model, column)
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 1150, in update_db_notnull
model._init_column(self.name)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 3390, in _init_column
value = field.default(self)
File "/home/odoo/src/odoo/18.0/addons/purchase_requisition_stock/models/purchase_requisition.py", line 13, in _default_picking_type_id
self.env['stock.warehouse']._warehouse_redirect_warning()
File "/home/odoo/src/odoo/18.0/addons/stock/models/stock_warehouse.py", line 172, in _warehouse_redirect_warning
raise RedirectWarning(msg, warehouse_action.id, _('Go to Warehouses'))
odoo.exceptions.RedirectWarning: ('Cree un almacén para la empresa Navieras Internacionales, S.A. (Navinter).', 464, 'Ir a los almacenes', None)
```
### Cause:
picking_type_id is required=True on purchase.requisition. In 18.0, warehouses are no longer auto-created for every company https://github.com/odoo/odoo/commit/6516ab61927a63e3f2d804cf1b5baa43a151ca19#diff-e018fe59e11c4e0078e9bc19879f9e98c731bb84c71766ef360ccc482c59d2d8R167 If the root company (base.main_company) had its incoming operation type archived and the upgrade, _default_picking_type_id returns nothing and falls through to _warehouse_redirect_warning, raising a RedirectWarning that aborts the upgrade entirely.
### Fix:
Add active_test=False to the search in _default_picking_type_id so archived picking types are also matched, allowing the upgrade to complete successfully.
opw-6245256
upg-4310650
tbg-2758
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes an issue where the pension fund tax was incorrectly applied to all invoice lines with the same VAT rate, leading to inaccurate accounting. The fix now correctly identifies the tax exemption reason from the bill data, ensuring the pension fund tax is applied accurately to the first invoice line. This improves tax compliance and financial reporting.
Original PR description
In `l10n_it_edi` vendor bill import, the pension fund tax was incorrectly applied to all invoice lines sharing the same VAT rate, even though they have different `l10n_it_tax_exemption_reason`s, resulting in wrong entries and document total. We now extract the Tax Exemption reason from the `DatiCassaPrevidenziale` node, and use it to search the correct tax. Steps to reproduce: 1. Install `account` and `l10n_edi_it` 2. In the `4% INPS` tax, set `TC22` in pension fund type and `N2.2` in exoneration 3. Import bill from the ticket 4. See the pension fund tax is applied to all the lines. It should only be applied only to the first one. Ticket [link](https://www.odoo.com/odoo/project.task/6212975) opw-6212975 Forward-Port-Of: odoo/odoo#265821
This update corrects an issue where Odoo automatically generated PDFs from invoices uploaded as PDFs containing embedded XML data. Previously, the system incorrectly assumed invoices with embedded XML needed a separate PDF. This change ensures that Odoo only generates PDFs when explicitly required, improving efficiency and preventing redundant file creation.
Original PR description
Commit https://github.com/odoo/odoo/commit/7bc35c41eb145638b5a37fc8a927c04b0337a740 introduced automatic PDF generation for imported XML invoices that don't include an embedded PDF file. However, this behavior does not take into account the case of xml embedded into the source pdf. Steps to reproduce: - Upload a PDF embedding an XML - Check the created bill Issue: A PDF will be automatically generated by the system. This should not occur if the uploaded file is already a PDF opw-6010999
This update fixes a visual issue where carousels in the website builder sometimes displayed inconsistent heights, causing a distracting 'jitter' effect. The change uses a new technology to automatically adjust carousel item heights based on image size changes, ensuring a smoother and more professional appearance.
Original PR description
In a carousel snippet all carousel items keep a consistent height to prevent layout jitter when sliding. The height synchronization was broken in snippets like `s_image_gallery` or `s_carousel` when:…
In a carousel snippet all carousel items keep a consistent height to prevent layout jitter when sliding. The height synchronization was broken in snippets like `s_image_gallery` or `s_carousel` when: - An image was replaced with one of a different aspect ratio. - Item dimensions were modified via border overlays (padding changes). This commit introduces a `ResizeObserver` to monitor the carousel and triggers a height synchronization whenever an element's size changes. Steps to reproduce (Media Change): 1. In the website builder, add the `s_image_gallery` snippet. 2. Replace one of its images with another which is significantly tall. 3. Navigate through the carousel and observe height changes causing a jitter effect. Steps to reproduce (Border Overlay): 1. In the website builder, add the `s_carousel` snippet. 2. Drag the lower border overlay so that the height of an image increases. 3. Navigate through the carousel and observe height changes causing a jitter effect. Task: [5135520](https://www.odoo.com/odoo/project/974/tasks/5135520)
This update resolves an issue where Odoo couldn't correctly import Peppol optional fields due to a limitation in field type support. The change now allows for both 'char' and 'text' field types, ensuring accurate import of these critical data elements. Additionally, unnecessary PDF attachments from the test files have been removed.
Original PR description
_Context :_ Users might confuse the `char` with the `text` field types when creating Peppol optional fields. Currently, only the `char` type is supported, which prevents `text` fields from being recognized and imported correctly. To avoid this issue, we support multiple types for the same field when necessary. Also, the test files of this PR : https://github.com/odoo/odoo/pull/262065 included PDF attachments, which is useless. This commit removes them. no-task --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
2 changes
Resolved issues and error corrections
This update corrects an error in the Peru Accounting Reports (l10n_pe_reports) module that caused the SUNAT/SIRE system to reject DAM reports. The fix ensures that only the required 3-digit customs dependency code is used in field 8 of the report, aligning with SUNAT regulations. This prevents report rejections and ensures accurate data submission.
Original PR description
**Steps to reproduce:** * Install Peru - Accounting Reports (l10n_pe_reports). * Create a vendor bill with Document Type 50 (Declaración Aduanera de Mercancías - DAM) and a document number in the…
**Steps to reproduce:** * Install Peru - Accounting Reports (l10n_pe_reports). * Create a vendor bill with Document Type 50 (Declaración Aduanera de Mercancías - DAM) and a document number in the standard pediment format (e.g. C235202610-38047). * Go to Accounting > Reporting > Purchase Electronic Record (RCE 8.4). * Export the TXT file and open it. **Observed behavior:** * Field 8 contains the full first numeric block of the document name including the year and sequence digits (e.g. 235202610) instead of only the 3-digit customs dependency code. * SUNAT/SIRE rejects the file immediately because 235202610 does not exist in Table 4 (RS 040-2022), which only defines 3-digit codes. **Cause:** * `_get_serie_folio()` splits the document name by taking everything before the last digit group as the serie. For a name like C235202610-38047 this produces serie = "C235202610", and the existing `serie[1:]` logic strips only the leading letter, leaving "235202610" in field 8 instead of the 3-digit customs dependency code "235". * The same incorrect value was also written to field 28 (aduana_code). * ref : https://www.sunat.gob.pe/legislacion/superin/2022/anexo-040-2022.pdf **Fix:** * For document types 50 and 52, extract the first numeric group from the document name using `re.search(r'\d+', move_name)` and slice the first 3 characters to obtain the customs dependency code as defined in SUNAT Table 4 (always a 3-digit value). * Apply the same logic to field 28 (aduana_code) for consistency. opw-6157662
This update corrects a bug where customer payments directly deposited into bank accounts were incorrectly categorized as 'Miscellaneous Operations' in bank reconciliation reports. The change ensures that payments are accurately reflected, improving the reliability of bank reconciliation processes. This resolves a reporting issue impacting financial accuracy.
Original PR description
Payments registered directly on a bank account appear incorrectly as miscellaneous operations in the bank reconciliation report. Steps to reproduce: - Open a Bank journal - Add the Bank account as Outstanding Receipts account - Create and validate a Customer Paymen. - Open the Bank Reconciliation Report of the Bank journal Issue: The newly created payment is incorrectly listed under the "Misc. operations" section of the report. Analysis: Direct payments hitting the bank account without an associated statement line are retrieved by the current domain and classified as miscellaneous. Journal items associated to a payment should be excluded from the domain. opw-6144542