# referenced thread was not found, we'll have to create a new one
res_id = False
if not res_id:
- res_id = int(create_record(msg))
+ res_id = create_record(msg)
# To forward the email to other followers
self.message_forward(cr, uid, model, [res_id], msg_txt, context=context)
return res_id
return 'Task'
def get_needaction_user_ids(self, cr, uid, ids, context=None):
- """ Returns the user_ids that have to perform an action
+ """ Returns the user_ids that have to perform an action.
+ Add to the previous results given by super the document responsible
+ when in draft mode.
:return: dict { record_id: [user_ids], }
"""
result = super(task, self).get_needaction_user_ids(cr, uid, ids, context=context)
<field name="stage_id" ref="project.project_tt_specification"/>
</record>
- <!-- Call Function to set the leads as Unread -->
+ <!-- Call Function to set some issues as Unread -->
<function model="project.issue" name="message_mark_as_unread"
eval="[ ref('crm_case_improvereportsinhrms0'), ref('crm_case_createnewobject0')], {}"
/>
result = super(purchase_order, self).get_needaction_user_ids(cr, uid, ids, context=context)
for obj in self.browse(cr, uid, ids, context=context):
if obj.state == 'approved':
- result[obj.id] = [obj.validator.id]
+ result[obj.id].append(obj.validator.id)
return result
def create_send_note(self, cr, uid, ids, context=None):
result = super(sale_order, self).get_needaction_user_ids(cr, uid, ids, context=context)
for obj in self.browse(cr, uid, ids, context=context):
if (obj.state == 'manual' or obj.state == 'progress'):
- result[obj.id] = [obj.user_id.id]
+ result[obj.id].append(obj.user_id.id)
return result
def create_send_note(self, cr, uid, ids, context=None):