Commit 312d02a6 authored by Patrick's avatar Patrick

Remove natural_key

parent 029ca507
......@@ -262,11 +262,6 @@ class Customer(models.Model):
return self.picture or self.accept_mails_from_members or self.accept_phone_call_from_members \
or (self.about_me is not None and len(self.about_me.strip()) > 1)
def natural_key(self):
return self.short_basket_name
natural_key.dependencies = ['repanier.customer']
def __str__(self):
return self.short_basket_name
......
......@@ -68,9 +68,6 @@ class Permanence(TranslatableModel):
verbose_name=_("highest permanence_status"),
help_text=_('status of the permanence from planned, orders opened, orders closed, send, done'))
def natural_key(self):
return self.permanence_date, self.short_name
def get_producers(self):
if self.id is not None:
if len(self.producers.all()) > 0:
......
......@@ -100,9 +100,6 @@ class Producer(models.Model):
_("represent_this_buyinggroup"), default=False)
is_active = models.BooleanField(_("is_active"), default=True)
def natural_key(self):
return self.short_profile_name
def get_products(self):
link = EMPTY_STRING
if self.id:
......
......@@ -44,11 +44,6 @@ class Staff(TranslatableModel):
_("password_reset_on"), null=True, blank=True, default=None)
is_active = models.BooleanField(_("is_active"), default=True)
def natural_key(self):
return self.user.natural_key()
natural_key.dependencies = ['auth.user']
def get_customer_phone1(self):
try:
return self.customer_responsible.phone1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment