[FIX] rma: Perform refund with proper view

Not indicating account.invoice, it takes the default that is the vendor bill view.
We force the suitable one.
This commit is contained in:
Pedro M. Baeza
2020-09-14 15:58:14 +02:00
committed by Ernesto Tejeda
parent a052e84acd
commit 2e8099f51a
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
{ {
"name": "Return Merchandise Authorization Management", "name": "Return Merchandise Authorization Management",
"summary": "Return Merchandise Authorization (RMA)", "summary": "Return Merchandise Authorization (RMA)",
"version": "12.0.1.4.0", "version": "12.0.1.4.1",
"development_status": "Beta", "development_status": "Beta",
"category": "RMA", "category": "RMA",
"website": "https://github.com/OCA/rma", "website": "https://github.com/OCA/rma",

View File

@@ -573,7 +573,7 @@ class Rma(models.Model):
invoice_form = Form(self.env['account.invoice'].with_context( invoice_form = Form(self.env['account.invoice'].with_context(
default_type='out_refund', default_type='out_refund',
company_id=rmas[0].company_id.id, company_id=rmas[0].company_id.id,
)) ), "account.invoice_form")
rmas[0]._prepare_refund(invoice_form, origin) rmas[0]._prepare_refund(invoice_form, origin)
refund = invoice_form.save() refund = invoice_form.save()
for rma in rmas: for rma in rmas: