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

We have a model with a chatter and creating records.

For all (by code) newly created records the current user is automatically set as following to the record.

How to avoid this automatic subscription behavior in Odoo14/15?

아바타
취소
작성자

During the meanwhile I figured out a solution.
When the model is being created an additional context can be used like this:
self.env['mymodel'].with_context(mail_create_nosubscribe=True).create(vals)

작성자 베스트 답변

I added message_is_follower in create method:

self.env['mymodel'].create({
       'message_is_follower': False,
       ....

Which was not working...


-------------------------------------

SOLUTION:

This code prevents automatic follow assignment of the current user during creating new database records.

self.env['mymodel'].with_context(mail_create_nosubscribe=True).create(vals)


아바타
취소

Could you post a bit more of the script you tried?

베스트 답변

When you set the properties of the record set 'message_is_follower': False

아바타
취소
관련 게시물 답글 화면 활동
1
2월 25
1325
2
12월 24
2267
0
11월 24
1102
0
1월 25
2559
1
10월 23
2687