Commit c0cd323c authored by Aurel's avatar Aurel

new banking core

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6621 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f0a691b4
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
<value> <string encoding="base64">bfINCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
......@@ -72,17 +72,19 @@
\n
# returns a dictionnary like : {\'error_code\', \'balance\'}\n
\n
workflow_id = \'bank_account_workflow\'\n
#workflow_id = \'bank_account_workflow\'\n
workflow_correct_state_list = (\'valid\', \'being_modified\', \'validating_modification\')\n
manual_validation_account_category_list = (\'test\',)\n
\n
# First check that the payment account is in an acceptable state\n
payment_state = context.portal_workflow.getInfoFor(ob=payment, name=\'simulation_state\', wf_id=workflow_id)\n
#payment_state = context.portal_workflow.getInfoFor(ob=payment, name=\'simulation_state\', wf_id=workflow_id)\n
payment_value = context.restrictedTraverse(payment)\n
payment_state = payment_value.getValidationState()\n
\n
if payment_state not in workflow_correct_state_list :\n
return {\'error_code\':2} # closed account\n
\n
resource = context.restrictedTraverse(payment).getPriceCurrencyValue()\n
resource = payment_value.getPriceCurrencyValue()\n
\n
if resource is None :\n
raise AttributeError, \'No currency defined on %s\' % payment\n
......@@ -106,36 +108,20 @@ return {\'error_code\':0, \'balance\':account_balance} # ok\n
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAgAAAEAAAABzEAAAAGQBAGQCAIQBAFoAAGQAAFMoAwAAAE5pAAAAAGMDAAAADQAA
ABcAAABDAAAAcxoBAABkAQB9AwBkAgBkAwBkBABmAwB9BABkBQBmAQB9BQB0AwB0AwB0BABkBgCD
AgBkBwCDAgBkCAB8AABkCQBkCgBkCwB8AwCDAAN9CAB8CAB8BABqBwBvEQABaAAABGQMAGQNAAM8
U24BAAF0AwB0AwB0BABkDgCDAgB8AACDAQBkDwCDAgCDAAB9CQB8CQB0CABqCABvEQABdAkAZBAA
fAAAFoICAG4BAAF0AwB8CQBkEQCDAgBkEgB8AABkEwB8AgCDAAJ9DAB8AgBvCAABfAwAU24BAAF8
DAB8AQAYZBQAagAAbxoAAWgAAARkDABkFQADPARkFgB8DAADPFNuAQABaAAABGQMAGQUAAM8BGQW
AHwMAAM8U2QAAFMoFwAAAE5zFQAAAGJhbmtfYWNjb3VudF93b3JrZmxvd3MFAAAAdmFsaWRzDgAA
AGJlaW5nX21vZGlmaWVkcxcAAAB2YWxpZGF0aW5nX21vZGlmaWNhdGlvbnMEAAAAdGVzdHMPAAAA
cG9ydGFsX3dvcmtmbG93cwoAAABnZXRJbmZvRm9ycwIAAABvYnMEAAAAbmFtZXMQAAAAc2ltdWxh
dGlvbl9zdGF0ZXMFAAAAd2ZfaWRzCgAAAGVycm9yX2NvZGVpAgAAAHMSAAAAcmVzdHJpY3RlZFRy
YXZlcnNlcxUAAABnZXRQcmljZUN1cnJlbmN5VmFsdWVzGQAAAE5vIGN1cnJlbmN5IGRlZmluZWQg
b24gJXNzEgAAAGdldEZ1dHVyZUludmVudG9yeXMHAAAAcGF5bWVudHMFAAAAc3JjX19pAAAAAGkB
AAAAcwcAAABiYWxhbmNlKA0AAABzCwAAAHdvcmtmbG93X2lkcxsAAAB3b3JrZmxvd19jb3JyZWN0
X3N0YXRlX2xpc3RzJwAAAG1hbnVhbF92YWxpZGF0aW9uX2FjY291bnRfY2F0ZWdvcnlfbGlzdHMJ
AAAAX2dldGF0dHJfcwcAAABjb250ZXh0cwcAAABwYXltZW50cw0AAABwYXltZW50X3N0YXRlcwgA
AAByZXNvdXJjZXMEAAAATm9uZXMOAAAAQXR0cmlidXRlRXJyb3JzBQAAAHNyY19fcw8AAABhY2Nv
dW50X2JhbGFuY2VzCAAAAHF1YW50aXR5KA0AAABzBwAAAHBheW1lbnRzCAAAAHF1YW50aXR5cwUA
AABzcmNfX3MLAAAAd29ya2Zsb3dfaWRzGwAAAHdvcmtmbG93X2NvcnJlY3Rfc3RhdGVfbGlzdHMn
AAAAbWFudWFsX3ZhbGlkYXRpb25fYWNjb3VudF9jYXRlZ29yeV9saXN0cwkAAABfZ2V0YXR0cl9z
BwAAAGNvbnRleHRzDQAAAHBheW1lbnRfc3RhdGVzCAAAAHJlc291cmNlcwQAAABOb25lcw4AAABB
dHRyaWJ1dGVFcnJvcnMPAAAAYWNjb3VudF9iYWxhbmNlKAAAAAAoAAAAAHMPAAAAU2NyaXB0IChQ
eXRob24pcxgAAABCYW5rQWNjb3VudF9jaGVja0JhbGFuY2UBAAAAcx4AAAAABAYBDwEJAy0CDQER
AiECDQERAx4CBwEIAhEEGgIoAQAAAHMYAAAAQmFua0FjY291bnRfY2hlY2tCYWxhbmNlKAEAAABz
GAAAAEJhbmtBY2NvdW50X2NoZWNrQmFsYW5jZSgAAAAAKAAAAABzDwAAAFNjcmlwdCAoUHl0aG9u
KXMIAAAAPG1vZHVsZT4BAAAAcwAAAAA=</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_skins/erp5_banking_core/BankAccount_checkBalance</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>payment, quantity, src__=0</string> </value>
......@@ -167,11 +153,11 @@ KXMIAAAAPG1vZHVsZT4BAAAAcwAAAAA=</string> </value>
<string>payment</string>
<string>quantity</string>
<string>src__</string>
<string>workflow_id</string>
<string>workflow_correct_state_list</string>
<string>manual_validation_account_category_list</string>
<string>_getattr_</string>
<string>context</string>
<string>payment_value</string>
<string>payment_state</string>
<string>resource</string>
<string>None</string>
......
<?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> <string encoding="base64">bfINCg==</string> </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>return context.getSourcePayment() or context.aq_parent.getBaobabSourcePayment()\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_core/BankingOperationLine_getBaobabSourcePayment</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></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>_getattr_</string>
<string>context</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>BankingOperationLine_getBaobabSourcePayment</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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> <string encoding="base64">bfINCg==</string> </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>context.edit(quantity_unit = \'unit\',\n
source = \'account_module/bank_account\',\n
destination = \'account_module/bank_account\')\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_core/BankingOperationLine_init</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple/>
</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>kw</string>
<string>_getattr_</string>
<string>context</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>BankingOperationLine_init</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.Form</string>
<string>ERP5Form</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_edit</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>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list>
<string>my_source_credit</string>
<string>my_source_debit</string>
<string>my_resource</string>
</list>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>my_source_title</string>
<string>my_source_payment_title</string>
<string>my_source_total_asset_price</string>
<string>my_source_total_asset_price_currency_reference</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list>
<string>my_destination_title</string>
<string>my_destination_payment_title</string>
<string>my_destination_total_asset_price</string>
<string>my_destination_total_asset_price_currency_reference</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BankingOperationLine_view</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>accounting_transaction_list</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</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>Banking Operation Line</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>
......@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_checkbook_type</string> </value>
<value> <string>my_resource</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -257,7 +257,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string encoding="base64">VHlwZSBmb3JtdWxlIG51bcOpcm90w6ll</string> </value>
<value> <string>Currency</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
......@@ -287,7 +287,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:map(lambda x: [x.getTitle(), x.getId()], [here.portal_categories.getCategoryValue(x) for x in here.getVariationRangeCategoryList()])</string> </value>
<value> <string>python:here.CurrencyModule_getCurrencyItemList()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -45,6 +45,12 @@
<tuple/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_edit</string> </value>
......@@ -74,7 +80,7 @@
<key> <string>left</string> </key>
<value>
<list>
<string>my_title</string>
<string>my_translated_title</string>
<string>my_variation_list</string>
<string>my_base_price</string>
</list>
......
......@@ -12,6 +12,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_base_price</string> </value>
......
......@@ -12,6 +12,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_price_currency</string> </value>
......
......@@ -12,6 +12,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_title</string> </value>
......
......@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_simulation_state</string> </value>
<value> <string>my_translated_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -249,7 +249,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>status</string> </value>
<value> <string>Title</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
......
......@@ -12,6 +12,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_variation_list</string> </value>
......
<?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> <string encoding="base64">bfINCg==</string> </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># return 1 if the counter date is open/closing for the given date and the given site\n
\n
if date is None:\n
# get current date\n
from DateTime import DateTime\n
date = DateTime()\n
date = date.Date()\n
\n
if site is None:\n
# get site from user assignment\n
site_list = context.Baobab_getUserAssignedSiteList()\n
if len(site_list) == 0:\n
context.log(\'Baobab_checkCounterDateOpen\', \'No site found for the user\')\n
return 0\n
else:\n
site = site_list[0]\n
\n
# get only the office, not need of vault\n
if not \'siege\' in site:\n
# XXX must change the way it get the vault\n
site = site.split(\'/\')[3:4]\n
else:\n
site = \'siege\'\n
\n
\n
kw = {"portal_type" : \'Counter Date\', "delivery.start_date" : str(date), "site_id" : site, "simulation_state" : "open"}\n
#context.log(\'Baobab_checkCounterDateOpen\', \'kw = %s\' %(kw,))\n
counter_date_list = [x.getObject() for x in context.portal_catalog(**kw)]\n
#context.log(\'Baobab_checkCounterDateOpen\', \'counter_date_list = %s, requete = %s\' %(counter_date_list, context.portal_catalog(src__=1, **kw)))\n
\n
if len(counter_date_list) == 0:\n
return 0\n
else:\n
return 1\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_skins/erp5_banking_core/Baobab_checkCounterDateOpen</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>site=None, date=None</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</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>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>site</string>
<string>date</string>
<string>None</string>
<string>DateTime</string>
<string>_getattr_</string>
<string>context</string>
<string>site_list</string>
<string>len</string>
<string>_getitem_</string>
<string>str</string>
<string>kw</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>_apply_</string>
<string>x</string>
<string>counter_date_list</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Baobab_checkCounterDateOpen</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Persistence</string>
<string>PersistentMapping</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_container</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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> <string encoding="base64">bfINCg==</string> </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 encoding="cdata"><![CDATA[
from Products.ERP5Type.Document import newTempDomain\n
domain_list = []\n
i = 0\n
vault_list = context.Delivery_getVaultItemList(leaf_node=0)\n
\n
# get depth\n
depth = len(parent.getPath().split(\'/\')[3:])\n
\n
for vault in vault_list:\n
if vault[0] != \'\':\n
if len(vault[0].split(\'/\')) == depth: \n
if depth > 1 and vault[0].split(\'/\')[-2] != parent.getId():\n
# only add those from parent\n
continue\n
domain = parent.generateTempDomain(id=vault[0].split(\'/\')[-1])\n
domain.edit(title=vault[0].split(\'/\')[-1], membership_criterion_base_category=(\'destination\',), membership_criterion_category=(\'destination/%s\' %(vault[1]),), domain_generator_method_id=script.id)\n
i+=1\n
domain_list.append(domain)\n
\n
return domain_list\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_core/Baobab_generateDestinationSiteDomainList</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>depth, parent, **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>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>depth</string>
<string>parent</string>
<string>kw</string>
<string>Products.ERP5Type.Document</string>
<string>newTempDomain</string>
<string>domain_list</string>
<string>i</string>
<string>_getattr_</string>
<string>context</string>
<string>vault_list</string>
<string>len</string>
<string>_getitem_</string>
<string>_getiter_</string>
<string>vault</string>
<string>domain</string>
<string>script</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>Baobab_generateDestinationSiteDomainList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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> <string encoding="base64">bfINCg==</string> </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 encoding="cdata"><![CDATA[
from Products.ERP5Type.Document import newTempDomain\n
domain_list = []\n
i = 0\n
vault_list = context.Delivery_getVaultItemList(leaf_node=0)\n
\n
# get depth\n
depth = len(parent.getPath().split(\'/\')[3:])\n
\n
for vault in vault_list:\n
if vault[0] != \'\':\n
if len(vault[0].split(\'/\')) == depth: \n
if depth > 1 and vault[0].split(\'/\')[-2] != parent.getId():\n
# only add those from parent\n
continue\n
domain = parent.generateTempDomain(id=vault[0].split(\'/\')[-1])\n
domain.edit(title=vault[0].split(\'/\')[-1], membership_criterion_base_category=(\'source\',), membership_criterion_category=(\'source/%s\' %(vault[1]),), domain_generator_method_id=script.id)\n
i+=1\n
domain_list.append(domain)\n
\n
return domain_list\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_core/Baobab_generateSourceSiteDomainList</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>depth, parent, **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>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>depth</string>
<string>parent</string>
<string>kw</string>
<string>Products.ERP5Type.Document</string>
<string>newTempDomain</string>
<string>domain_list</string>
<string>i</string>
<string>_getattr_</string>
<string>context</string>
<string>vault_list</string>
<string>len</string>
<string>_getitem_</string>
<string>_getiter_</string>
<string>vault</string>
<string>domain</string>
<string>script</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>Baobab_generateSourceSiteDomainList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
<value> <string encoding="base64">bfINCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
......@@ -73,18 +73,20 @@
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAAAAAAAAAAADAAAAQwAA
AHMOAAAAZAEAZAIAZwIAU2QAAFMoAwAAAE5zGwAAAEFjY291bnRpbmcgVHJhbnNhY3Rpb24gTGlu
ZXMVAAAAQmFua2luZyBPcGVyYXRpb25MaW5lKAAAAAAoAAAAACgAAAAAKAAAAABzDwAAAFNjcmlw
dCAoUHl0aG9uKXMkAAAAQmFvYmFiX2dldEFjY291bnRpbmdNb3ZlbWVudFR5cGVMaXN0AQAAAHMA
AAAAKAEAAABzJAAAAEJhb2JhYl9nZXRBY2NvdW50aW5nTW92ZW1lbnRUeXBlTGlzdCgBAAAAcyQA
AABCYW9iYWJfZ2V0QWNjb3VudGluZ01vdmVtZW50VHlwZUxpc3QoAAAAACgAAAAAcw8AAABTY3Jp
cHQgKFB5dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_skins/erp5_banking_core/Baobab_getAccountingMovementTypeList</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
......
<?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> <string encoding="base64">bfINCg==</string> </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>from Products.ERP5Type.Cache import CachingMethod\n
\n
def getCheckbookTypeItemList():\n
return [(\'\', \'\')] + [(x.getTitle(), x.getRelativeUrl())\n
for x in context.checkbook_type_module.objectValues()]\n
\n
getCheckbookTypeItemList = CachingMethod(getCheckbookTypeItemList, id = \'Baobab_getCheckbookTypeItemList\', cache_duration = 3600)\n
return getCheckbookTypeItemList()\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_core/Baobab_getCheckbookTypeItemList</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></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>Products.ERP5Type.Cache</string>
<string>CachingMethod</string>
<string>getCheckbookTypeItemList</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>Baobab_getCheckbookTypeItemList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -12,6 +12,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox</string> </value>
......
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