Odoo Help

0

New custom message subtype notification does not notify partners.

By
SavingVanilla
on 10/19/15, 10:47 PM 1,654 views

I've been wanting to add custom message subtypes on my odoo v8, in order to track changes on particular fields. Specifically, Description, and Work Summary. 

I've implemented the necessary message subtypes, but it seems that it's not working, though Odoo did not show any error. If it's working, followers of that task will be notified (with an addition to the unread message count). Here's my code for making "Description" work initially.

project.py

_track = { 
'description': {
'project.mt_desc': lambda self, cr, uid, obj, ctx=None: obj.description,
},
}
_columns = {
'description': fields.text('Description', track_visibility='onchange'),
}


project_data.xml

<record id="mt_desc" model="mail.message.subtype">
<field name="name">Description</field>
<field name="res_model">project.task</field>
<field name="default" eval="True"/>
<field name="description">Description</field>
</record>
<record id="mt_project_desc" model="mail.message.subtype">
<field name="name">Description</field>
<field name="sequence">14</field>
<field name="res_model">project.project</field>
<field name="parent_id" eval="ref('mt_desc')"/>
<field name="relation_field">project_id</field>
</record>
 

 And I realized that the "Description" option is not appearing in the drop down list.

I had to manually create a subtype through Settings > Email > Subtype using the GUI in order to let it show, but it does not have any effect whatsoever.


UPDATE : I just found out that I was able to log the changes through the use of track_visibility='onchange' on the "description" field, which can be seen in the open chatter log. But it does not increase the needaction counter indicating unread messages. So I went on to troubleshoot and found that the change is registered as a message ( Settings > Email > Messages), but not as a notification ( Settings > Email > Notification ). I think this is the why there is no increase in needaction counter for unread messages.

Looking forward to your valuable insights on this. Thanks.  

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 10/19/15, 10:47 PM
Seen: 1654 times
Last updated: 10/19/15, 10:56 PM