[FIX] google_calendar: do not strip bools

myself.cal_client_id could be False, when not filling in the according field in the general settings screen.
Therefore, trying to strip it won't work, as boolean do not have such method.

Regression introduced during rev. faee926f1b
This commit is contained in:
Denis Ledoux 2015-01-20 18:44:38 +01:00
parent 9c8c534c19
commit 124e476943
1 changed files with 2 additions and 2 deletions

View File

@ -13,8 +13,8 @@ class calendar_config_settings(osv.TransientModel):
def set_calset(self,cr,uid,ids,context=None) :
params = self.pool['ir.config_parameter']
myself = self.browse(cr,uid,ids[0],context=context)
params.set_param(cr, uid, 'google_calendar_client_id', myself.cal_client_id.strip() or '', groups=['base.group_system'], context=None)
params.set_param(cr, uid, 'google_calendar_client_secret', myself.cal_client_secret.strip() or '', groups=['base.group_system'], context=None)
params.set_param(cr, uid, 'google_calendar_client_id', (myself.cal_client_id or '').strip(), groups=['base.group_system'], context=None)
params.set_param(cr, uid, 'google_calendar_client_secret', (myself.cal_client_secret or '').strip(), groups=['base.group_system'], context=None)
def get_default_all(self,cr,uid,ids,context=None):