Ignore:
Timestamp:
20 Mar 2015, 18:51:29 (10 years ago)
Author:
Henrik Bettermann
Message:

Prepare products and contracts for annual payments.

Location:
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/products
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/products/interfaces.py

    r12371 r12803  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
     18from zope import schema
    1819from waeup.ikoba.products.interfaces import IProduct
    1920from ikobacustom.pcn.interfaces import MessageFactory as _
     
    2425
    2526    """
     27
     28    contract_year = schema.Int(
     29        title=u'Year of License',
     30        description=_(u'Enter 4-digit license year.'),
     31        required=False,
     32        min=1990,
     33        max=2050,
     34        )
     35
     36IPCNProduct['contract_year'].order = IPCNProduct['valid_from'].order
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/products/tests/test_browser.py

    r12686 r12803  
    5454        result = open(self.outfile, 'rb').read()
    5555        self.assertEqual(result,
    56             'contract_category,contract_title,description,options,'
     56            'contract_category,contract_title,contract_year,description,options,'
    5757            'product_id,terms_and_conditions,title,valid_from,valid_to,'
    5858            'users_with_local_roles\r\n'
    59             'ron,,,[],RON,,Unnamed,2015-12-04#,,[]\r\n')
     59            'ron,,,,[],RON,,Unnamed,2015-12-04#,,[]\r\n')
    6060        # We can import the same file.
    6161        processor = PCNProductProcessor()
     
    7474        result = processor.doImport(
    7575            self.outfile,
    76             ['contract_category','contract_title', 'description', 'options',
    77             'product_id', 'terms_and_conditions','title','valid_from','valid_to',
     76            ['contract_category','contract_title','contract_year',
     77            'description', 'options',
     78            'product_id', 'terms_and_conditions',
     79            'title','valid_from','valid_to',
    7880            'users_with_local_roles'],
    7981            mode='create')
     
    8486        result = processor.doImport(
    8587            self.outfile,
    86             ['contract_category','contract_title', 'description', 'options',
    87             'product_id', 'terms_and_conditions','title','valid_from','valid_to',
     88            ['contract_category','contract_title', 'contract_year',
     89            'description', 'options',
     90            'product_id', 'terms_and_conditions',
     91            'title','valid_from','valid_to',
    8892            'users_with_local_roles'],
    8993            mode='update')
Note: See TracChangeset for help on using the changeset viewer.