[Erp5-report] r40164 jerome - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_s...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Nov 10 14:29:36 CET 2010
Author: jerome
Date: Wed Nov 10 14:29:36 2010
New Revision: 40164
URL: http://svn.erp5.org?rev=40164&view=rev
Log:
- return immediatly if context matches
- fix a wrong state, on validation worklow it's invalidated not cancelled
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Organisation_getMappingRelatedOrganisation.xml
erp5/trunk/bt5/erp5_accounting/bt/revision
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Organisation_getMappingRelatedOrganisation.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Organisation_getMappingRelatedOrganisation.xml?rev=40164&r1=40163&r2=40164&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Organisation_getMappingRelatedOrganisation.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Organisation_getMappingRelatedOrganisation.xml [utf8] Wed Nov 10 14:29:36 2010
@@ -53,6 +53,10 @@
<value> <string>"""Returns the main organisation for that group.\n
"""\n
\n
+if len(context.contentValues(filter=\n
+ dict(portal_type=\'Accounting Period\'))) or context.getMapping():\n
+ return context\n
+\n
def getOrganisationForSectionCategory(section):\n
mapping = section.getMappingRelatedValue(portal_type=\'Organisation\',\n
checked_permission=\'Access contents information\')\n
@@ -64,7 +68,7 @@ def getOrganisationForSectionCategory(se
checked_permission=\'Access contents information\')\n
\n
for organisation in organisation_list:\n
- if organisation.getProperty(\'validation_state\', \'unset\') not in (\'deleted\', \'cancelled\'):\n
+ if organisation.getProperty(\'validation_state\', \'unset\') not in (\'deleted\', \'invalidated\'):\n
return organisation\n
\n
\n
@@ -105,6 +109,48 @@ return context\n
</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>len</string>
+ <string>_getattr_</string>
+ <string>context</string>
+ <string>dict</string>
+ <string>getOrganisationForSectionCategory</string>
+ <string>group</string>
+ <string>None</string>
+ <string>group_chain</string>
+ <string>_getiter_</string>
+ <string>organisation</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>Organisation_getMappingRelatedOrganisation</string> </value>
</item>
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=40164&r1=40163&r2=40164&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Wed Nov 10 14:29:36 2010
@@ -1 +1 @@
-1382
\ No newline at end of file
+1383
\ No newline at end of file
More information about the Erp5-report
mailing list