add manufacturer and supplier classes
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2911 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
2218a6734f
commit
62a45109c0
1 changed files with 18 additions and 0 deletions
|
@ -26,6 +26,7 @@ from zope.interface import implements, Interface
|
||||||
|
|
||||||
from cybertools.commerce.common import RelationSet
|
from cybertools.commerce.common import RelationSet
|
||||||
from cybertools.commerce.interfaces import IProduct, ICategory
|
from cybertools.commerce.interfaces import IProduct, ICategory
|
||||||
|
from cybertools.commerce.interfaces import IManufacturer, ISupplier
|
||||||
|
|
||||||
|
|
||||||
class Product(object):
|
class Product(object):
|
||||||
|
@ -39,6 +40,7 @@ class Product(object):
|
||||||
self.title = title or u'unknown'
|
self.title = title or u'unknown'
|
||||||
self.shops = self.collection(self, 'products')
|
self.shops = self.collection(self, 'products')
|
||||||
|
|
||||||
|
|
||||||
class Category(object):
|
class Category(object):
|
||||||
|
|
||||||
implements(ICategory)
|
implements(ICategory)
|
||||||
|
@ -49,3 +51,19 @@ class Category(object):
|
||||||
self.title = title or u'unknown'
|
self.title = title or u'unknown'
|
||||||
self.shops = self.collection(self, 'categories')
|
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'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue