Exemplo n.º 1
0
 def _make_resource(cls, folder, name, *args, **kw):
     # Create group
     ShopFolder._make_resource(cls, folder, name, *args, **kw)
     # Group schema
     cls = CustomerSchema
     cls._make_resource(cls, folder, '%s/schema' % name)
     # Welcome Page
     cls = WebPage
     cls._make_resource(cls, folder, '%s/welcome' % name,
                             title={'en': u'Welcome'},
                             state='public')
Exemplo n.º 2
0
Arquivo: shop.py Projeto: hforge/shop
 def _make_resource(cls, folder, name, *args, **kw):
     root = ShopFolder._make_resource(cls, folder, name, **kw)
     # Payments module
     cls.payments_class._make_resource(cls.payments_class, folder,
                             '%s/payments' % name,
                             title={'en': u'Payment module'})
     # Modules
     Modules._make_resource(Modules, folder,
                   '%s/modules' % name, title={'en': u'Modules'})
     # Suppliers
     Suppliers._make_resource(Suppliers, folder,
                   '%s/suppliers' % name, title={'en': u'Suppliers'})
     # Customers
     Customers._make_resource(Customers, folder,
                   '%s/customers' % name, title={'en': u'Customers'})
     # Product Models
     ProductModels._make_resource(ProductModels, folder, '%s/products-models' % name,
                                 title={'en': u'Product Models'})
     # Orders
     Orders._make_resource(Orders, folder, '%s/orders' % name,
                           title={'en': u'Orders'})
     # ShopUser_Groups
     ShopUser_Groups._make_resource(ShopUser_Groups, folder, '%s/groups' % name,
                                     title={'en': u'User groups'})
     # Addresses
     Addresses._make_resource(Addresses, folder, '%s/addresses' % name,
                              title={'en': u'Addresses'})
     # Countries
     Countries._make_resource(Countries, folder, '%s/countries' % name,
                              title={'en': u'countries'})
     # Countries zone
     CountriesZones._make_resource(CountriesZones, folder,
             '%s/countries-zones' % name, title={'en': u'Countries Zones'})
     # EnumeratesFolder
     EnumeratesFolder._make_resource(EnumeratesFolder, folder,
                                 '%s/enumerates' % name, title={'en': u'Enumerates'})
     # Shipping
     Shippings._make_resource(Shippings, folder, '%s/shippings' % name,
                              title={'en': u'Shipping'})
     # Conditions of users
     WebPage._make_resource(WebPage, folder, '%s/terms-and-conditions-of-use' % name,
                             **{'title': {'fr': u'Conditions Générales de ventes',
                                          'en': u'Terms and conditions of user'},
                                'state': 'public'})
     # Default cross Selling configuration
     CrossSellingTable._make_resource(CrossSellingTable, folder,
                                      '%s/cross-selling' % name,
                                      title={'en': u'Cross selling'})
     # Taxes
     Taxes_TableResource._make_resource(Taxes_TableResource, folder, '%s/taxes' % name,
                             **{'title': {'fr': u'TVA',
                                          'en': u'Taxes'}})
     table = Taxes_TableHandler()
     table.add_record({'value': '19.6'})
     folder.set_handler('%s/taxes' % name, table)
Exemplo n.º 3
0
 def _make_resource(cls, folder, name, *args, **kw):
     ShopFolder._make_resource(cls, folder, name, *args, **kw)
     ShopUser_Group._make_resource(ShopUser_Group, folder, '%s/default' % name)
Exemplo n.º 4
0
 def _make_resource(cls, folder, name, *args, **kw):
     root = ShopFolder._make_resource(cls, folder, name, **kw)
     # Payments module
     cls.payments_class._make_resource(cls.payments_class,
                                       folder,
                                       '%s/payments' % name,
                                       title={'en': u'Payment module'})
     # Modules
     Modules._make_resource(Modules,
                            folder,
                            '%s/modules' % name,
                            title={'en': u'Modules'})
     # Suppliers
     Suppliers._make_resource(Suppliers,
                              folder,
                              '%s/suppliers' % name,
                              title={'en': u'Suppliers'})
     # Customers
     Customers._make_resource(Customers,
                              folder,
                              '%s/customers' % name,
                              title={'en': u'Customers'})
     # Product Models
     ProductModels._make_resource(ProductModels,
                                  folder,
                                  '%s/products-models' % name,
                                  title={'en': u'Product Models'})
     # Orders
     Orders._make_resource(Orders,
                           folder,
                           '%s/orders' % name,
                           title={'en': u'Orders'})
     # ShopUser_Groups
     ShopUser_Groups._make_resource(ShopUser_Groups,
                                    folder,
                                    '%s/groups' % name,
                                    title={'en': u'User groups'})
     # Addresses
     Addresses._make_resource(Addresses,
                              folder,
                              '%s/addresses' % name,
                              title={'en': u'Addresses'})
     # Countries
     Countries._make_resource(Countries,
                              folder,
                              '%s/countries' % name,
                              title={'en': u'countries'})
     # Countries zone
     CountriesZones._make_resource(CountriesZones,
                                   folder,
                                   '%s/countries-zones' % name,
                                   title={'en': u'Countries Zones'})
     # EnumeratesFolder
     EnumeratesFolder._make_resource(EnumeratesFolder,
                                     folder,
                                     '%s/enumerates' % name,
                                     title={'en': u'Enumerates'})
     # Shipping
     Shippings._make_resource(Shippings,
                              folder,
                              '%s/shippings' % name,
                              title={'en': u'Shipping'})
     # Conditions of users
     WebPage._make_resource(
         WebPage, folder, '%s/terms-and-conditions-of-use' % name, **{
             'title': {
                 'fr': u'Conditions Générales de ventes',
                 'en': u'Terms and conditions of user'
             },
             'state': 'public'
         })
     # Default cross Selling configuration
     CrossSellingTable._make_resource(CrossSellingTable,
                                      folder,
                                      '%s/cross-selling' % name,
                                      title={'en': u'Cross selling'})
     # Taxes
     Taxes_TableResource._make_resource(
         Taxes_TableResource, folder, '%s/taxes' % name,
         **{'title': {
             'fr': u'TVA',
             'en': u'Taxes'
         }})
     table = Taxes_TableHandler()
     table.add_record({'value': '19.6'})
     folder.set_handler('%s/taxes' % name, table)