diff options
Diffstat (limited to 'servo/models/customer.py')
-rw-r--r-- | servo/models/customer.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/servo/models/customer.py b/servo/models/customer.py index a01ebdf..a6609d0 100644 --- a/servo/models/customer.py +++ b/servo/models/customer.py @@ -159,6 +159,12 @@ class Customer(MPTTModel): fmt = phonenumbers.PhoneNumberFormat.NATIONAL return phonenumbers.format_number(n, fmt) + def get_company_name(self): + """Since we don't really have a "company" field in Servo, + climb up the parent tree and return a concated name + """ + return ', '.join([i for i in self.get_parents()]) + def valid_email(self): """ Returns email address or raises ValidationError |