Commit 3e874abb authored by Jérome Perrin's avatar Jérome Perrin

Support multiple sections properly in accounting periods.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31059 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5f6dd24d
...@@ -69,12 +69,19 @@ section = period.getParentValue()\n ...@@ -69,12 +69,19 @@ section = period.getParentValue()\n
while section.getPortalType() == period.getPortalType():\n while section.getPortalType() == period.getPortalType():\n
section = section.getParentValue()\n section = section.getParentValue()\n
\n \n
section_category = section.getGroup(base=True)\n
if not section_category:\n
raise ValidationFailed, translateString("This Organisation must be member of a Group")\n
\n
section_uid = portal.Base_getSectionUidListForSectionCategory(section_category)\n
\n
movement_list = portal.portal_simulation.getMovementHistoryList(\n movement_list = portal.portal_simulation.getMovementHistoryList(\n
section_uid=section.getUid(),\n section_uid=section_uid,\n
from_date=period.getStartDate().earliestTime(),\n from_date=period.getStartDate().earliestTime(),\n
at_date=period.getStopDate().latestTime(),\n at_date=period.getStopDate().latestTime(),\n
simulation_state=invalid_simulation_state_list,\n simulation_state=invalid_simulation_state_list,\n
portal_type=portal.getPortalAccountingMovementTypeList(),)\n portal_type=portal.getPortalAccountingMovementTypeList(),\n
limit=1)\n
\n \n
if movement_list:\n if movement_list:\n
raise ValidationFailed, translateString(\n raise ValidationFailed, translateString(\n
...@@ -133,6 +140,9 @@ if movement_list:\n ...@@ -133,6 +140,9 @@ if movement_list:\n
<string>state</string> <string>state</string>
<string>invalid_simulation_state_list</string> <string>invalid_simulation_state_list</string>
<string>section</string> <string>section</string>
<string>True</string>
<string>section_category</string>
<string>section_uid</string>
<string>movement_list</string> <string>movement_list</string>
</tuple> </tuple>
</value> </value>
......
1071 1073
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment