- Timestamp:
- 22 Dec 2014, 16:42:50 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/customer.py
r12271 r12297 37 37 IIkobaUtils, IExtFileStore, 38 38 CREATED, REQUESTED, APPROVED) 39 from waeup.ikoba.customers.export import EXPORTER_NAMES40 39 from waeup.ikoba.customers.interfaces import ( 41 40 ICustomer, ICustomerNavigation, ICSVCustomerExporter, … … 233 232 (column `del_date`) as a UTC timestamp. 234 233 """ 235 for name in EXPORTER_NAMES:234 for name in getUtility(ICustomersUtils).EXPORTER_NAMES: 236 235 exporter = getUtility(ICSVCustomerExporter, name=name) 237 236 csv_data = exporter.export_customer(customer) -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/export.py
r12283 r12297 32 32 from waeup.ikoba.utils.helpers import iface_names, to_timezone 33 33 34 #: A tuple containing all exporter names referring to customers or35 #: subobjects thereof.36 EXPORTER_NAMES = ('customers', 'customersampledocuments', 'samplecontracts')37 38 39 34 def get_customers(site, cust_filter=CustomersQuery()): 40 35 """Get all customers registered in catalog in `site`. -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_customer.py
r12006 r12297 31 31 from zope.schema.interfaces import RequiredMissing 32 32 from waeup.ikoba.interfaces import IExtFileStore, IFileStoreNameChooser 33 from waeup.ikoba.customers.export import EXPORTER_NAMES34 33 from waeup.ikoba.customers.customer import ( 35 34 Customer, CustomerFactory, handle_customer_removed, path_from_custid) 36 35 from waeup.ikoba.customers.interfaces import ( 37 ICustomer, ICustomerNavigation )36 ICustomer, ICustomerNavigation, ICustomersUtils) 38 37 from waeup.ikoba.customers.tests.test_batching import CustomerImportExportSetup 39 38 from waeup.ikoba.testing import FunctionalLayer, FunctionalTestCase … … 136 135 137 136 # The customer data were put into CSV files 138 for name in EXPORTER_NAMES:137 for name in getUtility(ICustomersUtils).EXPORTER_NAMES: 139 138 csv_path = os.path.join(del_dir, '%s.csv' % name) 140 139 self.assertTrue(os.path.isfile(csv_path)) -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/utils.py
r12223 r12297 333 333 SELECTABLE_CONTYPES_DICT = CONTYPES_DICT 334 334 335 EXPORTER_NAMES = ('customers', 'customersampledocuments', 'samplecontracts') 336 335 337 def getPDFCreator(self, context=None): 336 338 """Get a pdf creator suitable for `context`. -
main/waeup.ikoba/trunk/src/waeup/ikoba/utils/utils.py
r12283 r12297 29 29 from waeup.ikoba.smtp import send_mail as send_mail_internally 30 30 from waeup.ikoba.utils.helpers import get_sorted_preferred 31 from waeup.ikoba.customers.export import EXPORTER_NAMES as CUSTOMER_EXPORTER_NAMES32 31 33 32 … … 139 138 } 140 139 141 EXPORTER_NAMES = CUSTOMER_EXPORTER_NAMES +(140 EXPORTER_NAMES = ( 142 141 'pdfdocuments', 143 142 'htmldocuments', 144 143 'users', 145 'products') 144 'products', 145 'customers', 146 'customersampledocuments', 147 'samplecontracts') 146 148 147 149 BATCH_PROCESSOR_NAMES = (
Note: See TracChangeset for help on using the changeset viewer.