Commit 46b44332 authored by Aurel's avatar Aurel

update some permission erp5_banking_check and some scritp to use more generic one

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6955 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 11aac8e4
......@@ -172,6 +172,9 @@
<name>Add ERP5Form Tools</name>
<role>Manager</role>
</permission>
<permission>
<name>Add ERP5Subversion Tools</name>
</permission>
<permission>
<name>Add ERP5SyncML Tools</name>
<role>Manager</role>
......@@ -244,9 +247,6 @@
<name>Add Plugin Registrys</name>
<role>Manager</role>
</permission>
<permission>
<name>Add Portal ZSyncer Tools</name>
</permission>
<permission>
<name>Add Python Scripts</name>
<role>Manager</role>
......@@ -315,9 +315,6 @@
<name>Add ZODB Mount Points</name>
<role>Manager</role>
</permission>
<permission>
<name>Add ZSyncers</name>
</permission>
<permission>
<name>Add Zope Tutorials</name>
<role>Manager</role>
......@@ -540,10 +537,6 @@
<name>Manage Transient Object Container</name>
<role>Manager</role>
</permission>
<permission>
<name>Manage Translation Services</name>
<role>Manager</role>
</permission>
<permission>
<name>Manage Vocabulary</name>
<role>Manager</role>
......@@ -711,9 +704,6 @@
<name>WebDAV access</name>
<role>Manager</role>
</permission>
<permission>
<name>ZSyncer: Use ZSyncer</name>
</permission>
<permission>
<name>ZopeProfiler: manage</name>
<role>Manager</role>
......
......@@ -172,6 +172,9 @@
<name>Add ERP5Form Tools</name>
<role>Manager</role>
</permission>
<permission>
<name>Add ERP5Subversion Tools</name>
</permission>
<permission>
<name>Add ERP5SyncML Tools</name>
<role>Manager</role>
......@@ -244,10 +247,6 @@
<name>Add Plugin Registrys</name>
<role>Manager</role>
</permission>
<permission>
<name>Add Portal ZSyncer Tools</name>
<role>Manager</role>
</permission>
<permission>
<name>Add Python Scripts</name>
<role>Manager</role>
......@@ -316,10 +315,6 @@
<name>Add ZODB Mount Points</name>
<role>Manager</role>
</permission>
<permission>
<name>Add ZSyncers</name>
<role>Manager</role>
</permission>
<permission>
<name>Add Zope Tutorials</name>
<role>Manager</role>
......@@ -542,10 +537,6 @@
<name>Manage Transient Object Container</name>
<role>Manager</role>
</permission>
<permission>
<name>Manage Translation Services</name>
<role>Manager</role>
</permission>
<permission>
<name>Manage Vocabulary</name>
<role>Manager</role>
......@@ -713,10 +704,6 @@
<name>WebDAV access</name>
<role>Manager</role>
</permission>
<permission>
<name>ZSyncer: Use ZSyncer</name>
<role>Manager</role>
</permission>
<permission>
<name>ZopeProfiler: manage</name>
<role>Manager</role>
......
<workflow_chain>
<chain>
<type>Check Deposit</type>
<workflow>check_deposit_workflow</workflow>
<workflow>check_deposit_workflow, edit_workflow</workflow>
</chain>
<chain>
<type>Check Payment</type>
......
......@@ -308,7 +308,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:here.Delivery_getVaultItemList(vault_type=[\'site/surface/banque_interne\'], exclude_vault_type=[\'site/surface/provision\',\'site/surface/tri_tiers\',\'site/surface/caisse_courante\',\'site/surface/salle_tri\'], current_url=here.getSource(), user_site=1, leaf_node=1, strict_membership=0)</string> </value>
<value> <string>python:here.Delivery_getVaultItemList(vault_type=[\'site/surface/banque_interne\'], current_url=here.getSource(), user_site=1, leaf_node=0, strict_membership=1)</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -102,8 +102,8 @@ date = transaction.getStartDate()\n
# check accounting date\n
current_date = DateTime().Date()\n
document_date = DateTime(date).Date()\n
#transaction.log("check_payment_workflow/scripts/validateConsistency", "date = %s, current_date = %s, document_date = %s, site = %s" %(date, current_date, document_date, site))\n
if not document_date > current_date: \n
# transaction.log("check_payment_workflow/scripts/validateConsistency", "date = %s, current_date = %s, document_date = %s, site = %s" %(date, current_date, document_date, site))\n
if not document_date > current_date:\n
if not transaction.Baobab_checkCounterDateOpen(site=site, date=date):\n
msg = Message(domain=\'ui\', message = \'Cannot validate document because of closed counter date\')\n
raise ValidationFailed, (msg,) \n
......
......@@ -70,10 +70,11 @@
from Products.ERP5Type.Message import Message\n
\n
transaction = state_change[\'object\']\n
source_object = transaction.getSourceValue()\n
source = transaction.getSource()\n
\n
# check again that we are in the good accounting date\n
if not transaction.Baobab_checkCounterDateOpen(site=source, date=transaction.getStartDate()):\n
if not transaction.Baobab_checkCounterDateOpen(site=source_object, date=transaction.getStartDate()):\n
msg = Message(domain = "ui", message="Transaction not in the good accounting date")\n
raise ValidationFailed, (msg,)\n
\n
......@@ -155,6 +156,7 @@ elif resource == 1:\n
<string>_getitem_</string>
<string>transaction</string>
<string>_getattr_</string>
<string>source_object</string>
<string>source</string>
<string>msg</string>
<string>resource</string>
......
......@@ -84,13 +84,17 @@
<item>
<key> <string>Add portal content</string> </key>
<value>
<tuple/>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>Modify portal content</string> </key>
<value>
<tuple/>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
......
Check Deposit | check_deposit_workflow
Check Deposit | edit_workflow
Check Payment | check_payment_workflow
Check Payment | edit_workflow
\ 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