此问题已终结
2 回复
35 查看

trying to upgrade to version 17 but I keep getting this error

RPC_ERROR

Odoo Server Error

Traceback (most recent call last):

  2024-02-10 07:43:51,870 28 CRITICAL db_1328430 odoo.service.server: Failed to initialize database `db_1328430`.
Traceback (most recent call last):
File "/home/odoo/src/odoo/17.0/odoo/service/server.py", line 1302, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "", line 2, in new
File "/home/odoo/src/odoo/17.0/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/17.0/odoo/modules/registry.py", line 113, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/src/odoo/17.0/odoo/modules/loading.py", line 476, in load_modules
processed_modules += load_marked_modules(env, graph,
File "/home/odoo/src/odoo/17.0/odoo/modules/loading.py", line 364, in load_marked_modules
loaded, processed = load_module_graph(
File "/home/odoo/src/odoo/17.0/odoo/modules/loading.py", line 227, in load_module_graph
load_data(env, idref, mode, kind='data', package=package)
File "/home/odoo/src/odoo/17.0/odoo/modules/loading.py", line 71, in load_data
tools.convert_file(env, package.name, filename, idref, mode, noupdate, kind)
File "/home/odoo/src/odoo/17.0/odoo/tools/convert.py", line 627, in convert_file
convert_xml_import(env, module, fp, idref, mode, noupdate)
File "/home/odoo/src/odoo/17.0/odoo/tools/convert.py", line 693, in convert_xml_import
obj.parse(doc.getroot())
File "/home/odoo/src/odoo/17.0/odoo/tools/convert.py", line 613, in parse
self._tag_root(de)
File "/home/odoo/src/odoo/17.0/odoo/tools/convert.py", line 556, in _tag_root
f(rec)
File "/home/odoo/src/odoo/17.0/odoo/tools/convert.py", line 567, in _tag_root
raise ParseError(msg) from None # Restart with "--log-handler odoo.tools.convert:DEBUG" for complete traceback
odoo.tools.convert.ParseError: while parsing /home/odoo/src/odoo/17.0/addons/hr_expense/data/hr_expense_data.xml:69
The default Unit of Measure and the purchase Unit of Measure must be in the same category.

View error context:
'-no context-'
2024-02-10 07

形象
丢弃
最佳答案

Hi,

If you are upgrading custom module and if you are getting this error, you have to dig the codes in the module and see from which file or from which part of the code the error has been raised.

Simply you can start as follows:

* If you have views and assets imported in the manifest file, comment those
* and try to upgrade the module and see how it goes
* if everything goes smooth, bring the xml file one by one in the proper order of dependency 
* and trace which file is the culprit

Odoo Migration:  How To Migrate Odoo Modules To Another Version



Thanks

形象
丢弃
编写者

i get same error when I uninstalled expense and then tried to reinstall it

Okay, thanks for updating the question with more information it. so as of now, it seems you are getting the error with odoo module.

Can you do one thing, create a fresh db and see if the module is getting installed there, most probably it will install in fresh db.

If the db is not live db, you can continue with a new db and if you need the same, see if there is any default values set for the uom fields from the user interface.

Thanks

编写者

I removed the user defaults and it works fine now but I still get the same error while upgrading

编写者 最佳答案

the problem is with hr_expense

形象
丢弃