2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Calculate 'fulfilled' quantity once a sales order is marked as shipped

- This allows us to delete the SalesOrderAllocation objects from the database
This commit is contained in:
Oliver Walters
2020-04-27 08:58:18 +10:00
parent 3c5ba75d27
commit 5167117067
10 changed files with 32 additions and 31 deletions

View File

@ -480,6 +480,8 @@ class BuildItem(models.Model):
self.stock_item = item
self.save()
# TODO - If the item__part object is not trackable, delete the stock item here
item.status = StockStatus.ASSIGNED_TO_BUILD
item.build_order = self.build
item.save()