Skip to Content
Menu
This question has been flagged

Dear community,


In an attempt to try to modify the standard "Invoice" template using Studio on the web version of Odoo, I accidentally did alter the settings of the standard invoice template. While I can still generate the pdf invoices using the "print" function, the "preview" function stopped working, and I receive the error message below. 


Anyone any idea how this can be resolved/fixed?


Many thanks!



Traceback (most recent call last):
  File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 807, in dispatch
    r = self._call_function(**self.params)
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 360, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/odoo/src/odoo/14.0/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 348, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 913, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 532, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/src/odoo/14.0/addons/account/controllers/portal.py", line 99, in portal_my_invoice_detail
    return self._show_report(model=invoice_sudo, report_type=report_type, report_ref='account.account_invoices', download=download)
  File "/home/odoo/src/odoo/14.0/addons/portal/controllers/portal.py", line 408, in _show_report
    report_sudo = request.env.ref(report_ref).with_user(SUPERUSER_ID)
  File "/home/odoo/src/odoo/14.0/odoo/api.py", line 511, in ref
    return self['ir.model.data'].xmlid_to_object(xml_id, raise_if_not_found=raise_if_not_found)
  File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_model.py", line 1944, in xmlid_to_object
    t = self.xmlid_to_res_model_res_id(xmlid, raise_if_not_found)
  File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_model.py", line 1928, in xmlid_to_res_model_res_id
    return self.xmlid_lookup(xmlid)[1:3]
  File "", line 2, in xmlid_lookup
  File "/home/odoo/src/odoo/14.0/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_model.py", line 1921, in xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % xmlid)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 807, in dispatch
    r = self._call_function(**self.params)
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 360, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/odoo/src/odoo/14.0/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 348, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 913, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 532, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/src/odoo/14.0/addons/account/controllers/portal.py", line 99, in portal_my_invoice_detail
    return self._show_report(model=invoice_sudo, report_type=report_type, report_ref='account.account_invoices', download=download)
  File "/home/odoo/src/odoo/14.0/addons/portal/controllers/portal.py", line 408, in _show_report
    report_sudo = request.env.ref(report_ref).with_user(SUPERUSER_ID)
  File "/home/odoo/src/odoo/14.0/odoo/api.py", line 511, in ref
    return self['ir.model.data'].xmlid_to_object(xml_id, raise_if_not_found=raise_if_not_found)
  File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_model.py", line 1944, in xmlid_to_object
    t = self.xmlid_to_res_model_res_id(xmlid, raise_if_not_found)
  File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_model.py", line 1928, in xmlid_to_res_model_res_id
    return self.xmlid_lookup(xmlid)[1:3]
  File "", line 2, in xmlid_lookup
  File "/home/odoo/src/odoo/14.0/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_model.py", line 1921, in xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system: account.account_invoices


Avatar
Discard

can you try upgrading the account module and see

Author

Hi thank you! What do you mean with “upgrading” however?

open the apps menu, search account in the search bar, you will see a module named Invoicing, click the upgrade button

Author Best Answer

This has fixed the invoice generation issue, yet  introduced a new issue: all former customisations are lost? Can I revert this?

Avatar
Discard
Related Posts Replies Views Activity
1
Apr 22
1454
2
Sep 24
9838
0
Feb 24
594
1
Feb 23
754
1
Aug 21
2331