Odoo Help


How to create a static field in a class ?

samir Guesmi
on 9/3/13, 11:59 AM 1,381 views

Hi guys !

I want to add a field who has all the time the same value (for every objects of his class).

How can i do that ?


On 9/3/13, 12:23 PM

You can create a field in python like that :

_columns = {
    'my_field' : fields.char('My static field', size=64),
_defaults = {
    'my_field': lambda *a: 'The default value',

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: 9/3/13, 11:59 AM
Seen: 1381 times
Last updated: 3/16/15, 8:10 AM