diff --git a/inventree/build.py b/inventree/build.py index de5cbe0..9b05d82 100644 --- a/inventree/build.py +++ b/inventree/build.py @@ -16,6 +16,14 @@ class Build( URL = 'build' MODEL_TYPE = 'build' + def issue(self): + """Mark this build as 'issued'.""" + return self._statusupdate(status='issue') + + def hold(self): + """Mark this build as 'on hold'.""" + return self._statusupdate(status='hold') + def complete( self, accept_overallocated='reject', diff --git a/inventree/purchase_order.py b/inventree/purchase_order.py index 98907c5..ff59f4e 100644 --- a/inventree/purchase_order.py +++ b/inventree/purchase_order.py @@ -65,6 +65,14 @@ def issue(self, **kwargs): # Return return self._statusupdate(status='issue', **kwargs) + def hold(self, **kwargs): + """ + Hold the purchase order + """ + + # Return + return self._statusupdate(status='hold', **kwargs) + def receiveAll(self, location, status=10): """ Receive all of the purchase order items, into the given location. diff --git a/inventree/return_order.py b/inventree/return_order.py index 0da6226..c5cf324 100644 --- a/inventree/return_order.py +++ b/inventree/return_order.py @@ -55,6 +55,10 @@ def issue(self, **kwargs): """Issue (send) this order""" return self._statusupdate(status='issue', **kwargs) + def hold(self, **kwargs): + """Place this order on hold""" + return self._statusupdate(status='hold', **kwargs) + def cancel(self, **kwargs): """Cancel this order""" return self._statusupdate(status='cancel', **kwargs) diff --git a/inventree/sales_order.py b/inventree/sales_order.py index 2d88bdf..e96fadc 100644 --- a/inventree/sales_order.py +++ b/inventree/sales_order.py @@ -71,6 +71,18 @@ def addShipment(self, reference, **kwargs): return SalesOrderShipment.create(self._api, data=kwargs) + def issue(self, **kwargs): + """Issue (send) this order""" + return self._statusupdate(status='issue', **kwargs) + + def hold(self, **kwargs): + """Place this order on hold""" + return self._statusupdate(status='hold', **kwargs) + + def cancel(self, **kwargs): + """Cancel this order""" + return self._statusupdate(status='cancel', **kwargs) + class SalesOrderLineItem( inventree.base.InventreeObject,