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.

2

get the string in the selection field

By
Vasanth
on 5/5/14, 4:01 AM 2,165 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.

0

Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
3918
| 5 3 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']

0
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

Vasanth
on 3/31/15, 4:02 AM
0
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"

0

Jagdish Panchal

--Jagdish Panchal--
2674
| 5 3 6
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

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

Hi,

You can use onchange method for that.

Thanks

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

0 follower(s)

Stats

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