2008-10-05 23:02:10 +02:00
|
|
|
t_producttype = None
|
|
|
|
t_product = None
|
|
|
|
|
2008-10-06 00:32:59 +02:00
|
|
|
|
2008-10-05 23:02:10 +02:00
|
|
|
class ProductType(object):
|
2008-10-06 00:32:59 +02:00
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
if self.id is None:
|
|
|
|
return "<ProductType: new %s>" % (self.name)
|
|
|
|
else:
|
|
|
|
return "<ProductType: %d %s>" % (self.id, self.name)
|
|
|
|
|
2008-10-05 23:02:10 +02:00
|
|
|
|
|
|
|
class Product(object):
|
2008-10-06 00:32:59 +02:00
|
|
|
|
|
|
|
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)
|