콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
8 답글
6080 화면

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
4월 23
8977
1
4월 23
26740
1
9월 16
5058
1
8월 25
1689
1
5월 25
1374