From b849f9d887e2fc7f521e7e9a7a84fcc464bbd5c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Wed, 4 Oct 2006 17:49:58 +0000 Subject: [PATCH] Account_getFormattedTitle can be called on the context of an account. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10547 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_accounting/Account_getFormattedTitle.xml | 13 ++++++++++--- bt5/erp5_accounting/bt/revision | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getFormattedTitle.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getFormattedTitle.xml index 9be64f4d44..e55598c6ca 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getFormattedTitle.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getFormattedTitle.xml @@ -68,7 +68,10 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>gap_id = account.Account_getGapId()\n + <value> <string>if account is None:\n + account = context\n +\n +gap_id = account.Account_getGapId()\n title = account.getTitle()\n \n if gap_id.isdigit():\n @@ -97,7 +100,7 @@ return title\n </item> <item> <key> <string>_params</string> </key> - <value> <string>account</string> </value> + <value> <string>account=None</string> </value> </item> <item> <key> <string>errors</string> </key> @@ -124,6 +127,8 @@ return title\n <value> <tuple> <string>account</string> + <string>None</string> + <string>context</string> <string>_getattr_</string> <string>gap_id</string> <string>title</string> @@ -138,7 +143,9 @@ return title\n <item> <key> <string>func_defaults</string> </key> <value> - <none/> + <tuple> + <none/> + </tuple> </value> </item> <item> diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision index eebd1d10b6..b2412e34df 100644 --- a/bt5/erp5_accounting/bt/revision +++ b/bt5/erp5_accounting/bt/revision @@ -1 +1 @@ -61 \ No newline at end of file +62 \ No newline at end of file -- 2.30.9