Daily updates from Odoo
Monday, June 1, 2026
280 changes
21 changes
Resolved issues and error corrections
This update enhances Odoo's ability to receive invoices with additional Peppol fields, addressing a previous limitation. Now, users can fully receive compliant invoices when they've already configured these extra fields using Odoo Studio. This ensures greater adherence to industry standards and simplifies invoice processing.
Original PR description
Currently, Odoo allows sending invoices with additional Peppol fields, but didn't support the receiving. This limitation prevents users from receiving fully compliant invoices. After this commit, users will be able to receive these extra fields if they already created them using Studio. task-6033667 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267071 Forward-Port-Of: odoo/odoo#262065
This update fixes an issue where the 'To Schedule' task default wasn't maintained when navigating the planning calendar using the previous/next arrow buttons. Previously, users would lose the context of the task they were scheduling. Now, the system correctly retains the task's default values when switching between weeks in the calendar view, ensuring a smoother scheduling experience.
Original PR description
Issue: ---------------------------------------- The default values aren't kept when using the previous/next arrows in planning calendar view. Steps to reproduce:…
Issue: ---------------------------------------- The default values aren't kept when using the previous/next arrows in planning calendar view. Steps to reproduce: ---------------------------------------- - Go on a Project task - Click the "To Schedule" button - Switch to calendar view - If we create now, the new slot will have the task as default value - Click the arrow to switch to next week - If we create there will be no default values Cause: ---------------------------------------- Since 7b844902e5c3a7aeedda6cc2be61366caad2d144 the context is lost when using the arrows. When switching to calendar view `load()` is called with the context in the params: https://github.com/odoo/odoo/blob/786c373d5ac8afdfb79eb7a7d69c5eb83b919625/addons/web/static/src/model/model.js#L163-L164 But when using the arrows, it is called with only a date: https://github.com/odoo/odoo/blob/786c373d5ac8afdfb79eb7a7d69c5eb83b919625/addons/web/static/src/views/calendar/calendar_controller.js#L426 So `...params.context,` is empty, and the context is only `hide_planned_dates: true,`. Solution: ---------------------------------------- If no context is specified in params, we use the one in `this.meta` to allow changing the context by giving it in the params but keeping the previous context when it's not given. opw-6211055 Forward-Port-Of: odoo/enterprise#118527
This update fixes an issue where the calculation of the gross total on invoices with both line and global discounts was incorrect. The change ensures accurate gross total calculations, particularly when global discounts are applied, leading to more reliable financial reporting. This resolves a discrepancy in the final invoice amount.
Original PR description
Problem: When both line discounts and global discounts are applied on a product in an invoice, the method `_add_and_round_raw_gross_total_excluded_and_discount` does not return the exact…
Problem: When both line discounts and global discounts are applied on a product in an invoice, the method `_add_and_round_raw_gross_total_excluded_and_discount` does not return the exact raw_gross_total_excluded before the modification done by other AccountTax helper methods, such as dispatching and squashing global discount lines. Current Behavior: The calculation is done in the wrong order of operations. For example, there is an invoice for Product A valued at $100 with a discount of 10% and a global discount of $10. The raw_total_excluded will be $80 after the both discounts. The discount_factor is based on only the line discount of 10%. The formula of the current calculation for raw_gross_total_excluded is: (raw_total_excluded / (1 - (line_discount / 100))) - global_discount = (80 / 0.90) - (-10) = 98.889 This does not equal the expected outcome of $100. Expected Behavior: Based on the previous example, the formula for the calculation should be: (raw_total_excluded - global_discount) / (1 - (line_discount/100)) = (80 - (-10)) / 0.9 = 100 The global discount needs to be added back to the raw_total_excluded to get the line discounted amount in order to divide by the discount_factor to gain the expected raw_gross_total_excluded before taxes and discounts. Steps to reproduce the issue: - Bug was encountered when implementing a global discount solution for l10n_co_dian. - Create an invoice with a product line and in-line discount and another line for global discount - Setup the base lines for the invoice and attempt the following: - _dispatch_global_discount_lines - _squash_global_discount_lines - _add_and_round_raw_gross_total_excluded_and_discount opw-5412446 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266584 Forward-Port-Of: odoo/odoo#262137
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 absences. This ensures accurate overtime calculations for all employees.
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#265976 Forward-Port-Of: odoo/odoo#263840
This update corrects a bug where paying off an account balance through a POS order resulted in an incorrect 'Settle Due' amount being displayed. The fix prevents negative values from affecting calculations, ensuring accurate remaining balances are shown to customers. This improves the user experience and financial reporting.
Original PR description
When a customer paid off their account balance through a POS order, a negative pay_later amount was used. The condition `if order_due:` in `_compute_customer_due_total` evaluated to True for negative values, causing `customer_due_total` and `init_customer_due_total` to be set to a negative amount. This made `pos_orders_amount_due` on the partner go negative, which in turn inflated `remainingDue` in the frontend (remainingDue = totalDue - posOrdersAmountDue), showing a wrong amount in the "Settle due amount" button. opw-6187771 Forward-Port-Of: odoo/enterprise#116394
This update resolves an issue where product prices didn't automatically update when the cost price of a product variant changed. Previously, users had to manually switch price lists to trigger the update. The fix ensures that changes to the cost price are immediately reflected in the on-sale price, streamlining the pricing process.
Original PR description
When we create a product variant and have a pricelist which is based on the cost price, and change the cost price, the on_sale_price doesn't update. You have the change the price list to other and…
When we create a product variant and have a pricelist which is based on the cost price, and change the cost price, the on_sale_price doesn't update. You have the change the price list to other and back to the one you want for it to trigger change because the _onchange_compute_pricing only gets triggered if there's change on pricelist (pricer_sale_pricelist_id), and sales price (lst_price). Steps to Reproduce: 1.Create a pricelist and add a line with "formula" price type, and based on "cost", 2.Create a product variant, and add the pricelist just created. 3.Change the "Cost". The "On Sale Price" doesn't update. 4.You have to change the price list to some other and back to the one you want for the "On Sale Price" to update. To fix the issue, we add the field Cost (standard_price) on api.onchange, so when we change the cost it'll update the "On Sale Price" right away. opw-5947995 Forward-Port-Of: odoo/enterprise#118584 Forward-Port-Of: odoo/enterprise#111892
This update resolves an issue where deleting an action linked to an inactive filter would sometimes cause errors. The change ensures that inactive filters are also removed when an action is deleted, maintaining data consistency and preventing unexpected behavior. This improves the overall stability and reliability of the system.
Original PR description
How to reproduce: - Delete an action linked to an inactive user-defined filter. - Go to the User-Defined menu, - Show inactive filters (with "Archived filter") - Got a MissingError. Explanation: odoo/odoo#156622 fixes an inconsistency when deleting an action, but the reviewer was "amorti" so he (I) forgot to account for inactive "ir.filters". Add active_test=False to ensure inactive "ir.filters" are also removed. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266761 Forward-Port-Of: odoo/odoo#262195
This update resolves an issue where reimbursed sales orders (paid via credit notes) continued to incorrectly impact customer credit limits. The fix adds a 'closed invoicing' flag to sale orders, preventing them from being considered for credit limit calculations once invoicing is finalized. This ensures accurate credit limit tracking for customers.
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 Forward-Port-Of: odoo/odoo#262720
This update resolves a technical issue impacting US reporting. Previously, a duplicated configuration caused incorrect formatting for US chart of accounts reports. The fix combines the necessary settings into a single, streamlined file, ensuring accurate reporting for US users.
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 Forward-Port-Of: odoo/enterprise#118712
This update resolves an issue where a test in the account payment module was unreliable due to dependencies on a module not always present. The change simplifies the test by directly using the intended calculation method, ensuring consistent and predictable results. This improves the overall stability and reliability of our payment processing tests.
Original PR description
The set_line_bank_statement_line method is defined in account_accountant, meaning we can't use it in account_payment as it will automatically break if enterprise is not installed. Replace it with direct call to _get_partial_amounts, which is the purpose of this test anyway. runbot-939260 Forward-Port-Of: odoo/odoo#267139
This pull request addresses a few minor issues identified during a recent update (FW-porting) of the l10n_fr_pdp module. These fixes improve the functionality and stability of the module, ensuring continued accurate processing of French accounting data. The changes are focused on internal improvements within the module.
Original PR description
Backports some fixes discovered during FW-porting task-None Forward-Port-Of: odoo/odoo#267375 Forward-Port-Of: odoo/odoo#267330
This update resolves an issue that caused errors when sending shifts involving multiple team members. The fix ensures the system correctly handles shifts with multiple resources, preventing a traceback and improving the reliability of shift scheduling. This enhancement ensures smoother operations for teams managing resources.
Original PR description
Steps to reproduce: - Install Planning - Create two resources - Enable "Employee Unavailabilities > Unassign themselves from shifts - Create a shift with multiple resources - Send the shift Issue: A traceback occurred when sending a shift linked to multiple resources. Cause: The unavailability URL was generated using `employees.token`, which expects a single employee record. Fix: Handle shifts with multiple resources correctly when generating the unavailability URL to avoid the traceback when sending shifts. issue commit-https://github.com/odoo/enterprise/pull/106700/commits Forward-Port-Of: odoo/enterprise#118292
This update fixes an issue where commission plans were incorrectly displayed in the 'Other Plans' section for salespeople, even when their assignment periods didn't overlap. The system now accurately checks for overlapping salesperson assignment dates, ensuring that only relevant plans are shown. This improves 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#118769 Forward-Port-Of: odoo/enterprise#112694
A previous error prevented users from canceling draft POS orders. This fix corrects a recent code change that caused a conflict when attempting to cancel an order. The update ensures the cancellation process now functions correctly.
Original PR description
Currently an error is generated when the user tries to cancel a draft POS order as follows: - Install the `pos_enterprise` module with demo data - Open the register of `Furniture store` and select…
Currently an error is generated when the user tries to cancel a draft POS order as follows: - Install the `pos_enterprise` module with demo data - Open the register of `Furniture store` and select any product - Click on the `Upload` icon to save the draft order and go to the backend. - Navigate Orders > Orders > open Draft order - Click the `cog` icon and click `Cancel Order` >>> Error occurs This issue is caused by the recent refactor introduced in [1]. The `action_pos_order_cancel` action now returns the `order` (`pos.order` recordset) instead of default returning `None`. As a result, the `action` variable contains a `pos.order` recordset, and an error is raised at line [2] when `setdefault` is called on it, since `setdefault` expects a dictionary-like object. This commit fixes the above issue by removing the code that returns the `pos.order` object from the action. As a result, the action now behaves as expected and returns the default value (`None`). [1]: https://github.com/odoo/enterprise/commit/27f57036a1d0468efe6e68d7aceafe0f01b21f93 [2]: https://github.com/odoo/odoo/blob/48f93ca056633bd5cba36b66ee1008fb57ca666c/addons/web/controllers/utils.py#L24 Sentry-7354160052 Forward-Port-Of: odoo/enterprise#118035
This update ensures that work entry data exported to Acerta adheres to their specific formatting requirements. The export now correctly pads the external reference number to 17 digits with spaces and formats the work entry type code to 4 digits with spaces, resolving potential data discrepancies with the Acerta system. This ensures accurate data transmission and processing.
Original PR description
We want to adhere to the correct format for the export of work entries to Acerta. There, the number of external reference is padded to 17, not 20, and is followed by 3 spaces, before the date. Also, the code of the work entry type is padded to 4 and followed by 2 spaces. Task: 6168106 Forward-Port-Of: odoo/enterprise#118568 Forward-Port-Of: odoo/enterprise#118124
This update resolves an issue where appointment calendars wouldn't display available slots correctly when appointments started in a future month. The fix ensures that the calendar accurately reflects available slots, regardless of when the appointment's booking range begins. This prevents users from seeing 'no slots available' messages when appointments are scheduled in the future.
Original PR description
The "show only 1 month at a time" optimization computes the navigated month as datetime.now() + month_id, so the controller passes that (month, year) tuple to _get_appointment_slots:…
The "show only 1 month at a time" optimization computes the navigated month as datetime.now() + month_id, so the controller passes that (month, year) tuple to _get_appointment_slots: https://github.com/odoo/enterprise/blob/57ec37b74a60c7e879a8afa66df5ab22a92c5bcd/appointment/models/appointment_type.py#L833 For a punctual appointment whose Allow Bookings range starts in a future month, the first displayed month is start_datetime.month, so the (month, year) tuple doesn't match the month the visitor is looking at. The model fills an empty month and the recovery loop refills the first displayed month (where slots actually live): https://github.com/odoo/enterprise/blob/57ec37b74a60c7e879a8afa66df5ab22a92c5bcd/appointment/models/appointment_type.py#L973-L988 The calendar the visitor just navigated to comes back empty. Compute the navigation base from start_datetime when it lies in the future and keep datetime.now() otherwise. month_id is added on top of that base so it always matches the displayed month index. Introduced by https://github.com/odoo/enterprise/commit/664857dd2c4ae2bc0dde8f44cb94136659ed2fe2 Steps to reproduce: 1. Open the Appointments app 2. Open an appointment type and set Schedule to Weekly and Allow Bookings to On specific dates with a range starting in a future month (for example 1 September to 31 December) 3. Save and click the Preview button in the header 4. Pick a staff member to reach the calendar 5. Click the right arrow to navigate to the next month => the next month shows "Sorry, we have no more slots available for this month" opw-6206293 Forward-Port-Of: odoo/enterprise#117283
This update corrects a technical issue that could cause errors in the DMFA report PDF generation. The change adds a validation check to ensure only numerical characters are used, preventing data entry problems and ensuring accurate report output. This improves the reliability of payroll reporting.
Original PR description
Added a validation error in the _get_code function in case the code contains non-numerical characters. This prevents non-numerical characters input from breaking the DMFA report PDF generation. Task: 6231125 Forward-Port-Of: odoo/enterprise#118367 Forward-Port-Of: odoo/enterprise#117889
This update resolves an issue where users without specific accounting permissions were encountering errors when loading templates within the Knowledge Articles module. The fix delays access to sensitive audit reporting data, ensuring the template loading process works correctly for all user roles. This prevents disruptions to users creating and managing knowledge articles.
Original PR description
Steps to reproduce: 1. Install `accountant_knowledge` with `demo data` 2. Remove demo user from bookkeeper access right and give some lesser right 3. Open knowledge and create a new artical with demo user 4. Click on Load template for example `Meeting Minutes` Issue: It gives a access error: `This operation is allowed for the following groups: - Accounting/Bookkeeper` Cause: - accountant_knowledge was doing accounting-only work during generic template loading. Immediately calling `target_article._get_inherited_audit_report()` that returns `inherited_audit_report_id`, which is a computed relation to audit report. `audit.report` is only readable by `account.group_account_user` Solution: - delay that access until it is actually needed, - only if the template contains data-embedded="accountReport" opw-6067390 Forward-Port-Of: odoo/enterprise#117292 Forward-Port-Of: odoo/enterprise#112946
This update resolves a performance issue affecting the Odoo web client, specifically within the account module. By restructuring CSS selectors, the system now renders faster, leading to a smoother user experience. This change focuses on optimizing how the application responds to user interactions.
Original PR description
This commit moves the span selector inside one of its parent styling selector block. This avoids the browser to check for any span and look for pseudo-classes :where and :has to compute its style, which caused unexpected slowlness in the webclient. Now, the browser firstly checks for the parent class, and then look for the more complex selectors present below. There are less occurence of the selector inside the component, and it is no longer global. Forward-Port-Of: odoo/odoo#266931
This update resolves an issue where Odoo was generating incorrect CFDI (Mexican electronic invoice) XML files when using a specific cash rounding strategy. The fix ensures that cash rounding amounts are properly handled according to SAT regulations, preventing XML rejection errors and ensuring compliance. This improves the accuracy of invoices for Mexican customers.
Original PR description
When using the 'add_invoice_line' cash rounding strategy, Odoo adds a journal line with display_type='rounding'. This line has no product and therefore no ClaveProdServ, causing PAC to reject the XML with error 301. Per SAT regulations, cash rounding is not a valid CFDI concept. The CFDI must report the pre-rounding amounts (e.g. 99.80); the rounding difference (e.g. 0.20) belongs only in the journal entry on the accounting side. opw-6024078 Forward-Port-Of: odoo/enterprise#117400 Forward-Port-Of: odoo/enterprise#112633
This update resolves an issue where manually creating a bill from the purchase dashboard defaulted to the wrong journal. Now, the system correctly uses the journal selected when the 'Create a bill manually' link was accessed, ensuring bills are created in the appropriate accounting context. This improves the accuracy and reliability of purchase billing.
Original PR description
This commit fixes the default journal used when pressing "Create a bill manually" on a purchase journal in the journals dashboard. Previously, when creating a bill manually, it would be created on the default purchase journal. Now, the correct purchase journal is chosen depending on which journal I pressed the "creating a bill manually" link from. task-6167135 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261586
26 changes
Resolved issues and error corrections
This update corrects a bug where newly created product categories didn't automatically use the updated expense accounts set in the company's configuration. The change ensures that all product categories, including new ones, correctly reflect the current default expense and income account settings. This prevents discrepancies in financial reporting and simplifies account management.
Original PR description
**Steps to reproduce:** - Accounting > Configuration > Settings > Default Accounts > Product Accounts - Change the default expense account (and income account) - Create a new product category -…
**Steps to reproduce:** - Accounting > Configuration > Settings > Default Accounts > Product Accounts - Change the default expense account (and income account) - Create a new product category - category still proposed the old accounts Affected versions: from 18.2 till 19.2 **Cause:** `ir.default` for `product.category` (`property_account_expense_categ_id` and `property_account_income_categ_id`) was not updated when `res.company.expense_account_id` / `income_account_id` changed, so new categories kept using stale defaults. and in 19.0 https://github.com/odoo/odoo/blob/894281f2a3e313fc239529572b5cc8c06a3511f7/addons/account/models/company.py#L490 and https://github.com/odoo/odoo/blob/894281f2a3e313fc239529572b5cc8c06a3511f7/addons/account/models/company.py#L753 calls https://github.com/odoo/odoo/blob/894281f2a3e313fc239529572b5cc8c06a3511f7/addons/account/models/company.py#L1136-L1139 However, when stock_account is installed https://github.com/odoo/odoo/blob/894281f2a3e313fc239529572b5cc8c06a3511f7/addons/stock_account/models/res_company.py#L361-L366 this gets called, without calling super, that's why it didn't work although the fix is there, we will need to adapt another fix in 19.0+ **Solution:** Call `_set_category_defaults()` in `res.company.write()` so `ir.default` stays aligned with the company's current product default accounts. opw-6145491 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265052 Forward-Port-Of: odoo/odoo#261594
This update resolves a technical issue preventing correct reporting of US Chart of Accounts settings. The previous implementation caused a conflict between files, leading to incorrect formatting. This change consolidates the US CoA definitions for improved 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 Forward-Port-Of: odoo/enterprise#118712
This update resolves an issue where deleting an action linked to an inactive filter would sometimes cause an error. The change ensures that inactive filters are also removed when an action is deleted, preventing data inconsistencies and improving the user experience. This improves data integrity and stability.
Original PR description
How to reproduce: - Delete an action linked to an inactive user-defined filter. - Go to the User-Defined menu, - Show inactive filters (with "Archived filter") - Got a MissingError. Explanation: odoo/odoo#156622 fixes an inconsistency when deleting an action, but the reviewer was "amorti" so he (I) forgot to account for inactive "ir.filters". Add active_test=False to ensure inactive "ir.filters" are also removed. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266761 Forward-Port-Of: odoo/odoo#262195
This update addresses a performance issue in the account module's web interface. By restructuring CSS selectors, the system now loads faster, resulting in a smoother user experience. This change focuses on optimizing how the browser renders account-related pages.
Original PR description
This commit moves the span selector inside one of its parent styling selector block. This avoids the browser to check for any span and look for pseudo-classes :where and :has to compute its style, which caused unexpected slowlness in the webclient. Now, the browser firstly checks for the parent class, and then look for the more complex selectors present below. There are less occurence of the selector inside the component, and it is no longer global. Forward-Port-Of: odoo/odoo#266931
This update resolves an issue where a test in the account payment module was unreliable due to dependencies on a module not always present. The test has been updated to use a more direct method, ensuring consistent and stable results. This improves the overall quality and reliability of our payment processing tests.
Original PR description
The set_line_bank_statement_line method is defined in account_accountant, meaning we can't use it in account_payment as it will automatically break if enterprise is not installed. Replace it with direct call to _get_partial_amounts, which is the purpose of this test anyway. runbot-939260 Forward-Port-Of: odoo/odoo#267139
This pull request addresses minor issues identified during the recent update of the French payroll module (l10n_fr_pdp). It backports necessary fixes to ensure proper functionality and data accuracy within this module. This update improves the reliability of financial reporting for French businesses using Odoo.
Original PR description
Backports some fixes discovered during FW-porting task-None Forward-Port-Of: odoo/odoo#267375 Forward-Port-Of: odoo/odoo#267330
This update fixes an issue where commission plans were incorrectly shown in a salesperson's 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 reporting accuracy and plan management.
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#118769 Forward-Port-Of: odoo/enterprise#112694
A recent update caused an error when users attempted to cancel draft POS orders. This fix removes a problematic code change that was causing the error, allowing users to successfully cancel draft orders. This ensures smooth order management within the POS system.
Original PR description
Currently an error is generated when the user tries to cancel a draft POS order as follows: - Install the `pos_enterprise` module with demo data - Open the register of `Furniture store` and select…
Currently an error is generated when the user tries to cancel a draft POS order as follows: - Install the `pos_enterprise` module with demo data - Open the register of `Furniture store` and select any product - Click on the `Upload` icon to save the draft order and go to the backend. - Navigate Orders > Orders > open Draft order - Click the `cog` icon and click `Cancel Order` >>> Error occurs This issue is caused by the recent refactor introduced in [1]. The `action_pos_order_cancel` action now returns the `order` (`pos.order` recordset) instead of default returning `None`. As a result, the `action` variable contains a `pos.order` recordset, and an error is raised at line [2] when `setdefault` is called on it, since `setdefault` expects a dictionary-like object. This commit fixes the above issue by removing the code that returns the `pos.order` object from the action. As a result, the action now behaves as expected and returns the default value (`None`). [1]: https://github.com/odoo/enterprise/commit/27f57036a1d0468efe6e68d7aceafe0f01b21f93 [2]: https://github.com/odoo/odoo/blob/48f93ca056633bd5cba36b66ee1008fb57ca666c/addons/web/controllers/utils.py#L24 Sentry-7354160052 Forward-Port-Of: odoo/enterprise#118035
This update resolves an issue where appointment scheduling displayed 'no slots available' for appointments with booking ranges starting in the future. The fix ensures that the calendar accurately reflects available slots, regardless of when the booking period begins, providing a more reliable scheduling experience for users.
Original PR description
The "show only 1 month at a time" optimization computes the navigated month as datetime.now() + month_id, so the controller passes that (month, year) tuple to _get_appointment_slots:…
The "show only 1 month at a time" optimization computes the navigated month as datetime.now() + month_id, so the controller passes that (month, year) tuple to _get_appointment_slots: https://github.com/odoo/enterprise/blob/57ec37b74a60c7e879a8afa66df5ab22a92c5bcd/appointment/models/appointment_type.py#L833 For a punctual appointment whose Allow Bookings range starts in a future month, the first displayed month is start_datetime.month, so the (month, year) tuple doesn't match the month the visitor is looking at. The model fills an empty month and the recovery loop refills the first displayed month (where slots actually live): https://github.com/odoo/enterprise/blob/57ec37b74a60c7e879a8afa66df5ab22a92c5bcd/appointment/models/appointment_type.py#L973-L988 The calendar the visitor just navigated to comes back empty. Compute the navigation base from start_datetime when it lies in the future and keep datetime.now() otherwise. month_id is added on top of that base so it always matches the displayed month index. Introduced by https://github.com/odoo/enterprise/commit/664857dd2c4ae2bc0dde8f44cb94136659ed2fe2 Steps to reproduce: 1. Open the Appointments app 2. Open an appointment type and set Schedule to Weekly and Allow Bookings to On specific dates with a range starting in a future month (for example 1 September to 31 December) 3. Save and click the Preview button in the header 4. Pick a staff member to reach the calendar 5. Click the right arrow to navigate to the next month => the next month shows "Sorry, we have no more slots available for this month" opw-6206293 Forward-Port-Of: odoo/enterprise#117283
This update resolves an issue where users without specific accounting permissions were encountering errors when loading templates within the knowledge article feature. The fix delays access to sensitive audit reporting data, ensuring the feature works correctly for a wider range of user roles. This improves usability and prevents disruptions for users accessing this functionality.
Original PR description
Steps to reproduce: 1. Install `accountant_knowledge` with `demo data` 2. Remove demo user from bookkeeper access right and give some lesser right 3. Open knowledge and create a new artical with demo user 4. Click on Load template for example `Meeting Minutes` Issue: It gives a access error: `This operation is allowed for the following groups: - Accounting/Bookkeeper` Cause: - accountant_knowledge was doing accounting-only work during generic template loading. Immediately calling `target_article._get_inherited_audit_report()` that returns `inherited_audit_report_id`, which is a computed relation to audit report. `audit.report` is only readable by `account.group_account_user` Solution: - delay that access until it is actually needed, - only if the template contains data-embedded="accountReport" opw-6067390 Forward-Port-Of: odoo/enterprise#117292 Forward-Port-Of: odoo/enterprise#112946
This update resolves an issue where resetting payroll work entries (attendance) would unexpectedly delete them. The problem stemmed from a mismatch between the calendar timezone and the employee's timezone when calculating the reset window. The fix ensures work entries are handled correctly regardless of timezone, preventing data loss.
Original PR description
Setup: Set the work entry source to attendance for an employee with active contract and change his timezone so that it differs from the working schedule one. Reset previous/next day delete Work Entry (payroll) - Step to reproduce: after an attendance was created, go to "Work Entries" in payroll, select the previous/next day and hit "Reset Selected Work Entries". The Work Entry will disappear. - Cause: reset window computed with calendar tz and work entry computed with user tz - Solution: localize work entries using calendar or user tz - Test: testing positive ans negative tz in hr_work_entry_attendance (enterprise) Task: 6072325 Forward-Port-Of: odoo/odoo#266537 Forward-Port-Of: odoo/odoo#257309
This update corrects a bug where the 'Reset Selected Work Entries' function in the payroll module was unexpectedly deleting work entries due to timezone discrepancies. The fix adjusts the system's timezone handling to ensure accurate work entry management, preventing data loss and improving payroll processing reliability.
Original PR description
Setup: Set the work entry source to attendance for an employee with active contract and change his timezone so that it differs from the working schedule one. Reset previous/next day delete Work Entry (payroll) - Step to reproduce: after an attendance was created, go to "Work Entries" in payroll, select the previous/next day and hit "Reset Selected Work Entries". The Work Entry will disappear. - Cause: domain to nullify using wrong tz - Solution: adjust domain to use calendar tz - Test: testing positive ans negative tz in hr_work_entry_attendance (enterprise) Task: 6072325 Forward-Port-Of: odoo/enterprise#118441 Forward-Port-Of: odoo/enterprise#114148
This update resolves an issue where Odoo was incorrectly generating CFDI invoices in Mexico, leading to XML rejection by tax authorities. The fix ensures that cash rounding lines, which are not valid CFDI concepts, are excluded, aligning with SAT regulations. This prevents errors and ensures accurate invoice generation.
Original PR description
When using the 'add_invoice_line' cash rounding strategy, Odoo adds a journal line with display_type='rounding'. This line has no product and therefore no ClaveProdServ, causing PAC to reject the XML with error 301. Per SAT regulations, cash rounding is not a valid CFDI concept. The CFDI must report the pre-rounding amounts (e.g. 99.80); the rounding difference (e.g. 0.20) belongs only in the journal entry on the accounting side. opw-6024078 Forward-Port-Of: odoo/enterprise#117400 Forward-Port-Of: odoo/enterprise#112633
This update fixes an issue where manually creating a bill from the purchase dashboard would always use the default purchase journal. Now, the system correctly selects the journal the user was previously viewing, ensuring bills are created in the appropriate accounting context. This improves the accuracy and reliability of purchase transactions.
Original PR description
This commit fixes the default journal used when pressing "Create a bill manually" on a purchase journal in the journals dashboard. Previously, when creating a bill manually, it would be created on the default purchase journal. Now, the correct purchase journal is chosen depending on which journal I pressed the "creating a bill manually" link from. task-6167135 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261586
This update corrects an issue where placeholder text within blog posts was incorrectly displayed as HTML spans when translations were applied. The fix ensures that placeholder text always shows as plain text, improving the user experience and consistency across languages. This resolves a visual inconsistency that could confuse users.
Original PR description
Since placeholder attribute is translated, for non-form elements placeholder attributes that contain a translation <span/> need to be unwrapped to restore the plain text value. Steps to reproduce the issue: - Have website and website_blog installed - Add a second language - Open a blog post in your second lanuage - Start translating - Remove the blog title => Shown placeholder text is <span ...> task-5190459 Forward-Port-Of: odoo/odoo#267327 Forward-Port-Of: odoo/odoo#263320
This update ensures that customers only see product categories accessible from their current website view. Previously, some categories were incorrectly displayed on Website 1, leading to a 'Not Found' error. The fix filters categories based on website access, improving the user experience and preventing broken links.
Original PR description
Steps to produce: --- - Install `website_sale` with demo data. - Go to `website > ecommerce > products > ecommerce categories`. - Open `Desks/Components` category > Set website to `My website 2`. -…
Steps to produce: --- - Install `website_sale` with demo data. - Go to `website > ecommerce > products > ecommerce categories`. - Open `Desks/Components` category > Set website to `My website 2`. - Open the shop page on website > Click on Desks category. Issue: --- - The Components subcategory is still displayed on Website 1. - Clicking on it leads to a Not Found page since the category is not assigned to that website. Root cause: --- - At [1], In the category filmstrip template, subcategories are fetched without filtering based on website access. - As a result, categories restricted to another website are still shown. Solution: --- - Filter categories using the `can_access_from_current_website` method to ensure only categories accessible from the current website are displayed. [1]https://github.com/odoo/odoo/blob/900fc043064216c5943ea07392d8120be7b50b63/addons/website_sale/views/templates.xml#L758-L769 opw-6159549 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266637 Forward-Port-Of: odoo/odoo#262410
This update fixes a problem preventing AI Livechat embedded on other websites from receiving AI responses correctly. The previous setup bypassed security controls, and the response format was incompatible. The fix exposes the necessary endpoint as an HTTP stream and ensures the correct guest token is passed, allowing seamless AI interaction within embedded Livechat.
Original PR description
AI livechat embedded on another origin could not receive AI responses. The response stream is requested with fetch(), so it bypassed the livechat CORS routing that only wraps RPC calls. The matching CORS controller was also exposed as JSON-RPC, which cannot return the streamed HTTP response correctly. Expose the CORS endpoint as an HTTP stream, route the embedded fetch call to it, and pass the livechat guest token explicitly. task-id-6201054 Forward-Port-Of: odoo/enterprise#117535
This update resolves an issue preventing correct calculation of the 13th month salary in the Belgian localization. The fix ensures the forced variable salary is properly applied during payslip computation, addressing a previous type error.
Original PR description
Steps to reproduce: * Create a new payslip in belgian localization * Set pay structure type to 13th month * Set the input value for the forced variable salary * Compute the payslip sheet Issue: * Despite the change of benefits to properties, the avg_variable_revenues was still being set as one of the benefit lines instead of ref_property value which was causing an type_error traceback Solution: A simple approach is to be followed to retrieve the value fo the forced variable salary from the actual property being set by the user at the payslip form view and will be accounted for in the payslip computation. Task: 6241608 Forward-Port-Of: odoo/enterprise#118644
This update fixes an issue where orders captured in a POS session would incorrectly reappear in a new session after a device was used to close the original. This prevented users from accurately tracking order history and caused confusion about session dates. The change ensures orders are properly recorded in the intended session.
Original PR description
Before this commit, if an order was captured in a session but could not be synced to the server, and the session was closed from another device, the order would be captured in the opening control session that created after the closing. This could lead to confusion for the user as the session opening date would be after the order capture date. opw-6207434 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263776
This update fixes an issue where POS refund orders were incorrectly showing as paid, leading to an underestimation of the outstanding balance on linked sales orders. The change ensures that refund amounts are properly accounted for when calculating the unpaid balance, improving the accuracy of financial reporting. This resolves a previous bug reported as opw-6190337.
Original PR description
POS refund order lines have a positive `price_subtotal_incl` but represent money returned to the customer. `_compute_amount_unpaid` was treating them as paid amounts, causing the unpaid balance on the linked sale order to be understated. opw-6190337 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263241
This update resolves an issue where the employee org chart would crash when displaying records with a missing 'write_date' field. This occurred due to a type error when attempting to use the timestamp of a NULL value. The fix mirrors a similar pattern used elsewhere in Odoo to gracefully handle missing dates, ensuring the chart loads correctly for all employee records, including those with legacy data.
Original PR description
### Description of the issue / feature this PR addresses The Odoo 19.0 \`hr_org_chart\` controller passes \`employee.write_date\` to JS as a cache-busting key: \`\`\`python #…
### Description of the issue / feature this PR addresses The Odoo 19.0 \`hr_org_chart\` controller passes \`employee.write_date\` to JS as a cache-busting key: \`\`\`python # addons/hr_org_chart/controllers/hr_org_chart.py:35 write_date=int(employee.write_date.timestamp()) * 1000, # to have it in milliseconds for js \`\`\` When \`hr_employee.write_date\` is NULL the ORM returns \`False\` for the field, so the unconditional \`.timestamp()\` call raises: \`\`\` AttributeError: 'bool' object has no attribute 'timestamp' \`\`\` This crashes the employee form view on click for any record with NULL \`write_date\`. NULL audit columns can occur in legacy databases — records inserted via direct SQL by data-loaders, rows carried forward from very old Odoo versions that did not always populate \`_log_access\` columns, or data restored from anonymised backups. The ORM's \`vals.setdefault\` defaults in \`_log_access\` do not override an explicit falsy value passed by callers. This is a regression vs 18.0 — the 18.0 \`_prepare_employee_data\` did not include \`write_date\` at all. ### Behaviour before this PR Opening the form view of an employee with NULL \`write_date\` (any affected employee record) raises \`AttributeError\` and the org chart fails to load. ### Behaviour after this PR The controller falls back to \`0\` when \`write_date\` is missing — the same defensive pattern already used in \`odoo/addons/base/models/avatar_mixin.py:67\`: \`\`\`python bgcolor = get_hsl_from_seed(self[self._avatar_name_field] + str(self.create_date.timestamp() if self.create_date else "")) \`\`\` The org chart loads; the JS cache key for that one record is \`0\` until the record is next written (which will set \`write_date\` via the normal ORM path). No user-visible regression on healthy rows. Forward-Port-Of: odoo/odoo#264591
This update makes carousels on the website more user-friendly by pausing automatic sliding when a user prefers reduced motion. It also increases the time between carousel image changes from 1 second to 5 seconds, preventing a jarring and fast-paced experience. This improves accessibility and overall website performance.
Original PR description
Auto-sliding carousels should be paused if the user chose prefers reduced motion. This commit also increases the fallback interval when none is set from 1s to 5s. Cycling through images every second is much too fast. task-5470023 Forward-Port-Of: odoo/odoo#266997 Forward-Port-Of: odoo/odoo#250169
This update resolves a warning message that appeared during AI development in Odoo 19.2. The change ensures the warning remains visible, as it was previously suppressed due to limitations in earlier versions. This maintains visibility into potential issues during AI integration.
Original PR description
This reverts commit e1c71a90b3e7163733cba3da401eaf473f190fef. The warning is fine. https://github.com/odoo/odoo/pull/259007#issuecomment-4299650605 > il fallait justement stop le forward-port en 18.2, on veut le warning, mais on n'avait pas la possibilité d'en avoir un avant 18.1 Forward-Port-Of: odoo/odoo#266967 Forward-Port-Of: odoo/odoo#262841
This update resolves an issue where Odoo couldn't properly serialize Date, Datetime, or Binary values stored in sparse fields when exporting data to JSON. The fix utilizes existing Odoo tools to handle these types natively, preventing errors and ensuring data is consistently serialized. This improves the reliability of data exports and integrations.
Original PR description
Storing a sparse field of type Date, Datetime or Binary raises a TypeError because json.dumps() cannot natively serialize the Python objects returned by convert_to_read (date/datetime instances and bytes). Fix Serialized.convert_to_cache to pass json_default (from odoo.tools.json) as the default serializer to json.dumps(). This handles Date, Datetime and Binary values without any extra conversion step in _inverse_sparse, and reuses the existing Odoo infrastructure instead of introducing a custom helper. Steps to reproduce: 1. Create a model with a sparse field of type Date, Datetime or Binary 2. Set a value on it 3. → TypeError: Object of type date is not JSON serializable --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266779
This update corrects a minor inaccuracy in how remaining days are displayed. Specifically, when deadlines are very close to the current date, the display was sometimes misleading (e.g., showing 'Next month' for a deadline of May 1st when today is April 30th). This change ensures a more precise and user-friendly representation of time remaining.
Original PR description
Luxon is not very accurate when the field is close to today: If today is Apr 30, so a deadline set to May 1 will be displayed as "Next month". In practice, it is not wrong, but it is not very accurate. task-6175442 Forward-Port-Of: odoo/odoo#267102
This update fixes an issue where receipts for orders with many items (over 70) would be cut off mid-print, resulting in incomplete tickets. The fix increases the timeout period for printing, ensuring that all order details are printed correctly, even with extensive product lists. This improves the customer experience and prevents data loss.
Original PR description
**Steps to reproduce:** - Connect an Epson printer - Go to the PoS - Make an order with 50+ products (70 to be safe) - Pay for it and try to print the receipt - It will stop halfway through, and the next ticket will have some leftover lines on top of it **Why the fix:** In d2a4bbc the timeout for the error popup was reduced from 15000 to 3000, and a timeout on the request was also added at 3000. This means that after 3000ms, the printing will stop, even in the middle of printing. Because of this, if the order has too many items, the printing will be forcefully stopped before everything could be printed, and as we stopped it in the middle, some leftover lines can be found on top of the next printed ticket. After this commit, the timeout is set to double the current time, and will be expanded further if we still have some issues. opw-6049062
9 changes
Resolved issues and error corrections
This update resolves an issue where deleting an action linked to an inactive filter would sometimes cause an error. The change ensures that inactive filters are also removed when an action is deleted, maintaining data consistency and preventing unexpected errors for users. This improves the stability and reliability of the system.
Original PR description
How to reproduce: - Delete an action linked to an inactive user-defined filter. - Go to the User-Defined menu, - Show inactive filters (with "Archived filter") - Got a MissingError. Explanation: odoo/odoo#156622 fixes an inconsistency when deleting an action, but the reviewer was "amorti" so he (I) forgot to account for inactive "ir.filters". Add active_test=False to ensure inactive "ir.filters" are also removed. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266761 Forward-Port-Of: odoo/odoo#262195
This update corrects an issue where placeholder text within blog posts was incorrectly displayed as HTML spans after translation. The fix ensures that placeholder text always shows as plain text, regardless of language settings, improving the user experience and consistency of blog content. This resolves a visual inconsistency that was impacting readability.
Original PR description
Since placeholder attribute is translated, for non-form elements placeholder attributes that contain a translation <span/> need to be unwrapped to restore the plain text value. Steps to reproduce the issue: - Have website and website_blog installed - Add a second language - Open a blog post in your second lanuage - Start translating - Remove the blog title => Shown placeholder text is <span ...> task-5190459 Forward-Port-Of: odoo/odoo#266166 Forward-Port-Of: odoo/odoo#263320
This update backports several bug fixes identified during a recent upgrade process (FW-porting) for the l10n_fr_pdp module. These fixes address minor issues related to French accounting functionality, ensuring continued accuracy and reliability for our French-speaking customers. The changes improve the overall stability of the module.
Original PR description
Backports some fixes discovered during FW-porting task-None Forward-Port-Of: odoo/odoo#267330
This update resolves a performance issue that was causing slow rendering in the Odoo web client. By restructuring CSS selectors, the system now processes styles more efficiently, leading to a faster and smoother user experience. This change focuses on optimizing the visual presentation of the application.
Original PR description
This commit moves the span selector inside one of its parent styling selector block. This avoids the browser to check for any span and look for pseudo-classes :where and :has to compute its style, which caused unexpected slowlness in the webclient. Now, the browser firstly checks for the parent class, and then look for the more complex selectors present below. There are less occurence of the selector inside the component, and it is no longer global. Forward-Port-Of: odoo/odoo#266931
This update resolves an issue where a test was failing due to an outdated method call. The change simplifies the test by directly using the intended functionality, ensuring consistent and reliable test results. This improves the overall stability of the payment processing system.
Original PR description
The set_line_bank_statement_line method is defined in account_accountant, meaning we can't use it in account_payment as it will automatically break if enterprise is not installed. Replace it with direct call to _get_partial_amounts, which is the purpose of this test anyway. runbot-939260 Forward-Port-Of: odoo/odoo#267139
This update fixes a potential issue where customer display URLs were inconsistently formatted across Odoo. By standardizing this URL generation logic, it now allows other modules, like the mobile POS app, to reliably access the correct URL. This ensures consistent customer access and simplifies future development.
Original PR description
Previously, the logic to build the customer display URL was scoped entirely within the `openCustomerDisplay` method. This prevented other modules from easily reusing the exact same URL formatting logic, leading to duplicated or inconsistent URL construction. By extracting this logic into a dedicated `customerDisplayURL` getter, we allow extending modules (such as `pos_mobile`) to reliably access the correctly formatted URL. This ensures that essential parameters, like the device UUID and access token, are consistently applied whenever the customer display URL is needed across the codebase. opw-6212067 See also: https://github.com/odoo/enterprise/pull/118458 Forward-Port-Of: odoo/odoo#266854 Forward-Port-Of: odoo/odoo#266581
This update fixes an issue where the mobile point-of-sale app wasn't correctly linking to customer details. By standardizing the URL generation process with the main POS system, the mobile app now reliably displays customer information. This ensures a consistent and accurate customer experience for mobile users.
Original PR description
The `_showDisplayAndGoToUrl` method in the mobile navbar was manually constructing its own URL for the customer display. This hardcoded string incorrectly omitted the device UUID, which is required for proper display identification and tracking. By leveraging the new `customerDisplayURL` getter introduced in the parent `Navbar` component, the mobile implementation now utilizes the exact same URL logic as the standard point of sale. This resolves the inconsistency and ensures the customer display functions reliably on mobile devices. opw-6212067 Forward-Port-Of: odoo/enterprise#118624 Forward-Port-Of: odoo/enterprise#118458
This update fixes an issue where commission plans were incorrectly displayed in the 'Other Plans' section for salespeople, even when their assignment periods didn't overlap. The system now accurately checks for overlapping assignment dates, ensuring that only relevant plans are shown, improving the accuracy of 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#118769 Forward-Port-Of: odoo/enterprise#112694
This update resolves an issue where appointment scheduling displayed 'no slots available' for appointments with booking ranges starting in the future. The fix ensures that the calendar correctly reflects all available months, regardless of when the booking range begins, providing a more accurate and user-friendly appointment booking experience.
Original PR description
The "show only 1 month at a time" optimization computes the navigated month as datetime.now() + month_id, so the controller passes that (month, year) tuple to _get_appointment_slots:…
The "show only 1 month at a time" optimization computes the navigated month as datetime.now() + month_id, so the controller passes that (month, year) tuple to _get_appointment_slots: https://github.com/odoo/enterprise/blob/57ec37b74a60c7e879a8afa66df5ab22a92c5bcd/appointment/models/appointment_type.py#L833 For a punctual appointment whose Allow Bookings range starts in a future month, the first displayed month is start_datetime.month, so the (month, year) tuple doesn't match the month the visitor is looking at. The model fills an empty month and the recovery loop refills the first displayed month (where slots actually live): https://github.com/odoo/enterprise/blob/57ec37b74a60c7e879a8afa66df5ab22a92c5bcd/appointment/models/appointment_type.py#L973-L988 The calendar the visitor just navigated to comes back empty. Compute the navigation base from start_datetime when it lies in the future and keep datetime.now() otherwise. month_id is added on top of that base so it always matches the displayed month index. Introduced by https://github.com/odoo/enterprise/commit/664857dd2c4ae2bc0dde8f44cb94136659ed2fe2 Steps to reproduce: 1. Open the Appointments app 2. Open an appointment type and set Schedule to Weekly and Allow Bookings to On specific dates with a range starting in a future month (for example 1 September to 31 December) 3. Save and click the Preview button in the header 4. Pick a staff member to reach the calendar 5. Click the right arrow to navigate to the next month => the next month shows "Sorry, we have no more slots available for this month" opw-6206293 Forward-Port-Of: odoo/enterprise#117283
4 changes
Resolved issues and error corrections
This update resolves a critical issue that caused OOM crashes when generating the Swedish SIE 4 report with large datasets. By optimizing the database query and using efficient data processing techniques, the report now runs significantly faster and uses far less memory, improving overall system performance.
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 ensures Odoo automatically syncs product tags with UrbanPiper, resolving an issue where a single, hardcoded tag was used. Now, users can define relevant tags based on their tax settings and UrbanPiper's requirements, leading to more accurate data transmission and improved integration.
Original PR description
Before this commit: ------------------------------------------ - The UrbanPiper payload used a hardcoded tag when the tax percentage was not 5%. - There was no mechanism to add additional tags based on providers, even though UrbanPiper supports multiple tags. After this commit: ------------------------------------------ - Tags are now dynamically handled using the Tag field in the product. - Users can define tags according to their tax configurations and aggregator requirements. - UrbanPiper only accepts relevant tags (default or provider-specific). task - 5154061 Forward-Port-Of: odoo/enterprise#112550 Forward-Port-Of: odoo/enterprise#96742
This update fixes an issue where quality alerts weren't being created when incoming emails were processed without a company assigned. The fix ensures that a company ID is always provided, preventing errors and guaranteeing that all emails are correctly logged as quality alerts. This improves the reliability of our quality tracking system.
Original PR description
Steps to reproduce 1. Install quality 2. Create an incoming email server 3. Go to Quality > Configuration > Quality Teams > Team > add alias email 4. Do not fill the company field 5. Send email to this alias 6. Fetch emails from incoming email server Issue: - Record is not created in the quality alert Root cause: - For the Quality alert model, the field `company_id` is required, but while we fetch emails We haven't set the `company_id` on the quality alert team, resulting in trying to insert a null value on the quality alert model. Solution: - Give a default value to company_id. - Raise a validation error on not having a company_id - Update alias default values on changing company_id opw-5917791 Forward-Port-Of: odoo/enterprise#117846 Forward-Port-Of: odoo/enterprise#109947
This update fixes an issue where payments to the Mexican tax authority (CFDI) were being sent multiple times for the same invoice. The fix ensures the 'Update Payments' button only appears after the full invoice payment is reconciled, preventing inaccurate reporting and potential overpayment issues. This improves financial accuracy and compliance.
Original PR description
Issue: Sending payments to SAT before its full amount is reconciled allow sending the same invoice payment several times to CFDI. Steps to reproduce: - In a Mexican company - Create an invoice A of…
Issue: Sending payments to SAT before its full amount is reconciled allow sending the same invoice payment several times to CFDI. Steps to reproduce: - In a Mexican company - Create an invoice A of $40 to Inmobiliaria CVA - Confirm and send to CFDI - Go to bank, create a new Bank transaction of $80 - reconcile with Invoice A - Go to invoice A => click on button "Update payments" (it doesn't appear in previous versions) - Then sheet CFDI and Download There is the first XML sent to CFDI with payment for invoice A - Create an invoice B of $40 to Inmobilira CVA - Confirm and send to CFDI - reconcile the transaction with Invoice B - Go to invoice B - Click on button "Update payments" - Then sheet CFDI and Download There is the second XML sent to CFDI with payment for invoices A and B Invoice A payment was sent twice to CFDI Expected behavior: - The "Update payment" button should appear only once the invoice payment is fully reconciled. Current behavior: - The update payment button appear once the invoice is reconciled with a payment. The method `_l10n_mx_edi_cfdi_invoice_get_payments_diff` is called twice, once to check whether it's needed to display the "Update button" and once when you try to update the payment (called only after clicking on said button). opw-5432421 Forward-Port-Of: odoo/enterprise#108355
4 changes
Resolved issues and error corrections
This update resolves a problem where users authenticating with Polish PESEL certificates were incorrectly rejected by KSeF. The change expands the matching criteria for certificate identifiers, ensuring existing users with standard certificates continue to function correctly. This prevents authentication errors and maintains seamless operation for our Polish customers.
Original PR description
### Description of the issue/feature this PR addresses: **Issue:** A recent update to support `certificateFingerprint` introduced a regression for existing users authenticating with standard…
### Description of the issue/feature this PR addresses: **Issue:** A recent update to support `certificateFingerprint` introduced a regression for existing users authenticating with standard certificates (AKA `certificateSubject`). Because the matching logic strictly checked for the company NIP within the certificate subject, it failed for users using personal PESEL certificates to act on a company's behalf. **Previous PR:** https://github.com/odoo/odoo/pull/264851 **Solution:** Expanded the string-matching heuristic in the XML signer to strip formatting characters from the NIP and explicitly checks for standard Polish qualified certificate prefixes (VATPL and PNOPL) to accurately get the identifier type. ### Current behavior before PR: When a user logs in via a personal PESEL certificate for a company context, the NIP check fails and miscategorizes the payload as a `certificateFingerprint`. KSeF rejects this mismatch, causing a 400 error for previously working setups. ### Desired behavior after PR is merged: The authentication flow distinguishes between `certificateSubject` and `certificateFingerprint` by checking for valid Polish prefixes or exact cleaned NIP matches. Existing customers are restored to working order natively, and new customers using manual fingerprints are still supported without requiring any database or UI changes. opw-6251153 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267060
This update backports several bug fixes identified during a recent upgrade process for the French payroll module (l10n_fr_pdp). These fixes address minor issues impacting the accurate processing of French tax regulations, ensuring continued compliance and reliable financial reporting.
Original PR description
Backports some fixes discovered during FW-porting task-None Forward-Port-Of: odoo/odoo#267330
This update fixes an issue where group allocations with past start dates incorrectly showed zero accrual amounts. The change ensures that accrual calculations are properly triggered when group allocations are created, regardless of the start date, ensuring accurate time-off tracking.
Original PR description
Problem ------------------ When creating group allocations, when the allocation type is accrual and the start date is set in the past, the newly created allocations have the accrual amounts at 0. To…
Problem ------------------ When creating group allocations, when the allocation type is accrual and the start date is set in the past, the newly created allocations have the accrual amounts at 0. To reproduce: 1. Create an accrual plan with an easily measurable milestone (e.g. 1 day every day) 2. From the allocations view -> New Group Allocation 3. Enter the following values: Grant -> By Employee Employees -> select your employee Time Off Type -> Paid Time Off (doesn't matter too much) Allocation Type -> Based on Accrual Plan Validity Period -> any date a few days in the past (Personally I tested with 1/1/2025 and no end date) Allocation -> Keep at 0 Allocate Time Off 4. Go to the newly created allocation The allocation amount is 0. Reason ---------------------- When creating group allocations, the `hr.leave.allocation.generate.multi.wizard` calls the `_process_accrual_plans()` method to compute the accruals, but when the allocations are created, the nextcall and lastcall fields are set, so the accruals are not computed and the scheduled action also does nothing until the nextcall date. The onchange method manually sets the nextcall date to False so the accruals are processed. Solution ------------------ Created a method to get the fields that need to be set to calculate the initial accrual amounts from the start date, which is called both in the onchange and to batch write in the wizard before accrual plans are processed. The wizard checks the duration values before overwriting the number_of_days field, since user manually setting the amount should overwrite the calculations. task-4938695 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266969 Forward-Port-Of: odoo/odoo#265783
This update resolves an issue where activity labels in the Chatter interface were not displaying correctly when the default summary was removed. The fix ensures that activity labels now consistently use the `display_name` when the summary is empty, providing accurate and consistent information for users.
Original PR description
Before this commit: --- - Chatter activity display used [`summary`](https://github.com/odoo/odoo/blob/4ba8950c25452cfe3310d40c26bd359c27f6c576/addons/mail/static/src/core/web/activity.js#L42) to get…
Before this commit: --- - Chatter activity display used [`summary`](https://github.com/odoo/odoo/blob/4ba8950c25452cfe3310d40c26bd359c27f6c576/addons/mail/static/src/core/web/activity.js#L42) to get the display name. - If `summary` was empty, it fell back to [`display_name`](https://github.com/odoo/odoo/blob/4ba8950c25452cfe3310d40c26bd359c27f6c576/addons/mail/static/src/core/web/activity.js#L44). - However, `_to_store` only [stored](https://github.com/odoo/odoo/blob/4ba8950c25452cfe3310d40c26bd359c27f6c576/addons/mail/models/mail_activity.py#L680) `summary`. - As a result, nothing was shown when `summary` was empty, even though `display_name` was set. Steps to reproduce: --- - Create an activity in chatter - Remove the default summary if set. - Observer the title. https://github.com/user-attachments/assets/1684feb7-02d0-4ac1-9c00-d2aaae88e045 After this commit: --- - Added `display_name` to `_to_store` along with `summary`. - Chatter activity now correctly falls back to `display_name`. - Users can now see the correct activity label in chatter. OPW: 6212976 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
28 changes
Resolved issues and error corrections
This update enhances the way Odoo handles errors when communicating with external payment systems (IAP). By improving exception handling, the system is now more resilient to potential issues, leading to more reliable transactions and reduced disruption for users. This change focuses on internal stability and doesn't directly impact the user experience.
Original PR description
See the commit in the community repository for more information about this change. task-none
This update corrects a minor issue in the product barcode lookup test data. Previously, the test included an unnecessary 'color' attribute due to a change in how product colors are defined. The fix replaces the 'Purple' color value with 'Invisible' to ensure the test consistently validates the color guard logic without relying on demo data.
Original PR description
The Issue: The barcode lookup flow in `_update_product_by_barcodelookup` searches for an attribute by name and links a matching value to the new product, but it never auto creates a missing color value because of the explicit `if not (attribute_value or attr_name == 'color'):`. Previous to 3181721 `product_barcodelookup` had a `color` attr which was removed in favor of the standard `Color` attr in `product` with demo values such as Purple, that's why now we get an extra attribute line. The Fix: Replace `"color": "Purple"` in the mock with `"color": "Invisible"`, a value not present in demo data. This ensures the test always exercises the color guard logic, but remains stable and independent of demo data. runbot-937747
This update re-enabled a previously skipped test related to the planning_field_service_sale_timesheet module. This change is necessary to ensure the continued stability and functionality of the system following the recent migration to the 'owl3' version. It's a routine maintenance step to maintain test coverage.
Original PR description
This commit unskips a test that has been skipped during the migration to owl3.
This update resolves a technical issue where the confirmation button in the AI tool was failing. The change updates the button's functionality to align with the new Owl 3 interface, ensuring the button now functions correctly and reliably. This improves the user experience for AI tool interactions.
Original PR description
Prior to this commit, the tool confirmation button would throw an error when clicked. This commit change the `on-click` call to match the new Owl 3 interface (using `this.onClick` instead of `onClick`)
This update fixes inconsistencies in how contract types are defined across Odoo modules. Specifically, the contract type ID was standardized and redundant entries were removed to ensure data accuracy and prevent future issues. This change is limited to version 17 and will be addressed in a separate update.
Original PR description
[IMP] hr_contract_salary: fix contract_type_id definition The definitions of the contract_type_id in hr_contract_salary_offer and l10n_be_hr_contract_salary/hr_contract_salary_offer should be same I converted the definition of contract_type_id in the base module to the Belgium one. Also, the contract_type_id was inserted to the view in Belgium one as well, I deleted that part to prevent double appearance. This task is only for v.17, after this version I will open a new PR to handle them. Do not forward the task after v.17 (only for v.17) task - 6101717 Forward-Port-Of: odoo/enterprise#118069 Forward-Port-Of: odoo/enterprise#113244
This update fixes a potential issue where users could select inactive Intrastat codes on products. Now, a warning message will appear if a user attempts to select an invalid or expired code, preventing incorrect data entry and ensuring accurate reporting for Intrastat purposes. This improves data integrity and compliance.
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 fixes an issue where selecting the start date first would incorrectly set both the start and end dates for deferred accounting periods. The change ensures the end date is correctly set first, resolving a display error where periods appeared reversed (e.g., 2026-2025).
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 Forward-Port-Of: odoo/enterprise#114866
This update addresses a problem where bank statement KPIs weren't being updated correctly when no statements were processed. Now, if no bank statements are reported, the KPIs will be reset to an empty state, ensuring accurate reporting and data integrity within the account module.
Original PR description
The aim of this commit is to update the integer kpis when those aren't received. ### Context: The account module report the bank statement in draft to process. When all bank statement have been processed, there isn't any and thus, the module send back an empty list. ### Before this commit: The bank statement kpi wasn't updated as we didn't received anything about that specific kpi. ### After this commit: Any kpi that wouldn't be reported would get it's column emptied. opw-6170973 Forward-Port-Of: odoo/enterprise#115695
This update resolves an error that prevented users from adding multiple loan lines to a record after the initial creation. The fix ensures that date comparisons within the system are handled correctly, allowing users to accurately manage loan line details. This improves the usability of the loan management feature.
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 Forward-Port-Of: odoo/enterprise#118354
This update corrects a bug where importing a product with a changed subscription type would bypass a necessary warning. Now, when a product has been sold, attempting to manually change its subscription type triggers a warning, ensuring data integrity and preventing unintended subscription modifications.
Original PR description
__ ## Short functional explanation of the error When we have a subscription product that has already been sold. If we try to import a product with the same ID but where we change the subscription…
__ ## Short functional explanation of the error When we have a subscription product that has already been sold. If we try to import a product with the same ID but where we change the subscription type of the product, the import is executed without issue. However, this leads to undesired behavior: when we go to the product page and try to manually change the subscription type (set it back to subscription), the change is not applied as a warning is raised. ## Reproduction Steps Make sure you have debug mode enabled. 1. Create a product, and check the Subscription box. 2. Click on Orders and create a Quotation with this product, then confirm. 3. Go to Products > Products. Select the list view and search for the product you just created. Select it, and click Actions > Export. 4. Check the import compatible field. Select the fields to export: name, id and recurring_invoice. Upon exporting, a file is downloaded. 5. Access that file and change the recurring_invoice to FAUX or FALSE if your computer is in English. Save the changes. 6. Unselect the product and click on the cog, top right > Import. Click on Upload Data File and select the file that you have downloaded upon exporting, then import. ### Expected behavior A user warning is raised: we shouldn't be able to change the subscription type of the product when it has already been sold. ### Unexpected behavior The import is processed normally. Then, when we access the product page, and try to check the Subscriptions box again, a warning is raised. ## Origin of the issue Nothing prevents the import from occurring in that case. __ opw-6143789 Forward-Port-Of: odoo/enterprise#117318 Forward-Port-Of: odoo/enterprise#115046
This update optimizes a key query used in financial reporting by correcting how the database searches for reconciliation models. By fixing a wildcard issue, the query now utilizes the database's index more effectively, resulting in significantly faster performance. This change improves the speed of financial reports and reduces processing times.
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 | Forward-Port-Of: odoo/enterprise#117746
This update optimizes the styling of account reports, specifically targeting performance issues related to large tables. By using CSS variables and simplifying selectors, the changes reduce unnecessary DOM calculations, resulting in smoother and faster report rendering, especially for complex reports.
Original PR description
Forward-Port-Of: odoo/enterprise#118741 Forward-Port-Of: odoo/enterprise#118490
This update fixes an issue where the 'next' and 'previous' arrows in the planning calendar view didn't retain the previously selected task's context. Now, when navigating the calendar, the new slot will automatically default to the same task, ensuring a consistent and intuitive scheduling experience. This improves usability and reduces the chance of users accidentally starting new tasks in the wrong context.
Original PR description
Issue: ---------------------------------------- The default values aren't kept when using the previous/next arrows in planning calendar view. Steps to reproduce:…
Issue: ---------------------------------------- The default values aren't kept when using the previous/next arrows in planning calendar view. Steps to reproduce: ---------------------------------------- - Go on a Project task - Click the "To Schedule" button - Switch to calendar view - If we create now, the new slot will have the task as default value - Click the arrow to switch to next week - If we create there will be no default values Cause: ---------------------------------------- Since 7b844902e5c3a7aeedda6cc2be61366caad2d144 the context is lost when using the arrows. When switching to calendar view `load()` is called with the context in the params: https://github.com/odoo/odoo/blob/786c373d5ac8afdfb79eb7a7d69c5eb83b919625/addons/web/static/src/model/model.js#L163-L164 But when using the arrows, it is called with only a date: https://github.com/odoo/odoo/blob/786c373d5ac8afdfb79eb7a7d69c5eb83b919625/addons/web/static/src/views/calendar/calendar_controller.js#L426 So `...params.context,` is empty, and the context is only `hide_planned_dates: true,`. Solution: ---------------------------------------- If no context is specified in params, we use the one in `this.meta` to allow changing the context by giving it in the params but keeping the previous context when it's not given. opw-6211055 Forward-Port-Of: odoo/enterprise#118527
This update streamlines the timesheet setup process for users. Previously, users had to manually start the activity watch server each login. This change removes that step, thanks to an updated installer, making timesheet setup much simpler and more convenient.
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#118664 Forward-Port-Of: odoo/enterprise#115373
This update resolves an issue where product prices didn't automatically update when the cost price was modified. Previously, users had to manually switch price lists to trigger the price update. Now, the system correctly updates the 'On Sale Price' whenever the cost price changes, ensuring accurate pricing calculations.
Original PR description
When we create a product variant and have a pricelist which is based on the cost price, and change the cost price, the on_sale_price doesn't update. You have the change the price list to other and…
When we create a product variant and have a pricelist which is based on the cost price, and change the cost price, the on_sale_price doesn't update. You have the change the price list to other and back to the one you want for it to trigger change because the _onchange_compute_pricing only gets triggered if there's change on pricelist (pricer_sale_pricelist_id), and sales price (lst_price). Steps to Reproduce: 1.Create a pricelist and add a line with "formula" price type, and based on "cost", 2.Create a product variant, and add the pricelist just created. 3.Change the "Cost". The "On Sale Price" doesn't update. 4.You have to change the price list to some other and back to the one you want for the "On Sale Price" to update. To fix the issue, we add the field Cost (standard_price) on api.onchange, so when we change the cost it'll update the "On Sale Price" right away. opw-5947995 Forward-Port-Of: odoo/enterprise#118584 Forward-Port-Of: odoo/enterprise#111892
This update corrects a technical error in the US reporting module that prevented the correct formatting of negative account balances. The issue stemmed from a duplicate file structure, and this fix consolidates the necessary configurations within a single, dedicated file for US reporting. This ensures accurate reporting for US-based financial data.
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 Forward-Port-Of: odoo/enterprise#118712
This update resolves an issue where changing a task's deadline didn't automatically update the deadlines of its dependent tasks, even with the 'Auto-Reschedule (Keep Buffer)' option enabled. The fix ensures that dependent tasks' start dates adjust dynamically when a main task's deadline is modified, improving project scheduling accuracy. This impacts project managers and team members relying on the Gantt chart for task synchronization.
Original PR description
__ ## Short functional explanation of the error When rescheduling the deadline only of a task that has dependencies, other dependencies won't be moved in time, even if we select `Auto-Reschedule…
__ ## Short functional explanation of the error When rescheduling the deadline only of a task that has dependencies, other dependencies won't be moved in time, even if we select `Auto-Reschedule (Keep Buffer)`. ## Reproduction Steps 1. Go to Project. On a given project, click on the 3 dots on the top right of the project card. Then, click settings and under Task Management, check Task Dependencies. 2. Create 2 tasks for this project. On task 1, click on the Deadline field, then click on the top right of the calendar card to set a planned date. 3. On task 2, click on the Blocked By tab. Then, add a line with task 1. Select a planned date like you did with task 1. 4. Go back to the project and on the top right, click on the Gantt view. Make sure that above the calendar, the Auto-Reschedule (Keep Buffer) option is selected. Then, move forward (or backward) the deadline of task 1 by only clicking on the right edge of the pill and dragging/dropping it to the left/right. ### Expected behavior As task 2 depends on task 1, and we need to keep the buffer. The start date of task 2 should be moved left when we drop the deadline of task 1 further left, or right when we move the deadline of task 1 further right. ### Unexpected behavior Nothing happens. ## Origin of the issue ### JS side When we click on the whole task 1 and drag it to the right (thus changing the start date *and* the deadline), the dependent tasks are also moved right. When performing this action, this calls the method `dragPillDrop`. In it, we can see this piece of code: https://github.com/odoo/enterprise/blob/e113c851e6fa9a7a3c1dca840926ed7e58b3f16f/web_gantt/static/src/gantt_renderer.js#L1484-L1489 where `this.isAutoPlan` indicates whether we checked the Auto-Reschedule (Keep Buffer) option. In that case, we call `rescheduleAccordingToDependency`, which performs this ORM call: https://github.com/odoo/enterprise/blob/e113c851e6fa9a7a3c1dca840926ed7e58b3f16f/web_gantt/static/src/gantt_model.js#L500 However, when only moving the deadline of the task, we call the method `resizePillDrop`. In this method, we don't check if `this.isAutoPlan` is True, as we perform in all case the call to: https://github.com/odoo/enterprise/blob/e113c851e6fa9a7a3c1dca840926ed7e58b3f16f/web_gantt/static/src/gantt_renderer.js#L2822 Which will trigger the orm call: https://github.com/odoo/enterprise/blob/e113c851e6fa9a7a3c1dca840926ed7e58b3f16f/web_gantt/static/src/gantt_model.js#L479 which will call the `web_gantt_write` method in Python, only writing on the task we changed the deadline of. ### PY side Inside `web_gantt_reschedule`, to reschedule dependent tasks, we have to reach the method call: https://github.com/odoo/enterprise/blob/e113c851e6fa9a7a3c1dca840926ed7e58b3f16f/web_gantt/models/models.py#L247 However, there's a condition preventing us from reaching that code when only changing the deadline: https://github.com/odoo/enterprise/blob/e113c851e6fa9a7a3c1dca840926ed7e58b3f16f/web_gantt/models/models.py#L230-L235 Yet, we need to trigger the code and reschedule dependencies even if there's no planned date as soon as we change the deadline. Once we're in `_web_gantt_action_reschedule_candidates`, we check if we're in the case of preponing or postponing the task (i.e the direction of the rescheduling): https://github.com/odoo/enterprise/blob/e113c851e6fa9a7a3c1dca840926ed7e58b3f16f/web_gantt/models/models.py#L410 This call is performed with `start_date_field_name`, which is present in the `vals` in the case of moving a whole task. Yet, in our case, we only move the deadline, so `start_date_field_name` isn't in our `vals`. So, to get the direction of our rescheduling, we have to use `stop_date_field_name` instead. Then, we perform this call: https://github.com/odoo/enterprise/blob/e113c851e6fa9a7a3c1dca840926ed7e58b3f16f/web_gantt/models/models.py#L412 However, in our case, the dependent tasks are still found under the `dependency_inverted_field_name` field. This leads us to the return of the function, where we call `_web_gantt_move_candidates`. In it, we retrieve the previous values of the pill we're modifying with: https://github.com/odoo/enterprise/blob/e113c851e6fa9a7a3c1dca840926ed7e58b3f16f/project_enterprise/models/project_task.py#L1366 using `vals`. Later we use `start_date_field_name` to update the dates of dependent tasks: https://github.com/odoo/enterprise/blob/e113c851e6fa9a7a3c1dca840926ed7e58b3f16f/project_enterprise/models/project_task.py#L1413-L1415 Still, in our case, we don't have `start_date_field_name` in vals. Thus, we have to define `old_vals_per_pill_id[self.id][start_date_field_name]`. Next, we define the start date and end date of the intervals in which we reschedule the dependent tasks (so, the left and right bounds of intervals): https://github.com/odoo/enterprise/blob/e113c851e6fa9a7a3c1dca840926ed7e58b3f16f/project_enterprise/models/project_task.py#L1392-L1401 In case of a `search_forward`, this is natural. Nevertheless, in the case of a backwards search, we can't consider the start date of the first task to be the right bound for our dependent tasks, as they occur after the first task! This would mean that our right bound is set before the dependent tasks even start. So, in our case of changing only a deadline, we have to set the right bound to the latest deadline of the dependent tasks. They won't be set to later, as we are moving the deadline backward. Finally, in the case of setting a deadline backwards, we have to keep the time gap between task 1 and the dependent tasks, based on the working hours. This feature wasn't implemented. __ opw-6080405 Forward-Port-Of: odoo/enterprise#117815 Forward-Port-Of: odoo/enterprise#113787
This update ensures that work entry data exported to Acerta adheres to their specific formatting requirements. The export now correctly pads the external reference number to 17 digits with 3 spaces and the work entry type code to 4 digits with 2 spaces, resolving potential data discrepancies with the Acerta system. This ensures accurate data transmission and processing.
Original PR description
We want to adhere to the correct format for the export of work entries to Acerta. There, the number of external reference is padded to 17, not 20, and is followed by 3 spaces, before the date. Also, the code of the work entry type is padded to 4 and followed by 2 spaces. Task: 6168106 Forward-Port-Of: odoo/enterprise#118568 Forward-Port-Of: odoo/enterprise#118124
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 for overlapping salesperson assignments, ensuring that only relevant plans are displayed, improving the accuracy of 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#118769 Forward-Port-Of: odoo/enterprise#112694
This update resolves an issue that caused errors when sending shifts involving multiple resources. The fix ensures the system correctly handles shifts with multiple assigned employees, preventing a traceback and improving the reliability of shift scheduling. This change enhances the overall stability of the Planning module.
Original PR description
Steps to reproduce: - Install Planning - Create two resources - Enable "Employee Unavailabilities > Unassign themselves from shifts - Create a shift with multiple resources - Send the shift Issue: A traceback occurred when sending a shift linked to multiple resources. Cause: The unavailability URL was generated using `employees.token`, which expects a single employee record. Fix: Handle shifts with multiple resources correctly when generating the unavailability URL to avoid the traceback when sending shifts. issue commit-https://github.com/odoo/enterprise/pull/106700/commits Forward-Port-Of: odoo/enterprise#118292
This update fixes an issue where unreconciling a payment on a recurring invoice would automatically generate a new draft invoice for the following month. The change adds a context flag to prevent this behavior, ensuring invoices are created correctly after reconciliation. This improves invoice management and reduces potential errors.
Original PR description
Issue: Unreconciling a payment in a batch payment from a recurring invoice will cause an invoice for the next recurring period to be generated Steps to reproduce: 1. Create and confirm a monthly…
Issue: Unreconciling a payment in a batch payment from a recurring invoice will cause an invoice for the next recurring period to be generated Steps to reproduce: 1. Create and confirm a monthly recurring invoice 2. Create a payment for the invoice 3. Create a batch payment and add the payment created in step 2 then validate it 4. Create a bank statement line and reconcile it with the batch payment created in step 3 5. Unreconcile the payment from the invoice from the invoice form view 6. Notice that a draft invoice for the next month’s recurring invoice is created Cause: When unreconciling the payment from the invoice via the invoice form view, the method “delete_reconciled_line” is called. In the “account_accountant_batch_payment” override of that method, it will reset the invoice back to draft and repost it. However, when posting a recurring invoice, the default behavior is to create the invoice for the next recurrence period Solution: Adding a new context flag called “skip_recurring_copy” will prevent the next period’s recurring invoice from being generated when invoices are posted through “delete_reconciled_line” opw-6158881 Forward-Port-Of: odoo/enterprise#117011
This update corrects a technical issue that could cause the DMFA report PDF generation to fail when non-numerical characters were entered for work addresses. The change adds a validation check to ensure only numbers are used, improving the reliability of the report and preventing potential disruptions.
Original PR description
Added a validation error in the _get_code function in case the code contains non-numerical characters. This prevents non-numerical characters input from breaking the DMFA report PDF generation. Task: 6231125 Forward-Port-Of: odoo/enterprise#118367 Forward-Port-Of: odoo/enterprise#117889
This update resolves an error that occurred when the Salary Increase wizard was used with a past date for the salary increase. The fix prevents a crash by handling cases where no matching employee versions are found for the specified date, ensuring the wizard functions correctly.
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-7498213478
Forward-Port-Of: odoo/enterprise#118309This update resolves a technical issue where the system incorrectly accessed bike color information when creating new bikes. The fix ensures that color data is only retrieved when a new bike is being added, improving data accuracy and preventing potential errors.
Original PR description
- Cause: for a new bike we try to access color attribute on fleet.vehicle.model (using fleet.vehicle for old bike) - Solution: access color attribute only if not a new bike Task: 6245895
This update ensures Odoo's Czech VAT reports accurately comply with the Czech tax authority's hybrid rounding rules. Previously, the system didn't correctly handle the required rounding of tax bases and VAT amounts. This change directly updates report expressions to ensure accurate VAT return calculations and avoid potential discrepancies.
Original PR description
The Czech tax authority enforces specific hybrid rounding rules for the VAT Return: - Tax bases and subtotals must use standard mathematical rounding. - VAT Due / Tax Amounts must be rounded UP to the nearest whole CZK. - Calculated totals must be the exact sum of the previously rounded lines. Currently, the report generation does not support this mixed rounding behavior out of the box. This commit resolves the issue by updating the report expressions directly in the XML to comply with the legal requirements thus removing the need to have the float_round method in the tax_report_handler. task: 6081523
This update resolves an issue preventing users from unreconciling SEPA CT batch payments with a 'pending' online status. Previously, the system incorrectly blocked this process, causing delays in bank statement reconciliation. The fix allows internal unreconciliation flows to bypass validation, ensuring accurate bank statement updates.
Original PR description
**Issue:** The account_online_payment module overrides `action_draft` to raise a UserError for sepa_ct payments belonging to a batch with a `payment_online_status` = 'pending' or 'accepted'. This…
**Issue:** The account_online_payment module overrides `action_draft` to raise a UserError for sepa_ct payments belonging to a batch with a `payment_online_status` = 'pending' or 'accepted'. This blocks the bank statement unreconciliation process. When `delete_reconciled_line` is called, it tries to set payments to draft and re-post them, despite it being an internal process not a manual user modification. **Steps to reproduce:** - Setup a 'sepa_ct' payment method on a bank journal. - Create a bill with a vendor with a trusted bank account. - Create a payment for that bill with a 'sepa_ct' payment method. - Add the payment to a batch. - Manually set the `payment_online_status` = 'pending'. - Create a bank transaction and reconcile it with the batch. - Try to unreconcile the lines on the transaction - Result: UserError 'You cannot modify a payment that has already been sent to the bank.' **Fix:** Pass a context flag to `action_draft` during the unreconciliation flow so that the validation is skipped when the call originates from the internal unreconcile flow. OPW-6080464 Forward-Port-Of: odoo/enterprise#118649 Forward-Port-Of: odoo/enterprise#117921
This update fixes a previous accounting error in Odoo's Hong Kong payroll system. The Employer Paid Rent rule was incorrectly only recording a debit, resulting in an imbalance. The change now uses the correct credit account (221004) for rent payments, ensuring accurate financial reporting for employees receiving housing allowances.
Original PR description
The Employer Paid Rent rule (HEPR) only had a debit account (5220 Employee Benefits/Staff Costs), leaving the journal entry unbalanced. Set account 221004 (Staff Housing Accrued) as the credit account for the HEPR rule in both CAP57 Monthly Employee Pay and CAP57 Casual Employee Pay structures. Community PR: https://github.com/odoo/odoo/pull/266863 task-6219303 Forward-Port-Of: odoo/enterprise#118629
This update resolves an issue where Odoo was incorrectly generating CFDI invoices in Mexico, leading to export rejections. The fix ensures that cash rounding lines, which are not valid CFDI concepts, are excluded from the invoice XML, aligning with SAT regulations. This prevents errors and ensures compliant invoice generation.
Original PR description
When using the 'add_invoice_line' cash rounding strategy, Odoo adds a journal line with display_type='rounding'. This line has no product and therefore no ClaveProdServ, causing PAC to reject the XML with error 301. Per SAT regulations, cash rounding is not a valid CFDI concept. The CFDI must report the pre-rounding amounts (e.g. 99.80); the rounding difference (e.g. 0.20) belongs only in the journal entry on the accounting side. opw-6024078 Forward-Port-Of: odoo/enterprise#117400 Forward-Port-Of: odoo/enterprise#112633
5 changes
Resolved issues and error corrections
This update corrects errors in the Swedish SIE4 export file format, ensuring compatibility with Swedish audit software and government systems. The changes address critical specification deviations, adding necessary identification posts and ensuring correct encoding (CP437) to avoid rejection by receiving systems. The updated files have been validated and now meet all required standards.
Original PR description
The current implementation of l10n_se_sie4_export does not follow the SIE4 specification (version 4C, 2025-08-06) in several critical areas, causing exported files to be rejected by Swedish audit…
The current implementation of l10n_se_sie4_export does not follow the SIE4 specification (version 4C, 2025-08-06) in several critical areas, causing exported files to be rejected by Swedish audit software, accounting systems and Skatteverket's own tools. This PR corrects all known spec deviations and completes the implementation of optional but commonly required identification posts. Note: The character encoding was set to ISO-8859-1. The SIE4 specification §5.8 explicitly requires IBM PC Codepage 437 (CP437). Files generated by the current implementation cannot be correctly read by any SIE4-compliant receiving system. Some identification posts are optional per the SIE4 specification, but required in real world use by Swedish audit software, accounting systems and government filing tools. The exported file has been validated against the official SIE4 validator at https://sietest.sie.se and passes all checks. **Specification reference:** https://sie.se/wp-content/uploads/2026/02/SIE_filformat_ver_4C_2025-08-06.pdf **Fixes:** - CP437 encoding per spec §5.8 - Amount format max 2 decimals per spec §5.9 - Identification posts in correct order per spec §5.12 - #VER sequence number per serie per spec §11 - #VER with all 6 fields per spec §11 - partner_id.company_registry as canonical source - stdnum.luhn for org number validation (v1.17/v1.19 compatible) - _escape_sie on all string values - Correct implementation order **Feature completion:** - #ORGNR with Luhn validation and report header warning - #ADRESS, #FNR, #GEN with username - #KPTYP hardcoded EUBAS97 (Odoo Swedish chart) - #VALUTA always written - #PROSA support - #KSUMMA per spec §10 - #OMFATTN for partial period export - Import key in #VER sign field (move.name) - 7 tests including encoding, round-trip and KSUMMA
This update ensures our Swedish SIE4 export files meet all regulatory requirements, resolving issues that previously prevented successful submission to Swedish authorities. The changes include correcting encoding, formatting, and adding necessary identification posts to guarantee compatibility with accounting systems and audit software, validated by an official SIE4 validator.
Original PR description
The current implementation of l10n_se_sie4_export does not follow the SIE4 specification (version 4C, 2025-08-06) in several critical areas, causing exported files to be rejected by Swedish audit…
The current implementation of l10n_se_sie4_export does not follow the SIE4 specification (version 4C, 2025-08-06) in several critical areas, causing exported files to be rejected by Swedish audit software, accounting systems and Skatteverket's own tools. This PR corrects all known spec deviations and completes the implementation of optional but commonly required identification posts. Note: The character encoding was set to ISO-8859-1. The SIE4 specification §5.8 explicitly requires IBM PC Codepage 437 (CP437). Files generated by the current implementation cannot be correctly read by any SIE4-compliant receiving system. Some identification posts are optional per the SIE4 specification, but required in real world use by Swedish audit software, accounting systems and government filing tools. The exported file has been validated against the official SIE4 validator at https://sietest.sie.se and passes all checks. **Specification reference:** https://sie.se/wp-content/uploads/2026/02/SIE_filformat_ver_4C_2025-08-06.pdf **Fixes:** - CP437 encoding per spec §5.8 - Amount format max 2 decimals per spec §5.9 - Identification posts in correct order per spec §5.12 - #VER sequence number per serie per spec §11 - #VER with all 6 fields per spec §11 - partner_id.company_registry as canonical source - stdnum.luhn for org number validation (v1.17/v1.19 compatible) - _escape_sie on all string values - Correct implementation order **Feature completion:** - #ORGNR with Luhn validation and report header warning - #ADRESS, #FNR, #GEN with username - #KPTYP hardcoded EUBAS97 (Odoo Swedish chart) - #VALUTA always written - #PROSA support - #KSUMMA per spec §10 - #OMFATTN for partial period export - Import key in #VER sign field (move.name) - 7 tests including encoding, round-trip and KSUMMA
This pull request addresses a preliminary fix (POC) for inconsistencies in account reporting across various Odoo localization modules (e.g., France, Germany, Spain). The changes involve updating XML data files and models to improve the accuracy and consistency of financial reports. This ensures that reports generated for different regions align with local accounting standards.
Original PR description
wip
This update streamlines the calculation of offer fields related to contracts, preventing unnecessary recomputations and ensuring data consistency. A previous issue with the `is_hr_payroll` context flag has been resolved, restoring correct form behavior when creating offers from the payroll module in version 19.3.
Original PR description
**Problem:** Since this https://github.com/odoo/enterprise/pull/103846, `employee_version_id` depends on `contract_start_date` to adjust the employee state based on the contract date. This introduced…
**Problem:** Since this https://github.com/odoo/enterprise/pull/103846, `employee_version_id` depends on `contract_start_date` to adjust the employee state based on the contract date. This introduced an unnecessary dependency chain: ``` contract_start_date -> employee_version_id -> contract_template_id -> wages and other offer fields ``` As a result, updating `contract_start_date` invalidates and recomputes the whole chain, even when `employee_version_id` does not actually change. In addition, offer fields were coupled in a single compute, causing unrelated fields to be reset to template values when only one field required recomputation. **Fix:** - `contract_template_id` compute now depends on `employee_id` instead of `employee_version_id`, and directly uses the employee's `version_id`, breaking the chain while preserving default behavior. - The offer fields computations were also split to avoid unintended recomputations and field resets. - Simplified `_get_version` by always copying values from the template to the currently active version. --- **Additional fix:** The `is_hr_payroll` context flag is used to distinguish payroll vs recruitment flows when creating an offer with both `employee_id` and `applicant_id` unset. A recent change in [Task #6094737](https://www.odoo.com/odoo/project/1251/tasks/6094737) did not account for this flag, causing both fields to be hidden when opening the form from Payroll (a new feature added in saas-19.3). This is fixed by properly considering `is_hr_payroll`, restoring consistent behavior across all versions. Task: 6158245
This update fixes an issue where payments for Mexican invoices were being sent to CFDI multiple times, leading to inaccurate reporting. The change ensures the 'Update Payments' button only appears after the full invoice payment is reconciled, preventing duplicate XML filings 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 Forward-Port-Of: odoo/enterprise#108355
3 changes
Resolved issues and error corrections
This pull request addresses minor fixes identified during the recent update of the French VAT (PDP) module. These changes ensure accurate VAT calculations and reporting for French businesses using Odoo. The fixes are backported to the 18.0 release.
Original PR description
Backports some fixes discovered during FW-porting task-None
This update ensures that descriptions are correctly populated on sale order lines when adding delivery items. Previously, new delivery lines didn't use the product's description, leading to incomplete order information. This change maintains accurate product details across the sales process, improving reporting and order clarity.
Original PR description
When a line is added to a delivery related to a sale order, the corresponding line created in the sale order uses only the display_name as a description. This commit makes sure that if a previous SO line exists for the product, the new line uses the same description. Otherwise we call `get_product_multiline_description_sale()` Steps to reproduce: - Create a product with a description in the Sales tab - Create a quotation with any product (can be said product) and confirm it - Go to the delivery action, and add a new line with the product in the view, set delivered quantity to 1 - After Validating, you'll notice that the new line in the Quotation doesn't have a description opw-6175891
This update fixes an issue where UBL files weren't correctly applying tax rates during import. The previous system used a simplified cache key, leading to inaccurate tax assignments for similar lines. This change ensures that the tax rates specified in the UBL file are precisely applied, improving data accuracy.
Original PR description
When we import a UBL file, we call the `_import_retrieve_tax` method to fetch taxes to indicate on lines.
During the process, we use cache to avoid performing the search a second time if a new line is the same as a previous one.
https://github.com/odoo/odoo/blob/d0424f2ffcf99ee59befe288150f1643b3fa0112/addons/account/models/account_tax.py#L4459-L4462
The cache_key used is defined as follows: {line's invoice, line's name, line's partner}.
This implies that if two lines from the same invoice share the same name and partner, the same tax will automatically be used even if different taxes were indicated in the file.
This is not desirable as we should match what is indicated in the XML file imported.
opw-6226166
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr