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

Hi all,

I want to modifie the content of the subtype message in sale order like:

Quotation confirmed

    • Customer: Bizou Florence

    • Untaxed Amount: 1799.99

into another content.

Best regards.

 

الصورة الرمزية
إهمال
أفضل إجابة

Hello Bernsheinder,

The main key of the message is "track_visibility" parameter in the fields.

Source 

Forum: What is _track Property is? 

Documentation: What is _track Property is? 

الصورة الرمزية
إهمال
أفضل إجابة

You can Modify that message from Settings->Email->Subtypes

And search for Sales Order Confirmation  open the one with model sale.order

الصورة الرمزية
إهمال
أفضل إجابة

sale.order inherits an object called "mail.thread" , which enables this feature

So by using "message_post", one can pass the necessary message....

Example:

self.message_post(cr, uid, [new_id], body=_("Quotation created"), context=context)

Now you can change body message to suite your necessary:

self.message_post(cr, uid, [new_id], body=_("Quotation Confirmed"), context=context)

Hint: use Ctrl + H to search in the addon modules...

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

yes, I have seen this method but the content of the message not in the all modules in openerp! Can you help me?

الكاتب

The solution I need is that I can modify the content of the message but I can't see where is the file.py or file.xml which this content is stored.

ya the method is presented in module mail.thread... all other module which inherits it, will gain access to that method...

الكاتب

Oups! the solution is in mail_thread.py format_message method. :)

You can see that below the sale.order record... like a chat messages it will attached to the corresponding records...

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أبريل 23
8782
1
أبريل 23
26435
1
سبتمبر 16
4833
1
مايو 25
1127
2
مايو 25
1191