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.

-1

change selection field from function

By
MoayadRayyan
on 12/10/14, 3:19 AM 668 views

Greetings,

 

Im trying to change the selection field once other many2one has beed changed .

the problem is : i can't change the values of the selection field with return statment , many errors i face some of them like wrong values , unhashable dict and many others .

what i want to do is :

i have many2one selection field , which the values contain all countries , on change , i have other selection field i want to but on it all customers on the selected country .

so the problem is in ' customers ' selection field , i loaded every thing but i need to add the selected customers to the selection field .

 

any help ?

1

Ivan

--Ivan--
3210
| 5 3 6
Jakarta, Indonesia
--Ivan--
Ivan
On 12/10/14, 3:33 AM

I would advise you to read the answer to this question: https://www.odoo.com/forum/help-1/question/best-practices-as-to-when-to-use-fields-selection-vs-fields-many2one-69262 also the discussion in this question: https://www.odoo.com/forum/help-1/question/how-to-update-selection-field-on-wizard-based-on-another-fied-value-68543

0
Anand
On 12/10/14, 3:30 AM

I will give you some tips..

1st thing is you have to use below func in your many2one field's table

 def name_get(self, cr, uid, ids, context=None):

     ###some code to filter your values###

     return the result

 

 

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: 12/10/14, 3:19 AM
Seen: 668 times
Last updated: 3/16/15, 8:10 AM