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

Value selected by default ? [Closed]

By
Dr Obx
on 4/22/15, 10:52 AM 220 views

The Question has been closed for reason: not relevant or out dated

by
Dr Obx
on 04/22/2015 17:04:51

Hi there,

Is it possible to select value from list for example:

condition = fields.selection([('new','new'),('old','old'),('dunno','dunno')],'Condition')

somehow like that in xml ?

<field name="condition" selected="used"/>

0
Michael Pol
On 4/22/15, 11:55 AM

Use _defaults if you are following old standard.

_defaults = {

    'condition' : 'new'

}

For new version

condition = fields.Selection([('new','new'),('old','old'),('dunno','dunno')],'Condition',default='new')

Aaaa ok, that way, simple, thank you

Dr Obx
on 4/22/15, 5:04 PM

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/22/15, 10:52 AM
Seen: 220 times
Last updated: 4/22/15, 5:04 PM