diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index aedb6e9f133..787fc536d45 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -497,6 +497,14 @@ class AccountInvoice(models.Model): self.create_workflow() return True + @api.multi + def get_formview_id(self): + """ Update form view id of action to open the invoice """ + if self.type == 'in_invoice': + return self.env.ref('account.invoice_supplier_form').id + else: + return self.env.ref('account.invoice_form').id + @api.multi def get_taxes_values(self): tax_grouped = {}