From 6d6471d7e5a6c115369dfb3a4378d31a1f74521c Mon Sep 17 00:00:00 2001 From: Elouan Le Bars Date: Fri, 14 Feb 2020 12:09:33 +0100 Subject: [PATCH] [MIG] easy_my_coop_taxshelter_report : adapt to version 12.0 --- .../models/tax_shelter_declaration.py | 20 +++-- .../reports/tax_shelter_resold_report.xml | 81 ++++++------------ .../reports/tax_shelter_shares_report.xml | 83 ++++++------------- .../tax_shelter_subscription_report.xml | 82 ++++++------------ 4 files changed, 84 insertions(+), 182 deletions(-) diff --git a/easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py b/easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py index cd33bc1..50ec191 100644 --- a/easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py +++ b/easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py @@ -237,15 +237,17 @@ class TaxShelterCertificate(models.Model): certificate.state = 'no_eligible' self.env.cr.commit() - @api.multi - def print_subscription_certificate(self): - self.ensure_one() - return self.env['report'].get_action(self, 'easy_my_coop_taxshelter_report.tax_shelter_subscription_report') - - @api.multi - def print_shares_certificate(self): - self.ensure_one() - return self.env['report'].get_action(self, 'easy_my_coop_taxshelter_report.tax_shelter_shares_report') + @api.multi + def print_subscription_certificate(self): + self.ensure_one() + report = self.env.ref("easy_my_coop_taxshelter_report.action_tax_shelter_subscription_report") + return report.report_action(self) + + @api.multi + def print_shares_certificate(self): + self.ensure_one() + report = self.env.ref("easy_my_coop_taxshelter_report.action_tax_shelter_shares_report") + return report.report_action(self) @api.multi def _compute_amounts(self): diff --git a/easy_my_coop_taxshelter_report/reports/tax_shelter_resold_report.xml b/easy_my_coop_taxshelter_report/reports/tax_shelter_resold_report.xml index e5abd65..21faf8d 100644 --- a/easy_my_coop_taxshelter_report/reports/tax_shelter_resold_report.xml +++ b/easy_my_coop_taxshelter_report/reports/tax_shelter_resold_report.xml @@ -2,74 +2,42 @@ - + diff --git a/easy_my_coop_taxshelter_report/reports/tax_shelter_shares_report.xml b/easy_my_coop_taxshelter_report/reports/tax_shelter_shares_report.xml index 21f311c..5f6134b 100644 --- a/easy_my_coop_taxshelter_report/reports/tax_shelter_shares_report.xml +++ b/easy_my_coop_taxshelter_report/reports/tax_shelter_shares_report.xml @@ -2,75 +2,43 @@ - + diff --git a/easy_my_coop_taxshelter_report/reports/tax_shelter_subscription_report.xml b/easy_my_coop_taxshelter_report/reports/tax_shelter_subscription_report.xml index 4cec67e..5b46546 100644 --- a/easy_my_coop_taxshelter_report/reports/tax_shelter_subscription_report.xml +++ b/easy_my_coop_taxshelter_report/reports/tax_shelter_subscription_report.xml @@ -2,74 +2,41 @@ - +