[FIX] sale, slae_stock, website_quote: get sale_delay in onchange_template_id
Inspired from a706ada opw:681245, 681289, 681285
This commit is contained in:
parent
5b1beec1f2
commit
c77745b9c5
|
@ -269,6 +269,9 @@ class sale_order(osv.osv):
|
||||||
]
|
]
|
||||||
_order = 'date_order desc, id desc'
|
_order = 'date_order desc, id desc'
|
||||||
|
|
||||||
|
def _get_customer_lead(self, cr, uid, product_tmpl_id):
|
||||||
|
return False
|
||||||
|
|
||||||
# Form filling
|
# Form filling
|
||||||
def unlink(self, cr, uid, ids, context=None):
|
def unlink(self, cr, uid, ids, context=None):
|
||||||
sale_orders = self.read(cr, uid, ids, ['state'], context=context)
|
sale_orders = self.read(cr, uid, ids, ['state'], context=context)
|
||||||
|
|
|
@ -102,6 +102,12 @@ class sale_order(osv.osv):
|
||||||
'picking_policy': 'direct',
|
'picking_policy': 'direct',
|
||||||
'order_policy': 'manual',
|
'order_policy': 'manual',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#FORWARDPORT UP TO SAAS-6
|
||||||
|
def _get_customer_lead(self, cr, uid, product_tmpl_id):
|
||||||
|
super(sale_order, self)._get_customer_lead(cr, uid, product_tmpl_id)
|
||||||
|
return product_tmpl_id.sale_delay
|
||||||
|
|
||||||
def onchange_warehouse_id(self, cr, uid, ids, warehouse_id, context=None):
|
def onchange_warehouse_id(self, cr, uid, ids, warehouse_id, context=None):
|
||||||
val = {}
|
val = {}
|
||||||
if warehouse_id:
|
if warehouse_id:
|
||||||
|
|
|
@ -185,7 +185,7 @@ class sale_order(osv.osv):
|
||||||
'product_uom': line.product_uom_id.id,
|
'product_uom': line.product_uom_id.id,
|
||||||
'website_description': line.website_description,
|
'website_description': line.website_description,
|
||||||
'state': 'draft',
|
'state': 'draft',
|
||||||
'delay': line.product_id.sale_delay
|
'delay': self.pool['sale.order']._get_customer_lead(cr, uid, line.product_id.product_tmpl_id)
|
||||||
})
|
})
|
||||||
lines.append((0, 0, data))
|
lines.append((0, 0, data))
|
||||||
options = []
|
options = []
|
||||||
|
|
Loading…
Reference in New Issue