在 Odoo 10 中禁用自动添加伙伴作为关注者 [英] Disable automatic addition of partner as follower in Odoo 10

查看:84
本文介绍了在 Odoo 10 中禁用自动添加伙伴作为关注者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何停止在 Odoo 10 中自动将合作伙伴添加为关注者.每当我创建新的报价或机会时,合作伙伴会自动添加到关注者列表中,并向我不想要的合作伙伴发送电子邮件通知.

How can I stop automatic addition of partners as followers in Odoo 10. Whenever I create a new quotation or opportunity, the partner is automatically added to the followers list and an email notification is send to the partner which I don't want.

如何防止这种情况发生?

How can I prevent this from happening?

推荐答案

您可以使用简单的方法来完成.

You can do it using simple method.

例如:

class sale_order(models.Model):
    _inherit="sale.order"

    @api.model
    def create(self,vals):
        res=super(sale_order,self.with_context('mail_create_nosubscribe':True)).create(vals)
        return res

如果您在上下文中传递 ma​​il_create_nosubscribe True,系统将不会在消息中添加默认关注者.

If you pass mail_create_nosubscribe True in the context, system will not add default followers in the message.

Odoo 在邮件消息上下文中主要支持三种类型的关键字,您可以使用它们来启用/禁用流程模型.

1.tracking_disable :在创建和写入时,不执行任何 MailThread 功能(自动订阅、跟踪、发布等)

1.tracking_disable : At create and write, perform no MailThread features (auto subscription, tracking, post, ...)

2.mail_create_nosubscribe : 在 create 或 message_post 时,不要订阅uid到记录线程

2.mail_create_nosubscribe : At create or message_post, do not subscribe uid to the record thread

3.mail_create_nolog : 在创建时,不记录自动 '已创建'消息

3.mail_create_nolog : At create, do not log the automatic ' created' message

你只需要在上下文中传递值,系统将禁用以上功能.

You need to just pass value in the context, system will disable above features.

这可能对您有所帮助.

这篇关于在 Odoo 10 中禁用自动添加伙伴作为关注者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