Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] base: rename field groups_id into group_ids & all_group_ids #169

Closed
wants to merge 1 commit into from

Conversation

Gorash
Copy link
Contributor

@Gorash Gorash commented Nov 28, 2024

No description provided.

@robodoo
Copy link
Contributor

robodoo commented Nov 28, 2024

Pull request status dashboard

@Gorash Gorash marked this pull request as ready for review November 28, 2024 13:50
@Gorash Gorash force-pushed the master-groups_id-chm branch from a9dcb73 to 7a96f02 Compare November 28, 2024 14:16
src/base/0.0.0/end-user_groups_view.py Outdated Show resolved Hide resolved
src/base/tests/test_util.py Outdated Show resolved Hide resolved
@Gorash Gorash force-pushed the master-groups_id-chm branch from 7a96f02 to bef8239 Compare November 29, 2024 08:25
src/base/tests/test_util.py Outdated Show resolved Hide resolved
src/base/tests/test_util.py Outdated Show resolved Hide resolved
src/base/tests/test_util.py Outdated Show resolved Hide resolved
src/base/tests/test_util.py Outdated Show resolved Hide resolved
@Gorash Gorash force-pushed the master-groups_id-chm branch 2 times, most recently from a8798f9 to 6e05e87 Compare December 3, 2024 10:59
@Gorash Gorash force-pushed the master-groups_id-chm branch from 69ac0dc to 6e05e87 Compare December 9, 2024 14:55
@Gorash Gorash force-pushed the master-groups_id-chm branch from 6e05e87 to f239894 Compare January 6, 2025 10:25
@Gorash Gorash force-pushed the master-groups_id-chm branch 2 times, most recently from a9238eb to e12abaa Compare January 9, 2025 13:37
src/base/tests/test_util.py Outdated Show resolved Hide resolved
@Gorash Gorash force-pushed the master-groups_id-chm branch 2 times, most recently from 436b1ae to 84da0c6 Compare January 16, 2025 12:52
@Gorash Gorash force-pushed the master-groups_id-chm branch from 84da0c6 to 5c53bec Compare January 20, 2025 13:01
@Gorash Gorash force-pushed the master-groups_id-chm branch from 5c53bec to ecbe99e Compare January 29, 2025 09:43
@rco-odoo rco-odoo force-pushed the master-groups_id-chm branch 2 times, most recently from 2b46f91 to 6598374 Compare February 11, 2025 10:15
@rco-odoo rco-odoo force-pushed the master-groups_id-chm branch from 6598374 to ef6b9a8 Compare February 13, 2025 08:10
@rco-odoo
Copy link
Member

@aj-fuentes the branch is ready. We are simply waiting for runbot to build it one last time before merging.

@aj-fuentes
Copy link
Contributor

Missing link to upgrade PR in the commit message -> hence matt is red here.

Copy link
Contributor

@aj-fuentes aj-fuentes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robodoo delegate=rco-odoo

Still consider linking the right upgrade PR via the commit message ;)

@rco-odoo rco-odoo force-pushed the master-groups_id-chm branch from ef6b9a8 to 9ec68fb Compare February 13, 2025 08:47
@rco-odoo
Copy link
Member

@aj-fuentes done 👍

@rco-odoo
Copy link
Member

@robodoo r+

@robodoo
Copy link
Contributor

robodoo commented Feb 13, 2025

@Gorash @rco-odoo linked pull request(s) odoo/enterprise#74122, odoo/odoo#179354 not ready. Linked PRs are not staged until all of them are ready.

robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 13, 2025
The private method _has_group() is the implementation of method
has_group(), and they only differ for 'base.group_no_one', where the
public method takes into account the session.  For all the other groups,
one should use the public method.

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 13, 2025
The "group definitions" was using a dummy element to indicate whether
the user is in debug mode. This allowed the implications of the groups
in the data to not be changed.  The 'debug-mode' element is not used as
data (neither in views nor in xmlids).

The management of 'base.group_no_one' is not consistent from the start.
It is a magic group that historically was added or removed depending
on the url used. 'base.group_no_one' is not to be considered as a
group but as a display feature independent of security and user set.

Typically the templates do not match the intent.
In each case, we want an "and" and not an "or":
e.g.:
    `<filter name="not_secured" string="Not Secured" ... groups="account.group_account_secured,base.group_no_one"/>`
    or
    `<menuitem ... name="Configuration" ... groups="base.group_system,base.group_no_one"/>`

We isolate this special behavior inside the processing of views.

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 13, 2025
The interface feature is in their own file.
This will ease the review of the commits that follow.

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 13, 2025
…user_ids

(all_user_ids is temporarily equal to user_ids)

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 13, 2025
…up_ids

(all_group_ids is temporary equal to group_ids)

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 13, 2025
From this point on, the fields 'all_group_ids' and 'all_user_ids' use
the reflexive transitive closure of implied groups.

Models:
```
<res.groups>:
  implied_ids        = Many2many <res.groups> Users of this group are also implicitly part of these groups (db table 'res_groups_implied_rel')
  all_implied_ids    = Many2many <res.groups> Reflexive transitive closure of 'implied_ids'
  implied_by_ids     = Many2many <res.groups> Inverse relation of 'implied_ids'
  all_implied_by_ids = Many2many <res.groups> Reflexive transitive closure of 'implied_by_ids'

  user_ids           = Many2many <res.users>  Users with this group (db table: 'res_groups_users_rel')
  all_user_ids       = Many2many <res.users>  Users and implied users

<res.users>:
  group_ids          = Many2many <res.groups> Group added directly to this user (db table: 'res_groups_users_rel')
  all_group_ids      = Many2many <res.groups> Groups and implied groups
```

Concept:
```
The groups involved are to be interpreted as sets.
Thus we can define groups that we will call for example N, Z... such as mathematical sets.
        ┌──────────────────────────────────────────┐
        │ C  ┌──────────────────────────┐          │
        │    │ R  ┌───────────────────┐ │ ┌──────┐ |   "C"
        │    │    │ Q  ┌────────────┐ │ │ │ I    | |   "I" implied "C"
        │    │    │    │ Z  ┌─────┐ │ │ │ │      | |   "R" implied "C"
        │    │    │    │    │ N   │ │ │ │ │      │ │   "Q" implied "R"
        │    │    │    │    └─────┘ │ │ │ │      │ │   "R\Q" implied "R"
        │    │    │    └────────────┘ │ │ │      │ │   "Z" implied "Q"
        │    │    └───────────────────┘ │ │      │ │   "N" implied "Z"
        │    │      ┌───────────────┐   │ │      │ │
        │    │      │ R\Q           │   │ │      │ │
        │    │      └───────────────┘   │ └──────┘ │
        │    └──────────────────────────┘          │
        └──────────────────────────────────────────┘
    For example:
    * A manager group will imply a user group: all managers are users (like Z imply C);
    * A group "computer developer employee" will imply that he is an employee group, a user
      group, that he has access to the timesheet user group.... "computer developer employee"
      is therefore a set of users in the intersection of these groups. These users will
      therefore have all the rights of these groups in addition to their own access rights.
```

XML data example:
```xml
<record model="res.groups" id="group_system">
    <field name="name">Settings</field>
    <field name="implied_ids" eval="[Command.link(ref('group_erp_manager')), Command.link(ref('group_sanitize_override'))]"/>
    <field name="user_ids" eval="[Command.link(ref('base.user_root')), Command.link(ref('base.user_admin'))]"/>
</record>
```
```xml
<record model="res.groups" id="group_no_one">
    <field name="name">Technical Features</field>
    <field name="implied_by_ids" eval="[Command.link(ref('group_user')), Command.link(ref('group_system'))]"/>
</record>

or

<record model="res.groups" id="group_no_one">
    <field name="name">Technical Features</field>
</record>
<record id="group_user">
    <field name="implied_ids" eval="[Command.link(ref('group_no_one'))]"/>
</record>
<record id="group_system">
    <field name="implied_ids" eval="[Command.link(ref('group_no_one'))]"/>
</record>
```

PY example:
```py
group_helpdesk = self.env.ref('helpdesk.group_helpdesk_user')
group_export = self.env.ref('base.group_allow_export')
group_portal = self.env.ref('base.group_portal')

user_portal_helpdesck = self.env['res.users'].search([('all_group_ids', 'in', group_helpdesk.id), ('all_group_ids', 'in', group_portal.id)])

user_portal_helpdesck.group_ids += group_export

user_export = group_export.all_user_ids

user_has_export = group_export.user_ids

```

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 13, 2025
Added a new 'technical' UI to easily visualize the implications of the
groups and to be able to easily access the access right.  This change
completely removes the hack of reified fields, and implements the UI
with a client-side widget.

closes #179354

Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit that referenced this pull request Feb 13, 2025
Task: 4166361 & 4341594

related:
odoo/odoo#179354
odoo/upgrade#6841
odoo/enterprise#74122

closes #169

Related: odoo/odoo#179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 13, 2025
The private method _has_group() is the implementation of method
has_group(), and they only differ for 'base.group_no_one', where the
public method takes into account the session.  For all the other groups,
one should use the public method.

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 13, 2025
The "group definitions" was using a dummy element to indicate whether
the user is in debug mode. This allowed the implications of the groups
in the data to not be changed.  The 'debug-mode' element is not used as
data (neither in views nor in xmlids).

The management of 'base.group_no_one' is not consistent from the start.
It is a magic group that historically was added or removed depending
on the url used. 'base.group_no_one' is not to be considered as a
group but as a display feature independent of security and user set.

Typically the templates do not match the intent.
In each case, we want an "and" and not an "or":
e.g.:
    `<filter name="not_secured" string="Not Secured" ... groups="account.group_account_secured,base.group_no_one"/>`
    or
    `<menuitem ... name="Configuration" ... groups="base.group_system,base.group_no_one"/>`

We isolate this special behavior inside the processing of views.

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 13, 2025
The interface feature is in their own file.
This will ease the review of the commits that follow.

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 13, 2025
…user_ids

(all_user_ids is temporarily equal to user_ids)

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 13, 2025
…up_ids

(all_group_ids is temporary equal to group_ids)

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 13, 2025
From this point on, the fields 'all_group_ids' and 'all_user_ids' use
the reflexive transitive closure of implied groups.

Models:
```
<res.groups>:
  implied_ids        = Many2many <res.groups> Users of this group are also implicitly part of these groups (db table 'res_groups_implied_rel')
  all_implied_ids    = Many2many <res.groups> Reflexive transitive closure of 'implied_ids'
  implied_by_ids     = Many2many <res.groups> Inverse relation of 'implied_ids'
  all_implied_by_ids = Many2many <res.groups> Reflexive transitive closure of 'implied_by_ids'

  user_ids           = Many2many <res.users>  Users with this group (db table: 'res_groups_users_rel')
  all_user_ids       = Many2many <res.users>  Users and implied users

<res.users>:
  group_ids          = Many2many <res.groups> Group added directly to this user (db table: 'res_groups_users_rel')
  all_group_ids      = Many2many <res.groups> Groups and implied groups
```

Concept:
```
The groups involved are to be interpreted as sets.
Thus we can define groups that we will call for example N, Z... such as mathematical sets.
        ┌──────────────────────────────────────────┐
        │ C  ┌──────────────────────────┐          │
        │    │ R  ┌───────────────────┐ │ ┌──────┐ |   "C"
        │    │    │ Q  ┌────────────┐ │ │ │ I    | |   "I" implied "C"
        │    │    │    │ Z  ┌─────┐ │ │ │ │      | |   "R" implied "C"
        │    │    │    │    │ N   │ │ │ │ │      │ │   "Q" implied "R"
        │    │    │    │    └─────┘ │ │ │ │      │ │   "R\Q" implied "R"
        │    │    │    └────────────┘ │ │ │      │ │   "Z" implied "Q"
        │    │    └───────────────────┘ │ │      │ │   "N" implied "Z"
        │    │      ┌───────────────┐   │ │      │ │
        │    │      │ R\Q           │   │ │      │ │
        │    │      └───────────────┘   │ └──────┘ │
        │    └──────────────────────────┘          │
        └──────────────────────────────────────────┘
    For example:
    * A manager group will imply a user group: all managers are users (like Z imply C);
    * A group "computer developer employee" will imply that he is an employee group, a user
      group, that he has access to the timesheet user group.... "computer developer employee"
      is therefore a set of users in the intersection of these groups. These users will
      therefore have all the rights of these groups in addition to their own access rights.
```

XML data example:
```xml
<record model="res.groups" id="group_system">
    <field name="name">Settings</field>
    <field name="implied_ids" eval="[Command.link(ref('group_erp_manager')), Command.link(ref('group_sanitize_override'))]"/>
    <field name="user_ids" eval="[Command.link(ref('base.user_root')), Command.link(ref('base.user_admin'))]"/>
</record>
```
```xml
<record model="res.groups" id="group_no_one">
    <field name="name">Technical Features</field>
    <field name="implied_by_ids" eval="[Command.link(ref('group_user')), Command.link(ref('group_system'))]"/>
</record>

or

<record model="res.groups" id="group_no_one">
    <field name="name">Technical Features</field>
</record>
<record id="group_user">
    <field name="implied_ids" eval="[Command.link(ref('group_no_one'))]"/>
</record>
<record id="group_system">
    <field name="implied_ids" eval="[Command.link(ref('group_no_one'))]"/>
</record>
```

PY example:
```py
group_helpdesk = self.env.ref('helpdesk.group_helpdesk_user')
group_export = self.env.ref('base.group_allow_export')
group_portal = self.env.ref('base.group_portal')

user_portal_helpdesck = self.env['res.users'].search([('all_group_ids', 'in', group_helpdesk.id), ('all_group_ids', 'in', group_portal.id)])

user_portal_helpdesck.group_ids += group_export

user_export = group_export.all_user_ids

user_has_export = group_export.user_ids

```

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 13, 2025
Added a new 'technical' UI to easily visualize the implications of the
groups and to be able to easily access the access right.  This change
completely removes the hack of reified fields, and implements the UI
with a client-side widget.

closes #179354

Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit that referenced this pull request Feb 13, 2025
Task: 4166361 & 4341594

related:
odoo/odoo#179354
odoo/upgrade#6841
odoo/enterprise#74122

closes #169

Related: odoo/odoo#179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Signed-off-by: Raphael Collet <rco@odoo.com>
@robodoo
Copy link
Contributor

robodoo commented Feb 14, 2025

@Gorash @rco-odoo linked pull request(s) odoo/enterprise#74122 not ready. Linked PRs are not staged until all of them are ready.

@rco-odoo rco-odoo force-pushed the master-groups_id-chm branch from 9ec68fb to 5644415 Compare February 15, 2025 08:54
@rco-odoo
Copy link
Member

@robodoo r+

robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 15, 2025
The private method _has_group() is the implementation of method
has_group(), and they only differ for 'base.group_no_one', where the
public method takes into account the session.  For all the other groups,
one should use the public method.

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 15, 2025
The "group definitions" was using a dummy element to indicate whether
the user is in debug mode. This allowed the implications of the groups
in the data to not be changed.  The 'debug-mode' element is not used as
data (neither in views nor in xmlids).

The management of 'base.group_no_one' is not consistent from the start.
It is a magic group that historically was added or removed depending
on the url used. 'base.group_no_one' is not to be considered as a
group but as a display feature independent of security and user set.

Typically the templates do not match the intent.
In each case, we want an "and" and not an "or":
e.g.:
    `<filter name="not_secured" string="Not Secured" ... groups="account.group_account_secured,base.group_no_one"/>`
    or
    `<menuitem ... name="Configuration" ... groups="base.group_system,base.group_no_one"/>`

We isolate this special behavior inside the processing of views.

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 15, 2025
The interface feature is in their own file.
This will ease the review of the commits that follow.

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 15, 2025
…user_ids

(all_user_ids is temporarily equal to user_ids)

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 15, 2025
…up_ids

(all_group_ids is temporary equal to group_ids)

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 15, 2025
From this point on, the fields 'all_group_ids' and 'all_user_ids' use
the reflexive transitive closure of implied groups.

Models:
```
<res.groups>:
  implied_ids        = Many2many <res.groups> Users of this group are also implicitly part of these groups (db table 'res_groups_implied_rel')
  all_implied_ids    = Many2many <res.groups> Reflexive transitive closure of 'implied_ids'
  implied_by_ids     = Many2many <res.groups> Inverse relation of 'implied_ids'
  all_implied_by_ids = Many2many <res.groups> Reflexive transitive closure of 'implied_by_ids'

  user_ids           = Many2many <res.users>  Users with this group (db table: 'res_groups_users_rel')
  all_user_ids       = Many2many <res.users>  Users and implied users

<res.users>:
  group_ids          = Many2many <res.groups> Group added directly to this user (db table: 'res_groups_users_rel')
  all_group_ids      = Many2many <res.groups> Groups and implied groups
```

Concept:
```
The groups involved are to be interpreted as sets.
Thus we can define groups that we will call for example N, Z... such as mathematical sets.
        ┌──────────────────────────────────────────┐
        │ C  ┌──────────────────────────┐          │
        │    │ R  ┌───────────────────┐ │ ┌──────┐ |   "C"
        │    │    │ Q  ┌────────────┐ │ │ │ I    | |   "I" implied "C"
        │    │    │    │ Z  ┌─────┐ │ │ │ │      | |   "R" implied "C"
        │    │    │    │    │ N   │ │ │ │ │      │ │   "Q" implied "R"
        │    │    │    │    └─────┘ │ │ │ │      │ │   "R\Q" implied "R"
        │    │    │    └────────────┘ │ │ │      │ │   "Z" implied "Q"
        │    │    └───────────────────┘ │ │      │ │   "N" implied "Z"
        │    │      ┌───────────────┐   │ │      │ │
        │    │      │ R\Q           │   │ │      │ │
        │    │      └───────────────┘   │ └──────┘ │
        │    └──────────────────────────┘          │
        └──────────────────────────────────────────┘
    For example:
    * A manager group will imply a user group: all managers are users (like Z imply C);
    * A group "computer developer employee" will imply that he is an employee group, a user
      group, that he has access to the timesheet user group.... "computer developer employee"
      is therefore a set of users in the intersection of these groups. These users will
      therefore have all the rights of these groups in addition to their own access rights.
```

XML data example:
```xml
<record model="res.groups" id="group_system">
    <field name="name">Settings</field>
    <field name="implied_ids" eval="[Command.link(ref('group_erp_manager')), Command.link(ref('group_sanitize_override'))]"/>
    <field name="user_ids" eval="[Command.link(ref('base.user_root')), Command.link(ref('base.user_admin'))]"/>
</record>
```
```xml
<record model="res.groups" id="group_no_one">
    <field name="name">Technical Features</field>
    <field name="implied_by_ids" eval="[Command.link(ref('group_user')), Command.link(ref('group_system'))]"/>
</record>

or

<record model="res.groups" id="group_no_one">
    <field name="name">Technical Features</field>
</record>
<record id="group_user">
    <field name="implied_ids" eval="[Command.link(ref('group_no_one'))]"/>
</record>
<record id="group_system">
    <field name="implied_ids" eval="[Command.link(ref('group_no_one'))]"/>
</record>
```

PY example:
```py
group_helpdesk = self.env.ref('helpdesk.group_helpdesk_user')
group_export = self.env.ref('base.group_allow_export')
group_portal = self.env.ref('base.group_portal')

user_portal_helpdesck = self.env['res.users'].search([('all_group_ids', 'in', group_helpdesk.id), ('all_group_ids', 'in', group_portal.id)])

user_portal_helpdesck.group_ids += group_export

user_export = group_export.all_user_ids

user_has_export = group_export.user_ids

```

Part-of: #179354
Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this pull request Feb 15, 2025
Added a new 'technical' UI to easily visualize the implications of the
groups and to be able to easily access the access right.  This change
completely removes the hack of reified fields, and implements the UI
with a client-side widget.

closes #179354

Related: odoo/enterprise#74122
Related: odoo/upgrade#6841
Related: odoo/upgrade-util#169
Signed-off-by: Raphael Collet <rco@odoo.com>
@robodoo robodoo closed this in 46a9980 Feb 15, 2025
@robodoo robodoo added the 18.2 label Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants