[9.0] mrp_repair_refurbish: send consumed products for standard repair to scrap location.

This commit is contained in:
lreficent
2017-09-20 14:26:33 +02:00
parent 6535f36fe8
commit 15d173a84c

View File

@@ -88,4 +88,9 @@ class mrp_repair_line(orm.Model):
context['to_refurbish']):
res['value']['location_dest_id'] = context[
'refurbish_location_dest_id']
elif (type == 'add' and 'to_refurbish' in context and not
context['to_refurbish']):
scrap_location_ids = self.pool['stock.location'].search(cr, uid, [
('scrap_location', '=', True)], context=context)
res['value']['location_dest_id'] = scrap_location_ids[0]
return res