diff --git a/contract/__manifest__.py b/contract/__manifest__.py index f065ff52..96879098 100644 --- a/contract/__manifest__.py +++ b/contract/__manifest__.py @@ -8,7 +8,7 @@ { 'name': 'Contracts Management - Recurring', - 'version': '11.0.4.0.0', + 'version': '11.0.4.1.0', 'category': 'Contract Management', 'license': 'AGPL-3', 'author': "OpenERP SA, " diff --git a/contract/models/account_analytic_account.py b/contract/models/account_analytic_account.py index cd50b0ca..ef5d4667 100644 --- a/contract/models/account_analytic_account.py +++ b/contract/models/account_analytic_account.py @@ -354,3 +354,14 @@ class AccountAnalyticAccount(models.Model): 'target': 'new', 'context': ctx, } + + @api.multi + def button_show_recurring_invoices(self): + self.ensure_one() + if self.contract_type == 'sale': + action = self.env.ref( + 'contract.act_recurring_invoices') + else: + action = self.env.ref( + 'contract.act_purchase_recurring_invoices') + return action.read()[0] diff --git a/contract/views/account_analytic_account_view.xml b/contract/views/account_analytic_account_view.xml index 4e2bea42..4ef6991c 100644 --- a/contract/views/account_analytic_account_view.xml +++ b/contract/views/account_analytic_account_view.xml @@ -35,8 +35,8 @@ groups="base.group_no_one" args='0' /> -