mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-20 13:32:04 +02:00
13 lines
405 B
Python
13 lines
405 B
Python
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import models
|
|
|
|
|
|
class ResGroups(models.Model):
|
|
_inherit = "res.groups"
|
|
|
|
def write(self, vals):
|
|
res = super().write(vals)
|
|
if vals.get("user_ids"):
|
|
self.env["discuss.channel"].search([("group_ids", "in", self.all_implied_ids._ids)])._subscribe_users_automatically()
|
|
return res
|