Review: Needs Fixing
Hello,
Thanks for the merge proposal ! Here are my comments.
1/ get_needaction_user_id -> get_needaction_user_ids, returning a list, as for
other merge props
2/ def case_create_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
if obj.user_id.id :
self.message_subscribe(cr, uid, ids, [obj.user_id.id], context=context)
obj.message_append_note('',_("Project has been <b>created</b>."))
return True
I think if this case, we should override the get_subscribers method, to add
user_id to the subscribers. Because if we change the user_id, you will have the
old user_id subscribed, but not the new one.
You should have something like
def message_get_subscribers(self, cr, uid, ids, context=None):
sub_ids = self.message_get_subscribers_ids(cr, uid, ids, context=context);
# add the project manager if present
for obj in self.browse(cr, uid, ids, context=context):
if obj.user_id:
sub_ids.append(obj.user_id.id)
return self.pool.get('res.users').read(cr, uid, sub_ids, context=context)
def create_send_note(self, cr, uid, ids, context=None):
return self.message_append_note(cr, uid, ids, '',_("Project has been
<b>created</b>."), context=context)
3/ Here, case_ prefix is not necessary as we do not inherit from crm_base or
crm_case.
Best regards,
Thibault.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-social-project-bth/+merge/97645
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-social-tde.
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp