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

RPC_Error, Odoo server error while retrieving Products items from product list in purchase or sales app, also cannot create new product record.Seems like anything related to product is broken, and that is why installing inventory app does not go through.


Please find error code below:


RPC_ERROR

Odoo Server Error

Traceback (most recent call last):

File "/cloudclusters/odoo/odoo/api.py", line 882, in get

return field_cache[record._ids[0]]

KeyError: 27



During handling of the above exception, another exception occurred:



Traceback (most recent call last):

File "/cloudclusters/odoo/odoo/fields.py", line 1057, in __get__

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

\ \ File\ "/cloudclusters/odoo/odoo/api\.py",\ line\ 885,\ in\ get

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

odoo\.exceptions\.CacheMiss:\ 'product\.template\(27,\)\.sales_count'



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



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

\ \ File\ "/cloudclusters/odoo/odoo/api\.py",\ line\ 882,\ in\ get

\ \ \ \ return\ field_cache\[record\._ids\[0\]\]

KeyError:\ 27



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



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

\ \ File\ "/cloudclusters/odoo/odoo/fields\.py",\ line\ 1057,\ in\ __get__

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

\ \ File\ "/cloudclusters/odoo/odoo/api\.py",\ line\ 885,\ in\ get

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

odoo\.exceptions\.CacheMiss:\ 'product\.product\(27,\)\.sales_count'



The\ above\ exception\ was\ the\ direct\ cause\ of\ the\ following\ exception:



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

\ \ File\ "/cloudclusters/odoo/odoo/addons/base/models/ir_http\.py",\ line\ 237,\ in\ _dispatch

\ \ \ \ result\ =\ request\.dispatch\(\)

\ \ File\ "/cloudclusters/odoo/odoo/http\.py",\ line\ 687,\ in\ dispatch

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

\ \ File\ "/cloudclusters/odoo/odoo/http\.py",\ line\ 359,\ in\ _call_function

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

\ \ File\ "/cloudclusters/odoo/odoo/service/model\.py",\ line\ 94,\ in\ wrapper

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

\ \ File\ "/cloudclusters/odoo/odoo/http\.py",\ line\ 348,\ in\ checked_call

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

\ \ File\ "/cloudclusters/odoo/odoo/http\.py",\ line\ 916,\ in\ __call__

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

\ \ File\ "/cloudclusters/odoo/odoo/http\.py",\ line\ 535,\ in\ response_wrap

\ \ \ \ response\ =\ f\(\*args,\ \*\*kw\)

\ \ File\ "/cloudclusters/odoo/odoo/addons/web/controllers/main\.py",\ line\ 1335,\ in\ call_kw

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

\ \ File\ "/cloudclusters/odoo/odoo/addons/web/controllers/main\.py",\ line\ 1327,\ in\ _call_kw

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

\ \ File\ "/cloudclusters/odoo/odoo/api\.py",\ line\ 464,\ in\ call_kw

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

\ \ File\ "/cloudclusters/odoo/odoo/api\.py",\ line\ 451,\ in\ _call_kw_multi

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

\ \ File\ "/cloudclusters/odoo/odoo/models\.py",\ line\ 3227,\ in\ read

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

\ \ File\ "/cloudclusters/odoo/odoo/models\.py",\ line\ 3247,\ in\ _read_format

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

\ \ File\ "/cloudclusters/odoo/odoo/models\.py",\ line\ 5866,\ in\ __getitem__

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

\ \ File\ "/cloudclusters/odoo/odoo/fields\.py",\ line\ 1106,\ in\ __get__

\ \ \ \ self\.compute_value\(recs\)

\ \ File\ "/cloudclusters/odoo/odoo/fields\.py",\ line\ 1265,\ in\ compute_value

\ \ \ \ records\._compute_field_value\(self\)

\ \ File\ "/cloudclusters/odoo/odoo/addons/mail/models/mail_thread\.py",\ line\ 410,\ in\ _compute_field_value

\ \ \ \ return\ super\(\)\._compute_field_value\(field\)

