تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
5 الردود
5392 أدوات العرض

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?

الصورة الرمزية
إهمال

Have you checked the code of that specific addon?

الكاتب

Yes, I tried searching for it but without success.

أفضل إجابة

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.

الصورة الرمزية
إهمال
الكاتب

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.

الكاتب

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.

الكاتب

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

الكاتب

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

أفضل إجابة

Hi,

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

الصورة الرمزية
إهمال
الكاتب

No, there is no automated action defined.

المنشورات ذات الصلة الردود أدوات العرض النشاط
0
أغسطس 19
2188
0
أغسطس 19
2578
2
فبراير 25
1484
2
يناير 24
1693
2
ديسمبر 23
1673