[FIX] base_contact migration to contact

lp bug: https://launchpad.net/bugs/927707 fixed

bzr revid: al@openerp.com-20120215132213-n8v4isg4ibftr15f
This commit is contained in:
Antony Lesuisse 2012-02-15 14:22:13 +01:00
parent 351d056c44
commit d8a6fa3b40
1 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ class res_partner_contact(osv.osv):
'lang_id': fields.many2one('res.lang', 'Language'),
'job_ids': fields.one2many('res.partner.address', 'contact_id', 'Functions and Addresses'),
'country_id': fields.many2one('res.country','Nationality'),
'birthdate': fields.date('Birth Date'),
'birthdate': fields.char('Birthdate', size=64),
'active': fields.boolean('Active', help="If the active field is set to False,\
it will allow you to hide the partner contact without removing it."),
'partner_id': fields.related('job_ids', 'partner_id', type='many2one',\
@ -99,9 +99,9 @@ class res_partner_contact(osv.osv):
cr.execute("""
INSERT INTO
res_partner_contact
(id,name,last_name,title,active)
(id,name,last_name,title,active,email,mobile,birthdate)
SELECT
id,COALESCE(name, '/'),COALESCE(name, '/'),title,true
id,COALESCE(name, '/'),COALESCE(name, '/'),title,true,email,mobile,birthdate
FROM
res_partner_address""")
cr.execute("alter table res_partner_address add contact_id int references res_partner_contact")