Return ids instead of instance in credit wizard

issue2979
review709004
(transplanted from 204118f95ae21037b40b265d2bc682b1d29eb9c4)
This commit is contained in:
Cédric Krier committed 2013-03-15 01:01:36 +01:00
1 parent e5b00c093d
commit d605376ce8
1 file changed
+3 -3
+3 -3
View File
@@ -2452,9 +2452,9 @@ class CreditInvoice(Wizard):
if invoice.payment_lines:
self.raise_user_error('refund_with_payement')
invoice_ids = Invoice.credit(invoices, refund=refund)
credit_invoices = Invoice.credit(invoices, refund=refund)
data = {'res_id': invoice_ids}
if len(invoice_ids) == 1:
data = {'res_id': [i.id for i in credit_invoices]}
if len(credit_invoices) == 1:
action['views'].reverse()
return action, data