Commit 5ab7a62e authored by Sebastien Robin's avatar Sebastien Robin

give right parameters to Base_checkCheck script

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14553 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b8a16533
...@@ -2,12 +2,15 @@ ...@@ -2,12 +2,15 @@
<portal_type id="Check Deposit"> <portal_type id="Check Deposit">
<item>site</item> <item>site</item>
</portal_type> </portal_type>
<portal_type id="Check Payment">
<item>aggregate_resource</item>
</portal_type>
<portal_type id="Checkbook Delivery"> <portal_type id="Checkbook Delivery">
<item>currency_exchange_type</item> <item>currency_exchange_type</item>
</portal_type> </portal_type>
<portal_type id="Checkbook Delivery Line"> <portal_type id="Checkbook Delivery Line">
<item>check_amount</item>
<item>check_type</item> <item>check_type</item>
<item>check_amount</item>
<item>currency_exchange_type</item> <item>currency_exchange_type</item>
</portal_type> </portal_type>
<portal_type id="Checkbook Reception Line"> <portal_type id="Checkbook Reception Line">
......
...@@ -104,6 +104,10 @@ ...@@ -104,6 +104,10 @@
<key> <string>init_script</string> </key> <key> <string>init_script</string> </key>
<value> <string>CheckPayment_init</string> </value> <value> <string>CheckPayment_init</string> </value>
</item> </item>
<item>
<key> <string>permission</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>property_sheet_list</string> </key> <key> <string>property_sheet_list</string> </key>
<value> <value>
......
...@@ -121,10 +121,16 @@ if bank_account is None:\n ...@@ -121,10 +121,16 @@ if bank_account is None:\n
\n \n
# Check the check.\n # Check the check.\n
check_number = transaction.getAggregateFreeText()\n check_number = transaction.getAggregateFreeText()\n
check_resource = transaction.getAggregateResource()\n
if not check_number:\n if not check_number:\n
msg = Message(domain=\'ui\', message="Check not defined.")\n msg = Message(domain=\'ui\', message="Check not defined.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
transaction.Base_checkCheck(reference=check_number, bank_account=bank_account)\n if check_resource is None:\n
msg = Message(domain=\'ui\', message="Check type not defined.")\n
raise ValidationFailed, (msg,)\n
\n
transaction.Base_checkCheck(reference=check_number, bank_account=bank_account, \n
resource=check_resource)\n
\n \n
context.updateBankingOperation(state_change)\n context.updateBankingOperation(state_change)\n
...@@ -206,6 +212,7 @@ context.updateBankingOperation(state_change)\n ...@@ -206,6 +212,7 @@ context.updateBankingOperation(state_change)\n
<string>price</string> <string>price</string>
<string>bank_account</string> <string>bank_account</string>
<string>check_number</string> <string>check_number</string>
<string>check_resource</string>
<string>context</string> <string>context</string>
</tuple> </tuple>
</value> </value>
......
217 219
\ No newline at end of file \ No newline at end of file
Check Deposit | site Check Deposit | site
Check Payment | aggregate_resource
Checkbook Delivery Line | check_amount Checkbook Delivery Line | check_amount
Checkbook Delivery Line | check_type Checkbook Delivery Line | check_type
Checkbook Delivery Line | currency_exchange_type Checkbook Delivery Line | currency_exchange_type
......
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