diff --git a/addons/stock/models/stock_move.py b/addons/stock/models/stock_move.py index aab7cb1ef36..00594774df6 100644 --- a/addons/stock/models/stock_move.py +++ b/addons/stock/models/stock_move.py @@ -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)