notificationsodooodoo-11odoo-12quotations

Unable to differentiate between note and message in Odoo 12


When I log any note (after clicking log note link) inside sale-> quotations or CRM -> activity

After entering any note when I check in notification section is doesn't show 'Note By ...' label in Odoo 12, in Odoo 11 it works fine.

I debugged the code and found that there is problem in the base module

mail->static->src->js->models->messages->abstract_message.js -> isNote()  

function is returning NULL! Please tell me is it a bug or how to differentiate between message and note.

Thank you!

Screen Shot - 1(Odoo 12) Screen Shot - 2 (Odoo 11)


Solution

  • You can differentiate notes from messages by the background color of the notification:

    enter image description here


    To distinguish a note in code, you have to use the internal field of the message's subtype_id:

    is_note = message.subtype_id.internal