mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP fixes
This commit is contained in:
parent
436d158cfe
commit
7dd960a299
@ -31,7 +31,7 @@ class Build(models.Model):
|
||||
"""
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
""" Called when the Build model is saved to the database.
|
||||
""" Called when the Build model is saved to the database.
|
||||
|
||||
If this is a new Build, try to allocate StockItem objects automatically.
|
||||
|
||||
@ -67,13 +67,12 @@ class Build(models.Model):
|
||||
|
||||
# Allocate parts to this build
|
||||
build_item = BuildItem(
|
||||
build=self,
|
||||
build=self,
|
||||
stock_item=stock_item,
|
||||
quantity=q_req)
|
||||
|
||||
build_item.save()
|
||||
|
||||
|
||||
def __str__(self):
|
||||
return "Build {q} x {part}".format(q=self.quantity, part=str(self.part))
|
||||
|
||||
@ -129,7 +128,6 @@ class Build(models.Model):
|
||||
"""
|
||||
print("cancelled!")
|
||||
|
||||
|
||||
def completeBuild(self):
|
||||
""" Mark the Build as COMPLETE
|
||||
|
||||
|
@ -69,7 +69,7 @@ class BuildCancel(AjaxView):
|
||||
|
||||
|
||||
class BuildComplete(AjaxView):
|
||||
""" View to mark a build as Complete.
|
||||
""" View to mark a build as Complete.
|
||||
|
||||
- Notifies the user of which parts will be removed from stock.
|
||||
- Removes allocated items from stock
|
||||
|
Loading…
Reference in New Issue
Block a user