Odoo Help


how create a new selection field with option to create another contained in this field

on 4/1/13, 1:19 PM 1,649 views

hi to all I want to create a new field type "selection". there is the same example in the stock module product is the category selection list,, how to do?? Thanks

You need to give some more details on what you want to accomplish. Please put in the module and field you want to edit along with the version of openERP you are using.

AJ Schrafel Paper Corp
on 4/1/13, 1:44 PM

Naresh Soni (nch)

--Naresh Soni (nch)--
--Naresh Soni (nch)--

Team Lead, Odoo(Formerly OpenERP) Support & OPW

Naresh Soni (nch)
On 4/1/13, 1:51 PM

Hello Kizayko,

Syntax for creating selection field is

selection(values, string, ...)

values: list of values (key-label tuples) or function returning such a list

For creating dynamic values in the selection. You can add a function like :


then you can define this function as:

def _get_selection(self, cr, uid, context=None):

 """ Your logic to get the values """


Hope this helps !

Thanks, Naresh

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: 4/1/13, 1:19 PM
Seen: 1649 times
Last updated: 3/16/15, 8:10 AM