@@ -245,7 +245,7 @@ def _compute_data(self, cr, uid, ids, name, arg, context=None):
245
245
continue
246
246
else :
247
247
result [id ][name ] = self ._get_address (attdata .sent_by_uid .name , \
248
- attdata .sent_by_uid .user_email )
248
+ attdata .sent_by_uid .email )
249
249
250
250
if name == 'cn' :
251
251
if attdata .user_id :
@@ -289,7 +289,7 @@ def _compute_data(self, cr, uid, ids, name, arg, context=None):
289
289
290
290
if name == 'language' :
291
291
user_obj = self .pool .get ('res.users' )
292
- lang = user_obj .read (cr , uid , uid , ['context_lang ' ], context = context )['context_lang ' ]
292
+ lang = user_obj .read (cr , uid , uid , ['lang ' ], context = context )['lang ' ]
293
293
result [id ][name ] = lang .replace ('_' , '-' )
294
294
295
295
return result
@@ -434,7 +434,7 @@ def ics_datetime(idate, short=False):
434
434
if not organizer :
435
435
organizer = event_obj .user_id
436
436
event_org .params ['CN' ] = [organizer .name ]
437
- event_org .value = 'MAILTO:' + (organizer .user_email or organizer .name )
437
+ event_org .value = 'MAILTO:' + (organizer .email or organizer .name )
438
438
439
439
if event_obj .alarm_id :
440
440
# computes alarm data
@@ -535,7 +535,7 @@ def onchange_user_id(self, cr, uid, ids, user_id, *args, **argv):
535
535
return {'value' : {'email' : '' }}
536
536
usr_obj = self .pool .get ('res.users' )
537
537
user = usr_obj .browse (cr , uid , user_id , * args )
538
- return {'value' : {'email' : user .user_email , 'availability' :user .availability }}
538
+ return {'value' : {'email' : user .email , 'availability' :user .availability }}
539
539
540
540
def do_tentative (self , cr , uid , ids , context = None , * args ):
541
541
""" Makes event invitation as Tentative
@@ -891,9 +891,9 @@ def do_run_scheduler(self, cr, uid, automatic=False, use_new_cursor=False, \
891
891
892
892
""" % (alarm .name , alarm .trigger_date , alarm .description , \
893
893
alarm .user_id .name , alarm .user_id .signature )
894
- mail_to = [alarm .user_id .user_email ]
894
+ mail_to = [alarm .user_id .email ]
895
895
for att in alarm .attendee_ids :
896
- mail_to .append (att .user_id .user_email )
896
+ mail_to .append (att .user_id .email )
897
897
if mail_to :
898
898
mail_message .schedule_with_attach (cr , uid ,
899
899
tools .config .get ('email_from' , False ),
@@ -947,7 +947,7 @@ def onchange_dates(self, cr, uid, ids, start_date, duration=False, end_date=Fals
947
947
value ['duration' ] = duration
948
948
# change start_date's time to 00:00:00 in the user's timezone
949
949
user = self .pool .get ('res.users' ).browse (cr , uid , uid )
950
- tz = pytz .timezone (user .context_tz ) if user .context_tz else pytz .utc
950
+ tz = pytz .timezone (user .tz ) if user .tz else pytz .utc
951
951
start = pytz .utc .localize (start ).astimezone (tz ) # convert start in user's timezone
952
952
start = start .replace (hour = 0 , minute = 0 , second = 0 ) # change start's time to 00:00:00
953
953
start = start .astimezone (pytz .utc ) # convert start back to utc
@@ -1097,8 +1097,8 @@ def default_organizer(self, cr, uid, context=None):
1097
1097
user_pool = self .pool .get ('res.users' )
1098
1098
user = user_pool .browse (cr , uid , uid , context = context )
1099
1099
res = user .name
1100
- if user .user_email :
1101
- res += " <%s>" % (user .user_email )
1100
+ if user .email :
1101
+ res += " <%s>" % (user .email )
1102
1102
return res
1103
1103
1104
1104
_defaults = {
0 commit comments