I have tried to inherit purchase module and replace default picking_type_id to False.
This is original module :
_defaults = { 'date_order': fields.datetime.now, 'state': 'draft', 'name': lambda obj, cr, uid, context: '/', 'shipped': 0, 'invoice_method': 'order', 'invoiced': 0, 'pricelist_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').browse(cr, uid, context['partner_id']).property_product_pricelist_purchase.id, 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'purchase.order', context=c), 'journal_id': _get_journal, 'currency_id': lambda self, cr, uid, context: self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id, 'picking_type_id': _get_picking_in, } |
And I change to :
_defaults = { 'name': '/', 'picking_type_id': False, 'salesman_id': lambda obj, cr, uid, context:uid, 'partner_ref': 'try' } |
But the default of picking_type_id (just picking_type_id) still get default from original module. How to change it?
What is the definition of the field in your module? Module starts?