From 7cba4f89317aebfea78b51ca8bbf6d07ef1f99f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Mon, 2 Jul 2007 09:32:09 +0000 Subject: [PATCH] some properties need to be retrieved on document and not line git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15098 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../IncomingIncidentLine_getBaobabDestination.xml | 8 +++++--- .../OutgoingIncidentLine_getBaobabSource.xml | 8 +++++--- bt5/erp5_banking_cash/bt/revision | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/IncomingIncidentLine_getBaobabDestination.xml b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/IncomingIncidentLine_getBaobabDestination.xml index 0a061ed116..17e82223c7 100644 --- a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/IncomingIncidentLine_getBaobabDestination.xml +++ b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/IncomingIncidentLine_getBaobabDestination.xml @@ -68,15 +68,16 @@ <value> <string>source_trade = context.getSourceTrade()\n if source_trade is None:\n # compute vault\n + document = context.getParentValue()\n default_currency = "currency_module/%s" %context.Baobab_getPortalReferenceCurrencyID()\n - currency = context.getResource()\n + currency = document.getResource()\n if currency == default_currency:\n vault = \'/encaisse_des_billets_et_monnaies/entrante\'\n else:\n - vault_title = (context.getResourceTitle().lower()).replace(\' \', \'_\')\n + vault_title = (document.getResourceTitle().lower()).replace(\' \', \'_\')\n vault = \'/encaisse_des_devises/%s/sortante\' %(vault_title,)\n # add it to user defined counter\n - user_id = context.Base_getLastUserIdByTransition(workflow_id=\'incident_workflow\', transition_id=\'deliver_action\')\n + user_id = document.Base_getLastUserIdByTransition(workflow_id=\'incident_workflow\', transition_id=\'deliver_action\')\n if user_id is None:\n return None\n site_list = context.Baobab_getUserAssignedSiteList(user_id=user_id)\n @@ -149,6 +150,7 @@ return source_trade\n <string>context</string> <string>source_trade</string> <string>None</string> + <string>document</string> <string>default_currency</string> <string>currency</string> <string>vault</string> diff --git a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/OutgoingIncidentLine_getBaobabSource.xml b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/OutgoingIncidentLine_getBaobabSource.xml index 4150a545e0..12e9867848 100644 --- a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/OutgoingIncidentLine_getBaobabSource.xml +++ b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/OutgoingIncidentLine_getBaobabSource.xml @@ -68,15 +68,16 @@ <value> <string>source_trade = context.getSourceTrade()\n if source_trade is None:\n # compute vault\n + document = context.getParentValue()\n default_currency = "currency_module/%s" %context.Baobab_getPortalReferenceCurrencyID()\n - currency = context.getResource()\n + currency = document.getResource()\n if currency == default_currency:\n vault = \'/encaisse_des_billets_et_monnaies/sortante\'\n else:\n - vault_title = (context.getResourceTitle().lower()).replace(\' \', \'_\')\n + vault_title = (document.getResourceTitle().lower()).replace(\' \', \'_\')\n vault = \'/encaisse_des_devises/%s/sortante\' %(vault_title,)\n # add it to user defined counter\n - user_id = context.Base_getLastUserIdByTransition(workflow_id=\'incident_workflow\', transition_id=\'deliver_action\')\n + user_id = document.Base_getLastUserIdByTransition(workflow_id=\'incident_workflow\', transition_id=\'deliver_action\')\n if user_id is None:\n return None\n site_list = context.Baobab_getUserAssignedSiteList(user_id=user_id)\n @@ -149,6 +150,7 @@ return source_trade\n <string>context</string> <string>source_trade</string> <string>None</string> + <string>document</string> <string>default_currency</string> <string>currency</string> <string>vault</string> diff --git a/bt5/erp5_banking_cash/bt/revision b/bt5/erp5_banking_cash/bt/revision index 9361cf7165..cadbe928f8 100644 --- a/bt5/erp5_banking_cash/bt/revision +++ b/bt5/erp5_banking_cash/bt/revision @@ -1 +1 @@ -376 \ No newline at end of file +378 \ No newline at end of file -- 2.30.9