Advertisement
Guest User

Product quantity

a guest
Nov 25th, 2013
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. context1 = {
  2.     'stock_date_end': date1,
  3.     'locations': location_ids,
  4. }
  5.  
  6. with Transaction().set_context(context1):
  7.     a = product.quantity
  8.  
  9. context2 = {
  10.     'stock_date_end': date2,
  11.     'locations': location_ids,
  12. }
  13.  
  14. with Transaction().set_context(context2):
  15.     b = product.quantity
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement