Commit c64aa9d8 authored by Jérome Perrin's avatar Jérome Perrin

accounting: AccountingTransaction_setDefaultMirrorAccountList is not needed here

We only want to do it when starting an internal invoice, but it will
probably make the invoice inconsitent, because not balance. This should
not be a problem for the source accountant who is starting the invoice,
but is something destination accountant have to fix before stopping.
parent 5e44e178
......@@ -12,7 +12,13 @@ if not transaction.getStartDate() and transaction.getStopDate():
transaction.setStartDate(transaction.getStopDate())
# XXX auto-fill mirror accounts, if necessary.
transaction.AccountingTransaction_setDefaultMirrorAccountList()
# We do not do it for internal invoice transaction, because we do it in
# only after starting the invoice, because this can make invoice not balanced
# for destination section, which is not a problem for source section accountant
# when starting.
# Using this in non-internal transaction is probably a bad idea.
if transaction.getPortalType() != 'Internal Invoice Transaction':
transaction.AccountingTransaction_setDefaultMirrorAccountList()
# Check constraints
transaction.Base_checkConsistency()
......
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