[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:
Goffin Simon 2016-06-20 13:50:58 +02:00
parent 5b1beec1f2
commit c77745b9c5
3 changed files with 10 additions and 1 deletions

View File

@ -269,6 +269,9 @@ class sale_order(osv.osv):
]
_order = 'date_order desc, id desc'
def _get_customer_lead(self, cr, uid, product_tmpl_id):
return False
# Form filling
def unlink(self, cr, uid, ids, context=None):
sale_orders = self.read(cr, uid, ids, ['state'], context=context)

View File

@ -102,6 +102,12 @@ class sale_order(osv.osv):
'picking_policy': 'direct',
'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):
val = {}
if warehouse_id:

View File

@ -185,7 +185,7 @@ class sale_order(osv.osv):
'product_uom': line.product_uom_id.id,
'website_description': line.website_description,
'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))
options = []