Hello,
when i want to export or print an invoice, I have this error message :
Odoo Server Error
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 344, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_account_report_invoice_document_with_payments_683 File "<template>", line 2, in body_call_content_682 File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 387, in _get_field content = converter.record_to_html(record, field_name, field_options) File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb_fields.py", line 454, in record_to_html return super(MonetaryConverter, self).record_to_html(record, field_name, options) File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb_fields.py", line 126, in record_to_html return False if value is False else record.env[self._name].value_to_html(value, options=options) File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb_fields.py", line 412, in value_to_html fmt = "%.{0}f".format(display_currency.decimal_places) AttributeError: 'str' object has no attribute 'decimal_places' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1673, in report_download response = self.report_routes(reportname, docids=docids, converter=converter) File "/usr/lib/python3/dist-packages/odoo/http.py", line 517, in response_wrap response = f(*args, **kw) File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1614, in report_routes pdf = report.with_context(context).render_qweb_pdf(docids, data=data)[0] File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 677, in render_qweb_pdf html = self.with_context(context).render_qweb_html(res_ids, data=data)[0] File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 711, in render_qweb_html return self.render_template(self.report_name, data), 'html' File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 501, in render_template return view_obj.render_template(template, values) File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1276, in render_template return self.browse(self.get_view_id(template)).render(values, engine) File "/usr/lib/python3/dist-packages/odoo/addons/web_editor/models/ir_ui_view.py", line 27, in render return super(IrUiView, self).render(values=values, engine=engine, minimal_qcontext=minimal_qcontext) File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1285, in render return self.env[engine].render(self.id, qcontext) File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 59, in render result = super(IrQWeb, self).render(id_or_xml_id, values=values, **context) File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 272, in render self.compile(template, options)(self, body.append, values or {}) File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 346, in _compiled_fn raise e File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 344, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_697_631 File "<template>", line 2, in body_call_content_630 File "<template>", line 3, in foreach_629 File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 351, in _compiled_fn raise QWebException("Error to render compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name) odoo.addons.base.models.qweb.QWebException: 'str' object has no attribute 'decimal_places' Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 344, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_account_report_invoice_document_with_payments_683 File "<template>", line 2, in body_call_content_682 File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 387, in _get_field content = converter.record_to_html(record, field_name, field_options) File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb_fields.py", line 454, in record_to_html return super(MonetaryConverter, self).record_to_html(record, field_name, options) File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb_fields.py", line 126, in record_to_html return False if value is False else record.env[self._name].value_to_html(value, options=options) File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb_fields.py", line 412, in value_to_html fmt = "%.{0}f".format(display_currency.decimal_places) AttributeError: 'str' object has no attribute 'decimal_places' Error to render compiling AST AttributeError: 'str' object has no attribute 'decimal_places' Template: account.report_invoice_document_with_payments Path: /templates/t/t/div/div[2]/div/div/table/tr[2]/td[2]/span Node: <span t-field="o.amount_discount" t-options="{"widget": "monetary", "display_currency": "o.currency_id"}"/>
Can someone tell me what to do to solve this please ?