Commit 15949a8f authored by Aurel's avatar Aurel

2006-07-24 aurel

* do more checkions in incident modules' workflow and fix some forms

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8715 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 28c612eb
...@@ -500,7 +500,7 @@ ...@@ -500,7 +500,7 @@
</item> </item>
<item> <item>
<key> <string>selection_name</string> </key> <key> <string>selection_name</string> </key>
<value> <string>account_incident_module_selection</string> </value> <value> <string>cash_incident_module_selection</string> </value>
</item> </item>
<item> <item>
<key> <string>sort</string> </key> <key> <string>sort</string> </key>
......
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: cell.getTotalPrice(deliveryLineType=\'Incoming Cash Incident Line\')</string> </value> <value> <string>python: cell.getTotalPrice(deliveryLineType=\'Outgoing Cash Incident Line\')</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: cell.getTotalPrice(deliveryLineType=\'Outgoing Cash Incident Line\')</string> </value> <value> <string>python: cell.getTotalPrice(deliveryLineType=\'Incoming Cash Incident Line\')</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -76,9 +76,19 @@ txn = state_change[\'object\']\n ...@@ -76,9 +76,19 @@ txn = state_change[\'object\']\n
in_list = txn.searchFolder(portal_type=\'Incoming Cash Incident Line\')\n in_list = txn.searchFolder(portal_type=\'Incoming Cash Incident Line\')\n
out_list = txn.searchFolder(portal_type=\'Outgoing Cash Incident Line\')\n out_list = txn.searchFolder(portal_type=\'Outgoing Cash Incident Line\')\n
\n \n
price = txn.getSourceTotalAssetPrice()\n
in_price = txn.getTotalPrice(deliveryLineType=\'Incoming Cash Incident Line\')\n
out_price = txn.getTotalPrice(deliveryLineType=\'Outgoing Cash Incident Line\')\n
\n
if len(in_list) != 0 and len(out_list) != 0:\n if len(in_list) != 0 and len(out_list) != 0:\n
msg = Message(domain = "ui", message="You can\'t have excess and deficit on the document.")\n msg = Message(domain = "ui", message="You can\'t have excess and deficit on the document.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
elif len(in_list) == 0 and len(out_list) == 0:\n
msg = Message(domain = "ui", message="No resource.")\n
raise ValidationFailed, (msg,)\n
elif (in_price != 0 and in_price != price) or (out_price != 0 and out_price != price):\n
msg = Message(domain = "ui", message="Price differs between document and resource.")\n
raise ValidationFailed, (msg,)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -129,6 +139,9 @@ if len(in_list) != 0 and len(out_list) != 0:\n ...@@ -129,6 +139,9 @@ if len(in_list) != 0 and len(out_list) != 0:\n
<string>_getattr_</string> <string>_getattr_</string>
<string>in_list</string> <string>in_list</string>
<string>out_list</string> <string>out_list</string>
<string>price</string>
<string>in_price</string>
<string>out_price</string>
<string>len</string> <string>len</string>
<string>msg</string> <string>msg</string>
</tuple> </tuple>
......
...@@ -76,9 +76,19 @@ txn = state_change[\'object\']\n ...@@ -76,9 +76,19 @@ txn = state_change[\'object\']\n
in_list = txn.searchFolder(portal_type=\'Incoming Cash Incident Line\')\n in_list = txn.searchFolder(portal_type=\'Incoming Cash Incident Line\')\n
out_list = txn.searchFolder(portal_type=\'Outgoing Cash Incident Line\')\n out_list = txn.searchFolder(portal_type=\'Outgoing Cash Incident Line\')\n
\n \n
price = txn.getSourceTotalAssetPrice()\n
in_price = txn.getTotalPrice(deliveryLineType=\'Incoming Cash Incident Line\')\n
out_price = txn.getTotalPrice(deliveryLineType=\'Outgoing Cash Incident Line\')\n
\n
if len(in_list) != 0 and len(out_list) != 0:\n if len(in_list) != 0 and len(out_list) != 0:\n
msg = Message(domain = "ui", message="You can\'t have excess and deficit on the document.")\n msg = Message(domain = "ui", message="You can\'t have excess and deficit on the document.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
elif len(in_list) == 0 and len(out_list) == 0:\n
msg = Message(domain = "ui", message="No resource.")\n
raise ValidationFailed, (msg,)\n
elif (in_price != 0 and in_price != price) or (out_price != 0 and out_price != price):\n
msg = Message(domain = "ui", message="Price differs between document and resource.")\n
raise ValidationFailed, (msg,)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -129,6 +139,9 @@ if len(in_list) != 0 and len(out_list) != 0:\n ...@@ -129,6 +139,9 @@ if len(in_list) != 0 and len(out_list) != 0:\n
<string>_getattr_</string> <string>_getattr_</string>
<string>in_list</string> <string>in_list</string>
<string>out_list</string> <string>out_list</string>
<string>price</string>
<string>in_price</string>
<string>out_price</string>
<string>len</string> <string>len</string>
<string>msg</string> <string>msg</string>
</tuple> </tuple>
......
2006-07-24 aurel
* do more checkions in incident modules' workflow
2006-07-21 aurel 2006-07-21 aurel
* add cash incident module * add cash incident module
......
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