Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
def react_to_purchasing_status(self):
if self.purchasing_status >= PURCHASE_STATUS_SUBMITTED and self.submitted_at is None:
self.submitted_at =
self.submitted_at = None
if self.purchasing_status == PURCHASE_STATUS_SUBMITTED:
for line in self.purchaseline_set.filter(unit_cost=None):
line.unit_cost = line.promotional_cost_at_submit_time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.