Commit e3e31c6f authored by Jérome Perrin's avatar Jérome Perrin

no need to set date on trade conditions

parent f523bb61
......@@ -755,8 +755,9 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
sale_trade_condition.getTitle())
self.assertEquals("STC-General", sale_trade_condition.getReference())
self.assertNotEquals(None, sale_trade_condition.getEffectiveDate())
self.assertNotEquals(None, sale_trade_condition.getExpirationDate())
# Trade condition does not need dates
self.assertEquals(None, sale_trade_condition.getEffectiveDate())
self.assertEquals(None, sale_trade_condition.getExpirationDate())
# Check relation with Business Process
business_process_list = \
......@@ -801,8 +802,9 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
purchase_trade_condition.getTitle())
self.assertEquals("PTC-General", purchase_trade_condition.getReference())
self.assertNotEquals(None, purchase_trade_condition.getEffectiveDate())
self.assertNotEquals(None, purchase_trade_condition.getExpirationDate())
# Trade condition does not need dates
self.assertEquals(None, purchase_trade_condition.getEffectiveDate())
self.assertEquals(None, purchase_trade_condition.getExpirationDate())
# Check relation with Business Process
business_process_list = \
......@@ -932,8 +934,7 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
resource.validate()
self.tic()
start_date = sale_trade_condition.getEffectiveDate() + 1
stop_date = sale_trade_condition.getExpirationDate() - 1
start_date = stop_date = DateTime()
order = module.newContent(
portal_type='Sale Order',
specialise=(sale_trade_condition.getRelativeUrl(),),
......
......@@ -72,9 +72,7 @@ class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
trade_condition = portal.purchase_trade_condition_module.newContent(
portal_type="Purchase Trade Condition",
reference=self.getReference(),
title=self.getTitle(),
effective_date=DateTime() - 1,
expiration_date=DateTime() + 10 * 365)
title=self.getTitle(), )
trade_condition.setSpecialise("business_process_module/%s" %\
business_process_id)
......
......@@ -72,9 +72,7 @@ class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
trade_condition = portal.sale_trade_condition_module.newContent(
portal_type="Sale Trade Condition",
reference=self.getReference(),
title=self.getTitle(),
effective_date=DateTime() - 1,
expiration_date=DateTime() + 10 * 365)
title=self.getTitle())
trade_condition.setSpecialise("business_process_module/%s" %\
business_process_id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment