Friday, August 11, 2023
6 changes · master
Resolved issues and error corrections
This change prevents users from saving or printing manually created reports that point to templates that do not exist. It also ensures report templates are loaded before report actions, reducing unexpected print failures across many Odoo apps.
Original PR description
*: account, account_test, hr, hr_skills, l10n_ch, l10n_cn, l10n_fr_pos_cert, mrp, point_of_sale, pos_self_order, product, purchase, purchase_requisition, repair, stock, stock_picking_batch,…
*: account, account_test, hr, hr_skills, l10n_ch, l10n_cn, l10n_fr_pos_cert, mrp, point_of_sale, pos_self_order, product, purchase, purchase_requisition, repair, stock, stock_picking_batch, test_event_full, base
When the user manually creates the report action, configures the non-exists report view template, and tries to print the report, an "Invalid report template id" trace back will be generated.
Steps to produce:
- Install any module, e.g., sale_management.
- Settings > Technical > Actions > Reports
- Create a new record and fill out the required details. Set the 'Template Name' as 'abcd' or 'abcd.xyz', the 'Model Name' as 'sale.order, and the 'Action Name' as 'test report'.
- Click on the "Add to the 'Print' menu" button.
- Sales > Orders > Orders
- Select any report and print the 'test report, then traceback will be generated.
Error:
External ID not found in the system: base.elcom_report_document_user_equipments
This PR check, when the user manually configures the report action at that time, raises the validation error message if the report template does not exist in the views and also loads the report template views before the report action views.
Sentry Traceback:
```ValueError: External ID not found in the system: base.elcom_report_document_user_equipments
File "addons/web/controllers/report.py", line 113, in report_download
response = self.report_routes(reportname, docids=docids, converter=converter, context=context)
File "odoo/http.py", line 716, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/report.py", line 42, in report_routes
pdf = report.with_context(context)._render_qweb_pdf(reportname, docids, data=data)[0]
File "odoo/addons/base/models/ir_actions_report.py", line 810, in _render_qweb_pdf
collected_streams = self._render_qweb_pdf_prepare_streams(report_ref, data, res_ids=res_ids)
File "odoo/addons/base/models/ir_actions_report.py", line 711, in _render_qweb_pdf_prepare_streams
html = self.with_context(**additional_context)._render_qweb_html(report_ref, res_ids_wo_stream, data=data)[0]
File "odoo/addons/base/models/ir_actions_report.py", line 887, in _render_qweb_html
return self._render_template(report.report_name, data), 'html'
File "odoo/addons/base/models/ir_actions_report.py", line 626, in _render_template
return view_obj._render_template(template, values).encode()
File "odoo/addons/base/models/ir_ui_view.py", line 2164, in _render_template
return self.env['ir.qweb']._render(template, values)
File "odoo/tools/profiler.py", line 292, in _tracked_method_render
return method_render(self, template, values, **options)
File "odoo/addons/base/models/ir_qweb.py", line 587, in _render
rendering = render_template(irQweb, values)
File "<None>", line 5, in not_found_template
```
Sentry-4293751777
Enterprise: https://github.com/odoo/enterprise/pull/43908This fixes a form behavior where choosing an action, such as duplicate, could still run after a failed save and cause a crash. Users will now see the save error without the requested action continuing, preventing confusing follow-up failures and protecting unsaved work.
Original PR description
Before this commit, in the form view, clicking on an action in the menu action executed the action even though the record save had failed.
Expected behaviour:
When you click on an action, you want to save the record and execute the action if the record was saved without error.
How to reproduce:
- Go to a form view
- Create a new record
- Edit a field to ensure that the save returns an error
- Click on an action in the action menu (for example duplicate)
- The "Oh Snap" dialog opens
- Click on "Discard
Before this commit:
The button action code executes and displays a crash
After this commit:
The button action code does not execute
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis fixes cases where closing a related-record popup with the X button could accidentally keep unsaved changes. It also restores survey answer visibility after a question is discarded and reopened, helping users trust that discard actions behave consistently.
Original PR description
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
This fix restores the ability to delete tax repartition lines without triggering an error. It prevents an accounting setup issue that could block users from updating tax configurations when needed.
Original PR description
Problem --------- When deleting a tax repartition line, an error occurred. When popping the modified values during deletion, only two values were present in the modified values. Thus, unpacking to 3 variables resulted in an error: `v` did not exist. Objective --------- Make repartition lines deletable again. Solution --------- Instead of popping 3 values for every command, we pop 1 stored as a list. We access the relevant elements using the index when necessary. task-xxxxxxx --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Odoo now honors Google Calendar settings that prevent guests from editing events. This avoids duplicate calendar entries and incorrect attendee lists when guests try to update events they are not allowed to modify.
Original PR description
Before this commit, the permission defined in Google Calendar of editing events by guests was always set in Odoo Calendar as 'True', even though there was also the 'False' option. This way, creating an event that didn't accept being edited by guests in Google and then updating it in Odoo by a guest was creating duplicates in Odoo Calendar and wrong lists of attendees. After this commit, the permission of guests modifying the event is taken into account in Odoo Calendar. If a guest updates an event that doesn't allow updates, a warning is shown forbidding the update and the reason explained. Task-id: 3276829
This update prevents users from reaching a technical error when a manually configured report points to a template that does not exist. It adds clearer validation and ensures report templates are loaded before report actions, improving reliability across payroll, localization, payments, manufacturing, quality, and signing features.
Original PR description
*: account_batch_payment, account_sepa_direct_debit, hr_payroll, l10n_be_hr_payroll, l10n_be_reports, l10n_ca_check_printing, l10n_in_hr_payroll, l10n_ke_hr_payroll, l10n_lt_hr_payroll,…
*: account_batch_payment, account_sepa_direct_debit, hr_payroll, l10n_be_hr_payroll, l10n_be_reports, l10n_ca_check_printing, l10n_in_hr_payroll, l10n_ke_hr_payroll, l10n_lt_hr_payroll, l10n_lu_hr_payroll, l10n_lu_reports_annual_vat_2023, l10n_mx_edi, l10n_mx_hr_payroll, l10n_nl_hr_payroll, l10n_pl_hr_payroll, l10n_sk_hr_payroll, l10n_us_check_printing, mrp_account_enterprise, quality_control, sign
When the user manually creates the report action, configures the non-exists report view template, and tries to print the report, an "Invalid report template id" trace back will be generated.
Steps to produce:
- Install any module, e.g., sale_management.
- Settings > Technical > Actions > Reports
- Create a new record and fill out the required details. Set the 'Template Name' as 'abcd' or 'abcd.xyz', the 'Model Name' as 'sale.order, and the 'Action Name' as 'test report'.
- Click on the "Add to the 'Print' menu" button.
- Sales > Orders > Orders
- Select any report and print the 'test report, then traceback will be generated.
Error:
External ID not found in the system: base.elcom_report_document_user_equipments
This PR check, when the user manually configures the report action at that time, raises the validation error message if the report template does not exist in the views and also loads the report template views before the report action views.
Sentry Traceback:
```ValueError: External ID not found in the system: base.elcom_report_document_user_equipments
File "addons/web/controllers/report.py", line 113, in report_download
response = self.report_routes(reportname, docids=docids, converter=converter, context=context)
File "odoo/http.py", line 716, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/report.py", line 42, in report_routes
pdf = report.with_context(context)._render_qweb_pdf(reportname, docids, data=data)[0]
File "odoo/addons/base/models/ir_actions_report.py", line 810, in _render_qweb_pdf
collected_streams = self._render_qweb_pdf_prepare_streams(report_ref, data, res_ids=res_ids)
File "odoo/addons/base/models/ir_actions_report.py", line 711, in _render_qweb_pdf_prepare_streams
html = self.with_context(**additional_context)._render_qweb_html(report_ref, res_ids_wo_stream, data=data)[0]
File "odoo/addons/base/models/ir_actions_report.py", line 887, in _render_qweb_html
return self._render_template(report.report_name, data), 'html'
File "odoo/addons/base/models/ir_actions_report.py", line 626, in _render_template
return view_obj._render_template(template, values).encode()
File "odoo/addons/base/models/ir_ui_view.py", line 2164, in _render_template
return self.env['ir.qweb']._render(template, values)
File "odoo/tools/profiler.py", line 292, in _tracked_method_render
return method_render(self, template, values, **options)
File "odoo/addons/base/models/ir_qweb.py", line 587, in _render
rendering = render_template(irQweb, values)
File "<None>", line 5, in not_found_template
```
Sentry-4293751777
Community: https://github.com/odoo/odoo/pull/128039