コンテンツへスキップ
メニュー
この質問にフラグが付けられました
5 返信
5402 ビュー

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
8月 19
2190
0
8月 19
2583
2
2月 25
1491
2
1月 24
1698
2
12月 23
1675