Odoo Help


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.


Database default value

willie ho
on 2/17/15, 2:48 AM 449 views

I want to add default value on database since I may want to edit records without using odoo

what should I put to give a default value on batabase?

detail your question.

Demirel yakito
on 2/17/15, 2:58 AM


| 5 3 8
Pondicherry, India
On 2/17/15, 3:03 AM

yes can use use the default values for the fields,

if you want some small number of fields as default value means ,you can use

_default = {

 'your_field' : 'your_default_value'



_default = {

 'name' : 'Andrew',

  'age' : 20



otherwise,if you want to diplay more values as default means ,you can use

default_get() method


On 2/17/15, 3:27 AM

write this code in .py file

_columns = {

     'gender' : fields.selection([('m','Male'),('f','Female')],'Gender')


_defaults = {

 'gender' : 'm'


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

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

Question tools

1 follower(s)


Asked: 2/17/15, 2:48 AM
Seen: 449 times
Last updated: 3/16/15, 8:10 AM