Commit 2c8d9f1d authored by Sebastien Robin's avatar Sebastien Robin

few changes:

improvement of  BankAccount_getReportInformationList
improvement of CounterModule_getVaultTransactionList
improvement of Delivery_getVaultItemList
Also the xml format has changed a bit

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14550 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 706a488a
<base_category_list>
<portal_type id="Banking Operation Line">
<item>aggregate_resource</item>
</portal_type>
<portal_type id="Cash Delivery Cell">
<item>variation</item>
</portal_type>
......@@ -12,6 +15,9 @@
<item>resource</item>
<item>check_amount</item>
</portal_type>
<portal_type id="Checkbook Model">
<item>composition</item>
</portal_type>
<portal_type id="Counter Date">
<item>site</item>
</portal_type>
......
......@@ -97,6 +97,10 @@
<key> <string>init_script</string> </key>
<value> <string>CheckModel_init</string> </value>
</item>
<item>
<key> <string>permission</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>property_sheet_list</string> </key>
<value>
......
......@@ -103,6 +103,10 @@
<key> <string>init_script</string> </key>
<value> <string>CheckOperationLine_init</string> </value>
</item>
<item>
<key> <string>permission</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>property_sheet_list</string> </key>
<value>
......
......@@ -97,6 +97,10 @@
<key> <string>init_script</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>permission</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>property_sheet_list</string> </key>
<value>
......
......@@ -97,6 +97,10 @@
<key> <string>init_script</string> </key>
<value> <string>CheckbookModel_init</string> </value>
</item>
<item>
<key> <string>permission</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>property_sheet_list</string> </key>
<value>
......
......@@ -33,6 +33,25 @@
<none/>
</value>
</item>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_roles</string> </key>
<value>
......@@ -108,4 +127,44 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_content</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_content</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -75,9 +75,9 @@ if reference is None:\n
message = Message(domain="ui", message="Please give a reference")\n
raise ValueError, message\n
\n
account_list = catalog(reference=reference, portal_type=portal_type, validation_state=\'valid\')\n
account_list = catalog(string_index=reference, portal_type=portal_type, validation_state=\'valid\')\n
if len(account_list) == 0:\n
account_list = catalog(reference="%%%s%%" % reference, portal_type=portal_type)\n
account_list = catalog(string_index="%%%s%%" % reference, portal_type=portal_type, validation_state=\'valid\')\n
if len(account_list) == 0:\n
message = Message(domain="ui", message="No bank account have this reference")\n
raise ValueError, message\n
......@@ -93,6 +93,7 @@ if total_price:\n
new_list.append(account.asContext(**tmp_dict))\n
account_list = new_list\n
\n
# context.log("final account list",account_list)\n
return account_list\n
</string> </value>
</item>
......@@ -118,6 +119,14 @@ return account_list\n
<key> <string>_params</string> </key>
<value> <string>reference=None, total_price=0</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>
......
......@@ -93,8 +93,14 @@ inv_account_dict = {}\n
for account_uid in account_uids:\n
acc_dict = inv_account_dict[account_uid] = {}\n
account = account_dict[account_uid]\n
# context.log(\'account\',account)\n
acc_dict[\'account_reference\'] = account.getReference()\n
acc_dict[\'account_owner\'] = account.getParentValue().getTitle()\n
acc_dict[\'internal_bank_account_number\'] = account.getInternalBankAccountNumber()\n
parent_value = account.getParentValue()\n
acc_dict[\'account_owner\'] = parent_value.getTitle()\n
acc_dict[\'activity\'] = None\n
if parent_value.getPortalType() == \'Organisation\':\n
acc_dict[\'activity\'] = parent_value.getActivity()\n
acc_dict[\'currency_title\'] = account.getPriceCurrencyTitle()\n
acc_dict[\'transaction_list\'] = []\n
\n
......@@ -166,7 +172,7 @@ if transaction_list:\n
if description is None:\n
description = \'\'\n
tmp_dict[\'description\'] = description\n
tmp_dict[\'start_date\'] = delivery.getStartDate()\n
tmp_dict[\'start_date\'] = inventory.date\n
tmp_dict[\'module_title\'] = delivery.getParentValue().getTranslatedTitle()\n
\n
# Common to bank account\n
......@@ -211,6 +217,14 @@ return inv_account_dict.values()\n
<key> <string>_params</string> </key>
<value> <string>from_date=None, at_date=None, reference=None, current_inventory=0, available_inventory=0, future_inventory=0, transaction_list=0</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>
......@@ -259,6 +273,7 @@ return inv_account_dict.values()\n
<string>inv_account_dict</string>
<string>account_uid</string>
<string>acc_dict</string>
<string>parent_value</string>
<string>_apply_</string>
<string>current_available_inventory_list</string>
<string>inv</string>
......
......@@ -95,7 +95,9 @@ return context.getPortalObject().getProperty(\'reference_currency_id\')\n
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple/>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</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># Rerturns the emission letter corresponding to a particular site\n
from Products.ERP5Type.Cache import CachingMethod\n
\n
def getSiteEmissionLetter(site=None):\n
portal = context.getPortalObject()\n
site_object = portal.portal_categories.restrictedTraverse(site)\n
return site_object.getCodification()[0].lower()\n
\n
getSiteEmissionLetter = CachingMethod(getSiteEmissionLetter,\n
id = \'Baobab_getSiteEmissionLetter\',\n
cache_factory = \'erp5_ui_long\')\n
\n
return getSiteEmissionLetter(site=site)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>site=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>site</string>
<string>Products.ERP5Type.Cache</string>
<string>CachingMethod</string>
<string>None</string>
<string>getSiteEmissionLetter</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_getSiteEmissionLetter</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -210,7 +210,7 @@
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
......
......@@ -365,9 +365,7 @@
</item>
<item>
<key> <string>count_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
......@@ -436,7 +434,7 @@
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
......@@ -522,22 +520,6 @@
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>countFolder</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
......
......@@ -553,7 +553,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getSourcePaymentInternalBankAccountNumber()</string> </value>
<value> <string>python: here.getSourcePaymentValue().getInternalBankAccountNumber()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -353,9 +353,7 @@
</item>
<item>
<key> <string>count_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
......@@ -436,7 +434,7 @@
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
......@@ -445,6 +443,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
......@@ -528,30 +530,8 @@
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.MethodField</string>
<string>Method</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>countFolder</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.MethodField</string>
<string>Method</string>
</tuple>
<none/>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......
......@@ -365,9 +365,7 @@
</item>
<item>
<key> <string>count_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
......@@ -436,7 +434,7 @@
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
......@@ -522,22 +520,6 @@
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>countFolder</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
......
......@@ -357,9 +357,7 @@
</item>
<item>
<key> <string>count_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
......@@ -428,7 +426,7 @@
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
......@@ -437,6 +435,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
......@@ -517,30 +519,8 @@
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.MethodField</string>
<string>Method</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>countFolder</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.MethodField</string>
<string>Method</string>
</tuple>
<none/>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......
......@@ -357,9 +357,7 @@
</item>
<item>
<key> <string>count_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
......@@ -433,7 +431,7 @@
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
......@@ -533,22 +531,6 @@
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>countFolder</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
......
......@@ -88,12 +88,19 @@ resource_dict = {}\n
vault_dict = {}\n
vault_inventory_dict = {}\n
\n
portal = context.getPortalObject()\n
\n
vault_url = vault\n
vault_dict[vault_url] = 1\n
total_inventory_list = []\n
\n
vault_inventory_dict[vault_url] = {}\n
vault_url_list = vault\n
if same_type(vault, \'a\'):\n
vault_url_list = [vault]\n
\n
for vault_url in vault_url_list:\n
vault_dict[vault_url] = 1\n
vault_inventory_dict[vault_url] = {}\n
\n
\n
total_inventory_list = []\n
inventory_kw = {}\n
#context.log(\'CounterModule_getVaultTransactionList, vault_report_type\',vault_report_type)\n
if vault_report_type is None or vault_report_type==\'inventory\':\n
......@@ -145,25 +152,39 @@ if column_names == 1:\n
\n
#context.log(\'node_category\',vault)\n
#context.log(\'inventory_kw\',inventory_kw)\n
vault_inventory_list = context.portal_simulation.getCurrentInventoryList( node=vault\n
vault_inventory_list = context.portal_simulation.getCurrentInventoryList( node=vault_url_list\n
, ignore_variation=0\n
,**inventory_kw\n
)\n
#context.log(\'CounterMOdule_getVaultTransactionList, sql src:\',context.portal_simulation.getCurrentInventoryList( node=vault\n
# , ignore_variation=0,src__=1\n
# ,**inventory_kw\n
# ))\n
context.log(\'CounterMOdule_getVaultTransactionList, sql src:\',context.portal_simulation.getCurrentInventoryList( node=vault_url_list\n
, ignore_variation=0,src__=1\n
,**inventory_kw\n
))\n
\n
if summarise:\n
total_quantity = 0\n
total_price = 0\n
for vault_inventory in vault_inventory_list:\n
if only_positive:\n
total_quantity += abs(vault_inventory.total_quantity)\n
total_price += abs(vault_inventory.total_price)\n
else:\n
total_quantity += vault_inventory.total_quantity\n
total_price += vault_inventory.total_price\n
return [newTempBase(context, "summary", total_quantity=total_quantity, total_price=total_price), ]\n
\n
#context.log(\'len(vault_inventory_list:\',len(vault_inventory_list))\n
for vault_inventory in vault_inventory_list:\n
node_relative_url = vault_inventory.node_relative_url\n
if vault_inventory.total_quantity in (0.0,0,None):\n
continue\n
#context.log(\'vault_inventory total_quantity\',vault_inventory.total_quantity)\n
#context.log(\'vault_inventory total_price\',vault_inventory.total_price)\n
resource = (vault_inventory.resource_uid, vault_inventory.variation_text or \'\')\n
resource = (vault_inventory.resource_relative_url, vault_inventory.variation_text or \'\')\n
if vault_report_type==\'history\':\n
resource = (vault_inventory.resource_uid, vault_inventory.variation_text or \'\',vault_inventory.stock_uid)\n
if not vault_inventory_dict[vault_url].has_key(resource):\n
#resource = (vault_inventory.resource_relative_url, vault_inventory.variation_text or \'\',vault_inventory.stock_uid)\n
resource = (vault_inventory.resource_relative_url, vault_inventory.variation_text or \'\',vault_inventory.path)\n
if not vault_inventory_dict[node_relative_url].has_key(resource):\n
total_quantity = vault_inventory.total_quantity\n
if total_quantity is None:\n
total_quantity = 0\n
......@@ -175,7 +196,7 @@ for vault_inventory in vault_inventory_list:\n
total_quantity = abs(total_quantity)\n
# context.log(\'type\',type(total_price))\n
# context.log(\'sql total_price\',total_price)\n
vault_inventory_dict[vault_url][resource] = {\'quantity\':total_quantity, \'total_price\':total_price,\n
vault_inventory_dict[node_relative_url][resource] = {\'quantity\':total_quantity, \'total_price\':total_price,\n
\'date\':vault_inventory.date}\n
\n
resource_dict[resource] = 1\n
......@@ -189,7 +210,7 @@ i = 0\n
#for resource in context.Baobab_sortResourceTitleList(resource_dict.keys()):\n
for resource in resource_dict.keys():\n
variation_text = resource[1]\n
tmp_dict = {\'resource_uid\':resource[0], \'variation_text\':variation_text}\n
tmp_dict = {\'resource_relative_url\':resource[0], \'variation_text\':variation_text}\n
for variation in variation_text.split(\'\\n\'):\n
if variation.startswith(\'cash_status\'):\n
tmp_dict[\'cash_status\'] = variation\n
......@@ -198,23 +219,31 @@ for resource in resource_dict.keys():\n
elif variation.startswith(\'emission_letter\'):\n
tmp_dict[\'emission_letter\'] = variation\n
tmp_dict[\'emission_letter_title\'] = getTitleFromCategoryUrl(variation)\n
tmp_dict[\'emission_letter_translated_title\'] = getTranslatedTitleFromCategoryUrl(variation)\n
elif variation.startswith(\'variation\'):\n
tmp_dict[\'variation\'] = variation\n
tmp_dict[\'variation_title\'] = getTitleFromCategoryUrl(variation)\n
tmp_dict[\'variation_translated_title\'] = getTranslatedTitleFromCategoryUrl(variation)\n
tmp_dict[\'variation_text_title\'] = \' \'.join(getVariationTitleList(resource[1]))\n
#resource = (vault_inventory.resource_uid, tuple(getVariationTitleList(vault_inventory.variation_text or \'\')))\n
resource_value = context.portal_catalog.getObject(resource[0])\n
#resource_value = context.portal_catalog.getObject(resource[0])\n
resource_value = portal.restrictedTraverse(resource[0])\n
current_resource_portal_type = resource_value.getPortalType()\n
if current_resource_portal_type not in resource_portal_type:\n
continue\n
if len(resource)==3: # case of history\n
context.log(\'movement uid before error\',resource[2])\n
movement = context.portal_catalog.getObject(resource[2])\n
#movement = context.portal_catalog.getObject(resource[2])\n
movement = portal.restrictedTraverse(resource[2])\n
#context.log(\'movement\',movement)\n
explanation_value = movement\n
if getattr(movement,\'getExplanationValue\',None) is not None:\n
explanation_value = movement.getExplanationValue()\n
tmp_dict[\'explanation_relative_url\'] = explanation_value.getRelativeUrl()\n
source_reference = explanation_value.getSourceReference() or \'\'\n
tmp_dict[\'source_reference\'] = source_reference\n
tmp_dict[\'explanation_translated_relative_url\'] = "%s/%s" % \\\n
(explanation_value.getTranslatedPortalType(),source_reference)\n
tmp_dict[\'base_price\'] = resource_value.getBasePrice()\n
tmp_dict[\'resource_title\'] = resource_value.getTitle()\n
#context.log(\'resource_value\',resource_value.getRelativeUrl())\n
......@@ -230,7 +259,9 @@ for resource in resource_dict.keys():\n
try:\n
resource_in_vault = vault_inventory_dict[vault][resource]\n
except KeyError:\n
resource_in_vault = {\'quantity\' : 0,\'total_price\' : 0}\n
# This resource does not exist for this vault\n
#resource_in_vault = {\'quantity\' : 0,\'total_price\' : 0}\n
continue\n
total_quantity = resource_in_vault[\'quantity\']\n
total_price = resource_in_vault[\'total_price\']\n
if banknote_quantity_divisor is not None:\n
......@@ -277,7 +308,7 @@ return repr([x for x in total_inventory_list])\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>vault=None,at_date=None,from_date=None,vault_report_type=None,column_names=0,resource_portal_type=(\'Banknote\',\'Coin\'), only_positive=0, banknote_quantity_divisor=None,**kw</string> </value>
<value> <string>vault=None,at_date=None,from_date=None,vault_report_type=None,column_names=0,resource_portal_type=(\'Banknote\',\'Coin\'), only_positive=0, banknote_quantity_divisor=None, summarise=False, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -297,7 +328,7 @@ return repr([x for x in total_inventory_list])\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>8</int> </value>
<value> <int>9</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -311,6 +342,7 @@ return repr([x for x in total_inventory_list])\n
<string>resource_portal_type</string>
<string>only_positive</string>
<string>banknote_quantity_divisor</string>
<string>summarise</string>
<string>kw</string>
<string>Products.ERP5Type.Document</string>
<string>newTempBase</string>
......@@ -320,27 +352,32 @@ return repr([x for x in total_inventory_list])\n
<string>resource_dict</string>
<string>vault_dict</string>
<string>vault_inventory_dict</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>vault_url_list</string>
<string>same_type</string>
<string>_getiter_</string>
<string>vault_url</string>
<string>_write_</string>
<string>total_inventory_list</string>
<string>inventory_kw</string>
<string>None</string>
<string>_getattr_</string>
<string>_getitem_</string>
<string>len</string>
<string>kw_has_cash_status</string>
<string>kw_has_emission_letter</string>
<string>variation_text_list</string>
<string>column_list</string>
<string>_getiter_</string>
<string>_apply_</string>
<string>context</string>
<string>vault_inventory_list</string>
<string>vault_inventory</string>
<string>resource</string>
<string>total_quantity</string>
<string>total_price</string>
<string>vault_inventory</string>
<string>_inplacevar_</string>
<string>abs</string>
<string>node_relative_url</string>
<string>resource</string>
<string>i</string>
<string>variation_text</string>
<string>tmp_dict</string>
......@@ -350,11 +387,11 @@ return repr([x for x in total_inventory_list])\n
<string>movement</string>
<string>explanation_value</string>
<string>getattr</string>
<string>source_reference</string>
<string>KeyError</string>
<string>general_total_price</string>
<string>resource_in_vault</string>
<string>round</string>
<string>_inplacevar_</string>
<string>sort_base_price</string>
<string>repr</string>
<string>append</string>
......@@ -383,6 +420,7 @@ return repr([x for x in total_inventory_list])\n
</tuple>
<int>0</int>
<none/>
<int>0</int>
</tuple>
</value>
</item>
......
......@@ -357,9 +357,7 @@
</item>
<item>
<key> <string>count_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
......@@ -445,7 +443,7 @@
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
......@@ -549,22 +547,6 @@
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>countFolder</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
......
......@@ -355,11 +355,11 @@
<string>Cash Status</string>
</tuple>
<tuple>
<string>emission_letter_title</string>
<string>emission_letter_translated_title</string>
<string>Emission Letter</string>
</tuple>
<tuple>
<string>variation_title</string>
<string>variation_translated_title</string>
<string>Variation</string>
</tuple>
<tuple>
......@@ -367,7 +367,7 @@
<string>Date</string>
</tuple>
<tuple>
<string>explanation_relative_url</string>
<string>explanation_translated_relative_url</string>
<string>Explanation</string>
</tuple>
<tuple>
......
......@@ -272,10 +272,14 @@ if user_vault == 1:\n
\n
if current_url != None :\n
if \'site\' not in current_url:\n
current_url = \'site/\'+current_url\n
current_category = context.portal_categories.getCategoryValue(current_url)\n
current_category_relative_url = \'site/\'+current_url\n
if with_base:\n
current_url = current_category_relative_url\n
else:\n
current_category_relative_url = current_url\n
current_category = context.portal_categories.getCategoryValue(current_category_relative_url)\n
if current_category is not None :\n
if current_category.getRelativeUrl() not in [x[1] for x in vault_list] :\n
if current_url not in [x[1] for x in vault_list] :\n
# Get the logical path of the current category\n
logical_path_list = current_category.getLogicalPath().split(\'/\')\n
title = \'/\'.join(context.Base_calculateBeautifulSiteLogicalPath(logical_path_list,path_len=len(logical_path_list)))\n
......@@ -377,6 +381,7 @@ return [(\'\', \'\')] + list(vault_list)\n
<string>$append0</string>
<string>x</string>
<string>new_vault_list</string>
<string>current_category_relative_url</string>
<string>current_category</string>
<string>logical_path_list</string>
<string>title</string>
......
......@@ -71,8 +71,9 @@ from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
bank_account = state_change[\'object\']\n
\n
# use of the constraint\n
vliste = bank_account.checkConsistency()\n
if len(vliste) != 0 and bank_account.getParentValue().getPortalType()!=\'Person\':\n
if bank_account.getParentValue().getPortalType()!=\'Person\':\n
vliste = bank_account.checkConsistency()\n
if len(vliste) != 0:\n
raise ValidationFailed, (vliste[0].getTranslatedMessage(),)\n
</string> </value>
</item>
......
226
\ No newline at end of file
228
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment