diff --git a/bt5/erp5_banking_cash/PortalTypeTemplateItem/portal_types/Account%20Incident.xml b/bt5/erp5_banking_cash/PortalTypeTemplateItem/portal_types/Account%20Incident.xml index 1c23deeb7c9599f0e6d6b737be7c47200f3ada4c..1dfa68b531bc7e80bea7b36b280ae69487891c9d 100644 --- a/bt5/erp5_banking_cash/PortalTypeTemplateItem/portal_types/Account%20Incident.xml +++ b/bt5/erp5_banking_cash/PortalTypeTemplateItem/portal_types/Account%20Incident.xml @@ -104,7 +104,7 @@ </item> <item> <key> <string>init_script</string> </key> - <value> <string></string> </value> + <value> <string>AccountIncident_init</string> </value> </item> <item> <key> <string>property_sheet_list</string> </key> diff --git a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/AccountIncident_init.xml b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/AccountIncident_init.xml new file mode 100644 index 0000000000000000000000000000000000000000..9665bcb90f72ea44c00437dd84b762bc535066c9 --- /dev/null +++ b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/AccountIncident_init.xml @@ -0,0 +1,152 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.PythonScripts.PythonScript</string> + <string>PythonScript</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Python_magic</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </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>user_site = context.Baobab_getUserAssignedSiteList()[0]\n +context.edit(source=user_site)\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_filepath</string> </key> + <value> <string>Script (Python):/baobab/portal_skins/erp5_banking_cash/AccountIncident_init</string> </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>*args, **kw</string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>args</string> + <string>kw</string> + <string>_getitem_</string> + <string>_getattr_</string> +<string>context</string> + <string>user_site</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>AccountIncident_init</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/IncomingAccountIncidentLine_getBaobabDestination.xml b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/IncomingAccountIncidentLine_getBaobabDestination.xml index d9f8e55e0e36c4052c218efe3d936a9b98904ca5..9b7ae4af0d4196dd6fed48396d92d8fb58801791 100644 --- a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/IncomingAccountIncidentLine_getBaobabDestination.xml +++ b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/IncomingAccountIncidentLine_getBaobabDestination.xml @@ -68,14 +68,7 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>old_group_list = context.get_local_roles()\n -for group, role_list in old_group_list:\n - if \'Owner\' in role_list:\n - user = group\n -\n -user_site = context.Baobab_getUserAssignedSiteList(user)[0]\n -\n -return "%s/surface/salle_de_tri/encaisse_des_differences" %(user_site,)\n + <value> <string>return "%s/surface/salle_de_tri/encaisse_des_differences" %(context.getSource(),)\n </string> </value> </item> <item> @@ -124,13 +117,6 @@ return "%s/surface/salle_de_tri/encaisse_des_differences" %(user_site,)\n <tuple> <string>_getattr_</string> <string>context</string> - <string>old_group_list</string> - <string>_getiter_</string> - <string>group</string> - <string>role_list</string> - <string>user</string> - <string>_getitem_</string> - <string>user_site</string> </tuple> </value> </item> diff --git a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/OutgoingAccountIncidentLine_getBaobabSource.xml b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/OutgoingAccountIncidentLine_getBaobabSource.xml index 4bdd9d122564891a6b86256cd92dfd475a83c676..272a19790095847c775aaec18692b3296d6847fb 100644 --- a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/OutgoingAccountIncidentLine_getBaobabSource.xml +++ b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/OutgoingAccountIncidentLine_getBaobabSource.xml @@ -68,14 +68,7 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>old_group_list = context.get_local_roles()\n -for group, role_list in old_group_list:\n - if \'Owner\' in role_list:\n - user = group\n -\n -user_site = context.Baobab_getUserAssignedSiteList(user)[0]\n -\n -return "%s/surface/salle_de_tri/encaisse_des_differences" %(user_site,)\n + <value> <string>return "%s/surface/salle_de_tri/encaisse_des_differences" %(context.getSource(),)\n </string> </value> </item> <item> @@ -124,13 +117,6 @@ return "%s/surface/salle_de_tri/encaisse_des_differences" %(user_site,)\n <tuple> <string>_getattr_</string> <string>context</string> - <string>old_group_list</string> - <string>_getiter_</string> - <string>group</string> - <string>role_list</string> - <string>user</string> - <string>_getitem_</string> - <string>user_site</string> </tuple> </value> </item>