def save(self, *args, **kwargs): if not self.pk: self.name = get_next_value(self._meta.object_name, 'INV') if not self.date_invoice or self.date_invoice == "": self.date_invoice = timezone.now super().save(*args, **kwargs)
def save(self, *args, **kwargs): if not self.pk: self.name = get_next_value(self._meta.object_name, 'SO') if not self.date_order or self.date_order == "": self.date_order = default=timezone.now super().save(*args, **kwargs)
def save(self): self.name = get_next_value(self._meta.object_name, 'SO') super(PySaleOrder, self).save()
def save(self, *args, **kwargs): if not self.pk: self.name = get_next_value(self._meta.object_name, 'SO') super().save(*args, **kwargs)
def save(self, *args, **kwargs): self.name = get_next_value(self._meta.object_name, 'ACC') if not self.date_move or self.date_move == "": self.date_move = timezone.now super().save(*args, **kwargs)