Changeset - e561e0d50c9b
[Not reviewed]
0 1 0
Lance Edgar (lance) - 12 years ago 2012-08-10 16:18:03
lance@edbob.org
add repr, unicode to Customer
1 file changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rattail/db/extension/model.py
Show inline comments
 
@@ -964,6 +964,12 @@ class Customer(Base):
 
    id = Column(String(20))
 
    name = Column(String(255))
 

	
 
    def __repr__(self):
 
        return "<Customer: %s, %s>" % (self.id, self.name or self.person)
 

	
 
    def __unicode__(self):
 
        return unicode(self.name or self.person)
 

	
 
    def add_email_address(self, address, type='Home'):
 
        email = CustomerEmailAddress(address=address, type=type)
 
        self.emails.append(email)
0 comments (0 inline, 0 general)