True

TICK-001269 - ERRORE STAMPA TEMPLATE Modifica Ticket

Assegnato a : SARA FARASO
Email : g.bonaldo@henoto.com
Team di assistenza : Assistenza Odoo II Livello
Data Creazione : 26/09/2022
Il ticket è Chiuso? : SI
Cliente : HENOTO SPA, GIORGIA BONALDO
Telefono :
Priorità : Normale
Data Chiusura : 28/09/2022
Categoria : Anomalia

Ciao Fede,
ho provato a stampare il template fatto per Devotio 2024, ma mi dà un errore.
Te lo copio di seguito.
Grazie

Errore:
Henoto Server Error

Traceback (most recent call last):
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-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_gi_sale_custom_layout_header_and_footer_87146
AttributeError: 'staging.template' object has no attribute 'state'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-packages/odoo/addons/web/controllers/main.py", line 2128, in report_download
response = self.report_routes(reportname, docids=docids, converter=converter, context=context)
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-packages/odoo/http.py", line 532, in response_wrap
response = f(*args, **kw)
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-packages/odoo/addons/web/controllers/main.py", line 2063, in report_routes
pdf = report.with_context(context)._render_qweb_pdf(docids, data=data)[0]
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-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 "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-packages/odoo/addons/base/models/ir_actions_report.py", line 805, in _render_qweb_pdf
html = self_sudo.with_context(context)._render_qweb_html(res_ids, data=data)[0]
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-packages/odoo/addons/base/models/ir_actions_report.py", line 846, in _render_qweb_html
return self._render_template(self.report_name, data), 'html'
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-packages/odoo/addons/base/models/ir_actions_report.py", line 582, in _render_template
return view_obj._render_template(template, values)
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-packages/odoo/addons/base/models/ir_ui_view.py", line 1708, in _render_template
return self.browse(self.get_view_id(template))._render(values, engine)
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-packages/odoo/addons/website/models/ir_ui_view.py", line 420, in _render
return super(View, self)._render(values, engine=engine, minimal_qcontext=minimal_qcontext)
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-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 "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-packages/odoo/addons/base/models/ir_ui_view.py", line 1716, in _render
return self.env[engine]._render(self.id, qcontext)
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-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 "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-packages/odoo/addons/base/models/qweb.py", line 258, in _render
self.compile(template, options)(self, body.append, values or {})
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-packages/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
raise e
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-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_gi_staging_template_report_staging_template_87132
File "<template>", line 2, in foreach_87131
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-packages/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
raise e
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-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_87143
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-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: 'staging.template' object has no attribute 'state'
Traceback (most recent call last):
File "/nix/store/4a6kxaq5r715zsl3wxzqyaqx633f2v7d-python3.9-odoo-14.0.20211229/lib/python3.9/site-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_gi_sale_custom_layout_header_and_footer_87146
AttributeError: 'staging.template' object has no attribute 'state'

Error to render compiling AST
AttributeError: 'staging.template' object has no attribute 'state'
Template: gi_sale.custom_layout_header_and_footer
Path: /t/div[1]
Node: <div class="header o_clean_header" t-if="doc.state not in ['draft']">
<t t-if="print_header">
<t t-if="company._name == 'res.company'">
<div class="row">
<div class="col-4">
<t t-if="company.logo">
<img t-att-src="'data:image/png;base64,%s' % to_text(company.logo)" style="max-width: 250px; margin-top: 15px;"/>
</t>
</div>
<div class="col-4">
<t t-if="company.header_image">
<img t-att-src="'data:image/png;base64,%s' % to_text(company.header_image)"/>
</t>
</div>
<div class="col-4" name="company_address" style="padding:0;margin:0;font-size:9px">
<span t-field="company.report_footer"/>
</div>
</div>
</t>
</t>
</div>

Storico messaggi e comunicazioni

To install this Web App in your iPhone/iPad press and then Add to Home Screen.