Skip to content

Instantly share code, notes, and snippets.

@ianjosephwilson
Last active December 18, 2015 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianjosephwilson/5732506 to your computer and use it in GitHub Desktop.
Save ianjosephwilson/5732506 to your computer and use it in GitHub Desktop.
@classmethod
def __setup__(cls):
super(InventoryLine, cls).__setup__()
cls._sql_constraints += [
('check_line_qty_pos',
'CHECK(quantity >= 0.0)', 'Line quantity must be positive!'),
]
cls._order.insert(0, ('product', 'ASC'))
cls._order.insert(1, ('location', 'ASC'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment