This question has been flagged

I'm running Odoo14 EE On-Premise. Its already has a database with several existing data. However, I tried to install the E-Commerce (website_sales) module using the app menu, but it always keeps running into the following error:


Error:
Odoo Server Error

Traceback (most recent call last):
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 530, in _tag_record
raise Exception("Cannot update missing record %r" % xid)
Exception: Cannot update missing record 'product.list0'

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 683, 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 347, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 912, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 531, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1393, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1381, 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 "", 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 453, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 346, in load_marked_modules
loaded, processed = load_module_graph(
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 681, in _tag_root
raise ParseError('while parsing %s:%s, near\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 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing /usr/lib/python3/dist-packages/odoo/addons/website_sale/data/data.xml:44, near




Can someone help me with this?

Avatar
Discard
Author

It seems some lines of the error were missed out:

odoo.tools.convert.ParseError: while parsing /usr/lib/python3/dist-packages/odoo/addons/website_sale/data/data.xml:44, near

<record model="product.pricelist" id="product.list0">

<field name="selectable" eval="True"/>

<field name="website_id" eval="False"/>

</record>

Author

Niyas,

Thanks for your reply. I tried that, however searching for list0 in external identifiers returns nothing.

Best Answer

Create a new price list with name Public Price List.

The export this price-list with External ID field.

Copy the external ID from the exported Excel sheet.

Come back to your Odoo database and activate Developer Mode.

Then Navigate to Settings -> Technical -> Sequence & Identifiers.

Paste the copied External Id in the Search section & open it.


Then try to reinstall the Ecommerce app. It will get installed now.

If you still encounter any new errors and if its related to Shipping methods you can also create a new shipping method, follow same steps as mentioned above and update its external ID as mentioned below.



Avatar
Discard
Best Answer

Extra information for future reference.

I had the same error message when trying to install the eCommerce module on (a duplicate of ;) ) a live site.

The live site had 3 pricelists which were imported and received a new external ID. The original price list with id product.list0 was removed.

I created an Excel file with 1 empty pricelist line: id (product_list0) & name (Public Pricelist). I imported this file. The installation of the eCommerce module went ok afterwards.

I configured the Public Pricelist that it uses another pricelist for all product. That way I did not have to reconfigure too much.


Avatar
Discard
Best Answer

Hi,

Seems somewhere in the code it is referencing the record with the external ID product.list0 , this is the record inside the Pricelist table with the name: Public Pricelist.

So in order to resolve the above issue,activate the developer mode and navigate to Settings -> Technical -> Sequence & Identifiers -> External Identifiers, and search for list0 and delete the record from here, and then upgrade the product module.


Thanks

Avatar
Discard