message=_('<div><p>Hello,</p><p>%s invited you to follow %s document: %s.</p></div>')%(user_name,model_name,document_name)
result['message']=message
elif'message'infields:
result['message']=_('<div><p>Hello,</p><p>%s invited you to follow a new document.</p></div>')%user_name
returnresult
res_model=fields.Char('Related Document Model',required=True,index=True,help='Model of the followed resource')
res_id=fields.Integer('Related Document ID',index=True,help='Id of the followed resource')
partner_ids=fields.Many2many('res.partner',string='Recipients',help="List of partners that will be added as follower of the current document.")
channel_ids=fields.Many2many('mail.channel',string='Channels',help='List of channels that will be added as listeners of the current document.',
domain=[('channel_type','=','channel')])
message=fields.Html('Message')
send_mail=fields.Boolean('Send Email',default=True,help="If checked, the partners will receive an email warning they have been added in the document's followers.")