Skip to Content
Menu
This question has been flagged
5 Replies
5255 Views

So basically I have Maintenance addon and it is sending email whenever there is for example stage change of the maintenance request. But I can't find where it is defined. There is nothing inside tab Technical > Templates in developer mode. I tried searching for key phrases in odoo files but without success.
How do I access them?

Avatar
Discard

Have you checked the code of that specific addon?

Author

Yes, I tried searching for it but without success.

Best Answer

Hi Andrzej:

The "Tracking" attribute is enabled at the field level.

  • Enable Developer mode

  • Go to Settings > Technical > Models (under Database Structure) and open the "Maintenance Request" model

  • Open the "stage_id" field. In the Base Properties section, "Tracking" has been set to "On Change".

This is causing all the changes in this field to be tracked in the Chatter which in turn is triggering the notifications to the followers.

Avatar
Discard
Author

I see... But how do I change the format of this message?

Please elaborate on what you mean by "format of this message". I didn't quite understand your question.

Author

I want to change body of that message, write something else in the email.

It is defined as a "System Notification". Go to Settings > Technical > Messages and group by "Type". Looks like the message cannot be changed since there is no "template" associated with it.

Author

Even in the files somehow? I have no problem with modifying source code, but I couldn't find the thing.

This seems to be where the emails are getting composed in the code:

https://github.com/odoo/odoo/blob/12.0/addons/mail/models/mail_thread.py#L2202

Author

And from where does the body of the message comes from? I'm having trouble tracing it back to the source.

The body of the message is being compiled by looking at all the tracked fields in the model and logging the values of the fields that have changed. Take a look at this piece of the code that is part of the base functionality.

https://github.com/odoo/odoo/blob/12.0/addons/mail/models/mail_thread.py#L625

Best Answer

Hi,

   Make sure that if there any automated action defined for maintenance.for that Enable Developer mode --> technical --> Automation -->Automated actions           

Avatar
Discard
Author

No, there is no automated action defined.

Related Posts Replies Views Activity
0
Aug 19
2140
0
Aug 19
2540
2
Feb 25
1362
2
Jan 24
1594
2
Dec 23
1582