Daily updates from Odoo
Wednesday, February 5, 2025
25 changes · master
Enhancements to existing features
The Indian payroll contract form now has improved help text for TDS-related fields. This makes it easier for HR and payroll users to understand the field purpose and enter the correct information.
Original PR description
task-4529300
The Brazilian AvaTax module now marks NCM tax classification codes as protected during installation instead of handling them again during later module updates. This reduces the risk of update-related disruption while preserving the intended tax code data setup.
Original PR description
This is a follow-up for a bug fix made in stable [1]. In master we can remove the init() hook on the model, which ran on module update, and instead rely on the post_init_hook during module installation. task-4374334 [1] https://github.com/odoo/enterprise/pull/77805
Resolved issues and error corrections
This fix updates an internal reference after the Indian GST reporting component was merged into the main Indian reports module. It helps prevent configuration or reporting errors caused by the old reference while keeping the change low-impact for users.
Original PR description
Update the reference XML ID from `l10n_in_reports_gstr` to `l10n_in_reports` as `l10n_in_reports_gstr` has been merged into `l10n_in_reports`. ref: https://github.com/odoo/enterprise/pull/75451/commits/03b2aceef289c14bd5d32355c14045fb72485ea7
Features or functions removed from Odoo
This change removes older workaround code in Studio that manually refreshed display names. The underlying issue is now fixed elsewhere, so removing the workaround lowers maintenance risk without changing normal user workflows.
Original PR description
https://github.com/odoo/enterprise/pull/6183 adds a weird manual call to _compute_display_name() to fix a registry issue of generated by base_automation. Another fix was created to fix this first fix in https://github.com/odoo/enterprise/pull/21746/commits/7b5dfa9792fc0d3ba8ccb810999f39de8ea404f1. But actually https://github.com/odoo/odoo/pull/39233 fixes the root issue. Then remove the two first weird fixes.
Code cleanup and technical improvements
This update aligns several Enterprise apps with a newer internal way of retrieving grouped data, following the related platform change. It should not change day-to-day workflows, but it helps keep reporting, planning, documents, appointments, manufacturing, field service, and accounting features maintainable and consistent.
Original PR description
https://github.com/odoo/odoo/pull/163300 https://github.com/odoo/upgrade/pull/6682 https://github.com/odoo/documentation/pull/11354
Miscellaneous changes
Forward-Port-Of: odoo/enterprise#78409 Forward-Port-Of: odoo/enterprise#77743
Original PR description
Forward-Port-Of: odoo/enterprise#78409 Forward-Port-Of: odoo/enterprise#77743
Before this commit, when a subscription move was posted all sale.order.log without effective_date were updated. As a result, some upsell flows could be wrong: - Create a contract, invoice it. Create log is effective. - Remove discount for next year. without invoicing. The log is not effective. - A few days later, in the middle of the period, upsell and invoice the upsell. Only the upsell change log should be effective - At the end of the invoicng period, renew the contract with
Original PR description
Before this commit, when a subscription move was posted all sale.order.log without effective_date were updated. As a result, some upsell flows could be wrong: - Create a contract, invoice it. Create…
Before this commit, when a subscription move was posted all sale.order.log without effective_date were updated. As a result, some upsell flows could be wrong: - Create a contract, invoice it. Create log is effective. - Remove discount for next year. without invoicing. The log is not effective. - A few days later, in the middle of the period, upsell and invoice the upsell. Only the upsell change log should be effective - At the end of the invoicng period, renew the contract with a new invoice: the discount log should be effective. With this commit the effective match the accouting date - A subscription start: effective_date = deferred_start_date - An upsell is invoiced: effective_date = deferred_start_date only for the log generated by the upsell - A subscription is churn or renewed: All the log without effective_date: effective_date = deferred_end_date - A subscription is reopen: All the log with the effective_date = deferred_end_date get effective_date = False task id: 4452545 Forward-Port-Of: odoo/enterprise#77765
Before this commit, if you drag and drop a partner name from the form view of bank_reconciliation in the file import dropzone, a traceback is raise. This commit fix this issue by hiding the dropzone when user is not dragging a file. Linked:https://github.com/odoo/odoo/pull/193355 opw-4366605 Forward-Port-Of: odoo/enterprise#78576 Forward-Port-Of: odoo/enterprise#76565
Original PR description
Before this commit, if you drag and drop a partner name from the form view of bank_reconciliation in the file import dropzone, a traceback is raise. This commit fix this issue by hiding the dropzone when user is not dragging a file. Linked:https://github.com/odoo/odoo/pull/193355 opw-4366605 Forward-Port-Of: odoo/enterprise#78576 Forward-Port-Of: odoo/enterprise#76565
This is the counterpart to the community PR allowing certain `div` elements (baseContainer) to be handled by the editor with the features commonly used inside `p` elements. See community PR for a more detailed explanation. task-4260398 and task-4294440 Forward-Port-Of: odoo/enterprise#78497 Forward-Port-Of: odoo/enterprise#75187
Original PR description
This is the counterpart to the community PR allowing certain `div` elements (baseContainer) to be handled by the editor with the features commonly used inside `p` elements. See community PR for a more detailed explanation. task-4260398 and task-4294440 Forward-Port-Of: odoo/enterprise#78497 Forward-Port-Of: odoo/enterprise#75187
Bug === The icon in the definition popover are currently black in dark mode, and it should be light gray. The reason is that the component that it uses changed, but the CSS in the properties component wasn't updated (we now use a more permissive rule to avoid future similar issue). Task-4543117 Forward-Port-Of: odoo/enterprise#78386
Original PR description
Bug === The icon in the definition popover are currently black in dark mode, and it should be light gray. The reason is that the component that it uses changed, but the CSS in the properties component wasn't updated (we now use a more permissive rule to avoid future similar issue). Task-4543117 Forward-Port-Of: odoo/enterprise#78386
There are two errors raised when importing a winbook file: 1) `psycopg2.ProgrammingError: can't adapt type 'account.account'` 2) `ValueError: Invalid field 'title' on model 'res.partner'` Number one is occuring because we pass a recordset instead of an id in the create vals. Number two is occuring because the field 'title' has been removed by https://github.com/odoo/odoo/commit/0b8bd891fad1c84607fe147a32d705917341fed7 opw-4499212 Forward-Port-Of: odoo/enterprise#78399
Original PR description
There are two errors raised when importing a winbook file: 1) `psycopg2.ProgrammingError: can't adapt type 'account.account'` 2) `ValueError: Invalid field 'title' on model 'res.partner'` Number one is occuring because we pass a recordset instead of an id in the create vals. Number two is occuring because the field 'title' has been removed by https://github.com/odoo/odoo/commit/0b8bd891fad1c84607fe147a32d705917341fed7 opw-4499212 Forward-Port-Of: odoo/enterprise#78399
Bug === 1. Open your profile -> My Documents 2. Switch to list view => You can not open the preview The reason is that the JS of the list view is not loaded, because we don't execute the right action. Task-4546797 Forward-Port-Of: odoo/enterprise#78492
Original PR description
Bug === 1. Open your profile -> My Documents 2. Switch to list view => You can not open the preview The reason is that the JS of the list view is not loaded, because we don't execute the right action. Task-4546797 Forward-Port-Of: odoo/enterprise#78492
If "Unfold All" is not selected and "Group by Account" is, printing the Depreciation Schedule won't print the unfolded lines. Furthermore, if you unfold some lines and then refresh, all the lines are refolded. This behaviour is different than the other reports, where the lines you unfold are printed and remembered during a refresh. The fix is to mark the parent lines generated by `group_by_account` as unfolded if the line is present in `options['unfolded_lines']`. task-4507580 F
Original PR description
If "Unfold All" is not selected and "Group by Account" is, printing the Depreciation Schedule won't print the unfolded lines. Furthermore, if you unfold some lines and then refresh, all the lines are refolded. This behaviour is different than the other reports, where the lines you unfold are printed and remembered during a refresh. The fix is to mark the parent lines generated by `group_by_account` as unfolded if the line is present in `options['unfolded_lines']`. task-4507580 Forward-Port-Of: odoo/enterprise#78424 Forward-Port-Of: odoo/enterprise#78074
Since this [commit](https://github.com/odoo/enterprise/commit/a067f8421e3058507f3e25088d94e33122ecdd1e#diff-0e37484af3f832073947594d460e7a6039698cbee82232e2c9b35c0aff3a59b3), the `default_account_id` is set as an `account.account` record, instead of its `id`. no-task Forward-Port-Of: odoo/enterprise#78529
Original PR description
Since this [commit](https://github.com/odoo/enterprise/commit/a067f8421e3058507f3e25088d94e33122ecdd1e#diff-0e37484af3f832073947594d460e7a6039698cbee82232e2c9b35c0aff3a59b3), the `default_account_id` is set as an `account.account` record, instead of its `id`. no-task Forward-Port-Of: odoo/enterprise#78529
Fix the drag_and_drop run of sign_tour to fit in the new tour system. Forward-Port-Of: odoo/enterprise#78524
Original PR description
Fix the drag_and_drop run of sign_tour to fit in the new tour system. Forward-Port-Of: odoo/enterprise#78524
Problem ---------- The SHIF is based on the gross and not the basic. There is no SHIF Relief Objective ---------- Correct the SHIF implementation Solution ---------- Get GROSS in SHIF computation rather than BASIC Remove SHIF Relief Rule task-4414345 Forward-Port-Of: odoo/enterprise#75804
Original PR description
Problem ---------- The SHIF is based on the gross and not the basic. There is no SHIF Relief Objective ---------- Correct the SHIF implementation Solution ---------- Get GROSS in SHIF computation rather than BASIC Remove SHIF Relief Rule task-4414345 Forward-Port-Of: odoo/enterprise#75804
Steps to reproduce: ------- - Install the `project_timesheet_forecast` module. - Open Planning > Pivot View. - Click on "Insert in Spreadsheet." - Confirm the action. Issue: --------- While inserting into the spreadsheet, the readgroup result does not have `effective_hours` and `percentage_hours`, which causes a traceback. EX: [{'__count': 6, 'allocated_hours_sum_id': 50.0, 'effective_hours_sum_id': 0.0, percentage_hours_sum_id': 0.0, '__domain'
Original PR description
Steps to reproduce: ------- - Install the `project_timesheet_forecast` module. - Open Planning > Pivot View. - Click on "Insert in Spreadsheet." - Confirm the action. Issue: --------- While inserting…
Steps to reproduce:
-------
- Install the `project_timesheet_forecast` module.
- Open Planning > Pivot View.
- Click on "Insert in Spreadsheet."
- Confirm the action.
Issue:
---------
While inserting into the spreadsheet, the readgroup result does not have `effective_hours` and `percentage_hours`,
which causes a traceback.
EX:
[{'__count': 6, 'allocated_hours_sum_id': 50.0, 'effective_hours_sum_id': 0.0,
percentage_hours_sum_id': 0.0, '__domain': ['&', ('start_datetime', '!=', False),
('end_datetime', '!=', False)]}]
Root Cause:
----------------------
The `read_group` result does not always contain the expected key, causing a traceback when accessed.
Fix:
--------
Used a getter method to safely retrieve the value. If the key is missing, it returns `None` instead
of raising an error.
Example:
--------------
temp = {'a': 1}
temp['b'] -> tracrback
temp.get('b') -> None
ticket-4497656
Forward-Port-Of: odoo/enterprise#78154We always send the product name, but sometimes users want to add more information to the electronic invoice. It makes more sense to send the line description (account.move.line's name field) instead. That allows the user to specify what they want and also aligns better with what the API expects (their field is called "description", not "productName"). To avoid changing function signatures in stable we override _l10n_br_build_avatax_line and browse the account.move.line using line_id. In ma
Original PR description
We always send the product name, but sometimes users want to add more information to the electronic invoice. It makes more sense to send the line description (account.move.line's name field) instead. That allows the user to specify what they want and also aligns better with what the API expects (their field is called "description", not "productName"). To avoid changing function signatures in stable we override _l10n_br_build_avatax_line and browse the account.move.line using line_id. In master we'll clean it up by providing "description" directly in _get_line_data_for_external_taxes() for both account.move and sale.order. This also fixes a mistake that cleared errors for service transactions (introduced in the merge of l10n_br_avatax_services [1]). [1] https://github.com/odoo/enterprise/pull/64714 task-4401787 Forward-Port-Of: odoo/enterprise#78125 Forward-Port-Of: odoo/enterprise#77610
NF-e invoices can optionally include sent packages. This integrates with the stock module to provide a way for users to specify packages on invoices. Typically EDI is done before products are sent out ("ordered quantity" invoicing policy). To handle this the user can enable 2-step picking. In the first step they can record how they will package the products. After that, the packages can be included on the invoice for EDI. At a later time products can be delivered to the customer in the last s
Original PR description
NF-e invoices can optionally include sent packages. This integrates with the stock module to provide a way for users to specify packages on invoices. Typically EDI is done before products are sent…
NF-e invoices can optionally include sent packages. This integrates with the stock module to provide a way for users to specify packages on invoices.
Typically EDI is done before products are sent out ("ordered quantity" invoicing policy). To handle this the user can enable 2-step picking. In the first step they can record how they will package the products. After that, the packages can be included on the invoice for EDI. At a later time products can be delivered to the customer in the last step. We provide a picking smart button in the invoice form view to easily navigate to the related pickings to sort out the packaging. This is typically done by a dedicated person who handles everything related to EDI.
Note that for products to be included in packages they must be storable (is_storable). The stock module allows to package
non-storable products as well, but in those cases the resulting stock.quant.package's are empty (no quant_ids).
task-4298921
## TODO
- [ ] translations
Forward-Port-Of: odoo/enterprise#78315
Forward-Port-Of: odoo/enterprise#75252Don't warn if products used on service invoices have an empty l10n_br_source_origin field. It's only needed for goods, and is in fact hidden on service products. opw-4536842 Forward-Port-Of: odoo/enterprise#78466
Original PR description
Don't warn if products used on service invoices have an empty l10n_br_source_origin field. It's only needed for goods, and is in fact hidden on service products. opw-4536842 Forward-Port-Of: odoo/enterprise#78466
Solves 2 issues related to the report builders. Also cleans the onWillUpdateProps as advised by the Framework JS team. Issue 1: Steps to reproduce: - Go to Accounting -> Configuration -> Accounting Reports - Create a new report with 2 lines - drag the bottom line on top of the first one -> The list order is properly handled - Press the save button -> The list order is back to its original form. Cause of the issue: When saving, the list.props.list.records is equal to it
Original PR description
Solves 2 issues related to the report builders. Also cleans the onWillUpdateProps as advised by the Framework JS team. Issue 1: Steps to reproduce: - Go to Accounting -> Configuration -> Accounting Reports - Create a new report with 2 lines - drag the bottom line on top of the first one -> The list order is properly handled - Press the save button -> The list order is back to its original form. Cause of the issue: When saving, the list.props.list.records is equal to its original order and therefore needs to be ordered based on the sequence. Issue 2: -> solved in related community PR - Create a report with 2 lines, line 2 being a child of line 1 - Drag line 2 above line 1 -> Validation error Cause of the issue: - The backend constraint receives line not ordered by sequence task-4328098 Forward-Port-Of: odoo/enterprise#78332 Forward-Port-Of: odoo/enterprise#74177
Steps to reproduce the bug: - Create a storable product “P1” - Component: C1 - Operation: OP1 - Create a manufacturing order to produce one unit of P1 - Confirm the MO and validate it - Go to the product P1 -> Cost analysis Problem: a traceback Is triggered: self._obj.execute(query, params) psycopg2.errors.UndefinedColumn: column wo.product_id does not exist LINE 2: wo.product_id, ^ HINT: Perhaps you meant to reference the column "wo.production_id". The field `product_id` in `mr
Original PR description
Steps to reproduce the bug: - Create a storable product “P1” - Component: C1 - Operation: OP1 - Create a manufacturing order to produce one unit of P1 - Confirm the MO and validate it - Go to the product P1 -> Cost analysis Problem: a traceback Is triggered: self._obj.execute(query, params) psycopg2.errors.UndefinedColumn: column wo.product_id does not exist LINE 2: wo.product_id, ^ HINT: Perhaps you meant to reference the column "wo.production_id". The field `product_id` in `mrp_workorder` is a related field (`related='production_id.product_id'`), meaning it does not exist as a physical column in the database. The SQL query was directly referencing `wo.product_id`, which caused the error. Solution: Instead of `wo.product_id`, the query now retrieves `product_id` from `mrp_production` opw-4525278 Forward-Port-Of: odoo/enterprise#78311
The print button should be invisible when no `line_ids` are added, which implies that the `compute_sheet` was not triggered. task-4491103 Forward-Port-Of: odoo/enterprise#78403 Forward-Port-Of: odoo/enterprise#77848
Original PR description
The print button should be invisible when no `line_ids` are added, which implies that the `compute_sheet` was not triggered. task-4491103 Forward-Port-Of: odoo/enterprise#78403 Forward-Port-Of: odoo/enterprise#77848
At the moment, the allowed groupbys for the standard report engines (account codes, domain, tax tags) need to be stored fields on `account.move.line`, or be defined in the custom handler. We want to be able to group by any field that is searchable and has `_field_to_sql` implemented for it. For example, for consolidation, users might want to create a non-stored field related to `account_id.code` and group by it. After this commit, groupbys can be any searchable field for which `_field_to_s
Original PR description
At the moment, the allowed groupbys for the standard report engines (account codes, domain, tax tags) need to be stored fields on `account.move.line`, or be defined in the custom handler. We want to be able to group by any field that is searchable and has `_field_to_sql` implemented for it. For example, for consolidation, users might want to create a non-stored field related to `account_id.code` and group by it. After this commit, groupbys can be any searchable field for which `_field_to_sql` is defined, regardless of whether it is stored or not. task-4259552 Forward-Port-Of: odoo/enterprise#78419 Forward-Port-Of: odoo/enterprise#71813
Some URLs in the digest emails are currently broken due to an outdated URL format. ### Steps to reproduce * Install `digest` and `crm` modules * Go to Settings > Technical > Digest Emails * Select the "Your Odoo Periodic Digest" digest and send it * Check the sent email and click on any of the "Open Email" links You should encounter an error indicating that the action does not exist. Although the reproduction steps use the `crm` module as an example, this issue occurs with all the
Original PR description
Some URLs in the digest emails are currently broken due to an outdated URL format. ### Steps to reproduce * Install `digest` and `crm` modules * Go to Settings > Technical > Digest Emails * Select the "Your Odoo Periodic Digest" digest and send it * Check the sent email and click on any of the "Open Email" links You should encounter an error indicating that the action does not exist. Although the reproduction steps use the `crm` module as an example, this issue occurs with all the modules listed in the title. ### Cause The "Open Report" URLs were not updated to account for the new URL format. opw-4405288 opw-4502625 Forward-Port-Of: odoo/enterprise#78394 Forward-Port-Of: odoo/enterprise#77282