Advertisement
Guest User

Untitled

a guest
Nov 26th, 2021
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1.     def default_start(self, fields):
  2.         lines = [{
  3.             'line': line,
  4.             'quantity': line.remaining_quantity,
  5.             'product': line.product.id,
  6.             'remaining_quantity': line.remaining_quantity,
  7.             'unit': line.unit.id,
  8.             'unit_price': line.unit_price}
  9.             for line in self.record.lines
  10.             if line.remaining_quantity > 0.
  11.         ]
  12.         return {'lines': lines}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement