Reviewers: ,
Please review this at http://codereview.tryton.org/742002/ Affected files: M invoice.py Index: invoice.py =================================================================== --- a/invoice.py +++ b/invoice.py @@ -905,17 +905,17 @@ class Invoice(Workflow, ModelSQL, ModelV accounting_date = self.accounting_date or self.invoice_date period_id = Period.find(self.company.id, date=accounting_date, test_state=test_state) period = Period(period_id) sequence_id = period.get_invoice_sequence(self.type).id if not sequence_id: self.raise_user_error('no_invoice_sequence', { - 'invoice': invoice.rec_name, + 'invoice': self.rec_name, 'period': period.rec_name, }) with Transaction().set_context( date=self.invoice_date or Date.today()): number = Sequence.get_id(sequence_id) vals = {'number': number} if (not self.invoice_date and self.type in ('out_invoice', 'out_credit_note')):