Commit 79dc23e2 authored by Aurel's avatar Aurel

many forms and scripts modifications

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8529 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2f1d43a4
...@@ -93,7 +93,7 @@ if resource is None :\n ...@@ -93,7 +93,7 @@ if resource is None :\n
\n \n
# Next, check the balance of the account\n # Next, check the balance of the account\n
account_balance = resource.getFutureInventory(payment=payment, src__=src__)\n account_balance = resource.getFutureInventory(payment=payment, src__=src__)\n
\n context.log("account balance",account_balance)\n
if src__ :\n if src__ :\n
return account_balance \n return account_balance \n
\n \n
...@@ -128,6 +128,14 @@ return {\'error_code\':0, \'balance\':account_balance} # ok\n ...@@ -128,6 +128,14 @@ return {\'error_code\':0, \'balance\':account_balance} # ok\n
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>payment, quantity, src__=0</string> </value> <value> <string>payment, quantity, src__=0</string> </value>
</item> </item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
<value> <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>
<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># We will take the emission letter and find what is the right site\n
# for it and the return the result\n
\n
site_item_list = context.Delivery_getVaultItemList(vault_type=(\'site\',),user_site=0,\n
with_base=0,strict_membership=1,\n
leaf_node=0)\n
site_path_list = [x[1] for x in site_item_list if x[1]!=\'\' and \'principale\' in x[1]]\n
site_base_category = context.portal_categories.site\n
for site_path in site_path_list:\n
site = site_base_category.restrictedTraverse(site_path)\n
if site.getCodification()[:1].lower()==emission_letter:\n
return site\n
return None\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_getEmissionLetterSiteValue</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>emission_letter=None</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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>emission_letter</string>
<string>_getattr_</string>
<string>context</string>
<string>site_item_list</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>x</string>
<string>_getitem_</string>
<string>site_path_list</string>
<string>site_base_category</string>
<string>site_path</string>
<string>site</string>
<string>None</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Baobab_getEmissionLetterSiteValue</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>
...@@ -68,9 +68,9 @@ ...@@ -68,9 +68,9 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from DateTime import DateTime\n <value> <string># in this script you must return the default value of the account for this site\n
\n # this must correspond to the relative url of the default account\n
context.edit(variation_base_category_list = [\'check_amount\'])\n return \'\'\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -81,7 +81,7 @@ context.edit(variation_base_category_list = [\'check_amount\'])\n ...@@ -81,7 +81,7 @@ context.edit(variation_base_category_list = [\'check_amount\'])\n
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_skins/erp5_banking_core/CheckbookModel_init</string> </value> <value> <string>Script (Python):/baobab/portal_skins/erp5_banking_core/Baobab_getPortalDefaultPaymentNode</string> </value>
</item> </item>
<item> <item>
<key> <string>_owner</string> </key> <key> <string>_owner</string> </key>
...@@ -91,7 +91,7 @@ context.edit(variation_base_category_list = [\'check_amount\'])\n ...@@ -91,7 +91,7 @@ context.edit(variation_base_category_list = [\'check_amount\'])\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>**kw</string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -116,12 +116,7 @@ context.edit(variation_base_category_list = [\'check_amount\'])\n ...@@ -116,12 +116,7 @@ context.edit(variation_base_category_list = [\'check_amount\'])\n
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple/>
<string>kw</string>
<string>DateTime</string>
<string>_getattr_</string>
<string>context</string>
</tuple>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -137,7 +132,7 @@ context.edit(variation_base_category_list = [\'check_amount\'])\n ...@@ -137,7 +132,7 @@ context.edit(variation_base_category_list = [\'check_amount\'])\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>CheckbookModel_init</string> </value> <value> <string>Baobab_getPortalDefaultPaymentNode</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -86,9 +86,9 @@ for site in site_list:\n ...@@ -86,9 +86,9 @@ for site in site_list:\n
counter = "/".join(site_split[:-1])\n counter = "/".join(site_split[:-1])\n
if not site_dict.has_key(counter):\n if not site_dict.has_key(counter):\n
if not \'siege\' in site[1]:\n if not \'siege\' in site[1]:\n
site_dict[counter] = \'/\'.join(site[1].split("/")[:6])\n site_dict[counter] = \'/\'.join(site[1].split("/")[:7])\n
else:\n else:\n
site_dict[counter] = \'/\'.join(site[1].split("/")[:5])\n site_dict[counter] = \'/\'.join(site[1].split("/")[:6])\n
else:\n else:\n
site_dict[site[0]] = site[1]\n site_dict[site[0]] = site[1]\n
\n \n
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
if bank_account in (\'\', None):\n if bank_account in (\'\', None):\n
return []\n return []\n
\n \n
return bank_account.searchFolder()\n return bank_account.searchFolder(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -125,6 +125,7 @@ return bank_account.searchFolder()\n ...@@ -125,6 +125,7 @@ return bank_account.searchFolder()\n
<string>context</string> <string>context</string>
<string>bank_account</string> <string>bank_account</string>
<string>None</string> <string>None</string>
<string>_apply_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -75,7 +75,10 @@ ...@@ -75,7 +75,10 @@
emission_letter_dict = {}\n emission_letter_dict = {}\n
user_site_list = []\n user_site_list = []\n
if site == None :\n if site == None :\n
user_site_list = context.Baobab_getUserAssignedSiteList()\n if user is not None:\n
user_site_list = context.Baobab_getUserAssignedSiteList(user)\n
else:\n
user_site_list = context.Baobab_getUserAssignedSiteList()\n
else :\n else :\n
user_site_list.append(site)\n user_site_list.append(site)\n
\n \n
...@@ -83,6 +86,7 @@ if len(user_site_list) > 0:\n ...@@ -83,6 +86,7 @@ if len(user_site_list) > 0:\n
for a in user_site_list:\n for a in user_site_list:\n
if not a.startswith(\'site\'):\n if not a.startswith(\'site\'):\n
a = \'site/\' + a\n a = \'site/\' + a\n
context.log("a", a)\n
site_codification = context.portal_categories.getCategoryValue(a).getCodification()\n site_codification = context.portal_categories.getCategoryValue(a).getCodification()\n
if site_codification not in (\'\', None):\n if site_codification not in (\'\', None):\n
emission_letter_dict[site_codification[0].lower()] = 1\n emission_letter_dict[site_codification[0].lower()] = 1\n
...@@ -110,7 +114,7 @@ return emission_letter_dict.keys()\n ...@@ -110,7 +114,7 @@ return emission_letter_dict.keys()\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>site = None</string> </value> <value> <string>user=None, site = None</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -130,12 +134,13 @@ return emission_letter_dict.keys()\n ...@@ -130,12 +134,13 @@ return emission_letter_dict.keys()\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>1</int> </value> <value> <int>2</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>user</string>
<string>site</string> <string>site</string>
<string>emission_letter_dict</string> <string>emission_letter_dict</string>
<string>user_site_list</string> <string>user_site_list</string>
...@@ -161,6 +166,7 @@ return emission_letter_dict.keys()\n ...@@ -161,6 +166,7 @@ return emission_letter_dict.keys()\n
<value> <value>
<tuple> <tuple>
<none/> <none/>
<none/>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -83,8 +83,8 @@ requested_dict = {}\n ...@@ -83,8 +83,8 @@ requested_dict = {}\n
\n \n
# test all movement\n # test all movement\n
tmp_list = context.contentValues(filter={\'portal_type\': portal_type})\n tmp_list = context.contentValues(filter={\'portal_type\': portal_type})\n
#context.log(\'tmp_list\', str((tmp_list, portal_type, context)))\n context.log(\'tmp_list\', str((tmp_list, portal_type, context)))\n
#context.log(\'source\',source)\n context.log(\'source\',source)\n
line_list = []\n line_list = []\n
for l in tmp_list :\n for l in tmp_list :\n
# The source can be different for every line (due to getBaobabSource approach)\n # The source can be different for every line (due to getBaobabSource approach)\n
...@@ -96,7 +96,7 @@ for l in tmp_list :\n ...@@ -96,7 +96,7 @@ for l in tmp_list :\n
line_list.append(l)\n line_list.append(l)\n
except (AttributeError, KeyError):\n except (AttributeError, KeyError):\n
pass\n pass\n
#context.log("line list", line_list)\n context.log("line list", line_list)\n
if len(line_list) == 0 :\n if len(line_list) == 0 :\n
# no resource\n # no resource\n
return 2\n return 2\n
...@@ -186,6 +186,7 @@ return 0\n ...@@ -186,6 +186,7 @@ return 0\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>tmp_list</string> <string>tmp_list</string>
<string>str</string>
<string>line_list</string> <string>line_list</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>l</string> <string>l</string>
...@@ -197,7 +198,6 @@ return 0\n ...@@ -197,7 +198,6 @@ return 0\n
<string>line_resource</string> <string>line_resource</string>
<string>cell</string> <string>cell</string>
<string>variation_text</string> <string>variation_text</string>
<string>str</string>
<string>inventory_value</string> <string>inventory_value</string>
</tuple> </tuple>
</value> </value>
......
...@@ -120,7 +120,9 @@ if listbox is None:\n ...@@ -120,7 +120,9 @@ if listbox is None:\n
\n \n
\n \n
# If use_inventory is passed, use that value. Otherwise, assume False.\n # If use_inventory is passed, use that value. Otherwise, assume False.\n
use_inventory = cash_detail_dict.get(\'use_inventory\', False)\n # use_inventory = cash_detail_dict.get(\'use_inventory\', False)\n
# assume this is always false as we don\'t need to distinguish this anymore\n
use_inventory = False\n
\n \n
if currency_cash_portal_type is None:\n if currency_cash_portal_type is None:\n
currency_cash_portal_type = (\'Banknote\',\'Coin\')\n currency_cash_portal_type = (\'Banknote\',\'Coin\')\n
...@@ -444,10 +446,10 @@ else :\n ...@@ -444,10 +446,10 @@ else :\n
<string>column_base_category</string> <string>column_base_category</string>
<string>read_only</string> <string>read_only</string>
<string>currency_cash_portal_type</string> <string>currency_cash_portal_type</string>
<string>_getattr_</string>
<string>False</string> <string>False</string>
<string>use_inventory</string> <string>use_inventory</string>
<string>list</string> <string>list</string>
<string>_getattr_</string>
<string>context</string> <string>context</string>
<string>currency</string> <string>currency</string>
<string>result</string> <string>result</string>
......
...@@ -265,7 +265,7 @@ if variation_not_defined:\n ...@@ -265,7 +265,7 @@ if variation_not_defined:\n
else:\n else:\n
request = context.REQUEST\n request = context.REQUEST\n
redirect_url = \'%s/view?%s\' % ( context.absolute_url()\n redirect_url = \'%s/view?%s\' % ( context.absolute_url()\n
, \'portal_status_message=Lines Created\'\n , \'portal_status_message=Lines%%20Created\'\n
)\n )\n
request[ \'RESPONSE\' ].redirect( redirect_url )\n request[ \'RESPONSE\' ].redirect( redirect_url )\n
......
...@@ -346,9 +346,13 @@ ...@@ -346,9 +346,13 @@
<string>Title</string> <string>Title</string>
</tuple> </tuple>
<tuple> <tuple>
<string>default_destination_section_title</string> <string>destination_trade_title</string>
<string>Holder</string> <string>Holder</string>
</tuple> </tuple>
<tuple>
<string>resource_title</string>
<string>Check Type</string>
</tuple>
<tuple> <tuple>
<string>check_amount_title</string> <string>check_amount_title</string>
<string>Check Amount</string> <string>Check Amount</string>
......
...@@ -106,9 +106,8 @@ ...@@ -106,9 +106,8 @@
<value> <value>
<list> <list>
<string>my_title</string> <string>my_title</string>
<string>my_resource</string> <string>my_destination_title</string>
<string>my_destination_payment_reference</string> <string>my_destination_payment_title</string>
<string>my_price_currency</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_destination_payment_reference</string> </value> <value> <string>my_destination_payment_title</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -30,6 +30,18 @@ ...@@ -30,6 +30,18 @@
<key> <string>external_validator_failed</string> </key> <key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value> <value> <string>The input failed the external validator.</string> </value>
</item> </item>
<item>
<key> <string>relation_result_ambiguous</string> </key>
<value> <string>Select appropriate document in the list.</string> </value>
</item>
<item>
<key> <string>relation_result_empty</string> </key>
<value> <string>No such document was found.</string> </value>
</item>
<item>
<key> <string>relation_result_too_long</string> </key>
<value> <string>Too many documents were found.</string> </value>
</item>
<item> <item>
<key> <string>required_not_found</string> </key> <key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value> <value> <string>Input is required but no input given.</string> </value>
...@@ -57,6 +69,10 @@ ...@@ -57,6 +69,10 @@
<key> <string>catalog_index</string> </key> <key> <string>catalog_index</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>columns</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -97,18 +113,38 @@ ...@@ -97,18 +113,38 @@
<key> <string>extra</string> </key> <key> <string>extra</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>first_item</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>items</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>jump_method</string> </key> <key> <string>jump_method</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>list_method</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>max_length</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>parameter_list</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -121,6 +157,14 @@ ...@@ -121,6 +157,14 @@
<key> <string>required</string> </key> <key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>size</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -148,14 +192,6 @@ ...@@ -148,14 +192,6 @@
<key> <string>tales</string> </key> <key> <string>tales</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>allow_creation</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>allow_jump</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>alternate_name</string> </key> <key> <string>alternate_name</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -172,19 +208,13 @@ ...@@ -172,19 +208,13 @@
<key> <string>columns</string> </key> <key> <string>columns</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>container_getter_id</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <value> <string></string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>default_module</string> </key> <key> <string>default_module</string> </key>
...@@ -233,7 +263,7 @@ ...@@ -233,7 +263,7 @@
<item> <item>
<key> <string>items</string> </key> <key> <string>items</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -248,14 +278,6 @@ ...@@ -248,14 +278,6 @@
<key> <string>max_length</string> </key> <key> <string>max_length</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>parameter_list</string> </key> <key> <string>parameter_list</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -309,7 +331,7 @@ ...@@ -309,7 +331,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>allow_creation</string> </key> <key> <string>allow_creation</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>allow_jump</string> </key> <key> <string>allow_jump</string> </key>
...@@ -325,7 +347,7 @@ ...@@ -325,7 +347,7 @@
</item> </item>
<item> <item>
<key> <string>catalog_index</string> </key> <key> <string>catalog_index</string> </key>
<value> <string>reference</string> </value> <value> <string>title</string> </value>
</item> </item>
<item> <item>
<key> <string>columns</string> </key> <key> <string>columns</string> </key>
...@@ -347,7 +369,7 @@ ...@@ -347,7 +369,7 @@
</item> </item>
<item> <item>
<key> <string>default_module</string> </key> <key> <string>default_module</string> </key>
<value> <string>person</string> </value> <value> <string>Accounting</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -444,7 +466,7 @@ ...@@ -444,7 +466,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Bank Account Number</string> </value> <value> <string>Bank Account</string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>truncate</string> </key>
...@@ -469,25 +491,6 @@ ...@@ -469,25 +491,6 @@
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getDestinationPaymentValue().getReference()</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
......
...@@ -105,6 +105,7 @@ ...@@ -105,6 +105,7 @@
<key> <string>left</string> </key> <key> <string>left</string> </key>
<value> <value>
<list> <list>
<string>my_destination</string>
<string>my_resource</string> <string>my_resource</string>
<string>my_variation_category_list</string> <string>my_variation_category_list</string>
</list> </list>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_price_currency</string> </value> <value> <string>my_destination</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Currency</string> </value> <value> <string>Emission Site</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python:here.CurrencyModule_getCurrencyItemList()</string> </value> <value> <string>python:here.Delivery_getVaultItemList(vault_type = \'site\', current_url = None, user_site = 1, leaf_node = 0, strict_membership = 1)</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: [(\'\', \'\')] + [(x.getTitle(), x.getRelativeUrl()) for x in here.checkbook_model_module.objectValues(portal_type=\'Checkbook Model\')]</string> </value> <value> <string>python: [(\'\', \'\')] + [(x.getTitle(), x.getRelativeUrl()) for x in here.checkbook_model_module.objectValues()]</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -100,14 +100,19 @@ if kw.has_key("portal_type"):\n ...@@ -100,14 +100,19 @@ if kw.has_key("portal_type"):\n
\n \n
if at_date is not None:\n if at_date is not None:\n
inventory_kw[\'at_date\'] = at_date\n inventory_kw[\'at_date\'] = at_date\n
\n
\n
if from_date is not None:\n
inventory_kw[\'from_date\'] = from_date\n
\n
vault_inventory_list = context.portal_simulation.getCurrentInventoryList( node_category=vault\n vault_inventory_list = context.portal_simulation.getCurrentInventoryList( node_category=vault\n
, ignore_variation=0\n , ignore_variation=0\n
,**inventory_kw\n ,**inventory_kw\n
)\n )\n
#context.log(\'CounterMOdule_getVaultTransactionList, sql src:\',context.portal_simulation.getCurrentInventoryList( node_category=vault\n # context.log(\'CounterMOdule_getVaultTransactionList, sql src:\',context.portal_simulation.getCurrentInventoryList( node_category=vault\n
# , ignore_variation=0,src__=1\n # , ignore_variation=0,src__=1\n
# ,**inventory_kw\n # ,**inventory_kw\n
# ))\n # ))\n
\n \n
#context.log(\'len(vault_inventory_list:\',len(vault_inventory_list))\n #context.log(\'len(vault_inventory_list:\',len(vault_inventory_list))\n
for vault_inventory in vault_inventory_list:\n for vault_inventory in vault_inventory_list:\n
......
...@@ -68,13 +68,15 @@ ...@@ -68,13 +68,15 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>price = context.CurrencyExchange_getExchangeRateList()[1] * context.getBasePrice()\n <value> <string>price = context.ERP5Banking_getExchangeValue()\n
\n \n
commission_ratio = context.getDiscountRatio()\n commission_ratio = context.getDiscountRatio()\n
commission_price = context.getDiscount()\n commission_price = context.getDiscount()\n
if commission_ratio is not None and commission_ratio !=0 and commission_price is not None and commission_price !=0:\n if commission_ratio is not None and commission_ratio !=0 and commission_price is not None and commission_price !=0:\n
return None\n return None\n
if (commission_ratio is None or commission_ratio == 0) and (commission_price is None or commission_price == 0):\n if commission_ratio == 0 or commission_price == 0:\n
return price\n
if commission_ratio is None and commission_price is None:\n
return None\n return None\n
\n \n
if commission_ratio is not None:\n if commission_ratio is not None:\n
...@@ -132,7 +134,6 @@ return quantity\n ...@@ -132,7 +134,6 @@ return quantity\n
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>_getitem_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>price</string> <string>price</string>
......
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