← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 798655] Re: country_id in crm_lead doesn't exist and can't start server when updating modules

 

** Description changed:

  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, in the select for
- creating table the column still appears:
+ 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
              )

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/798655

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

Status in OpenERP Modules (addons):
  New

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
              )

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/798655/+subscriptions


References