Ciao Vittorio, ti confermo che il tuo suggerimento è stato utilissimo e che funziona correttamente.
Però quando esporto il file xml mi da il seguente errore:
Errore:
Odoo Server Error
Traceback (most recent call last):
File "C:\Program Files\Odoo 14.0\server\odoo\addons\base\models\ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "C:\Program Files\Odoo 14.0\server\odoo\http.py", line 685, in dispatch
result = self._call_function(**self.params)
File "C:\Program Files\Odoo 14.0\server\odoo\http.py", line 361, in _call_function
return checked_call(self.db, *args, **kwargs)
File "C:\Program Files\Odoo 14.0\server\odoo\service\model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "C:\Program Files\Odoo 14.0\server\odoo\http.py", line 349, in checked_call
result = self.endpoint(*a, **kw)
File "C:\Program Files\Odoo 14.0\server\odoo\http.py", line 914, in __call__
return self.method(*args, **kw)
File "C:\Program Files\Odoo 14.0\server\odoo\http.py", line 533, in response_wrap
response = f(*args, **kw)
File "C:\Program Files\Odoo 14.0\server\odoo\addons\web\controllers\main.py", line 1398, in call_button
action = self._call_kw(model, method, args, kwargs)
File "C:\Program Files\Odoo 14.0\server\odoo\addons\web\controllers\main.py", line 1386, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "C:\Program Files\Odoo 14.0\server\odoo\api.py", line 399, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "C:\Program Files\Odoo 14.0\server\odoo\api.py", line 386, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "C:\Program Files\Odoo 14.0\server\odoo\addons\l10n_it_fatturapa_out\wizard\wizard_export_fatturapa.py", line 263, in exportFatturaPA
attach = self.saveAttachment(fatturapa, progressivo_invio)
File "C:\Program Files\Odoo 14.0\server\odoo\addons\l10n_it_fatturapa_out\wizard\wizard_export_fatturapa.py", line 54, in saveAttachment
attach_str = fatturapa.to_xml(self.env)
File "C:\Program Files\Odoo 14.0\server\odoo\addons\l10n_it_fatturapa_out\wizard\efattura.py", line 253, in to_xml
)._render(template_values)
File "C:\Program Files\Odoo 14.0\server\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 "C:\Program Files\Odoo 14.0\server\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 "C:\Program Files\Odoo 14.0\server\odoo\addons\base\models\ir_ui_view.py", line 1716, in _render
return self.env[engine]._render(self.id, qcontext)
File "C:\Program Files\Odoo 14.0\server\odoo\addons\base\models\ir_qweb.py", line 55, in _render
result = super(IrQWeb, self)._render(id_or_xml_id, values=values, **context)
File "C:\Program Files\Odoo 14.0\server\odoo\addons\base\models\qweb.py", line 258, in _render
self.compile(template, options)(self, body.append, values or {})
File "C:\Program Files\Odoo 14.0\server\odoo\addons\base\models\qweb.py", line 333, in _compiled_fn
raise e
File "C:\Program Files\Odoo 14.0\server\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_it_fatturapa_out_account_invoice_it_FatturaPA_export_8506
File "C:\Program Files\Odoo 14.0\server\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)
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\Odoo 14.0\server\odoo\http.py", line 641, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "C:\Program Files\Odoo 14.0\server\odoo\http.py", line 317, in _handle_exception
raise exception.with_traceback(None) from new_cause
odoo.addons.base.models.qweb.QWebException: 'NoneType' object is not callable
Traceback (most recent call last):
File "C:\Program Files\Odoo 14.0\server\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_it_fatturapa_out_account_invoice_it_dati_trasmissione_8517
TypeError: 'NoneType' object is not callable
Error to render compiling AST
TypeError: 'NoneType' object is not callable
Template: l10n_it_fatturapa_out.account_invoice_it_dati_trasmissione
Path: /t/DatiTrasmissione/IdTrasmittente/IdPaese
Node: <IdPaese t-esc="get_vat_country(transmitter.vat)"/>
E non ho idea di cosa si tratta.