savoirfairelinux-openerp team mailing list archive
-
savoirfairelinux-openerp team
-
Mailing list archive
-
Message #00542
Re: lp:~savoirfairelinux-openerp/openupgrade-server/base_contact into lp:openupgrade-server
> l.51 and l.78: why do you need to check if the fields exist? Seems to me this
> could mask potential problems in the current or future version of the code.
For l.78, I put that in place to avoid an error I had while testing relating to the 'mobile' column, which is not present on a bare system with only base_contact installed. I duplicated that safeguard in l.51 to avoid future similar errors.
Steps to reproduce:
OpenERP 6.1 with new database, install base_contact
Run OpenUpgrade
2013-11-14 16:33:28,336 9796 ERROR upgrade openerp: Failed to initialize database `upgrade`.
Traceback (most recent call last):
...
File "base/migrations/7.0.1.3/post-migration.py", line 282, in migrate
File "base/migrations/7.0.1.3/post-migration.py", line 211, in migrate_partner_address
File "base/migrations/7.0.1.3/post-migration.py", line 170, in process_address_type
File "parts/openerp/openerp/sql_db.py", line 161, in wrapper
return f(self, *args, **kwargs)
File "parts/openerp/openerp/sql_db.py", line 226, in execute
res = self._obj.execute(query, params)
ProgrammingError: column "mobile" does not exist
LIGNE 1 : ...irthdate, city, country_id, email, fax, function, mobile, ph...
^
> l.12: would it not be safer if you checked the status of the entry for
> 'base_contact' in the ir_module_module table? The table could theoretically
> belong to another module, or contain deprecated information after a
> deinstallation of the base_contact module.
It would. It's fixed now.
--
https://code.launchpad.net/~savoirfairelinux-openerp/openupgrade-server/base_contact/+merge/194762
Your team Savoir-faire Linux' OpenERP is subscribed to branch lp:~savoirfairelinux-openerp/openupgrade-server/base_contact.
References