Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 10/15/14, 10:31 AM|
|Seen: 1285 times|
|Last updated: 3/16/15, 8:10 AM|