Review: Needs Fixing
Hello,
Thanks for the merge proposal ! I however have some comments. Look for example
at the method:
def create_notificate(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_subscribe(cr, uid, ids, [obj.user_id.id], context=context)
self.message_append_note(cr, uid, ids, _('System notification'),
_("""Quotation for <em>%s</em> <b>created</b>.""")
% (obj.partner_id.name), type='notification', context=context)
You browse on all records, but you subscribe the user of a give record to all
record (in 'message_subscribe': you give ids). Moreover, as the message is
generic, do not include 'message_append_note' in the for loop; the method works
on ids. By the way, as said on the crm merge proposal, all methods should end
with _send_note instead of _notificate. The method will look like :
def create_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_subscribe(cr, uid, [obj.id], [obj.user_id.id], context=context)
self.message_append_note(cr, uid, ids, _('System notification'),
_("""Quotation for <em>%s</em> <b>created</b>.""")
% (obj.partner_id.name), type='notification', context=context)
Otherwise it looks good !
Best regards,
Thibault.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-social-sales-rga/+merge/97168
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