RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
  File "C:\odoo17\server\odoo\http.py", line 1783, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\service\model.py", line 133, in retrying
    result = func()
             ^^^^^^
  File "C:\odoo17\server\odoo\http.py", line 1810, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\http.py", line 2014, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\addons\base\models\ir_http.py", line 222, in _dispatch
    result = endpoint(**request.params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\http.py", line 759, in route_wrapper
    result = endpoint(self, *args, **params_ok)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\addons\web\controllers\dataset.py", line 24, in call_kw
    return self._call_kw(model, method, args, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\addons\web\controllers\dataset.py", line 20, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\api.py", line 468, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\api.py", line 453, in _call_kw_multi
    result = method(recs, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\addons\web\models\models.py", line 163, in web_read
    for vals in co_records.web_read(field_spec['fields'])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\addons\web\models\models.py", line 86, in web_read
    values_list: List[Dict] = self.read(fields_to_read, load=None)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\models.py", line 3556, in read
    return self._read_format(fnames=fields, load=load)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\models.py", line 3769, in _read_format
    vals[name] = convert(record[name], record, use_display_name)
                         ~~~~~~^^^^^^
  File "C:\odoo17\server\odoo\models.py", line 6649, in __getitem__
    return self._fields[key].__get__(self, self.env.registry[self._name])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\fields.py", line 4443, in __get__
    return super().__get__(records, owner)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\fields.py", line 2907, in __get__
    return super().__get__(records, owner)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\fields.py", line 1207, in __get__
    self.compute_value(recs)
  File "C:\odoo17\server\odoo\fields.py", line 1389, in compute_value
    records._compute_field_value(self)
  File "C:\odoo17\server\odoo\addons\mail\models\mail_thread.py", line 424, in _compute_field_value
    return super()._compute_field_value(field)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\models.py", line 4893, in _compute_field_value
    fields.determine(field.compute, self)
  File "C:\odoo17\server\odoo\fields.py", line 102, in determine
    return needle(*args)
           ^^^^^^^^^^^^^
  File "d:\vs_projects\odoo modules\production-cscdot-addons\cshe_product_cost_history\models\product_template.py", line 95, in _compute_cost_history
    cost_history = self.env['product.cost.history'].new(history)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\models.py", line 6455, in new
    record._update_cache(values, validate=False)
  File "C:\odoo17\server\odoo\models.py", line 6021, in _update_cache
    value = field.convert_to_cache(value, self, validate)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\odoo17\server\odoo\fields.py", line 2879, in convert_to_cache
    raise ValueError("Wrong value for %s: %r" % (self, value))
ValueError: Wrong value for product.cost.history.source_id: 1

The above server error caused the following client error:
OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
    Error: An error occured in the owl lifecycle (see this Error's "cause" property)
        at handleError (http://localhost:8069/web/assets/22be011/web.assets_web.min.js:916:101)
        at App.handleError (http://localhost:8069/web/assets/22be011/web.assets_web.min.js:1545:29)
        at ComponentNode.initiateRender (http://localhost:8069/web/assets/22be011/web.assets_web.min.js:1006:19)

Caused by: RPC_ERROR: Odoo Server Error
    RPC_ERROR
        at makeErrorFromResponse (http://localhost:8069/web/assets/22be011/web.assets_web.min.js:2888:163)
        at XMLHttpRequest.<anonymous> (http://localhost:8069/web/assets/22be011/web.assets_web.min.js:2892:13)