Odoo Help

2

get the string in the selection field

By
Vasanth
on 5/5/14, 4:01 AM 3,628 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

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
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
On 5/5/14, 4:05 AM

Hi,

You can use onchange method for that.

Thanks

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.

Register

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)

Stats

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