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

selection depended on another selection field

By
Ann
on 11/17/16, 2:33 AM 142 views

i have 2 selections fields in a one2many field. options for the 1st selection field is given in py file. and options of 2nd selection field depends on the value of 1st selection field. any idea? i had 1st initialized the 2nd selection field with an empty list , and on onchange of 1st selection i had updated the empty list but the updated empty list is not showing in the xml(in view). any idea? or any another method?

0
Ann
On 11/17/16, 6:25 AM

hi,

ok, thank you :)

0

Ahmed M.Elmubarak

--Ahmed M.Elmubarak--
2988
| 5 3 5
Sudan
--Ahmed M.Elmubarak--


Ahmed M.Elmubarak
On 11/17/16, 5:57 AM

Hi,

I think this method will not work, bcz the selection fields just populated when the form is loaded; so the onchange function will not fill the selections. You can make the second selection a many2one field to a new model that preserve your data, and the onchange function return just a domain to the desired ids in that many2one field.


Hope this could helps ...

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: 11/17/16, 2:33 AM
Seen: 142 times
Last updated: 11/17/16, 6:25 AM