country_id in crm_lead doesn't exist and can't start server when updating modules

Bug #798655 reported by fooflare

This bug report was converted into a question: question #163264: country_id in crm_lead doesn't exist and can't start server when updating modules.

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

Version 6.0.2
My revno. is 4663

When I update the modules this error appears, the column country_id is removed in crm_lead but when creating crm_lead_report view, in select the column still appears:

[2011-06-17 13:49:17,957][Isonor_601_110303] INFO:orm:column country_id (Country) in table crm_lead removed: converted to a function !

[2011-06-17 13:49:18,170][Isonor_601_110303] ERROR:db.cursor:Programming error: no existe la columna c.country_id
LÍNEA 23: c.country_id,
                              ^
, in query
            CREATE OR REPLACE VIEW crm_lead_report AS (
                SELECT
                    id,
                    to_char(c.create_date, 'YYYY') as name,
                    to_char(c.create_date, 'MM') as month,
                    to_char(c.create_date, 'YYYY-MM-DD') as day,
                    to_char(c.create_date, 'YYYY-MM-DD') as creation_date,
                    to_char(c.date_open, 'YYYY-MM-DD') as opening_date,
                    to_char(c.date_closed, 'YYYY-mm-dd') as date_closed,
                    c.state,
                    c.user_id,
                    c.probability,
                    c.stage_id,
                    c.type,
                    c.company_id,
                    c.priority,
                    c.section_id,
                    c.channel_id,
                    c.type_id,
                    c.categ_id,
                    c.partner_id,
                    c.country_id,
                    c.planned_revenue,
                    c.planned_revenue*(c.probability/100) as probable_revenue,
                    1 as nbr,
                    (SELECT count(id) FROM mailgate_message WHERE model='crm.lead' AND res_id=c.id AND history=True) AS email,
                    date_trunc('day',c.create_date) as create_date,
                    extract('epoch' from (c.date_closed-c.create_date))/(3600*24) as delay_close,
                    abs(extract('epoch' from (c.date_deadline - c.date_closed))/(3600*24)) as delay_expected,
                    extract('epoch' from (c.date_open-c.create_date))/(3600*24) as delay_open
                FROM
                    crm_lead c
            )

fooflare (fooflare)
summary: - country_id in crm_lead doesn't exist
+ country_id in crm_lead doesn't exist and can't start server when
+ updating modules
fooflare (fooflare)
description: updated
fooflare (fooflare)
description: updated
Changed in openobject-addons:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.