Odoo Help


Way to know the field that trigger the server request

Mathieu Laflamme
on 3/4/16, 4:30 PM 394 views

I have a function like that.

# @api.depends('field1', 'field2')

def _compute_allowed_carrier_and_service_ids(self):

for order in self:

# Call methods that will access the database. # Do something if field1 was changed
# Do something else if field2 was changed

Is there any way I can know what field was changed to trigger the server request? I want to run this method only once whether field1 or field2 was changed. I want to avoid make 2 functions with one "depend" each to make sure this is called only once.

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 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 3/4/16, 4:30 PM
Seen: 394 times
Last updated: 3/4/16, 6:02 PM