Commit 5e3c03c3 authored by Jérome Perrin's avatar Jérome Perrin

testStandardConfigurationWorkflow: create a valid sale order now that we check consistency

parent ff167d57
...@@ -934,6 +934,12 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin): ...@@ -934,6 +934,12 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
portal = self.getPortal() portal = self.getPortal()
module = portal.sale_order_module module = portal.sale_order_module
business_configuration = sequence.get('business_configuration') business_configuration = sequence.get('business_configuration')
organisation_list = self.getBusinessConfigurationObjectList(business_configuration, 'Organisation')
self.assertNotEquals(len(organisation_list), 0)
organisation = organisation_list[0]
self.assertEqual('validated', organisation.getValidationState())
sale_trade_condition = \ sale_trade_condition = \
self.getBusinessConfigurationObjectList(business_configuration, self.getBusinessConfigurationObjectList(business_configuration,
'Sale Trade Condition')[0] 'Sale Trade Condition')[0]
...@@ -954,6 +960,10 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin): ...@@ -954,6 +960,10 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
quantity_unit='unit/piece', quantity_unit='unit/piece',
individual_variation_base_category='variation', individual_variation_base_category='variation',
base_contribution='base_amount/taxable') base_contribution='base_amount/taxable')
client = portal.organisation_module.newContent(
portal_type='Organisation')
client.validate()
self.tic() self.tic()
resource.validate() resource.validate()
self.tic() self.tic()
...@@ -962,6 +972,10 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin): ...@@ -962,6 +972,10 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
order = module.newContent( order = module.newContent(
portal_type='Sale Order', portal_type='Sale Order',
specialise=(sale_trade_condition.getRelativeUrl(),), specialise=(sale_trade_condition.getRelativeUrl(),),
destination_value=client,
destination_section_value=client,
source_value=organisation,
source_section_value=organisation,
destination_decision=destination_decision.getRelativeUrl(), destination_decision=destination_decision.getRelativeUrl(),
destination_administration=destination_administration.getRelativeUrl(), destination_administration=destination_administration.getRelativeUrl(),
start_date=start_date, start_date=start_date,
......
670 671
\ No newline at end of file \ No newline at end of file
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