From a8ad37e65ac6fcabc0d14012f584fc56b7d58c8a Mon Sep 17 00:00:00 2001 From: "RGA(OpenERP)" <> Date: Mon, 9 Jul 2012 18:20:49 +0530 Subject: [PATCH] [fix] crash on followup, inherit sql view bzr revid: rgaopenerp-20120709125049-sld0p7ritubakoyc --- addons/account_followup/account_followup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/account_followup/account_followup.py b/addons/account_followup/account_followup.py index 093a07d3859..4497a254c50 100644 --- a/addons/account_followup/account_followup.py +++ b/addons/account_followup/account_followup.py @@ -87,10 +87,12 @@ class account_move_partner_info(osv.osv): def init(self, cr): tools.drop_view_if_exists(cr, 'account_move_partner_info') cr.execute(""" - create or replace view account_move_partner_info as ( + create or replace view account_move_partner_info as ( SELECT p.id, p.id as partner_id, max(p.last_reconciliation_date) as last_reconciliation_date, - max(l.date) as latest_date, + max(l.date) as latest_date, + count(l.id) as move_lines_count, + max(p.partner_move_count) as partner_move_count, max(l.followup_date) as followup_date, max(l.followup_line_id) as max_followup_id FROM account_move_line as l INNER JOIN res_partner AS p ON (l.partner_id = p.id)