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.


Odoo 9C: Overriding method & its "depends" decorator [Bug]

on 6/16/16, 9:27 AM 239 views

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?



| 5 4 7
Bangalore, India

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

On 7/21/16, 12:50 AM

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.

Odoo 9C: Overriding the method & its "depends" decorator [Bug] #12459

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: 6/16/16, 9:27 AM
Seen: 239 times
Last updated: 7/21/16, 12:50 AM