PEP8 on Operation model

This commit is contained in:
Ludovic Stephan 2017-03-25 10:43:02 -03:00
parent f645121fb1
commit 9a081ddae0

View file

@ -536,34 +536,34 @@ class Operation(models.Model):
)
group = models.ForeignKey(
OperationGroup, on_delete = models.PROTECT,
related_name = "opes")
OperationGroup, on_delete=models.PROTECT,
related_name="opes")
type = models.CharField(
choices = TYPE_ORDER_CHOICES,
max_length = choices_length(TYPE_ORDER_CHOICES))
choices=TYPE_ORDER_CHOICES,
max_length=choices_length(TYPE_ORDER_CHOICES))
amount = models.DecimalField(
max_digits = 6, decimal_places = 2,
blank = True, default = 0)
max_digits=6, decimal_places=2,
blank=True, default=0)
# Optional
article = models.ForeignKey(
Article, on_delete = models.PROTECT,
related_name = "operations",
blank = True, null = True, default = None)
Article, on_delete=models.PROTECT,
related_name="operations",
blank=True, null=True, default=None)
article_nb = models.PositiveSmallIntegerField(
blank = True, null = True, default = None)
blank=True, null=True, default=None)
canceled_by = models.ForeignKey(
Account, on_delete = models.PROTECT,
related_name = "+",
blank = True, null = True, default = None)
Account, on_delete=models.PROTECT,
related_name="+",
blank=True, null=True, default=None)
canceled_at = models.DateTimeField(
blank = True, null = True, default = None)
blank=True, null=True, default=None)
addcost_for = models.ForeignKey(
Account, on_delete = models.PROTECT,
related_name = "addcosts",
blank = True, null = True, default = None)
Account, on_delete=models.PROTECT,
related_name="addcosts",
blank=True, null=True, default=None)
addcost_amount = models.DecimalField(
max_digits = 6, decimal_places = 2,
blank = True, null = True, default = None)
max_digits=6, decimal_places=2,
blank=True, null=True, default=None)
@property
def is_checkout(self):
@ -584,6 +584,7 @@ class Operation(models.Model):
article=self.article,
amount=self.amount)
class GlobalPermissions(models.Model):
class Meta:
managed = False