2

when i tried inherit external id web.assets_backend odoo says that external id not found here's the error log:

Traceback (most recent call last):
  File "/opt/odoo/sources/odoo/odoo/tools/cache.py", line 85, in lookup
    r = d[key]
  File "/opt/odoo/sources/odoo/odoo/tools/func.py", line 71, in wrapper
    return func(self, *args, **kwargs)
  File "/opt/odoo/sources/odoo/odoo/tools/lru.py", line 34, in __getitem__
    a = self.d[obj]
KeyError: ('ir.model.data', <function IrModelData._xmlid_lookup at 0x7fb3865beaf0>, 'web.assets_backend')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/odoo/sources/odoo/odoo/tools/convert.py", line 680, in _tag_root
    f(rec)
  File "/opt/odoo/sources/odoo/odoo/tools/convert.py", line 658, in _tag_template
    return self._tag_record(record)
  File "/opt/odoo/sources/odoo/odoo/tools/convert.py", line 567, in _tag_record
    f_val = self.id_get(f_ref)
  File "/opt/odoo/sources/odoo/odoo/tools/convert.py", line 663, in id_get
    res = self.model_id_get(id_str, raise_if_not_found)
  File "/opt/odoo/sources/odoo/odoo/tools/convert.py", line 669, in model_id_get
    return self.env['ir.model.data']._xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
  File "/opt/odoo/sources/odoo/odoo/addons/base/models/ir_model.py", line 1935, in _xmlid_to_res_model_res_id
    return self._xmlid_lookup(xmlid)[1:3]
  File "<decorator-gen-35>", line 2, in _xmlid_lookup
  File "/opt/odoo/sources/odoo/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/opt/odoo/sources/odoo/odoo/addons/base/models/ir_model.py", line 1928, in _xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system: web.assets_backend

what is the solution for this issue? thanks in advance

wahyu aldika
  • 25
  • 1
  • 4

1 Answers1

5

In odoo 15, you can't inherit web.assets_backend in view and can't add your js or css. You need to add it in manifest file. I share example code.
Add this code to manifest file.

'assets': {
        'web.assets_backend': [
            'pos_address/static/src/js/yourjs.js',
        ],
    },
Bashir
  • 2,057
  • 5
  • 19
  • 44
Neural
  • 370
  • 1
  • 11
  • i tried your answer @neural, but then i got "Could not get content for fal_tablet_view/static/src/js/product_tablet_kanban.js defined in bundle 'web.assets_backend' " massage, is it because the order of my js in the assets? – wahyu aldika Jan 05 '22 at 10:55
  • @wahyualdika . I think your new question is not related to this question.So, open new question and someone will answer you. – Neural Jan 06 '22 at 03:05
  • ok never mind, i have solved my problem thank you @neural – wahyu aldika Jan 06 '22 at 03:42
  • @wahyualdika. If my answer solve your problem, pls vote.So, other user can use. If not solved your problem, it's ok. – Neural Jan 06 '22 at 03:46