Reviewers: ,
Please review this at http://codereview.tryton.org/733002/ Affected files: M invoice.py Index: invoice.py =================================================================== --- a/invoice.py +++ b/invoice.py @@ -1109,19 +1109,23 @@ class Invoice(Workflow, ModelSQL, ModelV pool = Pool() Move = pool.get('account.move') Period = pool.get('account.period') lines = [] if self.type in ('out_invoice', 'in_credit_note'): if self.account == journal.debit_account: - self.raise_user_error('same_debit_account') + self.raise_user_error('same_debit_account', { + 'journal': journal.rec_name, + 'invoice': invoice.rec_name, + }) if not journal.debit_account: - self.raise_user_error('missing_debit_account') + self.raise_user_error('missing_debit_account', + (journal.rec_name,)) lines.append({ 'description': description, 'account': self.account.id, 'party': self.party.id, 'debit': Decimal('0.0'), 'credit': amount, 'amount_second_currency': amount_second_currency,