Odoo Help

Welcome!

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.

0

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

By
rosey
on 10/9/14, 7:59 AM 481 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.

 

0

Ben Bernard

--Ben Bernard--
1083
| 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?

rosey
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

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)

Stats

Asked: 10/9/14, 7:59 AM
Seen: 481 times
Last updated: 3/16/15, 8:10 AM