Advertisement
Guest User

Read production lot quantities

a guest
Feb 1st, 2017
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. pool = Pool()
  2. Lot = pool.get('stock.lot')
  3. for move in self.inputs:
  4.     with Transacion().set_context(locations=[move.from_location.id]):
  5.         lot = Lot(lot.id)  # We need to re-read to get the valid context
  6.         print lot.quantity
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement