From e6f172b66d3db990aa1804716d7756339e9e82c1 Mon Sep 17 00:00:00 2001 From: Benoit Guillot Date: Wed, 29 Aug 2012 17:34:48 +0200 Subject: [PATCH] [FIX] fix typo bzr revid: benoit.guillot@akretion.com.br-20120829153448-i4ek7jny5hqgid1a --- addons/account/account_invoice.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 41524e08bdf7c..7ec504fa5e8c0 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1126,7 +1126,7 @@ def _refund_cleanup_lines(self, cr, uid, lines, context=None): line['invoice_line_tax_id'] = [(6,0, line.get('invoice_line_tax_id', [])) ] return map(lambda x: (0,0,x), lines) - def prepair_refund(self, cr, uid, refund_id, invoice, date=None, period_id=None, description=None, journal_id=None, context=None): + def _prepare_refund(self, cr, uid, refund_id, invoice, date=None, period_id=None, description=None, journal_id=None, context=None): obj_invoice_line = self.pool.get('account.invoice.line') obj_invoice_tax = self.pool.get('account.invoice.tax') obj_journal = self.pool.get('account.journal') @@ -1181,7 +1181,12 @@ def refund(self, cr, uid, ids, date=None, period_id=None, description=None, jour invoices = self.read(cr, uid, ids, ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', 'partner_contact', 'partner_insite', 'partner_ref', 'payment_term', 'account_id', 'currency_id', 'invoice_line', 'tax_line', 'journal_id', 'company_id'], context=context) new_ids = [] for invoice in invoices: - invoice = self.prepair_refund(cr, uid, invoice['id'], invoice, date=date, period_id=period_id, description=description, journal_id=journal_id, context=context) + invoice = self._prepare_refund(cr, uid, invoice['id'], invoice, + date=date, + period_id=period_id, + description=description, + journal_id=journal_id, + context=context) # create the new invoice new_ids.append(self.create(cr, uid, invoice, context=context))