Unable to install "MRP" module in Odoo Community 14 - python

I'm unable to install Manufacturing Resource Planning (MRP) module in Odoo Community 14.
I receive error message below:
Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 682, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 358, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 346, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 911, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 530, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1363, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1351, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 396, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 383, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-72>", line 2, in button_immediate_install
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 73, in check_and_log
return method(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 474, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 592, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 89, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 455, in load_modules
loaded_modules, update_module, models_to_check)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 348, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 221, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 69, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 733, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 799, in convert_xml_import
obj.parse(doc.getroot())
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 719, in parse
self._tag_root(de)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 677, in _tag_root
f(rec)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 684, in _tag_root
etree.tostring(rec, encoding='unicode').rstrip()
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 638, 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 exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing /usr/lib/python3/dist-packages/odoo/addons/mrp/data/mrp_data.xml:17, near
<record id="stock.warehouse0" model="stock.warehouse">
<field name="manufacture_to_resupply" eval="True"/>
</record>
Did I forget to configure something (route, ...) specific?
I run Odoo Community 14 containerized, based on official Docker image.
Thanks in advance for help!

Related

Server error when updating custom module fromOdoo-10 to Odoo-15

I'm trying to update custom module from Odoo v10 to v15.
When I try to install module I get following error:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/tools/cache.py", line 85, in lookup
r = d[key]
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 71, in wrapper
return func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
KeyError: ('ir.model.data', <function IrModelData._xmlid_lookup at 0x7f93db198a60>, 'web.assets_backend')
During handling of the above exception, another exception occurred:
Traceback (most recAent call last):
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 680, in _tag_root
f(rec)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 658, in _tag_template
return self._tag_record(record)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 567, in _tag_record
f_val = self.id_get(f_ref)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 663, in id_get
res = self.model_id_get(id_str, raise_if_not_found)
File "/usr/lib/python3/dist-packages/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 "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_model.py", line 1943, in _xmlid_to_res_model_res_id
return self._xmlid_lookup(xmlid)[1:3]
File "<decorator-gen-35>", line 2, in _xmlid_lookup
File "/usr/lib/python3/dist-packages/odoo/tools/cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_model.py", line 1936, 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
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 687, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 916, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 535, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1347, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1335, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 464, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 451, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-74>", line 2, in button_immediate_install
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 483, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 600, in _button_immediate_function
registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 474, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 363, in load_marked_modules
loaded, processed = load_module_graph(
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 69, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 745, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 811, in convert_xml_import
obj.parse(doc.getroot())
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 731, in parse
self._tag_root(de)
File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 693, in _tag_root
raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing None:4, somewhere inside
<data name="web_timeline assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/web_timeline/static/lib/vis/vis-timeline-graph2d.min.css"/>
<link rel="stylesheet" href="/web_timeline/static/src/css/web_timeline.css"/>
<script type="text/javascript" src="/web_timeline/static/lib/vis/vis-timeline-graph2d.min.js"/>
<script type="text/javascript" src="/web_timeline/static/src/js/web_timeline.js"/>
</xpath>
</data>
I have added in manifest file following code but it didn't help:
'assets': {
'web.assets_backend': [
'web_timeline/static/src/js/web_timeline.js',
],
'web.assets_common': [
'web_timeline/static/lib/vis/vis-timeline-graph2d.min.css',
'web_timeline/static/src/css/web_timeline.css',
'web_timeline/static/lib/vis/vis-timeline-graph2d.min.js',
]
}
I'm new to Odoo and can't figure out this error stack, I thought those js files had to be put in assets bundle.
Any help would be appreciated, thank you.
From v15, Odoo removed the support of pushing assets using the view web.assets_backend , web.assets_frontend etc.
So, you're right importing those files through the manifest, but you should still remove the call to the view that extends web.assets_backend etc.
You can try by simply commenting out the call to that view (e.g. views/assets.xml or something? :) ) in the manifest.
Keep me updated if you need more help

How to relation two field from differents models in Odoo or OpenERP?

I want to know how to relation 2 CHAR Fields by code in Odoo.
First field is in product.template the HS CODE and the other one is in account.invoice.line and is a custom field.
How can I do this?
I have this error message
Error:
Odoo Server Error
Traceback (most recent call last):
File "/home/ubuntu/OdooAddons/odoo/odoo/http.py", line 656, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/ubuntu/OdooAddons/odoo/odoo/http.py", line 314, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/ubuntu/OdooAddons/odoo/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/home/ubuntu/OdooAddons/odoo/odoo/http.py", line 698, in dispatch
result = self._call_function(**self.params)
File "/home/ubuntu/OdooAddons/odoo/odoo/http.py", line 346, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/ubuntu/OdooAddons/odoo/odoo/service/model.py", line 98, in wrapper
return f(dbname, *args, **kwargs)
File "/home/ubuntu/OdooAddons/odoo/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/home/ubuntu/OdooAddons/odoo/odoo/http.py", line 941, in __call__
return self.method(*args, **kw)
File "/home/ubuntu/OdooAddons/odoo/odoo/http.py", line 519, in response_wrap
response = f(*args, **kw)
File "/home/ubuntu/OdooAddons/odoo/addons/web/controllers/main.py", line 967, in call_button
action = self._call_kw(model, method, args, {})
File "/home/ubuntu/OdooAddons/odoo/addons/web/controllers/main.py", line 955, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/ubuntu/OdooAddons/odoo/odoo/api.py", line 759, in call_kw
return _call_kw_multi(method, model, args, kwargs)
File "/home/ubuntu/OdooAddons/odoo/odoo/api.py", line 746, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-67>", line 2, in button_immediate_upgrade
File "/home/ubuntu/OdooAddons/odoo/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "/home/ubuntu/OdooAddons/odoo/odoo/addons/base/models/ir_module.py", line 627, in button_immediate_upgrade
return self._button_immediate_function(type(self).button_upgrade)
File "/home/ubuntu/OdooAddons/odoo/odoo/addons/base/models/ir_module.py", line 561, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/home/ubuntu/OdooAddons/odoo/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/ubuntu/OdooAddons/odoo/odoo/modules/loading.py", line 417, in load_modules
force, status, report, loaded_modules, update_module, models_to_check)
File "/home/ubuntu/OdooAddons/odoo/odoo/modules/loading.py", line 313, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/home/ubuntu/OdooAddons/odoo/odoo/modules/loading.py", line 194, in load_module_graph
registry.setup_models(cr)
File "/home/ubuntu/OdooAddons/odoo/odoo/modules/registry.py", line 275, in setup_models
model._setup_fields()
File "/home/ubuntu/OdooAddons/odoo/odoo/models.py", line 2656, in _setup_fields
field.setup_full(self)
File "/home/ubuntu/OdooAddons/odoo/odoo/fields.py", line 520, in setup_full
self._setup_related_full(model)
File "/home/ubuntu/OdooAddons/odoo/odoo/fields.py", line 563, in _setup_related_full
field = target._fields[name]
KeyError: 'hs_code'
Thanks
The solution was to add the delivery_hs_code module to the depends entry in the manifest file.
Thank you Kenly

Char field related KeyError 'work_location'

I'm working with employee data such as in python:
employee_id = fields.Many2one('hr.employee', string="Работник")
work_location = fields.Char(related='employee_id.work_location', string="Место трудоустройства")
in xml
<field name="work_location"/>
when I uninstal and then install module it's ok but when i change somesing even in xml and try to update module I have an error
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo13/odoo/odoo/http.py", line 619, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo13/odoo/odoo/http.py", line 309, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/odoo13/odoo/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/opt/odoo13/odoo/odoo/http.py", line 664, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo13/odoo/odoo/http.py", line 345, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo13/odoo/odoo/service/model.py", line 93, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo13/odoo/odoo/http.py", line 338, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo13/odoo/odoo/http.py", line 909, in __call__
return self.method(*args, **kw)
File "/opt/odoo13/odoo/odoo/http.py", line 510, in response_wrap
response = f(*args, **kw)
File "/opt/odoo13/odoo/addons/web/controllers/main.py", line 1323, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/opt/odoo13/odoo/addons/web/controllers/main.py", line 1311, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo13/odoo/odoo/api.py", line 395, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo13/odoo/odoo/api.py", line 382, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-64>", line 2, in button_immediate_upgrade
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_module.py", line 72, in check_and_log
return method(self, *args, **kwargs)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_module.py", line 629, in button_immediate_upgrade
return self._button_immediate_function(type(self).button_upgrade)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_module.py", line 573, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/opt/odoo13/odoo/odoo/modules/registry.py", line 85, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo13/odoo/odoo/modules/loading.py", line 416, in load_modules
force, status, report, loaded_modules, update_module, models_to_check)
File "/opt/odoo13/odoo/odoo/modules/loading.py", line 312, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/opt/odoo13/odoo/odoo/modules/loading.py", line 194, in load_module_graph
registry.setup_models(cr)
File "/opt/odoo13/odoo/odoo/modules/registry.py", line 247, in setup_models
model._setup_fields()
File "/opt/odoo13/odoo/odoo/models.py", line 2675, in _setup_fields
field.setup_full(self)
File "/opt/odoo13/odoo/odoo/fields.py", line 405, in setup_full
self._setup_related_full(model)
File "/opt/odoo13/odoo/odoo/fields.py", line 458, in _setup_related_full
field = target._fields[name]
KeyError: 'work_location'
I dont use work_location anywhere else. I can't get what I did wrong. (sorry for bad english)
It seems use of dependency module is missing in your custom module manifest file. Make sure you have added hr module in it. Like
'depends': ['hr']

Error Installation MRO by CodUP module on Odo 12.0

I try to install MRO module but I get this error
Error:
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/tools/convert.py", line 757, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/odoo/odoo-server/odoo/tools/convert.py", line 573, in _tag_record
model = self.env[rec_model]
File "/odoo/odoo-server/odoo/api.py", line 820, in __getitem__
return self.registry[model_name]._browse((), self)
File "/odoo/odoo-server/odoo/modules/registry.py", line 176, in __getitem__
return self.models[model_name]
KeyError: 'procurement.rule'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/http.py", line 653, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/odoo-server/odoo/http.py", line 312, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/odoo/odoo-server/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/odoo/odoo-server/odoo/http.py", line 695, in dispatch
result = self._call_function(**self.params)
File "/odoo/odoo-server/odoo/http.py", line 344, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/odoo-server/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/odoo-server/odoo/http.py", line 337, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/odoo-server/odoo/http.py", line 938, in __call__
return self.method(*args, **kw)
File "/odoo/odoo-server/odoo/http.py", line 517, in response_wrap
response = f(*args, **kw)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 966, in call_button
action = self._call_kw(model, method, args, {})
File "/odoo/odoo-server/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 749, in call_kw
return _call_kw_multi(method, model, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 736, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-61>", line 2, in button_immediate_install
File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 71, in check_and_log
return method(self, *args, **kwargs)
File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 442, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 535, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/odoo/odoo-server/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/odoo/odoo-server/odoo/modules/loading.py", line 426, in load_modules
loaded_modules, update_module, models_to_check)
File "/odoo/odoo-server/odoo/modules/loading.py", line 318, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/odoo/odoo-server/odoo/modules/loading.py", line 224, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package, report=report)
File "/odoo/odoo-server/odoo/modules/loading.py", line 68, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
File "/odoo/odoo-server/odoo/tools/convert.py", line 801, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/odoo/odoo-server/odoo/tools/convert.py", line 864, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/odoo/odoo-server/odoo/tools/convert.py", line 754, in parse
self.parse(rec, mode)
File "/odoo/odoo-server/odoo/tools/convert.py", line 763, in parse
exc_info[2]
File "/odoo/odoo-server/odoo/tools/pycompat.py", line 86, in reraise
raise value.with_traceback(tb)
File "/odoo/odoo-server/odoo/tools/convert.py", line 757, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/odoo/odoo-server/odoo/tools/convert.py", line 573, in _tag_record
model = self.env[rec_model]
File "/odoo/odoo-server/odoo/api.py", line 820, in __getitem__
return self.registry[model_name]._browse((), self)
File "/odoo/odoo-server/odoo/modules/registry.py", line 176, in __getitem__
return self.models[model_name]
odoo.tools.convert.ParseError: "procurement.rule" while parsing /odoo/odoo- server/addons/mro/mro_data.xml:59, near
<record id="rule_wh_asset" model="procurement.rule">
<field name="name">WH: Stock -> Asset</field>
<field name="action">move</field>
<field name="picking_type_id" ref="stock.picking_type_internal"/>
<field name="location_src_id" ref="stock.stock_location_stock"/>
<field name="location_id" ref="asset.stock_location_assets"/>
<field name="route_id" ref="mro.route_maintenance"/>
</record>
I installed asset module as dependencies but nothing change
OS Debian 9
same installation but Odoo 11.0
works fine
same installation but Odoo 10.0
works fine
also tried to uninstall, purge and reinstall but nothing change new
Can anyone help me or have any idea to solve the problem pleas
waithing for your reply
thanks
regards
MD
Welcome to Stack Overflow Maudal78!
The procurement.rule has been renamed to stock.rule in Odoo v12. This is why the old code does not work in Odoo 12. See commit https://github.com/odoo/odoo/commit/827958a8902589246dd741341ce1bc5465059909 for details.
You, CodUp team or someone need to make changes to the module for it to be compatible. There already is a branch for Odoo 12.0 in the module’s repo at https://github.com/codup/odoo-eam, but it does not contain changes for this.

Reading Odoo Python Traceback

I am working on a odoo website, I am not familiar with odoo or python very much and while testing something, the Products page on backend has a XML syntax error I made changes through the backend's debug mode but I made sure to undo those changes before proceeding. Since this still might be the cause of the problem, I'm trying to figure out the file it was modifying.
Traceback (most recent call last):
File "/opt/odoo/odoo/http.py", line 638, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo/http.py", line 675, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo/http.py", line 331, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo/service/model.py", line 119, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo/http.py", line 324, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/odoo/http.py", line 933, in __call__
return self.method(*args, **kw)
File "/opt/odoo/odoo/http.py", line 504, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/addons/web/controllers/main.py", line 862, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/addons/web/controllers/main.py", line 854, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo/api.py", line 679, in call_kw
return call_kw_model(method, model, args, kwargs)
File "/opt/odoo/odoo/api.py", line 664, in call_kw_model
result = method(recs, *args, **kwargs)
File "/opt/odoo/odoo/models.py", line 1324, in load_views
for [v_id, v_type] in views
File "/opt/odoo/odoo/models.py", line 1324, in <dictcomp>
for [v_id, v_type] in views
File "/opt/odoo/addons/mail/models/mail_thread.py", line 363, in fields_view_get
res = super(MailThread, self).fields_view_get(view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu)
File "/opt/odoo/odoo/models.py", line 1383, in fields_view_get
root_view = View.browse(view_id).read_combined(['id', 'name', 'field_parent', 'type', 'model', 'arch'])
File "/opt/odoo/odoo/addons/base/ir/ir_ui_view.py", line 638, in read_combined
view_arch = etree.fromstring(view_data['arch'].encode('utf-8'))
File "lxml.etree.pyx", line 3032, in lxml.etree.fromstring (src/lxml/lxml.etree.c:68106)
File "parser.pxi", line 1785, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:102455)
File "parser.pxi", line 1673, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:101284)
File "parser.pxi", line 1074, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:96466)
File "parser.pxi", line 582, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:91275)
File "parser.pxi", line 683, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:92461)
File "parser.pxi", line 622, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:91757)
XMLSyntaxError: Blank needed here, line 1, column 19
The error trace shows that there is some syntactical error in an xml file.
After correcting the syntax you will have to upgrade the module.
You can either upgrade the module from the 'App' menu or using '-u' key followed by the name of the module when starting the server.
Thanks

Categories