diff options
Diffstat (limited to 'servo/models')
-rw-r--r-- | servo/models/account.py | 7 | ||||
-rw-r--r-- | servo/models/common.py | 13 |
2 files changed, 13 insertions, 7 deletions
diff --git a/servo/models/account.py b/servo/models/account.py index 13718c2..d4549c6 100644 --- a/servo/models/account.py +++ b/servo/models/account.py @@ -150,13 +150,6 @@ class User(AbstractUser): techies = TechieManager() active = ActiveManager() - def get_location_list(self): - results = [] - for l in self.locations.all(): - results.append({'pk': l.pk, 'name': l.title}) - - return results - @classmethod def serialize(cls, queryset): results = [] diff --git a/servo/models/common.py b/servo/models/common.py index 2ab81f0..eedba96 100644 --- a/servo/models/common.py +++ b/servo/models/common.py @@ -462,6 +462,19 @@ class Location(models.Model): verbose_name=_('Enabled') ) + checkin = models.BooleanField( + default=True, + verbose_name=_('Use for check-in') + ) + + @classmethod + def get_checkin_list(cls): + results = [] + for l in cls.objects.filter(checkin=True): + results.append({'pk': l.pk, 'name': l.title}) + + return results + def get_shipto_choices(self): return self.gsx_accounts.values_list('ship_to', 'ship_to') |