Commit 8477767e authored by Jérome Perrin's avatar Jérome Perrin

always display [reference -] translated title on analytic nodes

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40732 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d33a943c
...@@ -168,8 +168,12 @@ def getAnalyticTitleFromUid(uid):\n ...@@ -168,8 +168,12 @@ def getAnalyticTitleFromUid(uid):\n
try:\n try:\n
return analytic_title_dict[uid]\n return analytic_title_dict[uid]\n
except KeyError:\n except KeyError:\n
return analytic_title_dict.setdefault(uid,\n node = getObject(uid)\n
getObject(uid).getTranslatedTitle())\n title = node.getTranslatedTitle()\n
reference = node.getReference()\n
if reference:\n
title = \'%s - %s\' % (reference, title)\n
return analytic_title_dict.setdefault(uid, title)\n
\n \n
# standards accounts {{{\n # standards accounts {{{\n
for node in getInventoryList(\n for node in getInventoryList(\n
......
...@@ -56,11 +56,18 @@ function_uid = context.function_uid\n ...@@ -56,11 +56,18 @@ function_uid = context.function_uid\n
title_dict = container.REQUEST.get(\n title_dict = container.REQUEST.get(\n
\'Movement_getFunctionTitle.function_title_dict\') or dict()\n \'Movement_getFunctionTitle.function_title_dict\') or dict()\n
if function_uid in title_dict:\n if function_uid in title_dict:\n
return title_dict[function_uid] \n return title_dict[function_uid]\n
\n \n
if movement.getSourceFunctionUid() == function_uid:\n if movement.getSourceFunctionUid() == function_uid:\n
return movement.getSourceFunctionTitle()\n reference = movement.getSourceFunctionReference()\n
return movement.getDestinationFunctionTitle()\n if reference:\n
return \'%s - %s\' % (reference, movement.getSourceFunctionTranslatedTitle())\n
return movement.getSourceFunctionTranslatedTitle()\n
\n
reference = movement.getDestinationFunctionReference()\n
if reference:\n
return \'%s - %s\' % (reference, movement.getDestinationFunctionTranslatedTitle())\n
return movement.getDestinationFunctionTranslatedTitle()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -79,6 +86,47 @@ return movement.getDestinationFunctionTitle()\n ...@@ -79,6 +86,47 @@ return movement.getDestinationFunctionTitle()\n
<tuple/> <tuple/>
</value> </value>
</item> </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>_getattr_</string>
<string>context</string>
<string>movement</string>
<string>function_uid</string>
<string>container</string>
<string>dict</string>
<string>title_dict</string>
<string>_getitem_</string>
<string>reference</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Movement_getFunctionTitle</string> </value> <value> <string>Movement_getFunctionTitle</string> </value>
......
...@@ -59,8 +59,15 @@ if funding_uid in title_dict:\n ...@@ -59,8 +59,15 @@ if funding_uid in title_dict:\n
return title_dict[funding_uid]\n return title_dict[funding_uid]\n
\n \n
if movement.getSourceFundingUid() == funding_uid:\n if movement.getSourceFundingUid() == funding_uid:\n
return movement.getSourceFundingTitle()\n reference = movement.getSourceFundingReference()\n
return movement.getDestinationFundingTitle()\n if reference:\n
return \'%s - %s\' % (reference, movement.getSourceFundingTranslatedTitle())\n
return movement.getSourceFundingTranslatedTitle()\n
\n
reference = movement.getDestinationFundingReference()\n
if reference:\n
return \'%s - %s\' % (reference, movement.getDestinationFundingTranslatedTitle())\n
return movement.getDestinationFundingTranslatedTitle()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -105,6 +112,7 @@ return movement.getDestinationFundingTitle()\n ...@@ -105,6 +112,7 @@ return movement.getDestinationFundingTitle()\n
<string>dict</string> <string>dict</string>
<string>title_dict</string> <string>title_dict</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>reference</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -59,8 +59,15 @@ if project_uid in title_dict:\n ...@@ -59,8 +59,15 @@ if project_uid in title_dict:\n
\n \n
movement = context.getObject()\n movement = context.getObject()\n
if movement.getSourceProjectUid() == project_uid:\n if movement.getSourceProjectUid() == project_uid:\n
return movement.getSourceProjectTitle()\n reference = movement.getSourceProjectReference()\n
return movement.getDestinationProjectTitle()\n if reference:\n
return \'%s - %s\' % (reference, movement.getSourceProjectTranslatedTitle())\n
return movement.getSourceProjectTranslatedTitle()\n
\n
reference = movement.getDestinationProjectReference()\n
if reference:\n
return \'%s - %s\' % (reference, movement.getDestinationProjectTranslatedTitle())\n
return movement.getDestinationProjectTranslatedTitle()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -79,6 +86,47 @@ return movement.getDestinationProjectTitle()\n ...@@ -79,6 +86,47 @@ return movement.getDestinationProjectTitle()\n
<tuple/> <tuple/>
</value> </value>
</item> </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>_getattr_</string>
<string>context</string>
<string>project_uid</string>
<string>container</string>
<string>dict</string>
<string>title_dict</string>
<string>_getitem_</string>
<string>movement</string>
<string>reference</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Movement_getProjectTitle</string> </value> <value> <string>Movement_getProjectTitle</string> </value>
......
1407 1408
\ No newline at end of file \ 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