[MERGE] Sync with trunk
bzr revid: tde@openerp.com-20140411145955-91iohb1enc50se5l
This commit is contained in:
commit
aa48312b98
|
@ -249,9 +249,8 @@ class gamification_goal(osv.Model):
|
|||
'object': goal,
|
||||
'pool': self.pool,
|
||||
'cr': cr,
|
||||
'context': dict(context), # copy context to prevent side-effects of eval
|
||||
'context': dict(context), # copy context to prevent side-effects of eval
|
||||
'uid': uid,
|
||||
# 'result': False,
|
||||
'date': date, 'datetime': datetime, 'timedelta': timedelta, 'time': time
|
||||
}
|
||||
code = goal.definition_id.compute_code.strip()
|
||||
|
|
|
@ -118,19 +118,19 @@ class res_users(osv.Model):
|
|||
various mailboxes, we do not have access to the current partner_id. """
|
||||
if isinstance(thread_id, (list, tuple)):
|
||||
thread_id = thread_id[0]
|
||||
final_partner_ids = set()
|
||||
current_pids = []
|
||||
partner_ids = kwargs.get('partner_ids', [])
|
||||
partner_id = self._message_post_get_pid(cr, uid, thread_id, context=context)
|
||||
user_pid = self._message_post_get_pid(cr, uid, thread_id, context=context)
|
||||
for partner_id in partner_ids:
|
||||
if isinstance(partner_id, (list, tuple)) and partner_id[0] == 4 and len(partner_id) == 2:
|
||||
final_partner_ids.add(partner_id[1])
|
||||
current_pids.append(partner_id[1])
|
||||
elif isinstance(partner_id, (list, tuple)) and partner_id[0] == 6 and len(partner_id) == 3:
|
||||
final_partner_ids.add(partner_id[2])
|
||||
current_pids.append(partner_id[2])
|
||||
elif isinstance(partner_id, (int, long)):
|
||||
final_partner_ids.add(partner_id)
|
||||
if partner_id not in final_partner_ids:
|
||||
final_partner_ids.append(partner_id)
|
||||
kwargs['partner_ids'] = final_partner_ids
|
||||
current_pids.append(partner_id)
|
||||
if user_pid not in current_pids:
|
||||
partner_ids.append(user_pid)
|
||||
kwargs['partner_ids'] = partner_ids
|
||||
return self.pool.get('mail.thread').message_post(cr, uid, False, **kwargs)
|
||||
|
||||
def message_update(self, cr, uid, ids, msg_dict, update_vals=None, context=None):
|
||||
|
|
Loading…
Reference in New Issue