From 62a45109c0e986f6bed2b7955fd428693a03d85a Mon Sep 17 00:00:00 2001 From: helmutm Date: Thu, 9 Oct 2008 13:03:13 +0000 Subject: [PATCH] add manufacturer and supplier classes git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2911 fd906abe-77d9-0310-91a1-e0d9ade77398 --- commerce/product.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/commerce/product.py b/commerce/product.py index 063d3ff..1e5fc3a 100644 --- a/commerce/product.py +++ b/commerce/product.py @@ -26,6 +26,7 @@ from zope.interface import implements, Interface from cybertools.commerce.common import RelationSet from cybertools.commerce.interfaces import IProduct, ICategory +from cybertools.commerce.interfaces import IManufacturer, ISupplier class Product(object): @@ -39,6 +40,7 @@ class Product(object): self.title = title or u'unknown' self.shops = self.collection(self, 'products') + class Category(object): implements(ICategory) @@ -49,3 +51,19 @@ class Category(object): self.title = title or u'unknown' self.shops = self.collection(self, 'categories') + +class Manufacturer(object): + + implements(IManufacturer) + + def __init__(self, title=None): + self.title = title or u'unknown' + + +class Supplier(object): + + implements(ISupplier) + + def __init__(self, title=None): + self.title = title or u'unknown' +