Skip to content

Commit

Permalink
[FIX] sale_order_lot_selection: _prepare_procurement_from_move is an …
Browse files Browse the repository at this point in the history
…api.multi method! (OCA#475)
  • Loading branch information
lmignon authored and eLBati committed May 26, 2017
1 parent eeadd39 commit 29eb6e1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sale_order_lot_selection/model/stock.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
class StockMove(models.Model):
_inherit = 'stock.move'

@api.model
def _prepare_procurement_from_move(self, move):
vals = super(StockMove, self)._prepare_procurement_from_move(move)
vals['lot_id'] = move.restrict_lot_id.id
@api.multi
def _prepare_procurement_from_move(self):
self.ensure_one()
vals = super(StockMove, self)._prepare_procurement_from_move()
vals['lot_id'] = self.restrict_lot_id.id
return vals

0 comments on commit 29eb6e1

Please sign in to comment.