Commit 1b1fe38b authored by Jérome Perrin's avatar Jérome Perrin

make sure account is defined


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6169 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d45cb924
......@@ -107,6 +107,12 @@ if transaction.getPortalType() not in (\'Balance Transaction\',) :\n
\n
source_sum += source_quantity\n
destination_sum += destination_quantity\n
\n
if transaction_line.getSource(portal_type = \'Account\') is None and\\\n
transaction_line.getDestination(portal_type = \'Account\') is None and\\\n
transaction_line.getQuantity() != 0 :\n
raise ValidationFailed, N_(\'No Account defined for Line ${line_id}\',\n
mapping = {\'line_id\': transaction_line.getId()} )\n
\n
for side in (SOURCE, DESTINATION) :\n
if side == SOURCE :\n
......@@ -249,11 +255,11 @@ transaction.AccountingTransaction_deleteEmptyLines(redirect=0)\n
<string>transaction_line</string>
<string>source_quantity</string>
<string>destination_quantity</string>
<string>None</string>
<string>side</string>
<string>account</string>
<string>mirror_section</string>
<string>payment</string>
<string>None</string>
<string>unicode</string>
<string>hasattr</string>
<string>int</string>
......
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