Commit 113a509c authored by Jérome Perrin's avatar Jérome Perrin

change the isSourceView/isDestinationView scripts to return true when no...

change the isSourceView/isDestinationView scripts to return true when no sections are defined. Prior to that change a purchase invoice was displayed in source view when no section was defined

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34134 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2e71fb55
......@@ -58,11 +58,14 @@ section_category = context.portal_preferences\\\n
.getPreferredAccountingTransactionSectionCategory()\n
if destination is not None and section_category:\n
if destination.getPortalType() == \'Person\':\n
return 0\n
return False\n
if destination.isMemberOf(section_category):\n
return 1\n
return True\n
\n
return 0\n
if destination is None and context.getSourceSection() is None:\n
return True\n
\n
return False\n
</string> </value>
</item>
<item>
......@@ -104,6 +107,8 @@ return 0\n
<string>destination</string>
<string>section_category</string>
<string>None</string>
<string>False</string>
<string>True</string>
</tuple>
</value>
</item>
......
......@@ -58,11 +58,14 @@ section_category = context.portal_preferences\\\n
.getPreferredAccountingTransactionSectionCategory()\n
if source is not None and section_category:\n
if source.getPortalType() == \'Person\':\n
return 0\n
return False\n
if source.isMemberOf(section_category):\n
return 1\n
return True\n
\n
return 0\n
if source is None and context.getDestinationSection() is None:\n
return True\n
\n
return False\n
</string> </value>
</item>
<item>
......@@ -104,6 +107,8 @@ return 0\n
<string>source</string>
<string>section_category</string>
<string>None</string>
<string>False</string>
<string>True</string>
</tuple>
</value>
</item>
......
1153
\ No newline at end of file
1155
\ 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