Commit 999f4047 authored by Aurel's avatar Aurel

clean up the business template

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7098 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 05262c38
......@@ -231,7 +231,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -78,10 +78,12 @@ def getResourceVintageList(banknote=0, coin=0):\n
portal_type_list = ["Banknote", "Coin"]\n
\n
for resource in context.currency_cash_module.objectValues():\n
#context.log("Baobab_getResourcevintageList", "resource.getPriceCurrency() = %s, resource.getPortalType() = %s, portal_type_list = %s" %(resource.getPriceCurrency(),resource.getPortalType(), portal_type_list))\n
if resource.getPriceCurrency() == "currency_module/%s" %(context.Baobab_getPortalReferenceCurrencyID(),) and resource.getPortalType() in portal_type_list:\n
for variation in resource.getVariationList():\n
variation_list[variation] = 1\n
return variation_list.keys().sort()\n
#context.log("variation_list", variation_list)\n
return variation_list.keys()\n
\n
\n
getResourceVintageList = CachingMethod(getResourceVintageList, id=\'Baobab_getResourceVintageList\', cache_duration=360000)\n
......
......@@ -66,8 +66,9 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>resource = context.getResourceValue()\n
if resource is not None: return resource.getBasePrice()\n
<value> <string>for line in context.contentValues(filter={\'portal_type\':portal_type}):\n
if line.getResourceId() == resource_id:\n
return line\n
return None\n
</string> </value>
</item>
......@@ -79,7 +80,7 @@ return None\n
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_skins/erp5_banking_core/Movement_lookupPrice</string> </value>
<value> <string>Script (Python):/baobab/portal_skins/erp5_banking_core/CashDelivery_searchLineByResource</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
......@@ -89,7 +90,7 @@ return None\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
<value> <string>resource_id=None, portal_type</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -109,15 +110,18 @@ return None\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>resource_id</string>
<string>portal_type</string>
<string>_getiter_</string>
<string>_getattr_</string>
<string>context</string>
<string>resource</string>
<string>line</string>
<string>None</string>
</tuple>
</value>
......@@ -130,12 +134,14 @@ return None\n
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Movement_lookupPrice</string> </value>
<value> <string>CashDelivery_searchLineByResource</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
......
......@@ -68,7 +68,7 @@
<key> <string>_body</string> </key>
<value> <string>#if context.getPortalType() == \'Container Line\' :\n
# category_list = ((\'variation\',),)\n
\n
context.log(context.getPath(), base_category)\n
if base_category != None and base_category in context.getVariationBaseCategoryList():\n
variation_list = []\n
for category_item in context.getVariationCategoryItemList():\n
......@@ -78,14 +78,14 @@ if base_category != None and base_category in context.getVariationBaseCategoryLi
title = context.Localizer.erp5_ui.gettext(title)\n
if category.startswith(base_category + \'/\'):\n
variation_list.append((category, title))\n
return variation_list \n
return variation_list\n
\n
base_category_list = ((\'emission_letter\',),(\'variation\',),(\'cash_status\',))\n
variation_category_list = context.getVariationCategoryList() #(\'emission/letter/c\',\'cash_status/valid\',\'variation/2003\')\n
cash_line_list = []\n
for base_category in base_category_list :\n
cash_line_list.append([x for x in context.OrderLine_getMatrixItemList(base_category) if x in variation_category_list])\n
\n
context.log("cash line list", str((cash_line_list, base_category_list, variation_category_list, context.OrderLine_getMatrixItemList(base_category))))\n
return cash_line_list\n
</string> </value>
</item>
......@@ -95,6 +95,12 @@ return cash_line_list\n
<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/CashDetail_asCellRange</string> </value>
......@@ -136,9 +142,9 @@ return cash_line_list\n
<string>base_category</string>
<string>base_id</string>
<string>matrixbox</string>
<string>None</string>
<string>_getattr_</string>
<string>context</string>
<string>None</string>
<string>variation_list</string>
<string>_getiter_</string>
<string>category_item</string>
......@@ -152,6 +158,7 @@ return cash_line_list\n
<string>append</string>
<string>$append0</string>
<string>x</string>
<string>str</string>
</tuple>
</value>
</item>
......@@ -183,4 +190,25 @@ return cash_line_list\n
</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>
......@@ -99,10 +99,6 @@
<list>
<string>listbox_price</string>
<string>listbox_displayed_resource</string>
<string>listbox_resourceId</string>
<string>listbox_cashStatus</string>
<string>listbox_emissionLetter</string>
<string>listbox_resource</string>
<string>listbox_variation</string>
<string>listbox_column1</string>
<string>listbox_column10</string>
......@@ -119,7 +115,11 @@
<string>listbox_column13</string>
<string>listbox_column14</string>
<string>listbox_column15</string>
<string>listbox_numberLineToAdd</string>
<string>listbox_cash_status</string>
<string>listbox_emission_letter</string>
<string>listbox_number_line_to_add</string>
<string>listbox_resource_translated_title</string>
<string>listbox_resource_id</string>
</list>
</value>
</item>
......@@ -127,12 +127,12 @@
<key> <string>left</string> </key>
<value>
<list>
<string>my_emissionLetter_list</string>
<string>my_variation_list</string>
<string>my_cashStatus_list</string>
<string>my_operation_currency</string>
<string>my_line_portalType</string>
<string>my_otherParameter</string>
<string>my_cash_status_list</string>
<string>my_emission_letter_list</string>
<string>my_line_portal_type</string>
<string>my_other_parameter</string>
</list>
</value>
</item>
......@@ -157,7 +157,7 @@
</item>
<item>
<key> <string>name</string> </key>
<value> <string>CashDetail_fastInputForm</string> </value>
<value> <string>CashDelivery_generateCashDetailInputDialog</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
......@@ -181,7 +181,7 @@
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string>CashDetail_fastInputUpdate</string> </value>
<value> <string>CashDelivery_generateCashDetailInputDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox</string> </value>
......
......@@ -12,15 +12,9 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_cashStatus</string> </value>
<value> <string>listbox_cash_status</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -289,7 +283,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:cell.getProperty(\'cashStatus\')</string> </value>
<value> <string>python:cell.getProperty(\'cash_status\')</string> </value>
</item>
</dictionary>
</pickle>
......@@ -308,7 +302,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.CashDetail_getOthersForMatrixInput(myChoice=\'cashStatus_item\')</string> </value>
<value> <string>python:here.CashDetail_getOthersForMatrixInput(my_choice=\'cash_status_item\')</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_column1</string> </value>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_column10</string> </value>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_column11</string> </value>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_column12</string> </value>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_column13</string> </value>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_column14</string> </value>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_column15</string> </value>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_column2</string> </value>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_column3</string> </value>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_column4</string> </value>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_column5</string> </value>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_column6</string> </value>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_column7</string> </value>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_column8</string> </value>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_column9</string> </value>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_displayed_resource</string> </value>
......@@ -285,7 +279,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.getProperty(\'resource\')</string> </value>
<value> <string>python: cell.getProperty(\'resource_translated_title\')</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -12,15 +12,9 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_emissionLetter</string> </value>
<value> <string>listbox_emission_letter</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -289,7 +283,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:cell.getProperty(\'emissionLetter\')</string> </value>
<value> <string>python:cell.getProperty(\'emission_letter\')</string> </value>
</item>
</dictionary>
</pickle>
......@@ -308,7 +302,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.CashDetail_getOthersForMatrixInput(myChoice=\'emissionLetter_item\')</string> </value>
<value> <string>python:here.CashDetail_getOthersForMatrixInput(my_choice=\'emission_letter_item\')</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -12,15 +12,9 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_numberLineToAdd</string> </value>
<value> <string>listbox_number_line_to_add</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_price</string> </value>
......
......@@ -12,15 +12,9 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_resourceId</string> </value>
<value> <string>listbox_resource_id</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -217,7 +211,7 @@
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
......
......@@ -12,15 +12,9 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_resource</string> </value>
<value> <string>listbox_resource_translated_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -217,7 +211,7 @@
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_variation</string> </value>
......@@ -308,7 +302,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.CashDetail_getOthersForMatrixInput(myChoice=\'variation_item\')</string> </value>
<value> <string>python:here.CashDetail_getOthersForMatrixInput(my_choice=\'variation_item\')</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_calculated_price</string> </value>
......
......@@ -12,15 +12,9 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_cashStatus_list</string> </value>
<value> <string>my_cash_status_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -12,15 +12,9 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_emissionLetter_list</string> </value>
<value> <string>my_emission_letter_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -12,15 +12,9 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_line_portalType</string> </value>
<value> <string>my_line_portal_type</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -12,12 +12,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_operation_currency</string> </value>
......
......@@ -12,15 +12,9 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_otherParameter</string> </value>
<value> <string>my_other_parameter</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -12,12 +12,6 @@
</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>
......
......@@ -71,21 +71,21 @@
cell_base_id = \'movement\'\n
\n
variation_list = kw[\'variation_list\']\n
emissionLetter_list = kw[\'emissionLetter_list\']\n
cashStatus_list = kw[\'cashStatus_list\']\n
emissionLetter_list = kw[\'emission_letter_list\']\n
cashStatus_list = kw[\'cash_status_list\']\n
operationCurrency = kw[\'operation_currency\']\n
line_portal_type = kw[\'line_portalType\']\n
line_portal_type = kw[\'line_portal_type\']\n
\n
otherParameter_list = kw[\'otherParameter\']\n
otherParameter_list = kw[\'other_parameter\']\n
operationCurrency = otherParameter_list[0]\n
line_portal_type = otherParameter_list[1]\n
updatePossible = otherParameter_list[2]\n
columnBase = otherParameter_list[3]\n
useInventory = int(otherParameter_list[4])\n
useInventory = otherParameter_list[4]\n
\n
if columnBase == \'emissionLetter\':\n
if columnBase == \'emission_letter\':\n
numberOfColumn = len(emissionLetter_list)\n
elif columnBase == \'cashStatus\':\n
elif columnBase == \'cash_status\':\n
numberOfColumn = len(cashStatus_list)\n
else:\n
numberOfColumn = len(variation_list)\n
......@@ -129,12 +129,12 @@ for i_listbox in range(0,listbox_line_count_plus_1) : # Element of ListBox\n
else:\n
listbox_line = listbox[i_listbox]\n
\n
if last_row or (previous_resourceId is None) or not (previous_resourceId == listbox_line[\'resourceId\']):\n
if last_row or (previous_resourceId is None) or not (previous_resourceId == listbox_line[\'resource_id\']):\n
\n
if create_line :\n
counter_line += 1\n
# context.log(\'create new line\', line_category_list)\n
new_line = context.newContent(portal_type=line_portal_type) # New line creation \n
new_line = context.newContent(portal_type=line_portal_type) # New line creation\n
new_line.setResourceValue(resource_object) # Set line resource by object found\n
new_line.setVariationBaseCategoryList(base_list)\n
new_line.setVariationCategoryList(line_category_list)\n
......@@ -158,7 +158,7 @@ for i_listbox in range(0,listbox_line_count_plus_1) : # Element of ListBox\n
,membership_criterion_category_list = variante_list\n
,category_list = variante_list\n
)\n
\n
\n
if useInventory == 1:\n
oldQuantity = cell.getProperty(\'inventory\') or 0\n
cell.edit( inventory = cell_category[\'quantity\'] + oldQuantity\n
......@@ -178,18 +178,18 @@ for i_listbox in range(0,listbox_line_count_plus_1) : # Element of ListBox\n
line_category_list = []\n
cell_category_list = []\n
\n
old_line = context.CashDetail_search_lineByResource(listbox_line[\'resourceId\'],line_portal_type) # Search if current object contain line with the gived portal type\n
old_line = context.CashDetail_search_lineByResource(listbox_line[\'resource_id\'],line_portal_type) # Search if current object contain line with the gived portal type\n
if old_line is not None: # Line found, delete it\n
context.manage_delObjects(old_line.getId())\n
\n
\n
previous_resourceId = listbox_line[\'resourceId\']\n
resource_list = context.portal_catalog(portal_type = (\'Banknote\',\'Coin\'),id = listbox_line[\'resourceId\'])\n
previous_resourceId = listbox_line[\'resource_id\']\n
resource_list = context.portal_catalog(portal_type = (\'Banknote\',\'Coin\'),id = listbox_line[\'resource_id\'])\n
resource_object = resource_list[0].getObject()\n
\n
if columnBase == \'cashStatus\':\n
if columnBase == \'cash_status\':\n
if len(emissionLetter_list ) > 1 :\n
cell_emissionLetter = \'emission_letter/\' + listbox_line[\'emissionLetter\']\n
cell_emissionLetter = \'emission_letter/\' + listbox_line[\'emission_letter\']\n
else :\n
cell_emissionLetter = \'emission_letter/\' + emissionLetter_list[0]\n
if len(variation_list ) > 1 :\n
......@@ -199,9 +199,9 @@ for i_listbox in range(0,listbox_line_count_plus_1) : # Element of ListBox\n
axis_list_dict = {\'column\':cashStatus_list,\'line1\': emissionLetter_list ,\'line2\': variation_list}\n
axis_dict = {\'column\':\'cash_status\',\'line1\': \'emission_letter\' ,\'line2\': \'variation\'}\n
base_line_category_list = (cell_variation,cell_emissionLetter)\n
elif columnBase == \'emissionLetter\':\n
elif columnBase == \'emission_letter\':\n
if len(cashStatus_list ) > 1 :\n
cell_cashStatus = \'cash_status/\'+listbox_line[\'cashStatus\']\n
cell_cashStatus = \'cash_status/\'+listbox_line[\'cash_status\']\n
else :\n
cell_cashStatus = \'cash_status/\'+cashStatus_list[0]\n
if len(variation_list ) > 1 :\n
......@@ -213,11 +213,11 @@ for i_listbox in range(0,listbox_line_count_plus_1) : # Element of ListBox\n
base_line_category_list = (cell_variation,cell_cashStatus)\n
else:\n
if len(emissionLetter_list ) > 1 :\n
cell_emissionLetter = \'emission_letter/\' +listbox_line[\'emissionLetter\']\n
cell_emissionLetter = \'emission_letter/\' +listbox_line[\'emission_letter\']\n
else :\n
cell_emissionLetter = \'emission_letter/\' +emissionLetter_list[0]\n
if len(cashStatus_list ) > 1 :\n
cell_cashStatus = \'cash_status/\'+listbox_line[\'cashStatus\']\n
cell_cashStatus = \'cash_status/\'+listbox_line[\'cash_status\']\n
else :\n
cell_cashStatus = \'cash_status/\'+cashStatus_list[0]\n
axis_list_dict = {\'column\':variation_list,\'line1\': emissionLetter_list ,\'line2\': cashStatus_list}\n
......@@ -229,16 +229,16 @@ for i_listbox in range(0,listbox_line_count_plus_1) : # Element of ListBox\n
counter += 1\n
cell_quantity = int(listbox_line[\'column\'+str(counter)] or 0)\n
if cell_quantity <> 0 : # input quantity in the listbox\n
if columnBase == \'cashStatus\':\n
if columnBase == \'cash_status\':\n
cell_cashStatus = \'cash_status/\'+col\n
elif columnBase == \'emissionLetter\':\n
elif columnBase == \'emission_letter\':\n
cell_emissionLetter = \'emission_letter/\' +col\n
else:\n
cell_variation = \'variation/\'+col\n
# check that the variation selected exist for the resource object\n
if col != \'not_defined\' and col not in resource_object.getVariationList():\n
raise "Input Error", "%s doesn\'t exist for %s" %(resource_object.getTitle(), col)\n
\n
\n
cell_category_list += [{\'emission_letter\':cell_emissionLetter ,\'variation\':cell_variation, \'cash_status\':cell_cashStatus, \'quantity\':cell_quantity}]\n
\n
create_line = True\n
......@@ -290,7 +290,9 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple/>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
......@@ -329,7 +331,6 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
<string>otherParameter_list</string>
<string>updatePossible</string>
<string>columnBase</string>
<string>int</string>
<string>useInventory</string>
<string>len</string>
<string>numberOfColumn</string>
......@@ -380,6 +381,7 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
<string>categoy_list_created</string>
<string>counter</string>
<string>col</string>
<string>int</string>
<string>str</string>
<string>cell_quantity</string>
<string>base_line_category</string>
......
......@@ -68,42 +68,42 @@
<key> <string>_body</string> </key>
<value> <string>request = context.REQUEST\n
return_value = None\n
if myChoice == \'emissionLetter_item\':\n
my_list = getattr(request,\'my_emissionLetter_list\',None) # Find Emission letter on the REQUEST\n
if my_list is None: \n
my_list = getattr(request,\'field_my_emissionLetter_list\',None) # Find Emission letter on the REQUEST\n
if my_choice == \'emission_letter_item\':\n
my_list = getattr(request,\'my_emission_letter_list\',None) # Find Emission letter on the REQUEST\n
if my_list is None:\n
my_list = getattr(request,\'field_my_emission_letter_list\',None) # Find Emission letter on the REQUEST\n
\n
if my_list is not None: \n
if my_list is not None:\n
return_value = [x for x in context.portal_categories.emission_letter.getCategoryChildTitleItemList()\n
if x[1] in my_list ]\n
else: \n
else:\n
return_value = [x for x in context.portal_categories.emission_letter.getCategoryChildTitleItemList()]\n
elif myChoice == \'emissionLetter_defaultValue\':\n
return_value = getattr(request,\'my_emissionLetter_list\',None) # Find Emission letter on the REQUEST\n
elif my_choice == \'emission_letter_default_value\':\n
return_value = getattr(request,\'my_emission_letter_list\',None) # Find Emission letter on the REQUEST\n
return_value = return_value[1]\n
elif myChoice == \'cashStatus_item\':\n
my_list = getattr(request,\'my_cashStatus_list\',None) # Find cash Status on the REQUEST\n
if my_list is None: \n
my_list = getattr(request,\'field_my_cashStatus_list\',None) # Find Emission letter on the REQUEST\n
if my_list is not None: \n
elif my_choice == \'cash_status_item\':\n
my_list = getattr(request,\'my_cash_status_list\',None) # Find cash Status on the REQUEST\n
if my_list is None:\n
my_list = getattr(request,\'field_my_cash_status_list\',None) # Find Emission letter on the REQUEST\n
if my_list is not None:\n
return_value = [x for x in context.portal_categories.cash_status.getCategoryChildTitleItemList()\n
if x[1] in my_list]\n
else:\n
return_value = [x for x in context.portal_categories.cash_status.getCategoryChildTitleItemList()]\n
elif myChoice == \'cashStatus_defaultValue\':\n
return_value = getattr(request,\'my_cashStatus_list\',None) # Find cash Status on the REQUEST\n
elif my_choice == \'cash_status_default_value\':\n
return_value = getattr(request,\'my_cash_status_list\',None) # Find cash Status on the REQUEST\n
return_value = return_value[1]\n
\n
elif myChoice == \'variation_item\':\n
elif my_choice == \'variation_item\':\n
my_list = getattr(request,\'my_variation_list\',None) # Find variation on the REQUEST\n
if my_list is None: \n
if my_list is None:\n
my_list = getattr(request,\'field_my_variation_list\',None) # Find variation on the REQUEST\n
if my_list is not None: \n
if my_list is not None:\n
return_value = [x for x in context.portal_categories.variation.getCategoryChildTitleItemList()\n
if x[1] in my_list]\n
else:\n
return_value = [x for x in context.portal_categories.variation.getCategoryChildTitleItemList()]\n
elif myChoice == \'variation_defaultValue\':\n
elif my_choice == \'variation_default_value\':\n
return_value = getattr(request,\'my_variation_list\',None) # Find variation on the REQUEST\n
return_value = return_value[1]\n
\n
......@@ -117,6 +117,12 @@ return return_value\n
<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/CashDetail_getOthersForMatrixInput</string> </value>
......@@ -129,7 +135,7 @@ return return_value\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>myChoice=None, **kw</string> </value>
<value> <string>my_choice=None, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -155,7 +161,7 @@ return return_value\n
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>myChoice</string>
<string>my_choice</string>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
......@@ -198,4 +204,25 @@ return return_value\n
</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>
......@@ -69,70 +69,70 @@
<value> <string encoding="cdata"><![CDATA[
request = context.REQUEST\n
default_emissionLetter_list = getattr(request,\'my_emissionLetter_list\',None) # Find Emission letter on the REQUEST\n
default_cashStatus_list = getattr(request,\'my_cashStatus_list\',None) # Find Cash Status on the REQUEST\n
default_emission_letter_list = getattr(request,\'my_emission_letter_list\',None) # Find Emission letter on the REQUEST\n
default_cash_status_list = getattr(request,\'my_cash_status_list\',None) # Find Cash Status on the REQUEST\n
default_variation_list = getattr(request,\'my_variation_list\',None) # Find Variation on the REQUEST\n
default_otherParameter_list = getattr(request,\'my_otherParameter\',None) # Find Variation on the REQUEST\n
default_other_parameter_list = getattr(request,\'my_other_parameter\',None) # Find Variation on the REQUEST\n
\n
\n
return_list = []\n
return_list.append([\'displayed_resource\',\'Resource\'])\n
\n
\n
if default_emissionLetter_list is None:\n
default_emissionLetter_list = getattr(request,\'field_my_emissionLetter_list\',None) # Find Emission letter on the REQUEST\n
default_cashStatus_list = getattr(request,\'field_my_cashStatus_list\',None) # Find Cash Status on the REQUEST\n
default_variation_list = getattr(request,\'field_my_variation_list\',None) # Find Variation on the REQUEST\n
default_otherParameter_list = getattr(request,\'field_my_otherParameter\',None) # Find Variation on the REQUEST\n
if default_emission_letter_list is None:\n
default_emission_letter_list = getattr(request,\'field_my_emission_letter_list\',[]) # Find Emission letter on the REQUEST\n
default_cash_status_list = getattr(request,\'field_my_cash_status_list\',[]) # Find Cash Status on the REQUEST\n
default_variation_list = getattr(request,\'field_my_variation_list\',[]) # Find Variation on the REQUEST\n
default_other_parameter_list = getattr(request,\'field_my_other_parameter\', []) # Find Variation on the REQUEST\n
\n
if len(default_otherParameter_list) > 2:\n
default_columnBase = default_otherParameter_list[3]\n
\n
if len(default_other_parameter_list) > 2:\n
default_column_base = default_other_parameter_list[3]\n
else :\n
default_columnBase = \'variation\'\n
default_column_base = \'variation\'\n
\n
allow_addLine = False\n
if len(default_emissionLetter_list) > 1 and default_columnBase <> \'emissionLetter\':\n
return_list.append([\'emissionLetter\',\'Emission Letter\'])\n
allow_addLine = True\n
if len(default_cashStatus_list) > 1 and default_columnBase <> \'cashStatus\':\n
return_list.append([\'cashStatus\',\'Cash Status\'])\n
allow_addLine = True\n
if len(default_variation_list) > 1 and default_columnBase <> \'variation\':\n
allow_add_line = False\n
if len(default_emission_letter_list) > 1 and default_column_base <> \'emission_letter\':\n
return_list.append([\'emission_letter\',\'Emission Letter\'])\n
allow_add_line = True\n
if len(default_cash_status_list) > 1 and default_column_base <> \'cash_status\':\n
return_list.append([\'cash_status\',\'Cash Status\'])\n
allow_add_line = True\n
if len(default_variation_list) > 1 and default_column_base <> \'variation\':\n
return_list.append([\'variation\',\'Variation\'])\n
allow_addLine = True\n
allow_add_line = True\n
\n
if allow_addLine:\n
return_list.append([\'numberLineToAdd\',\'numberLineToAdd\'])\n
if allow_add_line:\n
return_list.append([\'number_line_to_add\',\'Lines To Add\'])\n
\n
\n
if default_columnBase == \'cashStatus\':\n
default_columnBase_list = default_cashStatus_list\n
if default_column_base == \'cash_status\':\n
default_column_base_list = default_cash_status_list\n
column_category = \'cash_status\'\n
elif default_columnBase == \'emissionLetter\':\n
default_columnBase_list = default_emissionLetter_list\n
elif default_column_base == \'emission_letter\':\n
default_column_base_list = default_emission_letter_list\n
column_category = \'emission_letter\'\n
else:\n
default_columnBase_list = default_variation_list\n
default_column_base_list = default_variation_list\n
column_category = \'variation\'\n
\n
\n
\n
if len(default_columnBase_list) > 0 :\n
columnBase_list = [x for x in context.portal_categories[column_category].getCategoryChildTitleItemList()[1:]\n
if x[1] in default_columnBase_list]\n
if len(default_column_base_list) > 0 :\n
column_base_list = [x for x in context.portal_categories[column_category].getCategoryChildTitleItemList()[1:]\n
if x[1] in default_column_base_list]\n
else:\n
columnBase_list = context.portal_categories[column_category].getCategoryChildTitleItemList()[1:]\n
column_base_list = context.portal_categories[column_category].getCategoryChildTitleItemList()[1:]\n
\n
\n
\n
counter = 1\n
for x in columnBase_list:\n
for x in column_base_list:\n
return_list.append([\'column\'+str(counter),x[0]])\n
counter += 1\n
return_list.append([\'price\',\'Price\'])\n
return_list.append([\'resource\',\'\'])\n
return_list.append([\'resourceId\',\'\'])\n
#context.log(\'CashDetail_getVariationForMatrixInput\', return_list)\n
return_list.append([\'resource_translated_title\',\'\'])\n
return_list.append([\'resource_id\',\'\'])\n
return return_list\n
......@@ -194,24 +194,24 @@ return return_list\n
<string>request</string>
<string>getattr</string>
<string>None</string>
<string>default_emissionLetter_list</string>
<string>default_cashStatus_list</string>
<string>default_emission_letter_list</string>
<string>default_cash_status_list</string>
<string>default_variation_list</string>
<string>default_otherParameter_list</string>
<string>default_other_parameter_list</string>
<string>return_list</string>
<string>len</string>
<string>_getitem_</string>
<string>default_columnBase</string>
<string>default_column_base</string>
<string>False</string>
<string>allow_addLine</string>
<string>allow_add_line</string>
<string>True</string>
<string>default_columnBase_list</string>
<string>default_column_base_list</string>
<string>column_category</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>x</string>
<string>columnBase_list</string>
<string>column_base_list</string>
<string>counter</string>
<string>str</string>
</tuple>
......
......@@ -231,7 +231,7 @@
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -148,7 +148,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Caisse en bois</string> </value>
<value> <string>Cash Container Line</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
......
......@@ -158,7 +158,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Enregister</string> </value>
<value> <string>Save</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
......
......@@ -153,7 +153,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Caisse en bois</string> </value>
<value> <string>Cash Container</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
......
......@@ -53,7 +53,7 @@
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
<value> <string>Base_edit</string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
......
......@@ -240,7 +240,7 @@ AND\t\n
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Comment: Exact copy from erp5_trade</string> </value>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
......
<?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.ERP5Form.Report import ReportSection\n
\n
result = []\n
\n
# Use Cases\n
result.append(\n
ReportSection(path=context.getPhysicalPath(), \n
title=\'Use Cases\', \n
form_id=None,\n
level=1,\n
) \n
)\n
\n
use_case = context.use_case\n
\n
for o in use_case.contentValues():\n
result.append(\n
ReportSection(path=o.getPhysicalPath(), \n
title=\'Use Case de %s \' % o.getTitle(), \n
level=2,\n
form_id=\'UseCase_viewUseCaseActors\',\n
) \n
)\n
for a in o.contentValues(filter={\'portal_type\' : \'Use Case Scenario\'}):\n
result.append(\n
ReportSection(path=a.getPhysicalPath(), \n
title=\'Sc\xc3\xa9nario %s\' % a.getTitle(), \n
level=3,\n
form_id=\'UseCaseScenario_view\',\n
) \n
)\n
\n
# Analyse documentaire\n
result.append(\n
ReportSection(path=context.getPhysicalPath(), \n
title=\'Analyse documentaire: Documents\', \n
form_id=None,\n
level=1,\n
) \n
)\n
\n
document_analysis = context.document_analysis[\'1\']\n
\n
for o in document_analysis.contentValues(filter={\'portal_type\' : \'Document Analysis Document\'}):\n
result.append(\n
ReportSection(path=o.getPhysicalPath(), \n
title=\'Structure documentaire de %s \' % o.getTitle(), \n
level=2,\n
form_id=\'DocumentAnalysisDocument_viewItems\',\n
) \n
)\n
\n
\n
\n
# Analyse documentaire\n
result.append(\n
ReportSection(path=context.getPhysicalPath(), \n
title=\'Analyse documentaire: Lexiques\', \n
form_id=None,\n
level=1,\n
) \n
)\n
\n
document_analysis = context.document_analysis[\'1\']\n
\n
for o in document_analysis.contentValues(filter={\'portal_type\' : \'Document Analysis Lexicon\'}):\n
result.append(\n
ReportSection(path=o.getPhysicalPath(), \n
title=\'Lexique de %s \' % o.getTitle(), \n
level=2,\n
form_id=\'DocumentAnalysisLexicon_view\',\n
) \n
)\n
\n
\n
return result\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/Document_getReportSectionList</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.ERP5Form.Report</string>
<string>ReportSection</string>
<string>result</string>
<string>_getattr_</string>
<string>context</string>
<string>None</string>
<string>use_case</string>
<string>_getiter_</string>
<string>o</string>
<string>a</string>
<string>_getitem_</string>
<string>document_analysis</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>Document_getReportSectionList</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Move this to erp5_consulting ?</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.Report</string>
<string>ERP5Report</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></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>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>Default</string> </key>
<value>
<list>
<string>my_title</string>
<string>my_date</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Document_viewBookReport</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Document_viewBookReport</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>report_view</string> </value>
</item>
<item>
<key> <string>report_method</string> </key>
<value> <string>Document_getReportSectionList</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>Rapport d\'Analyse (Move this to erp5_consulting ?)</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>
......@@ -120,7 +120,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Import CSV file - Move to erp5_core ?</string> </value>
<value> <string>Import CSV File</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
......
......@@ -456,7 +456,7 @@ return printed\n
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Move to erp5_core ?</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
......
<?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[
output_string = str(value)\n
int_string = output_string\n
end_string = \'\'\n
\n
if output_string.find(\'.\')>=0:\n
int_string = output_string.split(\'.\')[0]\n
end_string = \'.\' + output_string.split(\'.\')[1]\n
\n
int_len = len(int_string)\n
output_string = int_string\n
if int_len>3:\n
output_string = \'\'\n
i = int_len % 3 or 3\n
output_string = int_string[0:i]\n
while i <= int_len-3:\n
output_string += sep + int_string[i:i+3]\n
i+= 3\n
\n
output_string = output_string + end_string\n
return output_string\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_banking_core/Integer_toString</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>value,sep=\' \'</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>value</string>
<string>sep</string>
<string>str</string>
<string>output_string</string>
<string>int_string</string>
<string>end_string</string>
<string>_getattr_</string>
<string>_getitem_</string>
<string>len</string>
<string>int_len</string>
<string>i</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<string> </string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Integer_toString</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[
# list of all variation in the portal category\n
catalog_variation_list = context.portal_categories.variation.getCategoryChildTitleItemList()[1:] \n
\n
# List of elements on the input listbox\n
for x in listbox :\n
resource_list = context.portal_catalog(portal_type = (\'Banknote\',\'Coin\'),id = x[\'Id_resource\'])\n
resourceVariation_list = resource_list[0].getObject().getVariationIdList()\n
counter = 1\n
for y in catalog_variation_list:\n
if int(x[\'variation\'+str(counter)] or 0) <> 0 : \n
if y[1] not in resourceVariation_list :\n
return 0 \n
counter += 1 \n
return 1\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/VariationList_ok</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>listbox=None, **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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>listbox</string>
<string>kw</string>
<string>_getitem_</string>
<string>_getattr_</string>
<string>context</string>
<string>catalog_variation_list</string>
<string>_getiter_</string>
<string>x</string>
<string>resource_list</string>
<string>resourceVariation_list</string>
<string>counter</string>
<string>y</string>
<string>int</string>
<string>str</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>VariationList_ok</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>variation_list = context.portal_categories.variation.getCategoryChildTitleItemList()[1:]\n
return_list = [[\'displayed_resource\',\'Coupure\']]\n
counter = 1\n
for x in variation_list:\n
return_list.append([\'variation\'+str(counter),x[0]])\n
# x[counter-1][1]\n
counter += 1\n
return_list.append([\'price\',\'Montant\'])\n
return_list.append([\'resource\',\'\'])\n
return_list.append([\'Id_resource\',\'\'])\n
return return_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/getVariationForMatrixInput</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>_getitem_</string>
<string>_getattr_</string>
<string>context</string>
<string>variation_list</string>
<string>return_list</string>
<string>counter</string>
<string>_getiter_</string>
<string>x</string>
<string>str</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>getVariationForMatrixInput</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>sourceline_list = [x for x in context.contentValues(filter={\'portal_type\':(\'Check Payment Line\',\'Money Deposit Line\')})\n
if x.getResourceValue().getTitle() == resourceTitle]\n
\n
if len(sourceline_list) == 0 :\n
return None\n
else:\n
return sourceline_list[0]\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/searchLineByResource</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>resourceTitle=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>resourceTitle</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>_getattr_</string>
<string>context</string>
<string>x</string>
<string>sourceline_list</string>
<string>len</string>
<string>None</string>
<string>_getitem_</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>searchLineByResource</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2006-05-5 aurel
* clean up the skins
2006-04-13 aurel
* include bank_account
......
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