Files
tocmo0nlord adbe430761
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled
Initial commit: Odoo 18.0-20251222 extra-addons
2026-03-13 20:43:25 +00:00

29 lines
836 B
Python
Executable File

# Copyright 2018-2016 Tecnativa - Pedro M. Baeza
# Copyright 2020 - Iván Todorovich
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
def post_init_hook(env):
# At installation time, we need to sync followers
partners = env["res.partner"].search(
[
("parent_id", "=", False),
("is_company", "=", True),
"|",
("user_id", "!=", False),
("child_ids.user_id", "!=", False),
]
)
partners._add_followers_from_salesmen()
def uninstall_hook(env): # pragma: no cover
"""At uninstall, revert changes made to record rules"""
env.ref("sales_team.group_sale_salesman_all_leads").write(
{
"implied_ids": [
(6, 0, [env.ref("sales_team.group_sale_salesman").id]),
],
}
)