Ho lo stesso problema su una installazione "pulita". I moduli installati sono fattura, vendite, acquisti e magazzino + la roba di fatturapa e quella del ddt della community Sono loggato come amministratore. Aprendo la vista vedo che il campo related_documents è relazionato così
Ma comunque non riesco a individuare questo campo "documenti collegati".
Ho anche riprovato con i moduli officiali + fatturapa e basta senza
altre personalizzazioni (ubicazioni etc.) quindi il problema viene da fatturapa.
Ho notato che da fatturazione->configurazione->Documenti collegati è vuoto e non modificabile
Server application error
Error code: 200
Error message: Odoo Server Error
Error data message:
L'operazione richiesta non può essere completata per questioni di di sicurezza. Si prega di contattare l'amministratore di sistema.
(Tipo documento: Sales Order Line, Operazione: read) - (Utente: 2, Campi: related_documents)
None
Error data debug:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/api.py", line 1049, in get
value = self._data[key][field][record._ids[0]]
KeyError: 5
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1065, in __get__
value = record.env.cache.get(record, self)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 1051, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('sale.order.line(5,).related_documents', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/models.py", line 2880, in _prefetch_field
result = records.read([f.name for f in fs], load='_classic_write')
File "/usr/lib/python3/dist-packages/odoo/models.py", line 2800, in read
fields = self.check_field_access_rights('read', fields)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 2780, in check_field_access_rights
+ ' - ({} {}, {} {})'.format(_('User:'), self._uid, _('Fields:'), ', '.join(invalid_fields))
odoo.exceptions.AccessError: ("L'operazione richiesta non può essere completata per questioni di di sicurezza. Si prega di contattare l'amministratore di sistema.\n\n(Tipo documento: Sales Order Line, Operazione: read) - (Utente: 2, Campi: related_documents)", None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 656, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 314, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/usr/lib/python3/dist-packages/odoo/http.py", line 698, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 346, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 98, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 941, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 519, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 967, in call_button
action = self._call_kw(model, method, args, {})
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 955, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 759, in call_kw
return _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 746, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/sale/wizard/sale_make_invoice_advance.py", line 136, in create_invoices
sale_orders.action_invoice_create()
File "/mnt/extra-addons/l10n-italy/l10n_it_delivery_note/models/sale_order.py", line 119, in action_invoice_create
final=final)
File "/usr/lib/python3/dist-packages/odoo/addons/sale/models/sale.py", line 625, in action_invoice_create
invoices[group_key].id, line.qty_to_invoice
File "/usr/lib/python3/dist-packages/odoo/addons/sale/models/sale.py", line 1462, in invoice_line_create_vals
vals = line._prepare_invoice_line(qty=qty)
File "/mnt/extra-addons/l10n-italy/l10n_it_fatturapa_sale/models/sale_order_line.py", line 28, in _prepare_invoice_line
sale_line_documents = self.related_documents
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1069, in __get__
self.determine_value(record)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1172, in determine_value
record._prefetch_field(self)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 2883, in _prefetch_field
result = self.read([f.name for f in fs], load='_classic_write')
File "/usr/lib/python3/dist-packages/odoo/models.py", line 2800, in read
fields = self.check_field_access_rights('read', fields)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 2780, in check_field_access_rights
+ ' - ({} {}, {} {})'.format(_('User:'), self._uid, _('Fields:'), ', '.join(invalid_fields))
odoo.exceptions.AccessError: ("L'operazione richiesta non può essere completata per questioni di di sicurezza. Si prega di contattare l'amministratore di sistema.\n\n(Tipo documento: Sales Order Line, Operazione: read) - (Utente: 2, Campi: related_documents)", None)