[MERGE] forward port of branch 8.0 up to fe15829

This commit is contained in:
Christophe Simonis
2016-06-21 11:55:55 +02:00
4 changed files with 11 additions and 1 deletions
+3
View File
@@ -249,6 +249,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)
+6
View File
@@ -110,6 +110,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:
+1
View File
@@ -3892,6 +3892,7 @@ class stock_location_path(osv.osv):
'propagate': rule.propagate, 'propagate': rule.propagate,
'push_rule_id': rule.id, 'push_rule_id': rule.id,
'warehouse_id': rule.warehouse_id and rule.warehouse_id.id or False, 'warehouse_id': rule.warehouse_id and rule.warehouse_id.id or False,
'procurement_id': False,
} }
def _apply(self, cr, uid, rule, move, context=None): def _apply(self, cr, uid, rule, move, context=None):
+1 -1
View File
@@ -225,7 +225,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 = []