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 9C:
am trying to override a standard method, which involves adding another dependency field.
However, I noticed, newly added field in the depends decorator is not taken into consideration while saving the record.
Ex: Say in Purchase Order, the method called "_amount_all" has @api.depends on "order_line.price_total"
Now In my custom module I have overridden that method, and included one of my dependency field to it, like
Though it seems to work, when I change the value in myfield, however while saving the record, method is not triggered to recompute...
So In other words, newly added dependency fields are not taken into consideration while saving the record, as a result, method computation is not at all triggered. Hence old value is retained.
I believe this must be a bug.
Anybody has faced this issue?
I realised, this issue is happening only with the currency field, in which I have overridden the related property of the same in its lines.
However, for other fields or newly created fields, it works fine. Not sure what could be the problem in my scenario, perhaps the overriding of related didn't go well I guess. Anyways it doesn't matter since I found an alternate way to fulfil my requirement.
Refer the below thread which I had raised in Github, though I haven't got the solution for my problem, just thought, it might be useful to someone, who is looking for the same kind of solution.
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: 6/16/16, 9:27 AM|
|Seen: 626 times|
|Last updated: 7/21/16, 12:50 AM|