コード例 #1
0
ファイル: crm_meeting.py プロジェクト: 3dfxmadscientist/CBSS
 def _find_allowed_model_wise(self, cr, uid, doc_model, doc_dict, context=None):
     if doc_model == "crm.meeting":
         for virtual_id in self.pool.get(doc_model)._get_recurrent_ids(
             cr, uid, doc_dict.keys(), [], context=context
         ):
             doc_dict.setdefault(virtual_id, doc_dict[get_real_ids(virtual_id)])
     return super(mail_message, self)._find_allowed_model_wise(cr, uid, doc_model, doc_dict, context=context)
コード例 #2
0
 def message_post(self,
                  cr,
                  uid,
                  thread_id,
                  body='',
                  subject=None,
                  type='notification',
                  subtype=None,
                  parent_id=False,
                  attachments=None,
                  context=None,
                  **kwargs):
     if isinstance(thread_id, str):
         thread_id = get_real_ids(thread_id)
     return super(crm_meeting, self).message_post(cr,
                                                  uid,
                                                  thread_id,
                                                  body=body,
                                                  subject=subject,
                                                  type=type,
                                                  subtype=subtype,
                                                  parent_id=parent_id,
                                                  attachments=attachments,
                                                  context=context,
                                                  **kwargs)
コード例 #3
0
ファイル: crm_meeting.py プロジェクト: 3dfxmadscientist/CBSS
 def write(self, cr, uid, ids, vals, context=None):
     """
     when posting an attachment (new or not), convert the virtual ids in real ids.
     """
     if isinstance(vals.get("res_id"), str):
         vals["res_id"] = get_real_ids(vals.get("res_id"))
     return super(ir_attachment, self).write(cr, uid, ids, vals, context=context)
コード例 #4
0
ファイル: crm_meeting.py プロジェクト: 3dfxmadscientist/CBSS
 def message_post(
     self,
     cr,
     uid,
     thread_id,
     body="",
     subject=None,
     type="notification",
     subtype=None,
     parent_id=False,
     attachments=None,
     context=None,
     **kwargs
 ):
     if isinstance(thread_id, str):
         thread_id = get_real_ids(thread_id)
     return super(crm_meeting, self).message_post(
         cr,
         uid,
         thread_id,
         body=body,
         subject=subject,
         type=type,
         subtype=subtype,
         parent_id=parent_id,
         attachments=attachments,
         context=context,
         **kwargs
     )
コード例 #5
0
ファイル: crm_meeting.py プロジェクト: raji91/OE7
 def write(self, cr, uid, ids, vals, context=None):
     '''
     when posting an attachment (new or not), convert the virtual ids in real ids.
     '''
     if isinstance(vals.get('res_id'), str):
         vals['res_id'] = get_real_ids(vals.get('res_id'))
     return super(ir_attachment, self).write(cr, uid, ids, vals, context=context)
コード例 #6
0
ファイル: crm_meeting.py プロジェクト: 3dfxmadscientist/CBSS
 def default_get(self, cr, uid, fields, context=None):
     """
     in case someone clicked on 'invite others' wizard in the followers widget, transform virtual ids in real ids
     """
     result = super(invite_wizard, self).default_get(cr, uid, fields, context=context)
     if "res_id" in result:
         result["res_id"] = get_real_ids(result["res_id"])
     return result
コード例 #7
0
ファイル: crm_meeting.py プロジェクト: 0k/OpenUpgrade
 def search(self, cr, uid, args, offset=0, limit=0, order=None, context=None, count=False):
     '''
     convert the search on real ids in the case it was asked on virtual ids, then call super()
     '''
     for index in range(len(args)):
         if args[index][0] == "res_id" and isinstance(args[index][2], str):
             args[index][2] = get_real_ids(args[index][2])
     return super(ir_attachment, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)
コード例 #8
0
ファイル: crm_meeting.py プロジェクト: raji91/OE7
 def default_get(self, cr, uid, fields, context=None):
     '''
     in case someone clicked on 'invite others' wizard in the followers widget, transform virtual ids in real ids
     '''
     result = super(invite_wizard, self).default_get(cr, uid, fields, context=context)
     if 'res_id' in result:
         result['res_id'] = get_real_ids(result['res_id'])
     return result
コード例 #9
0
ファイル: crm_meeting.py プロジェクト: raji91/OE7
 def search(self, cr, uid, args, offset=0, limit=0, order=None, context=None, count=False):
     '''
     convert the search on real ids in the case it was asked on virtual ids, then call super()
     '''
     for index in range(len(args)):
         if args[index][0] == "res_id" and isinstance(args[index][2], str):
             args[index][2] = get_real_ids(args[index][2])
     return super(ir_attachment, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)
コード例 #10
0
 def _find_allowed_model_wise(self,
                              cr,
                              uid,
                              doc_model,
                              doc_dict,
                              context=None):
     if doc_model == 'crm.meeting':
         for virtual_id in self.pool[doc_model].get_recurrent_ids(
                 cr, uid, doc_dict.keys(), [], context=context):
             doc_dict.setdefault(virtual_id,
                                 doc_dict[get_real_ids(virtual_id)])
     return super(mail_message,
                  self)._find_allowed_model_wise(cr,
                                                 uid,
                                                 doc_model,
                                                 doc_dict,
                                                 context=context)