Skip to content
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

Impresión de Factura devuelve: AttributeError: 'bool' object has no attribute 'split' #27

Open
jocarren opened this issue Jun 29, 2022 · 0 comments

Comments

@jocarren
Copy link

jocarren commented Jun 29, 2022

Hola.

Estoy testeando odoo 15 con docker y encuentro el siguiente problema al imprimir una factura con la localización chilena.

imagen

Error to render compiling AST
AttributeError: 'bool' object has no attribute 'split'
Template: l10n_cl.custom_header
Path: /t/div/div/div[2]/div/div/div[1]/div/h6/strong/span[2]
Node: <span t-esc="o.company_id.partner_id._format_dotted_vat_cl(o.company_id.partner_id.vat)"/>

Error:
Odoo Server Error

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_l10n_cl_custom_header_2738
  File "/usr/lib/python3/dist-packages/odoo/addons/l10n_cl/models/res_partner.py", line 46, in _format_dotted_vat_cl
    vat_l = vat.split('-')
AttributeError: 'bool' object has no attribute 'split'

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 2134, in report_download
    response = self.report_routes(reportname, docids=docids, converter=converter, context=context)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 531, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 2065, in report_routes
    pdf = report.with_context(context)._render_qweb_pdf(docids, data=data)[0]
  File "/usr/lib/python3/dist-packages/odoo/addons/account/models/ir_actions_report.py", line 50, in _render_qweb_pdf
    return super()._render_qweb_pdf(res_ids=res_ids, data=data)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 824, in _render_qweb_pdf
    html = self_sudo.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 865, 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 601, 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 1718, 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 28, 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 1726, in _render
    return self.env[engine]._render(self.id, qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 55, 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 258, in _render
    self.compile(template, options)(self, body.append, values or {})
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
    raise e
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_account_report_invoice_with_payments_2627
  File "<template>", line 2, in body_call_content_2625
  File "<template>", line 3, in foreach_2624
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
    raise e
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_l10n_cl_report_invoice_document_2665
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
    raise e
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_web_external_layout_2708
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
    raise e
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_web_external_layout_standard_2725
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 338, 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: 'bool' object has no attribute 'split'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_l10n_cl_custom_header_2738
  File "/usr/lib/python3/dist-packages/odoo/addons/l10n_cl/models/res_partner.py", line 46, in _format_dotted_vat_cl
    vat_l = vat.split('-')
AttributeError: 'bool' object has no attribute 'split'

Error to render compiling AST
AttributeError: 'bool' object has no attribute 'split'
Template: l10n_cl.custom_header
Path: /t/div/div/div[2]/div/div/div[1]/div/h6/strong/span[2]
Node: <span t-esc="o.company_id.partner_id._format_dotted_vat_cl(o.company_id.partner_id.vat)"/>

Al parecer, hay un problema con el atributo 'split' en 'vat_l'

vat_l = vat.split('-')

El problema también existe en odoo 14, con docker.

Otra persona tiene el mismo problema, en Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant