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.



| 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

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: 7/18/14, 2:02 AM
Seen: 3863 times
Last updated: 5/6/15, 4:58 AM