Hello everyone !
I created a inheritance on the existing model partner of odoo 12, and it worked successfully. however, when I tried to create an inheritance on the existing product model of odoo 12, in order to add a necessary field for the operation of my new module, it failed.And the server shows me the following error:
2019-04-13 13:30:05,483 26274 INFO pers_io_money odoo.modules.loading: loading pers_io_money/views/partner.xml
2019-04-13 13:30:05,507 26274 INFO pers_io_money odoo.modules.loading: loading pers_io_money/views/product.xml
2019-04-13 13:30:05,512 26274 WARNING pers_io_money odoo.modules.loading: Transient module states were reset
2019-04-13 13:30:05,512 26274 ERROR pers_io_money odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/cache.py", line 88, in lookup
r = d[key]
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/func.py", line 69, in wrapper
return func(self, *args, **kwargs)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/lru.py", line 44, in __getitem__
a = self.d[obj].me
KeyError: ('ir.model.data', <function IrModelData.xmlid_lookup at 0x7f7ee53e8510>, 'pers_io_money.product_template_search_form_view_stock')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 757, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 649, in _tag_record
f_val = self.id_get(f_ref)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 740, in id_get
res = self.model_id_get(id_str, raise_if_not_found)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 746, 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 "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_model.py", line 1380, in xmlid_to_res_model_res_id
return self.xmlid_lookup(xmlid)[1:3]
File "<decorator-gen-25>", line 2, in xmlid_lookup
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/cache.py", line 93, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_model.py", line 1369, in xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system: pers_io_money.product_template_search_form_view_stock
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 417, in load_modules
force, status, report, loaded_modules, update_module, models_to_check)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 313, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package, report=report)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 68, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 801, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 864, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 754, in parse
self.parse(rec, mode)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 763, in parse
exc_info[2]
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/pycompat.py", line 86, in reraise
raise value.with_traceback(tb)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 757, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 649, in _tag_record
f_val = self.id_get(f_ref)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 740, in id_get
res = self.model_id_get(id_str, raise_if_not_found)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 746, 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 "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_model.py", line 1380, in xmlid_to_res_model_res_id
return self.xmlid_lookup(xmlid)[1:3]
File "<decorator-gen-25>", line 2, in xmlid_lookup
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/cache.py", line 93, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_model.py", line 1369, 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: pers_io_money.product_template_search_form_view_stock" while parsing /home/kaly-7/odoo -dev/odoo-12.0/addons/pers_io_money/views/product.xml:5, near
<record id="product_template_list_actions" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.template</field>
<field name="view_mode">tree,form</field>
<field name="view_type">form</field>
<field name="search_view_id" ref="product_template_search_form_view_stock"/>
<field name="context">{"search_default_consumable": 1, 'default_type': 'product'}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a new product
</p>
</field>
</record>
2019-04-13 13:30:05,554 26274 CRITICAL pers_io_money odoo.service.server: Failed to initialize database `pers_io_money`.
Traceback (most recent call last):
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/cache.py", line 88, in lookup
r = d[key]
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/func.py", line 69, in wrapper
return func(self, *args, **kwargs)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/lru.py", line 44, in __getitem__
a = self.d[obj].me
KeyError: ('ir.model.data', <function IrModelData.xmlid_lookup at 0x7f7ee53e8510>, 'pers_io_money.product_template_search_form_view_stock')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 757, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 649, in _tag_record
f_val = self.id_get(f_ref)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 740, in id_get
res = self.model_id_get(id_str, raise_if_not_found)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 746, 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 "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_model.py", line 1380, in xmlid_to_res_model_res_id
return self.xmlid_lookup(xmlid)[1:3]
File "<decorator-gen-25>", line 2, in xmlid_lookup
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/cache.py", line 93, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_model.py", line 1369, in xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system: pers_io_money.product_template_search_form_view_stock
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/service/server.py", line 1055, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 417, in load_modules
force, status, report, loaded_modules, update_module, models_to_check)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 313, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package, report=report)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 68, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 801, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 864, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 754, in parse
self.parse(rec, mode)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 763, in parse
exc_info[2]
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/pycompat.py", line 86, in reraise
raise value.with_traceback(tb)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 757, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 649, in _tag_record
f_val = self.id_get(f_ref)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 740, in id_get
res = self.model_id_get(id_str, raise_if_not_found)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 746, 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 "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_model.py", line 1380, in xmlid_to_res_model_res_id
return self.xmlid_lookup(xmlid)[1:3]
File "<decorator-gen-25>", line 2, in xmlid_lookup
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/cache.py", line 93, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_model.py", line 1369, 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: pers_io_money.product_template_search_form_view_stock" while parsing /home/kaly-7/odoo -dev/odoo-12.0/addons/pers_io_money/views/product.xml:5, near
<record id="product_template_list_actions" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.template</field>
<field name="view_mode">tree,form</field>
<field name="view_type">form</field>
<field name="search_view_id" ref="product_template_search_form_view_stock"/>
<field name="context">{"search_default_consumable": 1, 'default_type': 'product'}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a new product
</p>
</field>
</record>
Please help
Check your answer solution in: https://old.reddit.com/r/learnopenerp/
Hi ! I finally solved my problem. I just had to add the product module in the dependency section of the __manifest__.py file
Thank you
Hi ! I finally solved my problem. I just had to add the product module in the dependency section of the __manifest__.py file
Thank you