Skip to Content
Menu
This question has been flagged
1 Reply
975 Views

Hata:

Odoo Server Error


Traceback (most recent call last):

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\http.py", line 656, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\http.py", line 314, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\tools\pycompat.py", line 87, in reraise

    raise value

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\http.py", line 698, in dispatch

    result = self._call_function(**self.params)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\http.py", line 346, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\service\model.py", line 97, in wrapper

    return f(dbname, *args, **kwargs)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\http.py", line 339, in checked_call

    result = self.endpoint(*a, **kw)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\http.py", line 941, in __call__

    return self.method(*args, **kw)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\http.py", line 519, in response_wrap

    response = f(*args, **kw)

  File "c:\program files (x86)\odoo 12.0\server\odoo\addons\web\controllers\main.py", line 962, in call_kw

    return self._call_kw(model, method, args, kwargs)

  File "c:\program files (x86)\odoo 12.0\server\odoo\addons\web\controllers\main.py", line 954, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\api.py", line 759, in call_kw

    return _call_kw_multi(method, model, args, kwargs)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\api.py", line 746, in _call_kw_multi

    result = method(recs, *args, **kwargs)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\models.py", line 5489, in onchange

    record = self.new(values)

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\models.py", line 4951, in new

    record._cache.update(record._convert_to_cache(values, update=True))

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\models.py", line 4824, in _convert_to_cache

    for name, value in values.items()

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\models.py", line 4825, in <dictcomp>

    if name in fields

  File "C:\Program Files (x86)\Odoo 12.0\server\odoo\fields.py", line 1999, in convert_to_cache

    raise ValueError("Wrong value for %s: %r" % (self, value))

ValueError: Wrong value for res.config.settings.product_weight_in_lbs: '3'

Avatar
Discard
Author

Very very good thanks

Best Answer

The product_weight_in_lbs field is a selection field with two values 0 or 1 but in your DB it's 3 so you got this error, Check if you have any custom module change the value of product_weight_in_lbs field

product_weight_in_lbs = fields.Selection([
(
'0', 'Kilogram'),
(
'1', 'Pound'),
],
'Weight unit of measure', config_parameter='product.weight_in_lbs', default='0')



A workaround solution:
You can modify the value from DB in table res_config_settings 

update res_config_settings
set product_weight_in_lbs =0
Avatar
Discard