OpenERP Product status by default confirmed -
i have customized openerp products module , introduced workflow statuses called draft, pending, confirmed , cancelled. however, not sure error did while doing this.
when admin creating product default it's status setting confirmed status. (wrong) but when normal user creates product setting draft status. (correct)i want same happen when admin create also.
this happening in purchase orders module also.
am doing thing wrong?
edit: (code)
from osv import fields, osv class purchase_order(osv.osv): _inherit = 'product.product' _columns = { 'stage': fields.selection([ ('draft', 'draft product'), ('pending', 'pending'), ('validated', 'validated'), ('confirmed', 'confirmed'), ('cancel', 'cancelled'), ], 'status', select=true, track_visibility='onchange', help='product workflow stages') } _defaults = { 'type' : 'consu', 'stage': 'draft', } purchase_order() class product_supplierinfo(osv.osv): _inherit = 'product.supplierinfo' _columns = { 'default_sup': fields.boolean('default supplier', help="by checking default supplier field can set supplier default product."), } _defaults = { 'default_sup': 0 } product_supplierinfo()
product openerp-7 purchase-order
No comments:
Post a Comment