Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4 ตอบกลับ
20458 มุมมอง

Hi,

I've written a custom module and it works fine locally.


But if I push it to odoo.sh I get the following error:


return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_model.py", line 1681, in xmlid_to_res_model_res_id
return self.xmlid_lookup(xmlid)[1:3]
File "<decorator-gen-24>", line 2, in xmlid_lookup
File "/home/odoo/src/odoo/odoo/tools/cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_model.py", line 1670, in xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
odoo.tools.convert.ParseError: "External ID not found in the system: web.assets_backend" while parsing /home/odoo/src/user/idx_elasticsearch/views/templates.xml:1, near
<odoo>


Here is my template file idx_elasticsearch/views/templates.xml

<odoo>
<data>
<template id="button_render_js" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script src="idx_elasticsearch/static/src/js/action_call.js" type="text/javascript"/>
</xpath>
</template>
</data>
</odoo>


If I remove the template tag odoo.sh is successful.

Any suggestions?




Setup

* Odoo13 CE locally

* Odoo13 Enterprise on odoo.sh

* Manifest file

# -*- coding: utf-8 -*-
{
'name': "Indexer: Elastic Search Connector",

'summary': """
""",

'description': """
""",

'author': "...",
'website': "...",

# Categories can be used to filter modules in modules listing
# Check https://github.com/odoo/odoo/blob/13.0/odoo/addons/base/data/ir_module_category_data.xml
# for the full list
'category': 'Uncategorized',
'version': '0.1',

# any module necessary for this one to work correctly
'depends': ['base'],

# always loaded
'data': [
'security/ir.model.access.csv',
'views/views.xml',
'views/templates.xml',
'views/res_configuration_view.xml',
],
'qweb': ['static/src/xml/qweb.xml'],
'application': True,
"external_dependencies": {"python": ["elasticsearch"]}
}

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด
add this on manifest for version 15

'assets': { 'web.assets_backend': [ 'pos_address/static/src/js/yourjs.js', ], },


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi, try adding 'web' as dependency in the manifest of the module.

อวตาร
ละทิ้ง

it did not solve my problem

คำตอบที่ดีที่สุด

Hi HU3nn1,

Im sorry to bother you. Could you please provide the information to solve the below error

ValueError: External ID not found in the system: web.assets_backend


อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Hi,

Thank you, this is the solution.

I can´t mark the answer as solved because I've not enough XP :)

อวตาร
ละทิ้ง

How did you solve it..?

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.ย. 23
2911
4
ก.ย. 20
8918
3
ส.ค. 23
25911
1
ส.ค. 23
2429
1
พ.ค. 21
5310