def cancel(self, refund=True):
        """Cancel this order, optionally refunding it
        """
        if refund:
            self.refund()
        self.status = self.CANCELLED
        self.save()
def cancel ( self , refund = True ) : if refund : self . refund ( ) self . status = self . CANCELLED self . save ( )
Cancel this order, optionally refunding it