Odoo Help




| 7 8 8
Thiruvananthapuram, India

Working as an Senior ODOO developer. http://in.linkedin.com/pub/remya-r/69/a23/298

On 7/18/14, 2:05 AM

We can set default values in two ways:

1. Form Interface

First Activate Developer Mode. For activating developer mode: go to user context menu(upper right corner) & click on About OpenERP.

Here you can find Option Active the Developer Mode click on that URL, this will reload the Web and Now you will active debug mode.

For eg: For product we have product types as stockable, consumable, service. If we have to set product type as stockable product. follow the below steps.

Go to Product list view and on top of Kanban VIew of Product you will find Debug View# option.

Then Click on Create new Product and in Product Type Select the Stockble product and Now gotoDebug View# and you will find Set Defaults Option and select your default and Save it.

2. Python code

class product_template(osv.osv):
    _name = "product.template"
    _description = "Product Template"

    _columns = {

'type': fields.selection([('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual."),


 _defaults = {       
        'type' : 'consu',


Thus we can set default values in OpenERP.

Regarding this last option with python code... are you proposing here to modify the product module? (I say this because I don't see an inherit in the code).

Daniel Blanco
on 5/6/15, 10:23 AM

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: 7/18/14, 2:02 AM
Seen: 5538 times
Last updated: 9/26/17, 12:14 AM