[fix] crash on followup, inherit sql view

bzr revid: rgaopenerp-20120709125049-sld0p7ritubakoyc
This commit is contained in:
RGA(OpenERP)
2012-07-09 18:20:49 +05:30
parent abda554e4b
commit a8ad37e65a
+4 -2
View File
@@ -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)