Commit 4b9df912 authored by Sebastien Robin's avatar Sebastien Robin

finish changes on check payment in order to support the new way of checking references

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14556 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d21e9791
...@@ -74,17 +74,15 @@ transaction = state_change[\'object\']\n ...@@ -74,17 +74,15 @@ transaction = state_change[\'object\']\n
bank_account = transaction.getDestinationPaymentValue()\n bank_account = transaction.getDestinationPaymentValue()\n
check_number = transaction.getAggregateFreeText()\n check_number = transaction.getAggregateFreeText()\n
\n \n
\n # Already done before in validateConsistency\n
check = transaction.Base_checkOrCreateCheck(reference=check_number)\n #check = transaction.Base_checkOrCreateCheck(reference=check_number)\n
if not check.Check_isValid():\n #if not check.Check_isValid():\n
raise ValidationFailed, Message(domain=\'ui\', message=\'Check is in an invalid state\')\n # raise ValidationFailed, Message(domain=\'ui\', message=\'Check is in an invalid state\')\n
\n \n
line = transaction.get(\'movement\')\n line = transaction.get(\'movement\')\n
if line is not None and line.getPortalType() == \'Banking Operation Line\':\n if line is not None and line.getPortalType() == \'Banking Operation Line\':\n
# This is a single currency operation, so it is not necessary to convert the price.\n # This is a single currency operation, so it is not necessary to convert the price.\n
line.setSourceDebit(transaction.getSourceTotalAssetPrice())\n line.setSourceDebit(transaction.getSourceTotalAssetPrice())\n
\n
transaction.edit(aggregate = check.getRelativeUrl())\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -151,7 +149,6 @@ transaction.edit(aggregate = check.getRelativeUrl())\n ...@@ -151,7 +149,6 @@ transaction.edit(aggregate = check.getRelativeUrl())\n
<string>_getattr_</string> <string>_getattr_</string>
<string>bank_account</string> <string>bank_account</string>
<string>check_number</string> <string>check_number</string>
<string>check</string>
<string>line</string> <string>line</string>
<string>None</string> <string>None</string>
</tuple> </tuple>
......
...@@ -129,8 +129,9 @@ if check_resource is None:\n ...@@ -129,8 +129,9 @@ if check_resource is None:\n
msg = Message(domain=\'ui\', message="Check type not defined.")\n msg = Message(domain=\'ui\', message="Check type not defined.")\n
raise ValidationFailed, (msg,)\n raise ValidationFailed, (msg,)\n
\n \n
transaction.Base_checkCheck(reference=check_number, bank_account=bank_account, \n check = transaction.Base_checkCheck(reference=check_number, bank_account=bank_account, \n
resource=check_resource)\n resource=check_resource)\n
transaction.edit(aggregate=check.getRelativeUrl())\n
\n \n
context.updateBankingOperation(state_change)\n context.updateBankingOperation(state_change)\n
...@@ -213,6 +214,7 @@ context.updateBankingOperation(state_change)\n ...@@ -213,6 +214,7 @@ context.updateBankingOperation(state_change)\n
<string>bank_account</string> <string>bank_account</string>
<string>check_number</string> <string>check_number</string>
<string>check_resource</string> <string>check_resource</string>
<string>check</string>
<string>context</string> <string>context</string>
</tuple> </tuple>
</value> </value>
......
225 227
\ 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