[Erp5-report] r34160 jerome - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_s...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Mar 26 16:17:07 CET 2010
Author: jerome
Date: Fri Mar 26 16:17:06 2010
New Revision: 34160
URL: http://svn.erp5.org?rev=34160&view=rev
Log:
Also handle the case where both sections are set, but none of them is member of our preferred group. In such case we prefer the "default" view.
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isDestinationView.xml
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isSourceView.xml
erp5/trunk/bt5/erp5_accounting/bt/revision
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isDestinationView.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isDestinationView.xml?rev=34160&r1=34159&r2=34160&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isDestinationView.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isDestinationView.xml [utf8] Fri Mar 26 16:17:06 2010
@@ -56,16 +56,27 @@
<value> <string>destination = context.getDestinationSectionValue()\n
section_category = context.portal_preferences\\\n
.getPreferredAccountingTransactionSectionCategory()\n
+\n
+# If the destination is an organisation member of the preferred section category,\n
+# then we\'ll show destination view\n
if destination is not None and section_category:\n
if destination.getPortalType() == \'Person\':\n
return False\n
if destination.isMemberOf(section_category):\n
return True\n
\n
-if destination is None and context.getSourceSection() is None:\n
- return True\n
+# If the source is an organisation member of the preferred section category,\n
+# then we\'ll not show the destination view\n
+source = context.getSourceSectionValue()\n
+if source is not None and section_category:\n
+ if source.getPortalType() == \'Person\':\n
+ return True\n
+ if source.isMemberOf(section_category):\n
+ return False\n
\n
-return False\n
+# If we reach this point, none of the sections are member of the preferred section\n
+# category, we\'ll then show destination view, the default for this script\n
+return True\n
</string> </value>
</item>
<item>
@@ -109,6 +120,7 @@
<string>None</string>
<string>False</string>
<string>True</string>
+ <string>source</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isSourceView.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isSourceView.xml?rev=34160&r1=34159&r2=34160&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isSourceView.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isSourceView.xml [utf8] Fri Mar 26 16:17:06 2010
@@ -56,16 +56,27 @@
<value> <string>source = context.getSourceSectionValue()\n
section_category = context.portal_preferences\\\n
.getPreferredAccountingTransactionSectionCategory()\n
+\n
+# If the source is an organisation member of the preferred section category,\n
+# then we\'ll show the source view\n
if source is not None and section_category:\n
if source.getPortalType() == \'Person\':\n
return False\n
if source.isMemberOf(section_category):\n
return True\n
\n
-if source is None and context.getDestinationSection() is None:\n
- return True\n
+# Else, if the destination is an organisation member of the preferred section category,\n
+# then we\'ll not show source view\n
+destination = context.getDestinationSectionValue()\n
+if destination is not None and section_category:\n
+ if source.getPortalType() == \'Person\':\n
+ return True\n
+ if source.isMemberOf(section_category):\n
+ return False\n
\n
-return False\n
+# If we reach this point, none of the sections are member of the preferred section\n
+# category, we\'ll then show source view, default for this script\n
+return True\n
</string> </value>
</item>
<item>
@@ -109,6 +120,7 @@
<string>None</string>
<string>False</string>
<string>True</string>
+ <string>destination</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=34160&r1=34159&r2=34160&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Fri Mar 26 16:17:06 2010
@@ -1,1 +1,1 @@
-1160
+1163
More information about the Erp5-report
mailing list