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

make sure account is defined

git-svn-id: 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d45cb924
......@@ -107,6 +107,12 @@ if transaction.getPortalType() not in (\'Balance Transaction\',) :\n
source_sum += source_quantity\n
destination_sum += destination_quantity\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
for side in (SOURCE, DESTINATION) :\n
if side == SOURCE :\n
......@@ -249,11 +255,11 @@ transaction.AccountingTransaction_deleteEmptyLines(redirect=0)\n
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment