Review: Needs Fixing

Hello,

A quick first review :
- message_append_note should use a 'string' value (default: 'other') for 
subtype_id (call it subtype_name). Move the 'get_object_reference' inside this 
method (search for 'mail_subtype_%s_%s' % (model_name, subtype_name), related 
to the current module (ex: crm, mail_subtype_crm_lead_other)) before calling 
message_append with the subtype_id.
--> this way, in crm_lead, we can have shorter statements: return 
self.message_append_note(cr, uid, ids, body=_("Stage changed to <b>%s</b>.") % 
(stage_name), subtype="stage change", context=context)
- subtype model: put a constraint name is uniq, just to be sure
- in crm_lead_data: just to have easy-to-read data, also set the True default 
values

Some changes on how to automatically subscribe :
- in mail_thread, define message_get_follower_fields that return a list of user 
fields (ex: ['user_id'])
- in mail_thread, create and write call 'message_get_follower_fields', read 
those fields in the record, and subscribe the users given by those fields
- in crm.py (for the example): define message_get_follower_fields(...): return 
['user_id']
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-message-sub-type-apa-mail-subtype-fka/+merge/119346
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-message-sub-type-apa.

_______________________________________________
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

Reply via email to