Daily updates from Odoo
Friday, June 20, 2025
21 changes · master
Enhancements to existing features
The Indian reporting Balance Sheet now opens with the horizontal split option turned off by default. This makes the standard report view simpler and avoids users having to manually untick the option when they prefer the regular layout.
Original PR description
before this PR: split horizontally is ticked by default on Balance Sheet. after this PR: split horizontally is unticked by default. Related PR (Upgrade): https://github.com/odoo/upgrade/pull/7827 Previous version PR: https://github.com/odoo/enterprise/pull/86032 Task Id: 4836667
This update adjusts automated tests in Documents Spreadsheet, Spreadsheet Edition, and Web Studio so they stay aligned with recent platform changes. It helps maintain quality and reduces the risk of regressions without introducing direct user-facing changes.
Original PR description
We adapt the tests in documents_spreadsheet, spreadsheet_edition and web_studio to the changes brought by https://github.com/odoo/odoo/pull/208592. Task ID: 4610804
The ESG app’s summary text was improved to be clearer, more grammatically correct, and more polished. This helps users better understand the app’s purpose when viewing it in Odoo.
Original PR description
This is grammatically correct and more polished. No task ID
Resolved issues and error corrections
This update adjusts internal tests in Documents and Spreadsheet Edition so they match recent changes to how model selection data is represented. It helps keep quality checks reliable and prevents false test failures after the related platform change.
Original PR description
…or class
This commit is the counterpart of https://github.com/odoo/odoo/pull/215137.
Note that the mocks of `display_name_for` in `documents` were not correct, as they were returning a list of strings instead of a list of objects `{ model: string, display_name: string }`.The test setup now gives the test user the required permission group before checking unit of measure fields. This prevents automated test failures and helps keep the inter-company sales and purchasing workflow stable after recent platform changes.
Original PR description
This commit fixes tests failure caused by odoo/odoo#212098. The mentioned PR removed all occurrences of uom fields without the uom group. That led to failing any test that tried to access uom field without having the uom group. This commit ensures that the uom group is applied on the test user before accessing uom field.
The AI field refresh action now returns linked record values in the format expected by the updated system. This prevents refreshed many-to-one AI fields from incorrectly displaying “No Access,” improving reliability for users working with AI-generated field values.
Original PR description
Purpose: -------- Following the changes in [1], the relational model uses an object instead of an array for m2o values. However, the "Refresh value" button next to an ai m2o property still returns an array, which results in showing "No Access" as m2o value. This commit changes the returned value to an object. Task-4775956 [1]: https://github.com/odoo/odoo/pull/202534
Miscellaneous changes
…rrect data from MO operation **Problem:** lines of mrp.workcenter.productivity added from the workorder widget do not update the linked analytic account with the right amount **Steps to reproduce:** - enable "analytic accounting" setting - Unarchive MTO route - Create a new product - In the inventory page check MTO and Manufacture routes - click on the Bill of materials smart button and create a new BOM - add a component and an operation - Create another product, set "produc
Original PR description
…rrect data from MO operation **Problem:** lines of mrp.workcenter.productivity added from the workorder widget do not update the linked analytic account with the right amount **Steps to reproduce:**…
…rrect data from MO operation **Problem:** lines of mrp.workcenter.productivity added from the workorder widget do not update the linked analytic account with the right amount **Steps to reproduce:** - enable "analytic accounting" setting - Unarchive MTO route - Create a new product - In the inventory page check MTO and Manufacture routes - click on the Bill of materials smart button and create a new BOM - add a component and an operation - Create another product, set "product type" as service - in the "create on order" field select "project & task" - create a new quotation with these two products and confirm - click on the "manufacturing" smart button - in the work orders page click on the "open work order" button at the right of the line - click on add a line - set a duration of 30:10 and clik elsewhere on the screen - save - click on the "analytic account" smart button - select the only line and click on the "gross margin" smart button **Current behavior:** There is a single line with an amount of 0.01 **Expected behavior:** The price should reflect the hourly rate of the employee for the task (that's 50.28 with a 100$/hours rate for instance) **Cause of the issue:** There is two issue here. First Issue : When clicking on save on the widget, this will modify the time_ids field of the mrp.workorder this will create a new mrp.workcenter.productivity with the values we wrote. Consequently, on the vals_list when the create method is triggered duration is set to the duration we wrote (so here 30.17) Because of this, when the _compute_duration is the triggered previous_durations will be [30.17] and _create_analytic_entry will be called with a parameter of 30.17 https://github.com/odoo/enterprise/blob/8a21b4f8ee8d24ebbc9ac2eb08696a0de056357f/project_mrp_workorder_account/models/mrp_workcenter_productivity.py#L10-L14 Therefore, inside _create_analytic_entry duration will be 0 and amount will also be 0 This issue does not happen if the duration is set by changing the "real duration" in the "work orders" page of the manufacturing order. This is because when doing it this way, we modify the duration of the mrp.workorder which triggers the set_duration_method which also creates a new mrp.workcenter.productivity but here the _prepare_timeline_vals returns a dictonary without a duration field https://github.com/odoo/odoo/blob/4fe90167266a92c3a5941eac9a6a2084a80056ac/addons/mrp/models/mrp_workorder.py#L352-L353 Second Issue: The line we see with a 0.01 amount is actually created before we save. It's created from the onchange method when we change the duration on the form. The onchange of duration triggers an onchange of start date which gets the value of duration and triggers of recomputation of duration https://github.com/odoo/odoo/blob/4fe90167266a92c3a5941eac9a6a2084a80056ac/addons/mrp/models/mrp_workcenter.py#L522-L531 As a consequence, _compute_duration is called. self.duration is initially not rounded so in our exemple previous duration will be equal to 30.1666666666668 https://github.com/odoo/enterprise/blob/8a21b4f8ee8d24ebbc9ac2eb08696a0de056357f/project_mrp_workorder_account/models/mrp_workcenter_productivity.py#L10-L11 However after the call to super()._compute_duration(), self.duration will be rounded thanks to the use of convert to duration inside the super method https://github.com/odoo/odoo/blob/4fe90167266a92c3a5941eac9a6a2084a80056ac/addons/mrp/models/mrp_workcenter.py#L472 So when doing the difference here inside _create_analytic_entry https://github.com/odoo/enterprise/blob/8a21b4f8ee8d24ebbc9ac2eb08696a0de056357f/project_mrp_workorder_account/models/mrp_workcenter_productivity.py#L38 duration will be 5.555555555556424e-05 and amount will be -0.005555555555556424 which results in the creation of this line with an amount of 0.01 **fix:** Calling the creation of account.analytic.line from the compute method leads to other problems : For instance, if a line is added in the "open work order" widget and we change the end date but change our mind and don't save the line, the duration will have been computed and a new account analytic line will have been created Whereas calling the method _create_analytic_entries from create() and write() ensures it's only called when the model is saved opw-4715690 Forward-Port-Of: odoo/enterprise#85517
At the moment, the tax aggregators always give a base line with no tax the `None` grouping key. Sometimes, we want base lines with no tax to be grouped as if they had a particular tax, such as an exempt one. This commit extends the aggregator behaviour so that for base lines with no tax, the grouping function is called with an empty tax_data dict, and the returned grouping key is used to group the base line. Community PR: https://github.com/odoo/odoo/pull/213405 task-4242065 Forward
Original PR description
At the moment, the tax aggregators always give a base line with no tax the `None` grouping key. Sometimes, we want base lines with no tax to be grouped as if they had a particular tax, such as an exempt one. This commit extends the aggregator behaviour so that for base lines with no tax, the grouping function is called with an empty tax_data dict, and the returned grouping key is used to group the base line. Community PR: https://github.com/odoo/odoo/pull/213405 task-4242065 Forward-Port-Of: odoo/enterprise#87918 Forward-Port-Of: odoo/enterprise#87223
The [_get_common_substring](https://github.com/odoo/enterprise/blob/e8f7975659f3bfea42acdc7495efeccbffe183bc/account_accountant/models/account_bank_statement.py#L708-L782) method ought to return None if the substring is shorter than 10. The check is only done while looping through the normalised labels, but the loop is [skipped](https://github.com/odoo/enterprise/blob/e8f7975659f3bfea42acdc7495efeccbffe183bc/account_accountant/models/account_bank_statement.py#L777) if we have exactly 2 labels, t
Original PR description
The [_get_common_substring](https://github.com/odoo/enterprise/blob/e8f7975659f3bfea42acdc7495efeccbffe183bc/account_accountant/models/account_bank_statement.py#L708-L782) method ought to return None if the substring is shorter than 10. The check is only done while looping through the normalised labels, but the loop is [skipped](https://github.com/odoo/enterprise/blob/e8f7975659f3bfea42acdc7495efeccbffe183bc/account_accountant/models/account_bank_statement.py#L777) if we have exactly 2 labels, thus returning the substring irrespective of its length. Instead, we should do the actual length check (and substitute with None as needed) right before returning. The phrasing of the method's docstring is also updated to clarify that in the case of identical normalised labels, the _normalised_ label is returned rather than its original form. Forward-Port-Of: odoo/enterprise#87826
### Steps to reproduce: - Install PoS mexican localization - Navigate to PoS and create an order with a discount line - Go to back end and try to refund this order - Notice an error pops-up ### Cause: This is happening because when refunding an order we are checking if every line has positive price but since discount lines will have negative value it trigger the validation error. https://github.com/odoo/enterprise/blob/78bcd2e0b9296ad124ea1c3157a884fa6e62999a/l10n_mx_edi_pos/model
Original PR description
### Steps to reproduce: - Install PoS mexican localization - Navigate to PoS and create an order with a discount line - Go to back end and try to refund this order - Notice an error pops-up ### Cause: This is happening because when refunding an order we are checking if every line has positive price but since discount lines will have negative value it trigger the validation error. https://github.com/odoo/enterprise/blob/78bcd2e0b9296ad124ea1c3157a884fa6e62999a/l10n_mx_edi_pos/models/pos_order.py#L286 ### Fix: We check if the order lines are positive but after filtering the discount lines out opw-4528737 Forward-Port-Of: odoo/enterprise#87916 Forward-Port-Of: odoo/enterprise#84331
Mail now override unlink of all models to remove hanging activities. Indeed notably with server actions activities may be added on models not inheriting from mail.thread or mail.activity.mixin e.g. users. They should be removed when removing records otherwise they lead to void records, and do not mean anything business wise anyway. See community PR for more details. Forward-Port-Of: odoo/enterprise#88015
Original PR description
Mail now override unlink of all models to remove hanging activities. Indeed notably with server actions activities may be added on models not inheriting from mail.thread or mail.activity.mixin e.g. users. They should be removed when removing records otherwise they lead to void records, and do not mean anything business wise anyway. See community PR for more details. Forward-Port-Of: odoo/enterprise#88015
Since the access rights to see the hk rental is given to the payroll officer and the rights to modify the status is given to the employee administrator, you have payroll adminsitrator that cannot change the status and employee administrator that cannot access the model. As the model seems to be dedicated to Payroll and you need to be payroll officer to techniaclly change the status, we modify the view to allow this operation to payroll Adminsitrator. Forward-Port-Of: odoo/enterprise#87837
Original PR description
Since the access rights to see the hk rental is given to the payroll officer and the rights to modify the status is given to the employee administrator, you have payroll adminsitrator that cannot change the status and employee administrator that cannot access the model. As the model seems to be dedicated to Payroll and you need to be payroll officer to techniaclly change the status, we modify the view to allow this operation to payroll Adminsitrator. Forward-Port-Of: odoo/enterprise#87837
In this commit: https://github.com/odoo/enterprise/commit/13d527b2f940d2215a3bba578e47f180a0b7126e We wrongly removed the move_attachment_ids from the model params. Meaning that when putting an attachment on the reconciled line, the paper clip for the attachments was not visible on the statement line no task id Forward-Port-Of: odoo/enterprise#88044
Original PR description
In this commit: https://github.com/odoo/enterprise/commit/13d527b2f940d2215a3bba578e47f180a0b7126e We wrongly removed the move_attachment_ids from the model params. Meaning that when putting an attachment on the reconciled line, the paper clip for the attachments was not visible on the statement line no task id Forward-Port-Of: odoo/enterprise#88044
- Create a product with tracking by serial numbers then set a lot and serial number on the product - Activate the option Display Lots & Serial Numbers on Invoices in the Inventory settings - Create a sale order with the test product and confirm it - Create the invoice and send the cfdi report - Request a cancel and select the reason 01 Document issued with errors (with related document) . On the CFDI PDF report of the new invoice, there are no lines for lots and serial numbers—they are not
Original PR description
- Create a product with tracking by serial numbers then set a lot and serial number on the product - Activate the option Display Lots & Serial Numbers on Invoices in the Inventory settings - Create a…
- Create a product with tracking by serial numbers then set a lot and serial number on the product - Activate the option Display Lots & Serial Numbers on Invoices in the Inventory settings - Create a sale order with the test product and confirm it - Create the invoice and send the cfdi report - Request a cancel and select the reason 01 Document issued with errors (with related document) . On the CFDI PDF report of the new invoice, there are no lines for lots and serial numbers—they are not printed. The report uses the _get_invoiced_lot_values method from sale_stock to retrieve serial numbers. This method is first called when sending the CFDI for the parent invoice. However, when it is called for the child invoice, the method checks the quantity of the serial product, which is now depleted. This commit introduces a hook that allows to filter the amls taken into account in get_invoiced_lot_values. In l10n_mx_edi, we do not take the amls from the parent invoice after a cfdi cancellation. community PR: https://github.com/odoo/odoo/pull/202262 opw-4644031 Forward-Port-Of: odoo/enterprise#87687 Forward-Port-Of: odoo/enterprise#81656
During this commit:https://github.com/odoo/enterprise/commit/8419a92ae4697656da5b18325a5cc653a87e3ab5 we moved the reload of the statement line from the _setAccountOnReconcileLine function but by doing so the receivable and payable button are not reloaded anymore no task id Forward-Port-Of: odoo/enterprise#87865
Original PR description
During this commit:https://github.com/odoo/enterprise/commit/8419a92ae4697656da5b18325a5cc653a87e3ab5 we moved the reload of the statement line from the _setAccountOnReconcileLine function but by doing so the receivable and payable button are not reloaded anymore no task id Forward-Port-Of: odoo/enterprise#87865
In this commit: https://github.com/odoo/enterprise/commit/c0f8c5d17b9d78b640d744d8bfb6a2bb4002776a, we changed the way payment are matched with statement lines. Before, we were splitting the aml.ref based on ' ', then check for each word if there is an equivalent in the st_line label. But this is not restrictive enough. So now, there is the rules we apply, in the right order : 1 - Check if there is a payment ref like SO|INV|BILL|...xxxx/xxx-yy in the aml.ref 2 - Check for full match with
Original PR description
In this commit: https://github.com/odoo/enterprise/commit/c0f8c5d17b9d78b640d744d8bfb6a2bb4002776a, we changed the way payment are matched with statement lines. Before, we were splitting the aml.ref based on ' ', then check for each word if there is an equivalent in the st_line label. But this is not restrictive enough. So now, there is the rules we apply, in the right order : 1 - Check if there is a payment ref like SO|INV|BILL|...xxxx/xxx-yy in the aml.ref 2 - Check for full match with aml.ref 3 - Check if there is a word more than 16 characters long who match with aml.ref 4 - Check for full match with aml.move_name 5 - Check for full match with move.payment_reference If we have any multiple match, we don't reconcile. no-task Forward-Port-Of: odoo/enterprise#87811
Some fixes in regarding quality and mrp - Hide the failure location depending on the test_type - redirect the stock move to the failure location instead of the picking or mo (for the backorder) Forward-Port-Of: odoo/enterprise#81211
Original PR description
Some fixes in regarding quality and mrp - Hide the failure location depending on the test_type - redirect the stock move to the failure location instead of the picking or mo (for the backorder) Forward-Port-Of: odoo/enterprise#81211
Changes include: - Better background color alternation for each journal entry. - Journal Entry number is now shown only once, and in bold. - Moved the date into the same column as the Journal Entry number to save space. task-4844519 Forward-Port-Of: odoo/enterprise#86991
Original PR description
Changes include: - Better background color alternation for each journal entry. - Journal Entry number is now shown only once, and in bold. - Moved the date into the same column as the Journal Entry number to save space. task-4844519 Forward-Port-Of: odoo/enterprise#86991
The system will crash when we try to set the account for statement lines. And at [1], we can see that this fetches the `previous_statement_lines`. [1] https://github.com/odoo/enterprise/blob/e8f7975659f3bfea42acdc7495efeccbffe183bc/account_accountant/models/account_bank_statement.py#L654-L656 After that, it calls the `_prepare_reconciliation_rule_data` method. and try to find a `common substring`. https://github.com/odoo/enterprise/blob/e8f7975659f3bfea42acdc7495efeccbffe183bc/account_a
Original PR description
The system will crash when we try to set the account for statement lines. And at [1], we can see that this fetches the `previous_statement_lines`. [1]…
The system will crash when we try to set the account for statement lines. And at [1], we can see that this fetches the `previous_statement_lines`. [1] https://github.com/odoo/enterprise/blob/e8f7975659f3bfea42acdc7495efeccbffe183bc/account_accountant/models/account_bank_statement.py#L654-L656 After that, it calls the `_prepare_reconciliation_rule_data` method. and try to find a `common substring`. https://github.com/odoo/enterprise/blob/e8f7975659f3bfea42acdc7495efeccbffe183bc/account_accountant/models/account_bank_statement.py#L676 In the `_get_common_substring` method, when [2] is executed, and if we have the below `payment_ref` ``` [ 'PRLV SEPA VROOMLY STR16NASUC4VSCWSRGTVURANBFJQM4LJU9 VROOMLY', 'PRLV SEPA AMAZON PAYMENTS EUROP 450X4WSOR73LFYYL 171-6087599-8440309 AMZN MKTP FR 45 0X4WSOR73LFYYL', 'PRLV SEPA VROOMLY STR16NASTLNFBLLPVADQPRANTXVPUDYDFY VROOMLY', 'VIR STRIPE VROOMLY-6NXKKON62EKBHVFLXZ3T9PTDOP5 VROOMLY', 'PRLV SEPA VROOMLY STR16NAST8PLKGEKOLWOLRANIEPSODZENR VROOMLY' ] ``` (means our len(substring) is less than 10), Then it returns `None` from line [3]. [2] https://github.com/odoo/enterprise/blob/e8f7975659f3bfea42acdc7495efeccbffe183bc/account_accountant/models/account_bank_statement.py#L777-L781 [3] https://github.com/odoo/enterprise/blob/e8f7975659f3bfea42acdc7495efeccbffe183bc/account_accountant/models/account_bank_statement.py#L780 **Steps to produce:-** 1. Install the `Accounting` module. 2. Set up the `Odoo demo bank`. 3. Click on `Transactions` under Bank. 4. Set account as `Cash Discount Loss` for `Monthly Office Rent ` and `Annual Public liability insurance`. 5. For `Deposit on the invoice 784`, set the account as other than `Cash Discount Loss` and then delete that, and again set the account as `Cash Discount Loss`. **Error:-** `AttributeError: 'NoneType' object has no attribute 'strip'` **Solution:-** - In this commit, we handle the case where `_get_common_substring` returns `None` by checking it before calling .strip(). - This prevents the system from crashing without changing the function’s return value. **Sentry - 6682820343** Forward-Port-Of: odoo/enterprise#87828
The call was done with `bank` parameter instead of `branch`. This made the tests (and the feature) fail. ref: odoo/enterprise#74967 runbot-114997 Forward-Port-Of: odoo/enterprise#87617
Original PR description
The call was done with `bank` parameter instead of `branch`. This made the tests (and the feature) fail. ref: odoo/enterprise#74967 runbot-114997 Forward-Port-Of: odoo/enterprise#87617
This commit changes the style of the transfer button in the transfer view to be solid instead of outlined. ## Before  ## After  Forward-Port-Of: odoo/enterprise#87825
Original PR description
This commit changes the style of the transfer button in the transfer view to be solid instead of outlined. ## Before  ## After  Forward-Port-Of: odoo/enterprise#87825