跳至内容
菜单
此问题已终结
1 回复
1836 查看

Traceback (most recent call last):

  File "/hkspos/hkspos/odoo/api\.py",\ line\ 983,\ in\ get

 \  \ cache_value\ =\ field_cache\[record\._ids\[0\]\]

KeyError:\ 627


During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:


Traceback\ \(most\ recent\ call\ last\):

 \ File\ "/hkspos/hkspos/odoo/fields\.py",\ line\ 1139,\ in\ __get__

 \  \ value\ =\ env\.cache\.get\(record,\ self\)

 \ File\ "/hkspos/hkspos/odoo/api\.py",\ line\ 990,\ in\ get

 \  \ raise\ CacheMiss\(record,\ field\)

odoo\.exceptions\.CacheMiss:\ 'product\.product\(627,\)\.alert_tag'


During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:


Traceback\ \(most\ recent\ call\ last\):

 \ File\ "/hkspos/hkspos/odoo/api\.py",\ line\ 983,\ in\ get

 \  \ cache_value\ =\ field_cache\[record\._ids\[0\]\]

KeyError:\ 627


During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:


Traceback\ \(most\ recent\ call\ last\):

 \ File\ "/hkspos/hkspos/odoo/fields\.py",\ line\ 1192,\ in\ __get__

 \  \ value\ =\ env\.cache\.get\(record,\ self\)

 \ File\ "/hkspos/hkspos/odoo/api\.py",\ line\ 990,\ in\ get

 \  \ raise\ CacheMiss\(record,\ field\)

odoo\.exceptions\.CacheMiss:\ 'product\.product\(627,\)\.alert_tag'


During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:


Traceback\ \(most\ recent\ call\ last\):

 \ File\ "/hkspos/hkspos/odoo/http\.py",\ line\ 1583,\ in\ _serve_db

 \  \ return\ service_model\.retrying\(self\._serve_ir_http,\ self\.env\)

 \ File\ "/hkspos/hkspos/odoo/service/model\.py",\ line\ 134,\ in\ retrying

 \  \ result\ =\ func\(\)

 \ File\ "/hkspos/hkspos/odoo/http\.py",\ line\ 1612,\ in\ _serve_ir_http

 \  \ response\ =\ self\.dispatcher\.dispatch\(rule\.endpoint,\ args\)

 \ File\ "/hkspos/hkspos/odoo/http\.py",\ line\ 1809,\ in\ dispatch

 \  \ result\ =\ self\.request\.registry\['ir\.http'\]\._dispatch\(endpoint\)

 \ File\ "/hkspos/hkspos/addons/website/models/ir_http\.py",\ line\ 235,\ in\ _dispatch

 \  \ response\ =\ super\(\)\._dispatch\(endpoint\)

 \ File\ "/hkspos/hkspos/odoo/addons/base/models/ir_http\.py",\ line\ 144,\ in\ _dispatch

 \  \ result\ =\ endpoint\(\*\*request\.params\)

 \ File\ "/hkspos/hkspos/odoo/http\.py",\ line\ 698,\ in\ route_wrapper

 \  \ result\ =\ endpoint\(self,\ \*args,\ \*\*params_ok\)

 \ File\ "/hkspos/hkspos/addons/web/controllers/dataset\.py",\ line\ 42,\ in\ call_kw

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

 \ File\ "/hkspos/hkspos/addons/web/controllers/dataset\.py",\ line\ 33,\ in\ _call_kw

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

 \ File\ "/hkspos/hkspos/odoo/api\.py",\ line\ 461,\ in\ call_kw

 \  \ result\ =\ _call_kw_multi\(method,\ model,\ args,\ kwargs\)

 \ File\ "/hkspos/hkspos/odoo/api\.py",\ line\ 448,\ in\ _call_kw_multi

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

 \ File\ "/hkspos/hkspos/addons/point_of_sale/models/pos_session\.py",\ line\ 1574,\ in\ load_pos_data

 \  \ loaded_data\[model\]\ =\ self\._load_model\(model\)

 \ File\ "/hkspos/hkspos/addons/point_of_sale/models/pos_session\.py",\ line\ 1566,\ in\ _load_model

 \  \ return\ loader\(params\(\)\)

 \ File\ "/hkspos/hkspos/addons/pos_loyalty/models/pos_session\.py",\ line\ 71,\ in\ _get_pos_ui_product_product

 \  \ result\ =\ super\(\)\._get_pos_ui_product_product\(params\)

 \ File\ "/hkspos/hkspos/addons/point_of_sale/models/pos_session\.py",\ line\ 1914,\ in\ _get_pos_ui_product_product

 \  \ products\ =\ self\.config_id\.get_limited_products_loading\(params\['search_params'\]\['fields'\]\)

 \ File\ "/hkspos/hkspos/addons/point_of_sale/models/pos_config\.py",\ line\ 652,\ in\ get_limited_products_loading

 \  \ products\ =\ self\.env\['product\.product'\]\.search_read\(\[\('id',\ 'in',\ product_ids\)\],\ fields=fields\)

 \ File\ "/hkspos/hkspos/odoo/models\.py",\ line\ 4947,\ in\ search_read

 \  \ result\ =\ records\.read\(fields,\ \*\*read_kwargs\)

 \ File\ "/hkspos/hkspos/odoo/models\.py",\ line\ 2966,\ in\ read

 \  \ return\ self\._read_format\(fnames=fields,\ load=load\)

 \ File\ "/hkspos/hkspos/odoo/models\.py",\ line\ 3115,\ in\ _read_format

 \  \ vals\[name\]\ =\ convert\(record\[name\],\ record,\ use_name_get\)

 \ File\ "/hkspos/hkspos/odoo/models\.py",\ line\ 5830,\ in\ __getitem__

 \  \ return\ self\._fields\[key\]\.__get__\(self,\ type\(self\)\)

 \ File\ "/hkspos/hkspos/odoo/fields.py", line 1195, in __get__

    raise ValueError("Compute method failed to assign %s.%s" % (record, self.name))

ValueError: Compute method failed to assign product.product(627,).alert_tag

形象
丢弃
最佳答案

Hi  Rafa,

As the error message indicates, there is an issue with the compute method related to the alert_tag.
Make sure that the method handles all the cases and returns a value.

形象
丢弃
相关帖文 回复 查看 活动
1
8月 24
2055
2
4月 24
1400
2
9月 24
1291
2
7月 24
1805
0
5月 24
757