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

add proxy role to this script, because some filtering are done inside the...

add proxy role to this script, because some filtering are done inside the script and the current user may not have the permission to access some lines that will be filtered

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40447 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b4abb535
...@@ -58,6 +58,9 @@ getObject = portal.portal_catalog.getObject\n ...@@ -58,6 +58,9 @@ getObject = portal.portal_catalog.getObject\n
params = portal.ERP5Accounting_getParams(selection_name)\n params = portal.ERP5Accounting_getParams(selection_name)\n
N_ = lambda msg: Message(\'erp5_ui\', msg)\n N_ = lambda msg: Message(\'erp5_ui\', msg)\n
\n \n
# this also prevents to be called directly\n
assert \'node_uid\' in kw\n
\n
mirror_section_relative_url = None\n mirror_section_relative_url = None\n
if kw.get(\'mirror_section_uid\'):\n if kw.get(\'mirror_section_uid\'):\n
mirror_section_relative_url =\\\n mirror_section_relative_url =\\\n
...@@ -97,7 +100,7 @@ for brain in portal.Base_zGetNotGroupedMovementList(\n ...@@ -97,7 +100,7 @@ for brain in portal.Base_zGetNotGroupedMovementList(\n
transaction.getPortalType() not in portal_type_list:\n transaction.getPortalType() not in portal_type_list:\n
continue\n continue\n
\n \n
is_source = transaction.AccountingTransaction_isSourceView()\n is_source = (brain.mirror_section_relative_url == mvt.getDestinationSection())\n
if is_source:\n if is_source:\n
if payment_uid and mvt.getSourcePaymentUid() != payment_uid:\n if payment_uid and mvt.getSourcePaymentUid() != payment_uid:\n
continue\n continue\n
...@@ -189,12 +192,117 @@ return line_list\n ...@@ -189,12 +192,117 @@ return line_list\n
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>selection=None, sort_on=[], node_category=None, node_category_strict_membership=None, from_date=None, selection_name=None, function=None, project_uid=None, analytic_column_list=(), **kw</string> </value> <value> <string>selection=None, sort_on=[], node_category=None, node_category_strict_membership=None, from_date=None, selection_name=None, function=None, project_uid=None, analytic_column_list=(), **kw</string> </value>
</item> </item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
<value> <value>
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>9</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>selection</string>
<string>sort_on</string>
<string>node_category</string>
<string>node_category_strict_membership</string>
<string>from_date</string>
<string>selection_name</string>
<string>function</string>
<string>project_uid</string>
<string>analytic_column_list</string>
<string>kw</string>
<string>Products.PythonScripts.standard</string>
<string>Object</string>
<string>Products.ERP5Type.Document</string>
<string>newTempBase</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>getObject</string>
<string>params</string>
<string>N_</string>
<string>AssertionError</string>
<string>None</string>
<string>mirror_section_relative_url</string>
<string>_getitem_</string>
<string>payment_uid</string>
<string>portal_type_filter</string>
<string>portal_type_list</string>
<string>total_debit</string>
<string>total_credit</string>
<string>total_debit_price</string>
<string>total_credit_price</string>
<string>line_list</string>
<string>_getiter_</string>
<string>brain</string>
<string>mvt</string>
<string>transaction</string>
<string>is_source</string>
<string>specific_reference</string>
<string>mirror_section_title</string>
<string>section_title</string>
<string>max</string>
<string>debit</string>
<string>_inplacevar_</string>
<string>credit</string>
<string>debit_price</string>
<string>credit_price</string>
<string>brain_date</string>
<string>line</string>
<string>dict</string>
<string>analytic_info</string>
<string>analytic_column</string>
<string>analytic_column_title</string>
<string>_write_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
<list/>
<none/>
<none/>
<none/>
<none/>
<none/>
<none/>
<tuple/>
</tuple>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Account_getNotGroupedAccountingTransactionList</string> </value> <value> <string>Account_getNotGroupedAccountingTransactionList</string> </value>
......
1405 1407
\ 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