Commit 80621adf authored by Gabriel Monnerat's avatar Gabriel Monnerat

- clean up scripts

- update steps of configurator in spreadsheet

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44670 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 45e83aec
...@@ -10,13 +10,7 @@ ...@@ -10,13 +10,7 @@
<key> <string>_Access_contents_information_Permission</string> </key> <key> <string>_Access_contents_information_Permission</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -24,12 +18,7 @@ ...@@ -24,12 +18,7 @@
<key> <string>_Add_portal_content_Permission</string> </key> <key> <string>_Add_portal_content_Permission</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -37,12 +26,7 @@ ...@@ -37,12 +26,7 @@
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -50,13 +34,7 @@ ...@@ -50,13 +34,7 @@
<key> <string>_View_Permission</string> </key> <key> <string>_View_Permission</string> </key>
<value> <value>
<tuple> <tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string> <string>Manager</string>
<string>Owner</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Transition" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>after_script_id</string> </key>
<value> <string>BusinessConfiguration_setupUNGAssignment</string> </value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/workflow_module/ung_configuration_workflow/66</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>65</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Transition</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Configure assignment</string> </value>
</item>
<item>
<key> <string>transition_form_id</string> </key>
<value> <string>BusinessConfiguration_setupUNGAssignmentForm</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="State" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/workflow_module/ung_configuration_workflow/32</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>66</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>State</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Assignment</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>destination/workflow_module/ung_configuration_workflow/65</string> <string>destination/workflow_module/ung_configuration_workflow/32</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -89,20 +89,7 @@ if business_template is not None:\n ...@@ -89,20 +89,7 @@ if business_template is not None:\n
if obj is not None and hasattr(obj, \'getPortalType\'):\n if obj is not None and hasattr(obj, \'getPortalType\'):\n
# XXX This hardcoded list is a bit inconvinient.\n # XXX This hardcoded list is a bit inconvinient.\n
if obj.getPortalType() in (\'Person\', \n if obj.getPortalType() in (\'Person\', \n
\'Organisation\', \n \'Organisation\'):\n
\'Account\', \n
\'Service\', \'Product\',\n
\'Sale Trade Condition\', \n
\'Purchase Trade Condition\',\n
\'Order Root Simulation Rule\', \n
\'Delivery Root Simulation Rule\',\n
\'Trade Model Simulation Rule\', \n
\'Accounting Transaction Root Simulation Rule\',\n
\'Invoice Transaction Simulation Rule\', \n
\'Payment Simulation Rule\',\n
\'Invoice Root Simulation Rule\', \n
\'Delivery Simulation Rule\', \n
\'Invoice Simulation Rule\'):\n
if isTransitionPossible(obj, \'validate\'):\n if isTransitionPossible(obj, \'validate\'):\n
obj.validate()\n obj.validate()\n
print "Validated: ", obj.getRelativeUrl()\n print "Validated: ", obj.getRelativeUrl()\n
......
...@@ -53,50 +53,6 @@ ...@@ -53,50 +53,6 @@
<value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n <value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n
group_id = context.getGlobalConfigurationAttr(\'group_id\')\n group_id = context.getGlobalConfigurationAttr(\'group_id\')\n
\n \n
# setup Rules\n
configuration_save.addConfigurationItem("Rule Configurator Item")\n
\n
# setup default security\n
configuration_save.addConfigurationItem("Role Configurator Item", \n
filename="portal_types_roles_standard.ods",\n
group_id = \'group/%s\' %group_id)\n
\n
# web site module security\n
# we will not provide web_site_module for now.\n
configuration_save.addConfigurationItem("Permission Configurator Item",\n
filename="module_permission_access.ods")\n
\n
# Catalog Keyword Search Keys are for now hardcoded.\n
configuration_save.addConfigurationItem("Catalog Keyword Key Configurator Item",\n
key_list=(\'description\', \'title\', \'catalog.description\', \'catalog.title\'))\n
\n
# This could be a customer decision option\n
# configuration_save.addConfigurationItem("Site Property Configurator Item",\n
# site_property_list=[[[\'email_from_address\', \'email@example.com\', \'string\'],]])\n
\n
# Customize portal type information.\n
configuration_save.addConfigurationItem("Portal Type Configurator Item",\n
target_portal_type=\'Purchase Order\',\n
add_propertysheet_list=(\'TradeOrder\',))\n
configuration_save.addConfigurationItem("Portal Type Configurator Item",\n
target_portal_type=\'Sale Order\',\n
add_propertysheet_list=(\'TradeOrder\',))\n
configuration_save.addConfigurationItem("Portal Type Configurator Item",\n
target_portal_type=\'Purchase Order Line\',\n
add_propertysheet_list=(\'TradeOrderLine\',))\n
configuration_save.addConfigurationItem("Portal Type Configurator Item",\n
target_portal_type=\'Sale Order Line\',\n
add_propertysheet_list=(\'TradeOrderLine\',))\n
configuration_save.addConfigurationItem("Portal Type Configurator Item",\n
target_portal_type=\'Inventory\',\n
add_propertysheet_list=(\'InventoryConstraint\',))\n
configuration_save.addConfigurationItem("Portal Type Configurator Item",\n
target_portal_type=\'Sale Packing List\',\n
add_propertysheet_list=(\'TradeOrder\',))\n
configuration_save.addConfigurationItem("Portal Type Configurator Item",\n
target_portal_type=\'Sale Packing List Line\',\n
add_propertysheet_list=(\'TradeOrderLine\',))\n
\n
# These must be last\n # These must be last\n
configuration_save.addConfigurationItem("Export Customer BT5 Configurator Item")\n configuration_save.addConfigurationItem("Export Customer BT5 Configurator Item")\n
</string> </value> </string> </value>
......
<?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
## Configure assignment period\n
configuration_save.addConfigurationItem("Assignment Configurator Item",\n
start_date=period_start_date,\n
stop_date=period_stop_date,\n
assignment_title=assignment_title)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>configuration_save_url=None, period_start_date=None, period_stop_date=None, assignment_title=None, **kw</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BusinessConfiguration_setupUNGAssignment</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
</pickle>
<pickle>
<dictionary>
<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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>Default</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>Default</string> </key>
<value>
<list>
<string>your_period_description</string>
<string>your_period_title</string>
<string>your_period_start_date</string>
<string>your_period_stop_date</string>
</list>
</value>
</item>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BusinessConfiguration_setupUNGAssignmentForm</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_empty</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Accounting configuration</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_period_description</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_empty_mode_description</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewConfiguratorFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Assignment Period</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.Base_translateString("Assignment Periods are used to define the range of dates in which you will be allowed to login in UNG Web Site. To start using the system, you have to configure the first assignment period.")</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>required</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_period_start_date</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_empty_mode_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewConfiguratorFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>What is the begin date of your current accounting period?</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: test(getattr(here, field.getId().replace(\'your_\',\'\',1), None) is not None, getattr(here, field.getId().replace(\'your_\',\'\',1), \'\'), modules[\'DateTime\'].DateTime(modules[\'DateTime\'].DateTime().year(), 1, 1))</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>required</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_period_stop_date</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_empty_mode_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewConfiguratorFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>What will be the end date of your current accounting period?</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: test(getattr(here, field.getId().replace(\'your_\',\'\',1), None) is not None, getattr(here, field.getId().replace(\'your_\',\'\',1), \'\'), modules[\'DateTime\'].DateTime(modules[\'DateTime\'].DateTime().year(), 12, 31))</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>display_width</string>
<string>required</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_period_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_empty_mode_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewConfiguratorFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>What is the name of this period?</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: test(getattr(here, field.getId().replace(\'your_\',\'\',1), None) is not None, getattr(here, field.getId().replace(\'your_\',\'\',1), \'\'), modules[\'DateTime\'].DateTime().year())</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -52,39 +52,33 @@ ...@@ -52,39 +52,33 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>configuration_save_url = kw.get(\'configuration_save_url\', None)\n <value> <string>configuration_save_url = kw.get(\'configuration_save_url\', None)\n
configuration_save = context.restrictedTraverse(configuration_save_url)\n configuration_save = context.restrictedTraverse(configuration_save_url)\n
organisation_id = context.getGlobalConfigurationAttr(\'organisation_id\')\n
group_id = context.getGlobalConfigurationAttr(\'group_id\')\n
\n \n
company_user_number = context.getGlobalConfigurationAttr(\'company_employees_number\')\n user_number = context.getGlobalConfigurationAttr(\'user_number\')\n
\n \n
## get only form keys\n ## get only form keys\n
form_keys = [i for i in kw.keys() if i.startswith(\'field_your_\') and i!=\'field_your_search_text\']\n form_keys = [i for i in kw.keys() if i.startswith(\'field_your_\') and i!=\'field_your_search_text\']\n
\n \n
if company_user_number == 1:\n function = "function/ung_user"\n
if user_number == 1:\n
# only one user\n # only one user\n
for key in (\'configuration_save_url\', \'transition\', \'client_id\', \'password_confirm\'):\n for key in (\'configuration_save_url\', \'transition\', \'client_id\', \'password_confirm\'):\n
kw.pop(key, None)\n kw.pop(key, None)\n
function = kw.pop(\'function\', None)\n configuration_save.addConfigurationItem("Person Configurator Item",\n
configuration_save.addConfigurationItem("Person Configurator Item", \n function=function,\n
organisation_id = organisation_id,\n
function = function,\n
group_id = group_id,\n
**kw)\n **kw)\n
else:\n else:\n
# many users\n # many users\n
context.log(company_user_number)\n for counter in range(user_number):\n
for employee_counter in range(0, company_user_number):\n
user_kw = {}\n user_kw = {}\n
for key in form_keys:\n for key in form_keys:\n
new_key = key.replace("field_your_", "")\n new_key = key.replace("field_your_", "")\n
user_kw[new_key] = kw[key][employee_counter]\n value = kw.get(key)\n
if value:\n
user_kw[new_key] = value[counter]\n
# add an user\n # add an user\n
function = user_kw.pop(\'function\', None)\n
user_kw.pop(\'password_confirm\', None)\n user_kw.pop(\'password_confirm\', None)\n
configuration_save.addConfigurationItem("Person Configurator Item", \n configuration_save.addConfigurationItem("Person Configurator Item",\n
organisation_id = organisation_id,\n function=function,\n
function = function,\n
group_id = group_id,\n
**user_kw)\n **user_kw)\n
</string> </value> </string> </value>
</item> </item>
......
...@@ -51,27 +51,12 @@ ...@@ -51,27 +51,12 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n <value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n
company_email = kw[\'default_email_text\']\n
\n
# create under \'portal_categories/group\' a new category using company title\n
group_id = \'my_group\' #\'_\'.join(kw[\'title\'].split(\' \'))[:20]\n
\n \n
organisation_configurator_item = configuration_save.addConfigurationItem(\n organisation_configurator_item = configuration_save.addConfigurationItem(\n
"Organisation Configurator Item",\n "Organisation Configurator Item",\n
group=group_id,\n
site=\'main\',\n
**kw)\n **kw)\n
\n \n
configuration_save.addConfigurationItem("Category Configurator Item",\n context.setGlobalConfigurationAttr(company_email=kw.get(\'default_email_text\'))\n
category_root=\'group\',\n
object_id=group_id,\n
title=kw[\'title\'])\n
\n
# store globally group_id \n
context.setGlobalConfigurationAttr(group_id=group_id)\n
\n
# store globally company\'s email\n
context.setGlobalConfigurationAttr(company_email=company_email)\n
\n \n
# store globally company\'s configurator item which we can use later to reconfigure\n # store globally company\'s configurator item which we can use later to reconfigure\n
context.setGlobalConfigurationAttr(\n context.setGlobalConfigurationAttr(\n
......
...@@ -52,9 +52,7 @@ ...@@ -52,9 +52,7 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
# XXX-Luke: Beware, I will modify this script *very* much\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
\n
configuration_save_url = kw.get(\'configuration_save_url\', None)\n configuration_save_url = kw.get(\'configuration_save_url\', None)\n
preferred_event_sender_email = kw.get(\'preferred_event_sender_email\', \'\')\n preferred_event_sender_email = kw.get(\'preferred_event_sender_email\', \'\')\n
preferred_date_order = kw.get(\'preferred_date_order\', None)\n preferred_date_order = kw.get(\'preferred_date_order\', None)\n
...@@ -68,62 +66,6 @@ company_email = context.getGlobalConfigurationAttr(\'company_email\')\n ...@@ -68,62 +66,6 @@ company_email = context.getGlobalConfigurationAttr(\'company_email\')\n
if preferred_event_sender_email in (\'\', None,):\n if preferred_event_sender_email in (\'\', None,):\n
preferred_event_sender_email = company_email\n preferred_event_sender_email = company_email\n
\n \n
# price currency contains all currency info like iso code& precision \';\'\n
# separated\n
currency_info = kw[\'price_currency\']\n
currency_reference, currency_base_unit_quantity, currency_title = \\\n
currency_info.split(\';\')\n
configuration_save.addConfigurationItem(\n
"Currency Configurator Item",\n
reference = currency_reference,\n
base_unit_quantity = currency_base_unit_quantity,\n
title = currency_title,)\n
context.setGlobalConfigurationAttr(default_currency=currency_reference)\n
\n
# adjust price_currency for organisation configuration item\n
organisation_configurator_item = context.getGlobalConfigurationAttr(\n
\'organisation_configurator_item\')\n
organisation_configurator_item_obj = context.restrictedTraverse(\n
organisation_configurator_item, None)\n
organisation_configurator_item_obj.setPriceCurrency(currency_reference)\n
\n
# CRM\n
# Create services used in crm preference.\n
# XXX I think here is not a good place.(yusei)\n
service_list = (\n
# sale opportunity\n
(\'product\', \'Product\'),\n
(\'service\', \'Service\'),\n
# campaign\n
(\'marketing_campaign\', \'Marketing Campaign\'),\n
(\'marketing_survey\', \'Market Survey\'),\n
(\'marketing_purchases\', \'Purchases Campaign\'),\n
(\'marketing_sales\', \'Sales Campaign\'),\n
(\'marketing_other\', \'Other Marketing Service\'),\n
# support request\n
(\'support_administrative\', \'Administrative Support\'),\n
(\'support_financial\', \'Financial Support\'),\n
(\'support_it\', \'IT Support\'),\n
(\'support_other\', \'Other Support Service\'),\n
# meeting\n
(\'organisation_conference\', \'Conference\'),\n
(\'organisation_partnership\', \'Partnership Meeting\'),\n
(\'organisation_purchases\', \'Purchases Meeting\'),\n
(\'organisation_project\', \'Project Meeting\'),\n
(\'organisation_sales\', \'Sales Meeting\'),\n
(\'organisation_other\', \'Other Meeting\'),\n
# event\n
(\'event_complaint\', \'Complaint\'),\n
(\'event_announcement\', \'Announcement\'),\n
(\'event_inquiry\', \'Inquiry\'),\n
(\'event_advertisement\', \'Advertisement\'),\n
(\'event_spam\', \'Spam\'),\n
(\'event_information\', \'Information\'),\n
(\'event_other\', \'Other event\'),\n
)\n
configuration_save.addConfigurationItem("Service Configurator Item",\n
service_list=service_list)\n
\n
# configure preferences\n # configure preferences\n
prefs = dict(\n prefs = dict(\n
# UI\n # UI\n
...@@ -139,17 +81,11 @@ prefs = dict(\n ...@@ -139,17 +81,11 @@ prefs = dict(\n
preferred_textarea_height = 5,\n preferred_textarea_height = 5,\n
preferred_report_style = \'ODT\',\n preferred_report_style = \'ODT\',\n
preferred_report_format = \'pdf\',\n preferred_report_format = \'pdf\',\n
preferred_money_quantity_field_width = 10, # TODO: adapt this\n preferred_money_quantity_field_width = 10,\n
# based on the selected\n
# currency, XOF needs\n
# more than 10 for\n
# example\n
preferred_html_style_access_tab = 1,\n preferred_html_style_access_tab = 1,\n
preferred_quantity_field_width = 8,\n preferred_quantity_field_width = 8,\n
# accounting\n preferred_ooodoc_server_address = "localhost",\n
preferred_accounting_transaction_currency = \'currency_module/%s\' % \\\n preferred_ooodoc_server_port_number = 8011)\n
currency_reference,\n
)\n
\n \n
configuration_save.addConfigurationItem(\n configuration_save.addConfigurationItem(\n
\'Preference Configurator Item\',\n \'Preference Configurator Item\',\n
...@@ -162,67 +98,18 @@ configuration_save.addConfigurationItem(\n ...@@ -162,67 +98,18 @@ configuration_save.addConfigurationItem(\n
# configure system preferences\n # configure system preferences\n
# some preparation\n # some preparation\n
system_prefs = dict(\n system_prefs = dict(\n
# CRM\n
preferred_campaign_resource_list = [\n
\'service_module/marketing_campaign\',\n
\'service_module/marketing_survey\',\n
\'service_module/marketing_purchases\',\n
\'service_module/marketing_sales\',\n
\'service_module/marketing_other\',],\n
preferred_event_resource_list = [\n
\'service_module/event_complaint\',\n
\'service_module/event_announcement\',\n
\'service_module/event_inquiry\',\n
\'service_module/event_advertisement\',\n
\'service_module/event_spam\',\n
\'service_module/event_information\',\n
\'service_module/event_other\',],\n
preferred_meeting_resource_list = [\n
\'service_module/organisation_conference\',\n
\'service_module/organisation_partnership\',\n
\'service_module/organisation_purchases\',\n
\'service_module/organisation_project\',\n
\'service_module/organisation_sales\',\n
\'service_module/organisation_other\',],\n
preferred_sale_opportunity_resource_list = [\n
\'service_module/product\',\n
\'service_module/service\',],\n
preferred_support_request_resource_list = [\n
\'service_module/support_administrative\',\n
\'service_module/support_financial\',\n
\'service_module/support_it\',\n
\'service_module/support_other\',],\n
preferred_event_sender_email = preferred_event_sender_email,\n preferred_event_sender_email = preferred_event_sender_email,\n
preferred_event_assessment_form_id_list = [],\n preferred_event_assessment_form_id_list = [],\n
# dms\n
# XXX-Luke: (proposal) Allow to define, maybe use some magic of\n
# representation\n
preferred_document_file_name_regular_expression = \\\n preferred_document_file_name_regular_expression = \\\n
\'(?P<node_reference>[a-zA-Z0-9_-]+)-(?P<local_reference>[a-zA-Z0-9_.]+)\'\n \'(?P<node_reference>[a-zA-Z0-9_-]+)-(?P<local_reference>[a-zA-Z0-9_.]+)\'\n
\'-(?P<version>[0-9a-zA-Z.]+)-(?P<language>[a-z]{2})[^-]*?\',\n \'-(?P<version>[0-9a-zA-Z.]+)-(?P<language>[a-z]{2})[^-]*?\',\n
preferred_document_reference_regular_expression = \'(?P<reference>[a-zA-Z0-9\'\n preferred_document_reference_regular_expression = \'(?P<reference>[a-zA-Z0-9\'\n
\'-_.]+-[a-zA-Z0-9-_.]+)(|-(?P<version>[0-9a-zA-Z.]+))(|-(?P<language>[a\'\n \'-_.]+-[a-zA-Z0-9-_.]+)(|-(?P<version>[0-9a-zA-Z.]+))(|-(?P<language>[a\'\n
\'-z]{2})[^-]*)?\',\n \'-z]{2})[^-]*)?\',\n
preferred_document_classification = \'collaborative/team\',\n
preferred_synchronous_metadata_discovery = True,\n preferred_synchronous_metadata_discovery = True,\n
preferred_redirect_to_document = True,\n preferred_redirect_to_document = True)\n
# pdm\n
preferred_product_individual_variation_base_category_list = [\'variation\'],\n
preferred_component_individual_variation_base_category_list = [\'variation\'],\n
preferred_service_individual_variation_base_category_list = [\'variation\'],\n
# trade\n
preferred_supplier_role_list = [\'supplier\'],\n
preferred_client_role_list = [\'client\'],\n
preferred_sale_use_list = [\'trade/sale\'],\n
preferred_purchase_use_list = [\'trade/purchase\'],\n
preferred_packing_use_list = [\'trade/container\'],\n
# Express preferences\n
preferred_express_subscription_status = 1,\n
preferred_express_configuration_status = 1,\n
preferred_express_after_setup_script_id = \'ERP5Generator_afterSetup\')\n
\n \n
configuration_save.addConfigurationItem(\n configuration_save.addConfigurationItem(\'System Preference Configurator Item\',\n
\'System Preference Configurator Item\',\n
object_id = \'default_configurator_system_preference\',\n object_id = \'default_configurator_system_preference\',\n
description="The default system parameters for the site are set on this \'\\\n description="The default system parameters for the site are set on this \'\\\n
\'preference",\n \'preference",\n
......
...@@ -94,7 +94,6 @@ ...@@ -94,7 +94,6 @@
<value> <value>
<list> <list>
<string>your_preferred_event_sender_email</string> <string>your_preferred_event_sender_email</string>
<string>your_price_currency</string>
<string>your_preferred_date_order</string> <string>your_preferred_date_order</string>
<string>your_lang</string> <string>your_lang</string>
</list> </list>
......
...@@ -76,6 +76,7 @@ bt5_installation_list = (\'erp5_simulation\',\n ...@@ -76,6 +76,7 @@ bt5_installation_list = (\'erp5_simulation\',\n
\'erp5_jquery_sheet_editor\',\n \'erp5_jquery_sheet_editor\',\n
\'erp5_xinha_editor\',\n \'erp5_xinha_editor\',\n
\'erp5_svg_editor\',\n \'erp5_svg_editor\',\n
# \'erp5_mail_reader\',\n
\'erp5_web_ung_core\',\n \'erp5_web_ung_core\',\n
\'erp5_web_ung_theme\',\n \'erp5_web_ung_theme\',\n
\'erp5_web_ung_role\')\n \'erp5_web_ung_role\')\n
......
...@@ -94,7 +94,6 @@ ...@@ -94,7 +94,6 @@
<list> <list>
<string>your_default_email_text</string> <string>your_default_email_text</string>
<string>your_default_telephone_text</string> <string>your_default_telephone_text</string>
<string>your_function</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_function</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_empty_mode_function</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewConfiguratorFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -53,19 +53,19 @@ ...@@ -53,19 +53,19 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
configuration_save_url = kw.get(\'configuration_save_url\', None)\n configuration_save_url = kw.get(\'configuration_save_url\', None)\n
company_employees_number = kw.get(\'company_employees_number\', 1)\n user_number = kw.get(\'user_number\', 1)\n
next_transition = context.getNextTransition().getRelativeUrl()\n next_transition = context.getNextTransition().getRelativeUrl()\n
\n \n
if company_employees_number > 1:\n if user_number > 1:\n
# mark next transition as multiple\n # mark next transition as multiple\n
context.setMultiEntryTransition(next_transition, company_employees_number)\n context.setMultiEntryTransition(next_transition, user_number)\n
else:\n else:\n
# explicitly reset next transition as not multiple because \n # explicitly reset next transition as not multiple because \n
# we may have already set it as multiple\n # we may have already set it as multiple\n
context.setMultiEntryTransition(next_transition, 0)\n context.setMultiEntryTransition(next_transition, 0)\n
\n \n
# store globally\n # store globally\n
context.setGlobalConfigurationAttr(company_employees_number=company_employees_number)\n context.setGlobalConfigurationAttr(user_number=user_number)\n
]]></string> </value> ]]></string> </value>
...@@ -80,7 +80,7 @@ context.setGlobalConfigurationAttr(company_employees_number=company_employees_nu ...@@ -80,7 +80,7 @@ context.setGlobalConfigurationAttr(company_employees_number=company_employees_nu
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Setup number of company\'s employees</string> </value> <value> <string>Setup number of users</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<key> <string>Default</string> </key> <key> <string>Default</string> </key>
<value> <value>
<list> <list>
<string>your_company_employees_number</string> <string>your_user_number</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>your_company_employees_number</string> </value> <value> <string>your_user_number</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
......
7 8
\ 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