diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index 81540697766..6c8c160aaba 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -1019,7 +1019,7 @@ class AccountInvoice(models.Model): :return: dict of value to create() the refund """ values = {} - for field in ['name', 'reference', 'comment', 'date_due', 'partner_id', 'company_id', + for field in ['name', 'reference', 'comment', 'date_due', 'partner_id', 'company_id', 'team_id', 'account_id', 'currency_id', 'payment_term_id', 'user_id', 'fiscal_position_id']: if invoice._fields[field].type == 'many2one': values[field] = invoice[field].id diff --git a/addons/account/wizard/account_invoice_refund.py b/addons/account/wizard/account_invoice_refund.py index bb30c799611..729d2bd325d 100644 --- a/addons/account/wizard/account_invoice_refund.py +++ b/addons/account/wizard/account_invoice_refund.py @@ -79,8 +79,7 @@ class AccountInvoiceRefund(models.TransientModel): invoice = inv.read( ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', - 'partner_insite', 'partner_contact', - 'partner_ref', 'payment_term_id', 'account_id', + 'payment_term_id', 'account_id', 'team_id', 'currency_id', 'invoice_line_ids', 'tax_line_ids', 'journal_id', 'date']) invoice = invoice[0] @@ -101,7 +100,7 @@ class AccountInvoiceRefund(models.TransientModel): 'fiscal_position_id': inv.fiscal_position_id.id, }) for field in ('partner_id', 'account_id', 'currency_id', - 'payment_term_id', 'journal_id'): + 'payment_term_id', 'journal_id', 'team_id'): invoice[field] = invoice[field] and invoice[field][0] inv_refund = inv_obj.create(invoice) if inv_refund.payment_term_id.id: