Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions fix_compute_trans_implied_groups/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
====================================
Fix trans implied groups computation
====================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7c2c1f40816d9460f2b852c46de1cdd7a4673461d1ee0638e88d00f478290ec7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/14.0/fix_compute_trans_implied_groups
:alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-fix_compute_trans_implied_groups
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=14.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

The computation of `res.groups.trans_implied_ids` is broken, check it by executing the following steps:
1. Install `sale` module
2. In the Odoo shell execute: `env["res.groups"].get_groups_by_application()`

*Actual result*
`[..., (ir.module.category(52,), 'boolean', res.groups(22, 21, 20), (100, 'Other')) , ...]`

*Expected result*
`[..., (ir.module.category(52,), 'selection', res.groups(20, 21, 22), (5, 'Sales')) , ...]`

*Additional info*
The result of `get_groups_by_application` is correct if the computation of `res.groups.trans_implied_ids` is called executing:
`env["res.groups"].search([])._compute_trans_implied()`

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20fix_compute_trans_implied_groups%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* PyTech

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/14.0/fix_compute_trans_implied_groups>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions fix_compute_trans_implied_groups/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
15 changes: 15 additions & 0 deletions fix_compute_trans_implied_groups/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2025 Simone Rubino - PyTech
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Fix trans implied groups computation",
"summary": "Fix transitively implied groups computation",
"version": "14.0.1.0.0",
"author": "PyTech, Odoo Community Association (OCA)",
"category": "Tools",
"license": "AGPL-3",
"website": "https://github.com/OCA/server-tools",
"depends": [
"base",
],
}
3 changes: 3 additions & 0 deletions fix_compute_trans_implied_groups/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import res_groups
12 changes: 12 additions & 0 deletions fix_compute_trans_implied_groups/models/res_groups.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2025 Simone Rubino - PyTech
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class ResGroups(models.Model):
_inherit = "res.groups"

trans_implied_ids = fields.Many2many(
recursive=True,
)
13 changes: 13 additions & 0 deletions fix_compute_trans_implied_groups/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
The computation of `res.groups.trans_implied_ids` is broken, check it by executing the following steps:
1. Install `sale` module
2. In the Odoo shell execute: `env["res.groups"].get_groups_by_application()`

*Actual result*
`[..., (ir.module.category(52,), 'boolean', res.groups(22, 21, 20), (100, 'Other')) , ...]`

*Expected result*
`[..., (ir.module.category(52,), 'selection', res.groups(20, 21, 22), (5, 'Sales')) , ...]`

*Additional info*
The result of `get_groups_by_application` is correct if the computation of `res.groups.trans_implied_ids` is called executing:
`env["res.groups"].search([])._compute_trans_implied()`
Loading