Commit e01a4b39 authored by Rafael Monnerat's avatar Rafael Monnerat

Install categories via Spreadsheet instead use business templates

parent c37602ac
......@@ -45,7 +45,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/workflow_module/erp5_standard_workflow/3</string>
<string>destination/workflow_module/erp5_standard_workflow/6</string>
</tuple>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="State" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>comment</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/workflow_module/erp5_standard_workflow/3</string>
</tuple>
</value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string>Configure Preference</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>5</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>State</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Category</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Transition" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>after_script_id</string> </key>
<value> <string>BusinessConfiguration_setupStandardCategory</string> </value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/workflow_module/erp5_standard_workflow/5</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>guard_expression</string> </key>
<value> <string>python: True</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>6</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Transition</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Setup Category</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
......@@ -63,7 +63,6 @@ bt5_installation_list = (\'erp5_dhtml_style\',\n
\'erp5_crm_knowledge_pad\',\n
\'erp5_tax_resource\',\n
\'erp5_discount_resource\',\n
\'erp5_configurator_standard_categories\',\n
\'erp5_ods_style\',\n
\'erp5_odt_style\',\n
\'erp5_ooo_import\',\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n
\n
context.setGlobalConfigurationAttr(\n
categories_spreadsheet_configuration_save_relative_url=configuration_save.getRelativeUrl())\n
\n
configuration_save.addConfigurationItem("Categories Spreadsheet Configurator Item",\n
configuration_spreadsheet_data = getattr(context, "standard_category.ods").data)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>configuration_save_url=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BusinessConfiguration_setupStandardCategory</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -108,11 +108,11 @@ class TestConsultingConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
def afterSetUp(self):
TestLiveConfiguratorWorkflowMixin.afterSetUp(self)
categories_file_id = 'consulting_configurator_sample_categories.ods'
categories_file_id = 'standard_category.ods'
self.categories_file_path, self.categories_file_upload = \
self.uploadFile(categories_file_id)
roles_file_id = 'consulting_configurator_sample_roles_configuration_sheet.ods'
roles_file_id = 'standard_portal_type_roles.ods'
self.roles_file_path, self.roles_file_upload = \
self.uploadFile(roles_file_id)
# set the company employees number
......@@ -245,7 +245,7 @@ class TestConsultingConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
""" Check if organisation was created fine """
business_configuration = sequence.get("business_configuration")
# last one: a step for what the client selected
organisation_config_save = business_configuration['5']
organisation_config_save = business_configuration['6']
self.assertEquals(1, len(organisation_config_save.contentValues()))
# first item: configuration of our organisation
organisation_config_item = organisation_config_save['1']
......@@ -524,7 +524,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
default_address_region):
""" Check if configuration key was created fine """
# last one: a step for what the client selected
organisation_config_save = business_configuration['4']
organisation_config_save = business_configuration['5']
self.assertEquals(2, len(organisation_config_save.contentValues()))
# first item: configuration of our organisation
organisation_config_item = organisation_config_save['1']
......@@ -548,7 +548,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
self.assertEquals(category_config_item.getTitle(),
'My Organisation')
self.assertEquals(4, len(business_configuration.contentValues(portal_type="Configuration Save")))
self.assertEquals(5, len(business_configuration.contentValues(portal_type="Configuration Save")))
self.assertEquals(0, len(business_configuration.contentValues(portal_type="Link")))
def stepCheckOrganisationConfiguratorItemFrance(self, sequence=None, sequence_list=None, **kw):
......
......@@ -58,7 +58,6 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
'erp5_tax_resource',
'erp5_discount_resource',
'erp5_invoicing',
'erp5_configurator_standard_categories',
'erp5_trade_knowledge_pad',
'erp5_crm_knowledge_pad',
'erp5_simplified_invoicing',
......
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