Skip to content

Commit f34900b

Browse files
committed
[ADD] ERPLibre odoo 15 migration om_fiscal_year
1 parent 2b2e540 commit f34900b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2025 TechnoLibre <https://technolibre.ca>
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
import logging
4+
5+
from openupgradelib import openupgrade
6+
7+
from odoo.tools.translate import _
8+
9+
_logger = logging.getLogger(__name__)
10+
11+
12+
13+
def change_owner_group_fiscal_year(env):
14+
"""When installing om_account_accountant, got a conflict duplicated group group_fiscal_year
15+
"""
16+
res_groups = env['res.groups'].sudo()
17+
# Remove any stale/duplicate mapping of the old XMLID
18+
res_groups.search([
19+
('name', '=', 'Allow to define fiscal years of more or less than a year'),
20+
]).unlink()
21+
22+
23+
@openupgrade.migrate()
24+
def migrate(env, version):
25+
change_owner_group_fiscal_year(env)

0 commit comments

Comments
 (0)