Odoo Help


how to add values dynamically in selection fields?

Demirel yakito
on 1/13/15, 1:45 AM 4,250 views

In default i have some fields in selection field. if i want to add another field in selection field. then how to add it?


Anil R. Kesariya

--Anil R. Kesariya--
| 7 6 8
Rajkot, India
--Anil R. Kesariya--

Odoo Techno Functional Expert

* Engaged with odoo since May - 2012.

* Customise existing module or develop new module base on customer requirement.

* Played key developer role in many past and running projects.

* Expert in requirement gathering of business and transforming requirement into odoo platform.

* Major expertise in core modules, database, report development and theme development.

* Integration expert.

Linkedin  : https://in.linkedin.com/in/anil-kesariya-97b20a66

Anil R. Kesariya
On 1/13/15, 2:36 AM

Hello Ramanan,

The same Question is asked

Nice answer given by Atul.

Click Here

Click above link for your answer.




Dhinesh - Technical Consultant, Sodexis Inc

--Dhinesh - Technical Consultant, Sodexis Inc--
| 5 4 9
Pondicherry, India
--Dhinesh - Technical Consultant, Sodexis Inc--

Passionate coder in Python/OpenERP. Knows Django/Flask MVC frameworks. Did code in Java, PHP.

Contact me at: dvdhinesh.mail@gmail.com

Dhinesh - Technical Consultant, Sodexis Inc
On 1/13/15, 2:14 AM

Go through this link:


If your selection field is static list of tuples defined in field, then there is no way to do. If it is a method or global variable you can change it.


you can use list to add item dynamically in fields.Selection 
for i in range(1900,2017):

class Employee(models.Model):
      _name = 'employee.details'
      year=fields.Selection(list1, string='Years', required=True, copy=True)

     #append item


    #update item


     #item updated automatically in field.Selection

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

1 follower(s)


Asked: 1/13/15, 1:45 AM
Seen: 4250 times
Last updated: 1/24/17, 9:46 AM