Commit 292f9791 authored by Romain Courteaud's avatar Romain Courteaud

erp5_configurator_standard: check coding style

parent b508e53d
""" This script will be called to apply the customization. """
from AccessControl import getSecurityManager
from Products.ERP5Type.Log import log
portal = context.getPortalObject()
portal_preferences = portal.portal_preferences
business_template = context.getSpecialiseValue()
N_ = context.Base_translateString
isTransitionPossible = portal.portal_workflow.isTransitionPossible
if business_template is not None:
# update role settings for modules which exists already
......
configuration_save_url = kw.get('configuration_save_url', None)
company_employees_number = kw.get('company_employees_number', 1)
next_transition = context.getNextTransition().getRelativeUrl()
......
......@@ -125,13 +125,13 @@ for row in context.ConfigurationTemplate_readOOCalcFile('standard_currency_list.
#
# Output
#
def format(string):
def formatText(string):
line_list = string.split('\n')
length = len(line_list)
if length==1:
return '"%s"' % string
else:
return '\n'.join(['""']+[format(i) for i in line_list])
return '\n'.join(['""']+[formatText(i) for i in line_list])
MESSAGE_TEMPLATE = '''\
......@@ -145,7 +145,7 @@ for message in message_list:
comment_list = message_dict[message]
comment_list.sort()
comment = '\n'.join([('#: %s' % i) for i in comment_list])
print MESSAGE_TEMPLATE % (comment, format(message))
print MESSAGE_TEMPLATE % (comment, formatText(message))
context.REQUEST.RESPONSE.setHeader('Content-Type', 'text/plain')
......
......@@ -556,7 +556,7 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
"""
# XXX FIXME (Lucas): this is not possible yet, because the Account does not have
# the id set like that, we probably gonna use reference.
return
"""
account_id_list = [
'capital', 'profit_loss', 'equipments',
'inventories', 'bank', 'receivable',
......@@ -566,6 +566,8 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
account = self.portal.account_module._getOb(account_id)
self.assertNotEquals(account, None,
"%s account is not Found." % account_id)
"""
return
def stepCheckSolver(self, sequence=None, sequence_list=None, **kw):
"""
......@@ -945,7 +947,6 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
'Business Process')
self.assertEqual(len(business_process_list), 1)
business_process = business_process_list[0]
destination_decision = portal.portal_catalog.getResultValue(
portal_type='Person',
reference=self.sales_manager_reference)
......
......@@ -6,10 +6,22 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testStandardConfigurationWorkflow</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testStandardConfigurationWorkflow</string> </value>
......@@ -24,6 +36,18 @@
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
......@@ -31,13 +55,28 @@
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -50,7 +89,7 @@
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
......@@ -59,13 +98,15 @@
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<tuple>
<none/>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
......@@ -78,7 +119,9 @@
</item>
</dictionary>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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