-
-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0][FIX] add is_company_detail_empty boolean computed field on res.brand #195
base: 16.0
Are you sure you want to change the base?
Conversation
The field works like on res.company model
Hi @sbejaoui, |
Hi @sbejaoui, I dont understand how I can manage to solve the 2 codecov issues to make this PR mergeable. |
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
Hi @Ivorra78 @ibuioli, as @sbejaoui seems not to be active at this time, do you have the write access on this repository to merge this PR I made 4 months ago ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional review
The field works like on res.company model and prevents the following error (encountered on branded sale.order PDF report print) :
Traceback (most recent call last):
File "<198>", line 304, in template_198
File "<198>", line 76, in template_198_content
AttributeError: 'res.brand' object has no attribute 'is_company_details_empty'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/odoo/auto/addons/web/controllers/report.py", line 113, in report_download
response = self.report_routes(reportname, docids=docids, converter=converter, context=context)
File "/opt/odoo/custom/src/odoo/odoo/http.py", line 697, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/opt/odoo/auto/addons/web/controllers/report.py", line 42, in report_routes
pdf = report.with_context(context)._render_qweb_pdf(reportname, docids, data=data)[0]
File "/opt/odoo/auto/addons/account/models/ir_actions_report.py", line 58, in _render_qweb_pdf
return super()._render_qweb_pdf(report_ref, res_ids=res_ids, data=data)
File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_actions_report.py", line 819, in _render_qweb_pdf
collected_streams = self._render_qweb_pdf_prepare_streams(report_ref, data, res_ids=res_ids)
File "/opt/odoo/auto/addons/account_invoice_facturx/models/ir_actions_report.py", line 17, in _render_qweb_pdf_prepare_streams
collected_streams = super()._render_qweb_pdf_prepare_streams(
File "/opt/odoo/auto/addons/account_edi_ubl_cii/models/ir_actions_report.py", line 58, in _render_qweb_pdf_prepare_streams
collected_streams = super()._render_qweb_pdf_prepare_streams(report_ref, data, res_ids=res_ids)
File "/opt/odoo/auto/addons/account_edi/models/ir_actions_report.py", line 14, in _render_qweb_pdf_prepare_streams
collected_streams = super()._render_qweb_pdf_prepare_streams(report_ref, data, res_ids=res_ids)
File "/opt/odoo/auto/addons/account/models/ir_actions_report.py", line 20, in _render_qweb_pdf_prepare_streams
return super()._render_qweb_pdf_prepare_streams(report_ref, data, res_ids=res_ids)
File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_actions_report.py", line 708, 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 "/opt/odoo/auto/addons-dev/enterprise/web_studio/models/ir_actions_report.py", line 19, in _render_qweb_html
return super(IrActionsReport, self)._render_qweb_html(report_ref, docids, data)
File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_actions_report.py", line 896, in _render_qweb_html
return self._render_template(report.report_name, data), 'html'
File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_actions_report.py", line 623, in _render_template
return view_obj._render_template(template, values).encode()
File "/opt/odoo/auto/addons/website/models/ir_ui_view.py", line 420, in _render_template
return super()._render_template(template, values=values)
File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_ui_view.py", line 2125, in _render_template
return self.env['ir.qweb']._render(template, values)
File "/opt/odoo/custom/src/odoo/odoo/tools/profiler.py", line 292, in _tracked_method_render
return method_render(self, template, values, **options)
File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_qweb.py", line 581, in _render
result = ''.join(rendering)
File "<1107>", line 80, in template_1107
File "<1107>", line 62, in template_1107_content
File "<1107>", line 50, in template_1107_t_call_0
File "<1106>", line 1662, in template_1106
File "<1106>", line 1651, in template_1106_content
File "<202>", line 150, in template_202
File "<202>", line 106, in template_202_content
File "<198>", line 310, in template_198
odoo.addons.base.models.ir_qweb.QWebException: Error while render the template
AttributeError: 'res.brand' object has no attribute 'is_company_details_empty'
Template: web.external_layout_striped
Path: /t/div[1]/div/div[2]/ul/li[1]
Node:
This field is used in report layout templates web/views/report_templates.xml at lines 303, 349, 392, 415 and 446. Native
company
is replaced by the recordbrand_id
in brand_external_report_layout/views/report_template.xml at line 19.