Ignore:
Timestamp:
18 Jan 2015, 15:59:43 (10 years ago)
Author:
Henrik Bettermann
Message:

Do not set contract_category default values.

product_object is not an editable attribute of any kind of contract.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/interfaces.py

    r12486 r12487  
    376376    """
    377377
    378     product_object = schema.Choice(
    379         title = _(u'Product'),
    380         source = ConCatProductSource(),
    381         required = True,
    382         )
    383 
    384378    document_object = schema.Choice(
    385379        title = _(u'Document'),
  • main/waeup.ikoba/trunk/src/waeup/ikoba/products/interfaces.py

    r12361 r12487  
    6767        title = _(u'Contract Category'),
    6868        source = ConCatSource(),
    69         default = u'license',
    7069        required = True,
    7170        )
  • main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_batching.py

    r12358 r12487  
    5959    layer = FunctionalLayer
    6060
     61    _contract_category = u'license'
     62
    6163    def setUp(self):
    6264        super(ProductImportExportSetup, self).setUp()
     
    8385        product = Product()
    8486        product.product_id = u'LIC'
     87        product.contract_category = self._contract_category
    8588        options = ProductOption()
    8689        options.title = u'Base Fee'
  • main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_browser.py

    r12361 r12487  
    100100            NotIdValue, setattr, self.product, 'product_id', u'id with spaces')
    101101        self.product.title = u'Our License'
     102        self.product.contract_category = u'license'
    102103        self.product.valid_from = date(2015, 12, 4)
    103104        self.app['products'].addProduct(self.product)
     
    157158        self.browser.getControl(name="form.product_id").value = 'bob'
    158159        self.browser.getControl(name="form.title").value = 'My product'
     160        self.browser.getControl(name="form.contract_category").value = ['license']
    159161        self.browser.getControl("Create product").click()
    160162        self.assertTrue('Product bob added' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.