Odoo Help

Welcome!

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.

0

I want to select default value product (service) on Sales Order Lines

By
kitcle
on 10/2/14, 1:40 AM 537 views

 <tree string="Sales Order Lines" editable="bottom">
          <field name="product_id"         <--- select default  item     How can I do ? 

0
Mohamed Magdy
On 10/2/14, 4:20 AM

you can set the default value in the object itself.  you need to inherit the object of the s

class sale_order(osv.Model):    

 _name = 'sale.order' 

_inherit = 'sale.order'

_columns = {}

_defaults = {

'product_id': 1

}

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)

Stats

Asked: 10/2/14, 1:40 AM
Seen: 537 times
Last updated: 3/16/15, 8:10 AM