[FIX] google_calendar: do not copy user Google info

If a user syncs his calendar with Google,
and a second user is created in the database by copying this first
user, the Google information of the first user was copied
(The Google account to sync, the token to use, the last
syncrhonization date, ...), which is obviously wrong.

On calendar syncrhonization, which can be done
manually or automatically with the according cron, all
events of the first user were created a second time,
as a second user synchronized the same Google Calendar.

opw-674141
This commit is contained in:
Denis Ledoux 2016-05-10 16:05:47 +02:00
parent 3954affc30
commit a0366b3a66
1 changed files with 5 additions and 5 deletions

View File

@ -987,12 +987,12 @@ class res_users(osv.Model):
_inherit = 'res.users'
_columns = {
'google_calendar_rtoken': fields.char('Refresh Token'),
'google_calendar_token': fields.char('User token'),
'google_calendar_token_validity': fields.datetime('Token Validity'),
'google_calendar_last_sync_date': fields.datetime('Last synchro date'),
'google_calendar_rtoken': fields.char('Refresh Token', copy=False),
'google_calendar_token': fields.char('User token', copy=False),
'google_calendar_token_validity': fields.datetime('Token Validity', copy=False),
'google_calendar_last_sync_date': fields.datetime('Last synchro date', copy=False),
'google_calendar_cal_id': fields.char('Calendar ID', help='Last Calendar ID who has been synchronized. If it is changed, we remove \
all links between GoogleID and Odoo Google Internal ID')
all links between GoogleID and Odoo Google Internal ID', copy=False)
}