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

A delivery is not supposed to contain lines the user printing the delivery cannot view

Instead of hiding those lines and printing an incorrect document it's safer to
let the unauthorized error happen.
parent 5fd02092
......@@ -86,8 +86,7 @@ excluded_portal_type_list = context.getPortalTaxMovementTypeList() \\\n
def getSubLineList(obj):\n
sub_list = []\n
for x in obj.contentValues(portal_type=context.getPortalInvoiceMovementTypeList(),\n
sort_on=[(\'int_index\', \'ascending\'), (\'reference\', \'ascending\')],\n
checked_permission=\'View\'):\n
sort_on=[(\'int_index\', \'ascending\'), (\'reference\', \'ascending\')],):\n
if x.getPortalType() in excluded_portal_type_list:\n
continue\n
sub_list.append(x)\n
......
393
394
\ No newline at end of file
......@@ -56,8 +56,7 @@
def getSubLineList(obj):\n
sub_list = []\n
for x in obj.contentValues(portal_type=context.getPortalOrderMovementTypeList(),\n
sort_on=[(\'int_index\', \'ascending\'), (\'reference\', \'ascending\')],\n
checked_permission=\'View\'):\n
sort_on=[(\'int_index\', \'ascending\'), (\'reference\', \'ascending\')]):\n
if x.getPortalType() in obj.getPortalTaxMovementTypeList():\n
continue\n
sub_list.append(x)\n
......
......@@ -55,7 +55,7 @@
\n
def getSubLineList(obj):\n
sub_list = []\n
for x in obj.searchFolder(portal_type=context.getPortalDeliveryMovementTypeList(),\n
for x in obj.contentValues(portal_type=context.getPortalDeliveryMovementTypeList(),\n
sort_on=[(\'int_index\', \'ascending\'), (\'reference\', \'ascending\')]):\n
if x.getPortalType() in obj.getPortalTaxMovementTypeList():\n
continue\n
......
480
\ No newline at end of file
481
\ No newline at end of file
......@@ -83,8 +83,7 @@ else:\n
def getSubLineList(obj):\n
sub_list = []\n
for x in obj.contentValues(portal_type=context.getPortalOrderMovementTypeList(),\n
sort_on=[(\'int_index\', \'ascending\'), (\'reference\', \'ascending\')],\n
checked_permission=\'View\'):\n
sort_on=[(\'int_index\', \'ascending\'), (\'reference\', \'ascending\')]):\n
if x.getPortalType() in obj.getPortalTaxMovementTypeList():\n
continue\n
sub_list.append(x)\n
......
......@@ -66,7 +66,7 @@
\n
def getSubLineList(obj):\n
sub_list = []\n
for x in obj.searchFolder(portal_type=context.getPortalDeliveryMovementTypeList(),\n
for x in obj.contentValues(portal_type=context.getPortalDeliveryMovementTypeList(),\n
sort_on=[(\'int_index\', \'ascending\'), (\'reference\', \'ascending\')]):\n
if x.getPortalType() in obj.getPortalTaxMovementTypeList():\n
continue\n
......
1174
\ No newline at end of file
1175
\ 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