[Erp5-report] r34735 jerome - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_s...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Apr 23 11:06:30 CEST 2010
Author: jerome
Date: Fri Apr 23 11:06:28 2010
New Revision: 34735
URL: http://svn.erp5.org?rev=34735&view=rev
Log:
contentValues(filter= cannot filter by simulation state. Use the more common contentValues(portal_type=, checked_permission= and filter simulation states in the loop
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_getAccountingPeriodStartDateForSectionCategory.xml
erp5/trunk/bt5/erp5_accounting/bt/revision
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_getAccountingPeriodStartDateForSectionCategory.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_getAccountingPeriodStartDateForSectionCategory.xml?rev=34735&r1=34734&r2=34735&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_getAccountingPeriodStartDateForSectionCategory.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_getAccountingPeriodStartDateForSectionCategory.xml [utf8] Fri Apr 23 11:06:28 2010
@@ -67,12 +67,14 @@
section_uid.extend(portal.Base_getSectionUidListForSectionCategory(\n
section_category, strict_membership=False))\n
period_start_date = None\n
- valid_accounting_period = dict(portal_type=\'Accounting Period\',\n
- simulation_state=(\'planned\', \'confirmed\',\n
- \'started\', \'stopped\', \'closing\', \'delivered\'))\n
for uid in section_uid:\n
section = portal.portal_catalog.getObject(uid)\n
- for ap in section.contentValues(filter=valid_accounting_period):\n
+ for ap in section.contentValues(portal_type=\'Accounting Period\',\n
+ checked_permission=\'Access contents information\'):\n
+ if ap.getSimulationState() not in (\'planned\', \'confirmed\',\n
+ \'started\', \'stopped\',\n
+ \'closing\', \'delivered\'):\n
+ continue\n
if ap.getStartDate() <= date <= ap.getStopDate():\n
period_start_date = ap.getStartDate().earliestTime()\n
if period_start_date:\n
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=34735&r1=34734&r2=34735&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Fri Apr 23 11:06:28 2010
@@ -1,1 +1,1 @@
-1191
+1193
More information about the Erp5-report
mailing list