[Erp5-report] r11450 - /erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_a...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Nov 22 22:33:17 CET 2006
Author: jerome
Date: Wed Nov 22 22:33:15 2006
New Revision: 11450
URL: http://svn.erp5.org?rev=11450&view=rev
Log:
don't use portal_catalog.getObject(uid) when it's not necessary
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getMirrorSectionTitle.xml
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getMirrorSectionTitle.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getMirrorSectionTitle.xml?rev=11450&r1=11449&r2=11450&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getMirrorSectionTitle.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getMirrorSectionTitle.xml Wed Nov 22 22:33:15 2006
@@ -71,8 +71,10 @@
<value> <string>"""Retrieve the title of the mirror section\n
"""\n
if brain.mirror_section_uid:\n
- return context.getPortalObject().portal_catalog.getObject(\n
- uid=brain.mirror_section_uid).getTitle()\n
+ movement = brain.getObject()\n
+ if brain.mirror_section_uid == movement.getDestinationSectionUid():\n
+ return movement.getDestinationSectionTitle()\n
+ return movement.getSourceSectionTitle()\n
</string> </value>
</item>
<item>
@@ -125,7 +127,7 @@
<string>selection</string>
<string>kwd</string>
<string>_getattr_</string>
- <string>context</string>
+ <string>movement</string>
</tuple>
</value>
</item>
More information about the Erp5-report
mailing list