pyalchemybiz/pyalchemybiz/model/product.py
Jan Dittberner b53e8c48df model cleanup
* add __repr__() to all current module objects (fixes #10)
 * pep8 fixes in all Python files (addresses #9)
 * create subdirectory for customer templates (addresses #2)


git-svn-id: file:///var/www/wwwusers/usr01/svn/pyalchemybiz/trunk@8 389c73d4-bf09-4d3d-a15e-f94a37d0667a
2008-10-05 22:32:59 +00:00

22 lines
548 B
Python

t_producttype = None
t_product = None
class ProductType(object):
def __repr__(self):
if self.id is None:
return "<ProductType: new %s>" % (self.name)
else:
return "<ProductType: %d %s>" % (self.id, self.name)
class Product(object):
def __repr__(self):
if self.id is None:
return "<Product: new %s %s>" % (self.name, self.producttype)
else:
return "<Product: %d %s %s>" % (self.id, self.name,
self.producttype)