Ciao a tutti,
recentemente, come si evince anche da questo problema che avevo avuto, ho rifatto il server su cui gira Odoo 14 CE e ho poi eseguito un restore del DB. Sembrava essere andato tutto liscio salvo che a distanza di giorni mi accorgo che il File e-fatture in ingresso dei fornitori non si popolava con le fatture che via via arrivavano per PEC. I server in ingresso e uscita sono corretti (almeno così dicono i test) e dopo che faccio Preleva ora dalla webmail della pec vedo che il messaggio viene marcato come letto. Quindi Odoo legge correttamente il server di posta sia in entrata che in uscita.
Se provo a importare manualmente una fattura elettronica fornitore (da File e-fatture in ingresso --> Crea) ricevo questo errore:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 685, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 361, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 349, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 914, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 533, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1388, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1380, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 399, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 386, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 6276, in onchange
todo = [
File "/usr/lib/python3/dist-packages/odoo/models.py", line 6279, in <listcomp>
if name not in done and snapshot0.has_changed(name)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 6096, in has_changed
return self[name] != record[name]
File "/usr/lib/python3/dist-packages/odoo/models.py", line 5694, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 2489, in __get__
return super().__get__(records, owner)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 969, in __get__
self.recompute(record)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1155, in recompute
self.compute_value(recs)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1177, in compute_value
records._compute_field_value(self)
File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 410, in _compute_field_value
return super()._compute_field_value(field)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4069, in _compute_field_value
getattr(self, field.compute)()
File "/etc/odoo/addons/l10n-italy-14.0/l10n_it_fatturapa_in/models/attachment.py", line 109, in _compute_xml_data
fatt = wiz_obj.get_invoice_obj(att)
File "/etc/odoo/addons/l10n-italy-14.0/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py", line 1697, in get_invoice_obj
xml_string = fatturapa_attachment.get_xml_string()
File "/etc/odoo/addons/l10n-italy-14.0/l10n_it_fatturapa_in/models/attachment.py", line 90, in get_xml_string
return self.ir_attachment_id.get_xml_string()
File "/etc/odoo/addons/l10n-italy-14.0/l10n_it_fatturapa/models/ir_attachment.py", line 104, in get_xml_string
data = self.extract_cades(data)
File "/etc/odoo/addons/l10n-italy-14.0/l10n_it_fatturapa/models/ir_attachment.py", line 75, in extract_cades
info = cms.ContentInfo.load(data)
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 641, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 317, in _handle_exception
raise exception.with_traceback(None) from new_cause
NameError: name 'cms' is not defined
Cosa posso fare?