Odoo Help


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.


[Solved] Called Write method for another object is not evaluating Functional Field !!!

on 10/15/14, 10:31 AM 1,158 views

In Odoo Version:

Am trying to call the write method of different object in one of the Button functionality persent in Other Object...

In Earlier version, whenever a write method is called, either manually or systematically irrespective of Values list, all the Functional fields present in that object will be recomputed again.... Whereas in this version it is not happening.. Any idea why it is so, or am i missing something...

Let me take classic example:

In Sale Object: [in which a button is placed]

 def button_method(self):


So when button is triggered in Sale Object, along with other functionality, it will just call a dummy write for Lead in order to trigger the functional fields present in Lead object... which works perfectly in Earlier Version, including V8 Alpha but not in Odoo V8


  • If I manage to pass a values for Write method, then it triggers the Functional field
  • And this code works great in older version...
  • functional field is not having dependency property also




| 5 4 7
Bengaluru, India

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

On 10/16/14, 7:24 AM

Well finally I got the solution... what I missed to realize was for One2many objects, write method was not triggering to compute the stored functional fields..

Solution: updated my context with "recompute"..  here it goes like this

context = dict(context, recompute=True)

when I updated my context value for "recompute" as True, everything worked fine, recomputed all my stored functional fields...

Follow the link for more details:

  1. Compute field is broken creating o2m field to database

  2. stored func fields computation on one2many write

This explains the behaviour....

recompute=True did not work for me unfortuanetely :( : I write to the field price_unit sale.order.line but after the write the functional field price_subtotal was not recalculated? Did i miss a thing?

Michael Karrer
on 3/23/15, 5:37 PM

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

1 follower(s)


Asked: 10/15/14, 10:31 AM
Seen: 1158 times
Last updated: 3/16/15, 8:10 AM