Hey guys, I am new to Odoo. I have installed the Fleet Management App that is built in Odoo 10. I also installed the app Freight Management system. https://www.odoo.com/apps/modules/9.0/tms/ (Except v10.0 of course). When I have everything installed and all the dependency I get this error when I attempted to create a vehicle.
Traceback (most recent call last):
File "/opt/odoo/odoo-10.0/odoo/http.py", line 640, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo-10.0/odoo/http.py", line 677, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo-10.0/odoo/http.py", line 333, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo-10.0/odoo/service/model.py", line 101, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo-10.0/odoo/http.py", line 326, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/odoo-10.0/odoo/http.py", line 935, in __call__
return self.method(*args, **kw)
File "/opt/odoo/odoo-10.0/odoo/http.py", line 506, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/odoo-10.0/addons/web/controllers/main.py", line 885, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/odoo-10.0/addons/web/controllers/main.py", line 877, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo-10.0/odoo/api.py", line 689, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/opt/odoo/odoo-10.0/odoo/api.py", line 680, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/opt/odoo/odoo-10.0/odoo/models.py", line 5505, in onchange
newval = record[name]
File "/opt/odoo/odoo-10.0/odoo/models.py", line 5210, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/opt/odoo/odoo-10.0/odoo/fields.py", line 872, in __get__
self.determine_draft_value(record)
File "/opt/odoo/odoo-10.0/odoo/fields.py", line 993, in determine_draft_value
self._compute_value(record)
File "/opt/odoo/odoo-10.0/odoo/fields.py", line 927, in _compute_value
getattr(records, self.compute)()
File "/opt/odoo/odoo-10.0/addons/fleet/models/fleet.py", line 191, in _compute_vehicle_name
record.name = record.model_id.brand_id.name + '/' + record.model_id.name + '/' + record.license_plate
TypeError: unsupported operand type(s) for +: 'bool' and 'str'
Can I get some fixing this issue. And it doesn't matter when I try to add the Vehicle from.
@niyas, has given the correct answer, I'm agree with that. when we concate any two or more than two fields value, then Make sure those field has the value otherwise it will raise the following error, TypeError: unsupported operand type(s) for +: 'bool' and
'str'. Just improve the existing code with some checks on the fields which are get contacted.