Odoo Help

Welcome!

This community 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.

0

Problem with computed value in a TreeView

By
Chris Z.
on 10/14/14, 11:18 AM 830 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
    self._read_from_database(stored)
  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..

deep
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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

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