[FIX] stock: wrong field name in move.split()

This commit is contained in:
Thibault Delavallée
2016-05-24 17:11:55 +02:00
parent 28e623be66
commit e87dbff063
+1 -2
View File
@@ -931,7 +931,6 @@ class StockMove(models.Model):
return scrap_moves
@api.multi
# @api.returns('self')
def split(self, qty, restrict_lot_id=False, restrict_partner_id=False):
""" Splits qty from move move into a new move
@@ -974,7 +973,7 @@ class StockMove(models.Model):
self.with_context(do_not_propagate=True).write({'product_uom_qty': self.product_uom_qty - uom_qty})
if self.move_dest_id and self.propagate and self.move_dest_id.state not in ('done', 'cancel'):
new_move_prop = self.dest_id.split(qty)
new_move_prop = self.move_dest_id.split(qty)
new_move.write({'move_dest_id': new_move_prop})
# returning the first element of list returned by action_confirm is ok because we checked it wouldn't be exploded (and
# thus the result of action_confirm should always be a list of 1 element length)