Odoo Help


Refresh field function

on 3/16/13, 2:06 PM 1,929 views

hi, I want to show "historical" sales order lines for the customer when user is creating a new sale order, so I've created a fields.function (type='one2many') in sale.order.

Everything works fine, in sale order form view I have a tree for "historical" lines for this customer.

But when creating a new order, historical lines are not refreshed until order is saved. I would like to refresh lines just after partner_id is set. How can I "recompute" functional fields inside a onchange event? I think store parm in fields.function is only for triggering events when data "in other" objetcs change, not for self...

Place onchange function call in XML to fields that must cause recalculate function fields.

Vasiliy Birukov
on 3/18/13, 1:56 AM

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/16/13, 2:06 PM
Seen: 1929 times
Last updated: 3/16/15, 8:10 AM