diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_getAccountingPeriodStartDateForSectionCategory.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_getAccountingPeriodStartDateForSectionCategory.xml index 89c5bd0c10bbe2265dfc4f5ecbd6cb54010e279d..fc2f59360f935d17bca638ebac798913b006ab33 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_getAccountingPeriodStartDateForSectionCategory.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Base_getAccountingPeriodStartDateForSectionCategory.xml @@ -67,12 +67,14 @@ def getAccountingPeriodStartDateForSectionCategory(section_category, date):\n 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 diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision index 15ffde37797c5307026106580397da66b0d6c3af..77e48ce77545528902c5cadd7e7b90278fec4f56 100644 --- a/bt5/erp5_accounting/bt/revision +++ b/bt5/erp5_accounting/bt/revision @@ -1 +1 @@ -1191 \ No newline at end of file +1193 \ No newline at end of file