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
try:\n
return analytic_title_dict[uid]\n
except KeyError:\n
return analytic_title_dict.setdefault(uid,\n
getObject(uid).getTranslatedTitle())\n
node = getObject(uid)\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
# standards accounts {{{\n
for node in getInventoryList(\n
......
......@@ -56,11 +56,18 @@ function_uid = context.function_uid\n
title_dict = container.REQUEST.get(\n
\'Movement_getFunctionTitle.function_title_dict\') or dict()\n
if function_uid in title_dict:\n
return title_dict[function_uid] \n
return title_dict[function_uid]\n
\n
if movement.getSourceFunctionUid() == function_uid:\n
return movement.getSourceFunctionTitle()\n
return movement.getDestinationFunctionTitle()\n
reference = movement.getSourceFunctionReference()\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>
</item>
<item>
......@@ -79,6 +86,47 @@ return movement.getDestinationFunctionTitle()\n
<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>_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>
<key> <string>id</string> </key>
<value> <string>Movement_getFunctionTitle</string> </value>
......
......@@ -59,8 +59,15 @@ if funding_uid in title_dict:\n
return title_dict[funding_uid]\n
\n
if movement.getSourceFundingUid() == funding_uid:\n
return movement.getSourceFundingTitle()\n
return movement.getDestinationFundingTitle()\n
reference = movement.getSourceFundingReference()\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>
</item>
<item>
......@@ -105,6 +112,7 @@ return movement.getDestinationFundingTitle()\n
<string>dict</string>
<string>title_dict</string>
<string>_getitem_</string>
<string>reference</string>
</tuple>
</value>
</item>
......
......@@ -59,8 +59,15 @@ if project_uid in title_dict:\n
\n
movement = context.getObject()\n
if movement.getSourceProjectUid() == project_uid:\n
return movement.getSourceProjectTitle()\n
return movement.getDestinationProjectTitle()\n
reference = movement.getSourceProjectReference()\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>
</item>
<item>
......@@ -79,6 +86,47 @@ return movement.getDestinationProjectTitle()\n
<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>_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>
<key> <string>id</string> </key>
<value> <string>Movement_getProjectTitle</string> </value>
......
1407
\ No newline at end of file
1408
\ 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