Odoo Help


Problem with computed value in a TreeView

Chris Z.
on 10/14/14, 11:18 AM 1,098 views

I am trying to place a computed value in a tree view (extension of product.template) and getting following message:


  File "/opt/odoo/odoo-server/openerp/models.py", line 3105, in read
  File "/opt/odoo/odoo-server/openerp/api.py", line 235, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/models.py", line 3272, in _read_from_database
    vals[f] = res2[vals['id']]
KeyError: 4


The same variable and view definitons worked fine with V8 Alpha version.

I tested with field.function  using both True and False values   for store with the same effect.


I was wndering if anybody had similar experience?

Can you share your code..

on 10/15/14, 9:43 AM

I managed to solve the issue by moving my code to the new api's - I figured that since it worked before then API must be a reason.

Chris Z.
on 10/15/14, 9:56 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 10/14/14, 11:18 AM
Seen: 1098 times
Last updated: 3/16/15, 8:10 AM