Example #1
0
 def save(self, *args, **kwargs):
     super(Customer, self).save(*args, **kwargs)
     if not self.designator:
         self.designator = build_verhoeff_id('DC', self.id, length=8)
         self.save()
Example #2
0
 def save(self, *args, **kwargs):
     super(Notification, self).save(*args, **kwargs)
     if not self.designator:
         self.designator = build_verhoeff_id('DN', self.id, length=8)
         self.save()
Example #3
0
 def save(self, *args, **kwargs):
     super(Order, self).save(*args, **kwargs)
     if not self.designator:
         length = int(math.log10(self.id)) + 2
         self.designator = build_verhoeff_id('DA', self.id, length=length)
         self.save()
Example #4
0
 def save(self, *args, **kwargs):
     super(Invoice, self).save(*args, **kwargs)
     if not self.designator:
         self.designator = build_verhoeff_id('DI', self.id, length=8)
         self.save()