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]
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
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:
This explains the behaviour....
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
|Asked: 10/15/14, 10:31 AM|
|Seen: 1215 times|
|Last updated: 3/16/15, 8:10 AM|