Odoo Help


get the string in the selection field

on 5/5/14, 4:01 AM 4,457 views

how to display string in the selection field to another text field by clicking the value in the selection field. for example i have selection field with values male and female.i have a empty text field.when i click male ,it should display it in the text field.when i click fe-male ,it should display it in the text field.


Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
| 5 5 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
On 4/1/15, 1:01 AM

To obtain the value of a selection, try this model is the name of the model, example: 'account.invoice' field is the name of the field inside the model, example: 'state' field_val is the value of that field, example: 'draft' Code: dict(self.pool.get(model).fields_get(cr, uid, allfields=[field], context=context)[field]['selection'])[field_val] Example: dict(self.pool.get('account.invoice').fields_get(cr, uid, allfields=['state'], context=context)['state']['selection'])['draft']

Mohammed Roshan
On 3/30/15, 2:37 AM

Hey Vasanth

Did you get the answer for this question?

yes. By onchange method , we can achieve my requirement

on 3/31/15, 4:02 AM
Hengky Zhang
On 3/30/15, 2:51 AM

yes of course you can with on_change method

but instead of using return domain

u can return value with onchange method

you seach in google with keyword "odoo onchange return value"


Jagdish Panchal

--Jagdish Panchal--

| 5 4 6
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal
On 5/5/14, 4:05 AM


You can use onchange method for that.


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

0 follower(s)


Asked: 5/5/14, 4:01 AM
Seen: 4457 times
Last updated: 6/27/16, 2:09 AM