Commit 1fbd6fd4 authored by Jérome Perrin's avatar Jérome Perrin

bug fix, we should check for accounting periods inside the mapping related organisation

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29745 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fce188cc
......@@ -124,8 +124,10 @@ if not skip_period_validation :\n
if no_accounts:\n
valid_date = True\n
else:\n
section = transaction.getSourceSectionValue()\n
if section is not None and not len(section.contentValues(\n
section = source_section\n
if section.getPortalType() == \'Organisation\':\n
section = section.Organisation_getMappingRelatedOrganisation()\n
if not len(section.contentValues(\n
filter=dict(portal_type="Accounting Period"))):\n
valid_date = True\n
else:\n
......@@ -152,8 +154,10 @@ if not skip_period_validation :\n
if no_accounts:\n
valid_date = True\n
else:\n
section = transaction.getDestinationSectionValue()\n
if section is not None and not len(section.contentValues(\n
section = destination_section\n
if section.getPortalType() == \'Organisation\':\n
section = section.Organisation_getMappingRelatedOrganisation()\n
if not len(section.contentValues(\n
filter=dict(portal_type="Accounting Period"))):\n
valid_date = True\n
else:\n
......
999
\ No newline at end of file
1000
\ 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