[FIX] Errors in navigation to customer invoices / vendor bills

This commit is contained in:
Jordi Ballester Alomar
2019-02-04 11:36:35 +01:00
committed by mreficent
parent 46260f5c8a
commit 0b0ba917f0
4 changed files with 34 additions and 6 deletions

View File

@@ -349,3 +349,13 @@ class AccountAnalyticAccount(models.Model):
'target': 'new',
'context': ctx,
}
@api.multi
def button_show_recurring_invoices(self):
self.ensure_one()
action = self.env.ref(
'contract.act_purchase_recurring_invoices')
if self.contract_type == 'sale':
action = self.env.ref(
'contract.act_recurring_invoices')
return action.read()[0]