Search code examples
python-3.xodooodoo-10

Key error while updating all modules in oddo10


using command - python3 odoo-bin --addons=addons,/opt/git_addons/project_abcd -u all &

when i tryied to update modules on server, I am geeting Internal server Error and Error log says:

Traceback (most recent call last):
      File "/opt/odoo/odoo/modules/registry.py", line 83, in new
        odoo.modules.load_modules(registry._db, force_demo, status, update_module)
      File "/opt/odoo/odoo/modules/loading.py", line 373, in load_modules
        force, status, report, loaded_modules, update_module, models_to_check)
      File "/opt/odoo/odoo/modules/loading.py", line 270, in load_marked_modules
        perform_checks=perform_checks, models_to_check=models_to_check
      File "/opt/odoo/odoo/modules/loading.py", line 153, in load_module_graph
        registry.setup_models(cr, partial=True)
      File "/opt/odoo/odoo/modules/registry.py", line 300, in setup_models
        model._setup_fields(partial)
      File "/opt/odoo/odoo/models.py", line 2853, in _setup_fields
        field.setup_full(self)
      File "/opt/odoo/odoo/fields.py", line 505, in setup_full
        self._setup_regular_full(model)
      File "/opt/odoo/odoo/fields.py", line 2178, in _setup_regular_full
        invf = comodel._fields[self.inverse_name]
    KeyError: 'standard_id'

Please help to resolve this error.


Solution

  • Please find the standard_id field in all modules.

    Upgrade module which have standard_id field.

    If you update -u all with this command line interface then it'll update all your base module first and then you custom modules.

    So it might be the reason where your module consist this field and odoo registry can't find it.