\ \ File\ "/cloudclusters/odoo/odoo/models\.py",\ line\ 4248,\ in\ _compute_field_value

\ \ \ \ getattr\(self,\ field\.compute\)\(\)

\ \ File\ "/cloudclusters/odoo/odoo/addons/sale/models/product_template\.py",\ line\ 60,\ in\ _compute_sales_count

\ \ \ \ product\.sales_count\ =\ float_round\(sum\(\[p\.sales_count\ for\ p\ in\ product\.with_context\(active_test=False\)\.product_variant_ids\]\),\ precision_rounding=product\.uom_id\.rounding\)

\ \ File\ "/cloudclusters/odoo/odoo/addons/sale/models/product_template\.py",\ line\ 60,\ in\

\ \ \ \ product\.sales_count\ =\ float_round\(sum\(\[p\.sales_count\ for\ p\ in\ product\.with_context\(active_test=False\)\.product_variant_ids\]\),\ precision_rounding=product\.uom_id\.rounding\)

\ \ File\ "/cloudclusters/odoo/odoo/fields\.py",\ line\ 1106,\ in\ __get__

\ \ \ \ self\.compute_value\(recs\)

\ \ File\ "/cloudclusters/odoo/odoo/fields\.py",\ line\ 1265,\ in\ compute_value

\ \ \ \ records\._compute_field_value\(self\)

\ \ File\ "/cloudclusters/odoo/odoo/addons/mail/models/mail_thread\.py",\ line\ 410,\ in\ _compute_field_value

\ \ \ \ return\ super\(\)\._compute_field_value\(field\)

\ \ File\ "/cloudclusters/odoo/odoo/models\.py",\ line\ 4248,\ in\ _compute_field_value

\ \ \ \ getattr\(self,\ field\.compute\)\(\)

\ \ File\ "/cloudclusters/odoo/odoo/addons/sale/models/product_product\.py",\ line\ 28,\ in\ _compute_sales_count

\ \ \ \ for\ group\ in\ self\.env\['sale\.report'\]\.read_group\(domain,\ \['product_id',\ 'product_uom_qty'\],\ \['product_id'\]\):

\ \ File\ "/cloudclusters/odoo/odoo/models\.py",\ line\ 2438,\ in\ read_group

\ \ \ \ result\ =\ self\._read_group_raw\(domain,\ fields,\ groupby,\ offset=offset,\ limit=limit,\ orderby=orderby,\ lazy=lazy\)

\ \ File\ "/cloudclusters/odoo/odoo/models\.py",\ line\ 2580,\ in\ _read_group_raw

\ \ \ \ self\._cr\.execute\(query,\ where_clause_params\)

\ \ File\ "",\ line\ 2,\ in\ execute

\ \ File\ "/cloudclusters/odoo/odoo/sql_db\.py",\ line\ 89,\ in\ check

\ \ \ \ return\ f\(self,\ \*args,\ \*\*kwargs\)

\ \ File\ "/cloudclusters/odoo/odoo/sql_db\.py",\ line\ 310,\ in\ execute

\ \ \ \ res\ =\ self\._obj\.execute\(query,\ params\)

Exception



The\ above\ exception\ was\ the\ direct\ cause\ of\ the\ following\ exception:



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

\ \ File\ "/cloudclusters/odoo/odoo/http\.py",\ line\ 643,\ in\ _handle_exception

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

\ \ File\ "/cloudclusters/odoo/odoo/http\.py",\ line\ 301,\ in\ _handle_exception

\ \ \ \ raise\ exception\.with_traceback\(None\)\ from\ new_cause

psycopg2.errors.UndefinedTable: relation "sale_report" does not exist

LINE 3: FROM "sale_report" LEFT JOIN "product_product" A...

^




Avatar
Discard

i have same error how we can fix it

Best Answer

Restarting the server did work for me. Thanks 

Avatar
Discard
Related Posts Replies Views Activity
2
Dec 24
3132
1
Dec 24
352
4
Nov 24
1366
1
Sep 24
1137
1
Sep 24
1203