Odoo Help


What are options to display values when another field value changes, except(onchange function)?(Please help me!!!!!)

on 10/9/14, 7:59 AM 688 views

I have two fields

<field name="dest_location" />
<field name="new_project" on_change="onchange_location_id(new_project)" />

I want, when i choose new_project, all its corresponding location will display in dest_location.

But i also need, when i choose dest_location, all its corresponding location will display in new_project.

I cant use onchange function. Its has right!

Any another option?

i tried using domain, but no output.



Ben Bernard

--Ben Bernard--

| 4 3 6
Jakarta, Indonesia
--Ben Bernard--
Ben Bernard
On 10/10/14, 1:34 AM

I see the problem is looping onchange. Then why don't you add second arg in the onchange function, or context, to flag non changed value. I think the second argument would be the other field.

It's not elegant, but I think it can be done that way.

Problem is looping. but i didnt get you about the second arg or context or flag. how can use in my onchange function?

on 10/10/14, 2:45 AM

Like: on_change="onchange_location_id(new_project, dest_location)". Of course, you have to update the code and consider the dest_location. if the relation new_project ~ dest_location satisfied then you don't have to update new value.

Ben Bernard
on 10/10/14, 5:12 AM

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: 10/9/14, 7:59 AM
Seen: 688 times
Last updated: 3/16/15, 8:10 AM