From 7f571f085223301b225e1e9e78d63cae9bdf1438 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 11 Apr 2016 12:54:38 +0200 Subject: [PATCH] [FIX] crm_partner_assign: avoid report view deletion The SQL view `crm_partner_report_assign` makes a join on `account_invoice_report` A column is added to `account_invoice_report` in the module `sale` (`section_id` is added to the view), making the SQL view `account_invoice_report` replaced automatically at the install/update of the `sale` module, which leads to the automatic deletion of the SQL view `crm_partner_report_assign`, because the SQL view `account_invoice_report` is altered. Therefore, after the install/update of the `sale` module, the view `crm_partner_report_assign` was deleted, and the "partnership anaylsis" unusable. This revision makes sure to init the `crm.partner.report.assign` report after every init of the `account.invoice.report`. opw-674177 --- addons/crm_partner_assign/report/crm_partner_report.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/crm_partner_assign/report/crm_partner_report.py b/addons/crm_partner_assign/report/crm_partner_report.py index 4f0fe14297d..db9e3b2c00b 100644 --- a/addons/crm_partner_assign/report/crm_partner_report.py +++ b/addons/crm_partner_assign/report/crm_partner_report.py @@ -68,4 +68,11 @@ class crm_partner_report_assign(osv.osv): )""") +class account_invoice_report(osv.osv): + _inherit = 'account.invoice.report' + + def init(self, cr): + super(account_invoice_report, self).init(cr) + self.pool['crm.partner.report.assign'].init(cr) + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: