← Back to team overview

credativ team mailing list archive

[Bug 1200888] Re: Bug migrating 'mail' module due to a view associated to 'base' module. ('base.view_crm_partner_info_History')

 

Hi Stefan,
You may remember my problem from Question #231855.
After I install new open upgrade-server, everything was strait to post-migration. 
It seems there is mobile field problem at the new model.
Related parts of log file is as below:

.........
2013-07-26 13:29:18,485 8714 INFO b6 OpenUpgrade: base: post-migration script called with version 6.1.1.3
2013-07-26 13:29:18,487 8714 DEBUG b6 OpenUpgrade: model ir.mail_server, field active: setting default value of resources [2, 6] to True
2013-07-26 13:29:18,510 8714 DEBUG b6 OpenUpgrade: model res.partner, field is_company: setting default value of resources [3611, 151, 3619, 142,
..........
2013-07-26 13:29:44,081 8714 DEBUG b6 OpenUpgrade: model res.company, field custom_footer: setting default value of resources [1] to True
2013-07-26 13:29:44,111 8714 DEBUG b6 OpenUpgrade: model ir.model.access, field active: setting default value of resources [1, 2, 3, 4, 5, 
..........
17] to True
2013-07-26 13:29:46,043 8714 DEBUG b6 OpenUpgrade: Running  UPDATE ir_translation
            SET state = 'translated'
            WHERE length(value) > 0;
        
2013-07-26 13:29:46,043 8714 DEBUG b6 OpenUpgrade: 14229 rows affected
2013-07-26 13:29:46,049 8714 DEBUG b6 OpenUpgrade: Running  UPDATE ir_translation
            SET state = 'to_translate'
            WHERE state is NULL;
        
2013-07-26 13:29:46,049 8714 DEBUG b6 OpenUpgrade: 0 rows affected
2013-07-26 13:29:46,349 8714 ERROR b6 openerp.sql_db: Programming error: column "mobile" does not exist
LINE 1: ...irthdate, city, country_id, email, fax, function, mobile, ph...
                                                             ^
, in query SELECT id, birthdate, city, country_id, email, fax, function, mobile, phone, state_id, street, street2, type, zip, partner_id, name FROM res_partner_address WHERE type = 'default'
2013-07-26 13:29:46,350 8714 ERROR b6 OpenUpgrade: base: error in migration script /opt/openerp/openupgrade-server/openerp/addons/base/migrations/7.0.1.3/post-migration.py: column "mobile" does not exist
LINE 1: ...irthdate, city, country_id, email, fax, function, mobile, ph...
                                                             ^

2013-07-26 13:29:46,350 8714 ERROR b6 OpenUpgrade: column "mobile" does not exist
LINE 1: ...irthdate, city, country_id, email, fax, function, mobile, ph...
                                                             ^
Traceback (most recent call last):
  File "/opt/openerp/openupgrade-server/openerp/openupgrade/openupgrade.py", line 435, in wrapped_function
    func(cr, version)
  File "base/migrations/7.0.1.3/post-migration.py", line 199, in migrate
  File "base/migrations/7.0.1.3/post-migration.py", line 145, in migrate_partner_address
  File "base/migrations/7.0.1.3/post-migration.py", line 109, in process_address_type
  File "/opt/openerp/openupgrade-server/openerp/sql_db.py", line 161, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/openerp/openupgrade-server/openerp/sql_db.py", line 226, in execute
    res = self._obj.execute(query, params)
ProgrammingError: column "mobile" does not exist
LINE 1: ...irthdate, city, country_id, email, fax, function, mobile, ph...
                                                             ^

2013-07-26 13:29:46,351 8714 ERROR b6 openerp.modules.loading: Error executing post migration script for module base
: column "mobile" does not exist
LINE 1: ...irthdate, city, country_id, email, fax, function, mobile, ph...
                                                             ^

2013-07-26 13:29:46,366 8714 ERROR b6 openerp: Failed to initialize database `b6`.
Traceback (most recent call last):
  File "/opt/openerp/openupgrade-server/openerp/cli/server.py", line 98, in preload_registry
    db, registry = openerp.pooler.get_db_and_pool(dbname,update_module=update_module)
  File "/opt/openerp/openupgrade-server/openerp/pooler.py", line 33, in get_db_and_pool
    registry = RegistryManager.get(db_name, force_demo, status, update_module)
  File "/opt/openerp/openupgrade-server/openerp/modules/registry.py", line 192, in get
    update_module)
  File "/opt/openerp/openupgrade-server/openerp/modules/registry.py", line 218, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/opt/openerp/openupgrade-server/openerp/modules/loading.py", line 475, in load_modules
    cr.close()
  File "/opt/openerp/openupgrade-server/openerp/sql_db.py", line 160, in wrapper
    raise psycopg2.OperationalError(msg)
OperationalError: Unable to use a closed cursor.

-- 
You received this bug notification because you are a member of
OpenUpgrade Committers, which is subscribed to OpenUpgrade Server.
https://bugs.launchpad.net/bugs/1200888

Title:
  Bug migrating 'mail' module due to a view associated to 'base' module.
  ('base.view_crm_partner_info_History')

Status in OpenUpgrade Server:
  Fix Committed

Bug description:
  Hi

  I have a problem doing the migration of 'mail' module.

  It's about the view 'base.view_crm_partner_info_History' (inherits 'base.view_partner_form') in 6.1. 
  (In 7.0, the view doesn't exist anymore.)

  *** Reproduce the bug :
  - install a 6.1 database without module (juste 'base') & run openupgrade server ; 
  - OpenUpgrade: 'base' pre-migration : OK
  - openerp.modules.modules : init_module_models : OK
  - openerp.modules.loading : loading XML files : OK
  - OpenUpgrade: 'base' post-migration : OK
  - all is OK.

  - re install a 6.1 database, installing 'mail' module & run openupgrade server ; 
  - OpenUpgrade: 'base' pre-migration : OK
  - openerp.modules.modules : init_module_models : OK
  - openerp.modules.loading : loading XML files : --- FAIL ---

  View definition error for inherited view
  'base.view_crm_partner_info_History' on model 'res.partner': Element
  '<xpath expr="/form/notebook/page[@string='History']">' not found in
  parent view 'base.view_partner_form'

  I think that the problem is the following : 
  - 'view_crm_partner_info_History' is associated to 'base' but not created by 'base' module ; 
  - The view is in fact created by 'mail' (or 'marketing_campaign' / 'crm_claim' / 'project' module.)
  - the openupgrade has no time to pass in 'mail' pre-migration.py script, it fail before.

  *** Solution (?): 
  - 'base' pre-migration.py have to delete this view.(if exist)
  It's not very clean 'cause it's not the 'problem' of 'base' module...

To manage notifications about this bug go to:
https://bugs.launchpad.net/openupgrade-server/+bug/1200888/+subscriptions


References