Save the date of Build cancellation

This commit is contained in:
Oliver Walters 2019-05-02 21:23:53 +10:00
parent b91de1af7b
commit a0ad95ab28

View File

@ -133,6 +133,9 @@ class Build(models.Model):
for item in self.allocated_stock.all(): for item in self.allocated_stock.all():
item.delete() item.delete()
# Date of 'completion' is the date the build was cancelled
self.completion_date = datetime.now().date()
self.status = self.CANCELLED self.status = self.CANCELLED
self.save() self.save()