Odoo error to 13 from 12

Michele Esposito


I upgraded my odoo instance from 12 to 13 and I follow every instrunctions provided here:  

But when I try to install an app dependent by fleet app i receive this error:

Odoo Server Error
Traceback (most recent call last):
  File "/home/odoo_itaca/odoo/odoo/", line 619, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo_itaca/odoo/odoo/", line 309, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/home/odoo_itaca/odoo/odoo/tools/", line 14, in reraise
    raise value
  File "/home/odoo_itaca/odoo/odoo/", line 664, in dispatch
    result = self._call_function(**self.params)
  File "/home/odoo_itaca/odoo/odoo/", line 345, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/odoo_itaca/odoo/odoo/service/", line 93, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo_itaca/odoo/odoo/", line 338, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/odoo_itaca/odoo/odoo/", line 909, in __call__
    return self.method(*args, **kw)
  File "/home/odoo_itaca/odoo/odoo/", line 510, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo_itaca/odoo/addons/web/controllers/", line 1323, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/home/odoo_itaca/odoo/addons/web/controllers/", line 1311, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/odoo_itaca/odoo/odoo/", line 395, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/home/odoo_itaca/odoo/odoo/", line 382, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "<decorator-gen-58>", line 2, in button_immediate_install
  File "/home/odoo_itaca/odoo/odoo/addons/base/models/", line 72, in check_and_log
    return method(self, *args, **kwargs)
  File "/home/odoo_itaca/odoo/odoo/addons/base/models/", line 463, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/home/odoo_itaca/odoo/odoo/addons/base/models/", line 573, in _button_immediate_function, update_module=True)
  File "/home/odoo_itaca/odoo/odoo/modules/", line 85, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/home/odoo_itaca/odoo/odoo/modules/", line 420, in load_modules
    loaded_modules, update_module, models_to_check)
  File "/home/odoo_itaca/odoo/odoo/modules/", line 312, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/home/odoo_itaca/odoo/odoo/modules/", line 194, in load_module_graph
  File "/home/odoo_itaca/odoo/odoo/modules/", line 247, in setup_models
  File "/home/odoo_itaca/odoo/odoo/", line 2676, in _setup_fields
  File "/home/odoo_itaca/odoo/odoo/", line 420, in setup_full
  File "/home/odoo_itaca/odoo/odoo/", line 473, in _setup_related_full
    field = target._fields[name]
KeyError: 'plan_to_change_car'

Some one can help me?
Have a nice day

1 Comment
Niyas Raphy

Check the usage of plan_to_change_car in your custom module

1 إجابة
Michele Esposito
Best Answer

Hi, there is no use of this function in my custom module

Niyas Raphy

am not talking about the function, if you have got a IDE, search for the plan_to_change_car inside your code and see, it might be wrongly used somwhere

Michele Esposito

I search in my costum module, I think is that because I change driver id inherited with fleet app:

driver_id = fields.Many2one('hr.employee', string="Driver")

Instead connected with res.partner I change the relation. I noticed that plan_to_change_car is connected with the driver_id in the fleet app. How can I deal this problem?

Have a nice day

Michele Esposito

I think it is a problem of odoo 13 because my code works in odoo 12, and in addition I have already correct the views and removed api.multi from the code as it is written on the guides.

Michele Esposito

I saw that plan_to_change_car is a new boolean field of fleet app. How can I shut this field or How can I correct this field?