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): ...@@ -755,8 +755,9 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
sale_trade_condition.getTitle()) sale_trade_condition.getTitle())
self.assertEquals("STC-General", sale_trade_condition.getReference()) self.assertEquals("STC-General", sale_trade_condition.getReference())
self.assertNotEquals(None, sale_trade_condition.getEffectiveDate()) # Trade condition does not need dates
self.assertNotEquals(None, sale_trade_condition.getExpirationDate()) self.assertEquals(None, sale_trade_condition.getEffectiveDate())
self.assertEquals(None, sale_trade_condition.getExpirationDate())
# Check relation with Business Process # Check relation with Business Process
business_process_list = \ business_process_list = \
...@@ -801,8 +802,9 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin): ...@@ -801,8 +802,9 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
purchase_trade_condition.getTitle()) purchase_trade_condition.getTitle())
self.assertEquals("PTC-General", purchase_trade_condition.getReference()) self.assertEquals("PTC-General", purchase_trade_condition.getReference())
self.assertNotEquals(None, purchase_trade_condition.getEffectiveDate()) # Trade condition does not need dates
self.assertNotEquals(None, purchase_trade_condition.getExpirationDate()) self.assertEquals(None, purchase_trade_condition.getEffectiveDate())
self.assertEquals(None, purchase_trade_condition.getExpirationDate())
# Check relation with Business Process # Check relation with Business Process
business_process_list = \ business_process_list = \
...@@ -932,8 +934,7 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin): ...@@ -932,8 +934,7 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
resource.validate() resource.validate()
self.tic() self.tic()
start_date = sale_trade_condition.getEffectiveDate() + 1 start_date = stop_date = DateTime()
stop_date = sale_trade_condition.getExpirationDate() - 1
order = module.newContent( order = module.newContent(
portal_type='Sale Order', portal_type='Sale Order',
specialise=(sale_trade_condition.getRelativeUrl(),), specialise=(sale_trade_condition.getRelativeUrl(),),
......
...@@ -72,9 +72,7 @@ class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -72,9 +72,7 @@ class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
trade_condition = portal.purchase_trade_condition_module.newContent( trade_condition = portal.purchase_trade_condition_module.newContent(
portal_type="Purchase Trade Condition", portal_type="Purchase Trade Condition",
reference=self.getReference(), reference=self.getReference(),
title=self.getTitle(), title=self.getTitle(), )
effective_date=DateTime() - 1,
expiration_date=DateTime() + 10 * 365)
trade_condition.setSpecialise("business_process_module/%s" %\ trade_condition.setSpecialise("business_process_module/%s" %\
business_process_id) business_process_id)
......
...@@ -72,9 +72,7 @@ class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -72,9 +72,7 @@ class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
trade_condition = portal.sale_trade_condition_module.newContent( trade_condition = portal.sale_trade_condition_module.newContent(
portal_type="Sale Trade Condition", portal_type="Sale Trade Condition",
reference=self.getReference(), reference=self.getReference(),
title=self.getTitle(), title=self.getTitle())
effective_date=DateTime() - 1,
expiration_date=DateTime() + 10 * 365)
trade_condition.setSpecialise("business_process_module/%s" %\ trade_condition.setSpecialise("business_process_module/%s" %\
business_process_id) 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