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
9 changes: 9 additions & 0 deletions spp_area/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ Dependencies
Changelog
=========

19.0.2.0.3
~~~~~~~~~~

- fix(views): follow the ``base_user_role`` rename of
``res.users.role_ids`` to ``user_role_ids`` (OCA/server-backend #428).
The user form override inserted the center-areas group before
``role_ids``, which no longer exists in the parent view, so the module
failed to install.

19.0.2.0.2
~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion spp_area/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "OpenSPP Area Management",
"summary": "Establishes direct associations between OpenSPP registrants, beneficiary groups, and their corresponding geographical administrative areas. It validates registrant-area linkages against official area types, ensuring data integrity and enabling targeted program delivery and analysis.",
"category": "OpenSPP/Core",
"version": "19.0.2.0.2",
"version": "19.0.2.0.3",
"sequence": 1,
"author": "OpenSPP.org",
"website": "https://github.com/OpenSPP/OpenSPP2",
Expand Down
4 changes: 4 additions & 0 deletions spp_area/readme/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 19.0.2.0.3

- fix(views): follow the `base_user_role` rename of `res.users.role_ids` to `user_role_ids` (OCA/server-backend #428). The user form override inserted the center-areas group before `role_ids`, which no longer exists in the parent view, so the module failed to install.

### 19.0.2.0.2

- fix(security): grant `group_area_viewer` (read-only) to spp_user_roles support roles (Global Support, Global Support Manager, Local Support) so they can browse area records per the OP#951 menu audit.
Expand Down
14 changes: 12 additions & 2 deletions spp_area/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,16 @@ <h2><a class="toc-backref" href="#toc-entry-1">Changelog</a></h2>
</div>
</div>
<div class="section" id="section-1">
<h1>19.0.2.0.3</h1>
<ul class="simple">
<li>fix(views): follow the <tt class="docutils literal">base_user_role</tt> rename of
<tt class="docutils literal">res.users.role_ids</tt> to <tt class="docutils literal">user_role_ids</tt> (OCA/server-backend #428).
The user form override inserted the center-areas group before
<tt class="docutils literal">role_ids</tt>, which no longer exists in the parent view, so the module
failed to install.</li>
</ul>
</div>
<div class="section" id="section-2">
<h1>19.0.2.0.2</h1>
<ul class="simple">
<li>fix(security): grant <tt class="docutils literal">group_area_viewer</tt> (read-only) to
Expand All @@ -545,7 +555,7 @@ <h1>19.0.2.0.2</h1>
audit.</li>
</ul>
</div>
<div class="section" id="section-2">
<div class="section" id="section-3">
<h1>19.0.2.0.1</h1>
<ul class="simple">
<li>fix(security): add a global <tt class="docutils literal">ir.rule</tt> on <tt class="docutils literal">res.partner</tt> that
Expand All @@ -557,7 +567,7 @@ <h1>19.0.2.0.1</h1>
domain is a no-op for users without center areas (global roles).</li>
</ul>
</div>
<div class="section" id="section-3">
<div class="section" id="section-4">
<h1>19.0.2.0.0</h1>
<ul class="simple">
<li>Initial migration to OpenSPP2</li>
Expand Down
2 changes: 1 addition & 1 deletion spp_area/views/user.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
invisible="role_type != 'local'"
/>
</xpath>
<xpath expr="//field[@name='role_ids']" position="before">
<xpath expr="//field[@name='user_role_ids']" position="before">
<group colspan="4" col="4">
<field
name="center_area_ids"
Expand Down
10 changes: 10 additions & 0 deletions spp_user_roles/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ Dependencies
Changelog
=========

19.0.2.0.2
~~~~~~~~~~

- fix(views): follow the ``base_user_role`` rename of
``res.users.role_ids`` to ``user_role_ids`` (OCA/server-backend #428).
The list-view override anchored its xpath on ``role_ids``, so the
module failed to install against the current ``19.0`` head of
``base_user_role`` ("Element cannot be located in parent view") and
took every dependent module down with it.

19.0.2.0.1
~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion spp_user_roles/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"name": "OpenSPP User Roles",
"category": "OpenSPP",
"version": "19.0.2.0.1",
"version": "19.0.2.0.2",
"sequence": 1,
"author": "OpenSPP.org",
"website": "https://github.com/OpenSPP/OpenSPP2",
Expand Down
2 changes: 1 addition & 1 deletion spp_user_roles/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class ResUsersCustomSPP(models.Model):
_inherit = "res.users"

# Stored version of role_ids for list view display
# Stored version of base_user_role.user_role_ids for list view display
# The base_user_role One2many computed field doesn't display in list views
role_ids_stored = fields.Many2many(
comodel_name="res.users.role",
Expand Down
4 changes: 4 additions & 0 deletions spp_user_roles/readme/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 19.0.2.0.2

- fix(views): follow the `base_user_role` rename of `res.users.role_ids` to `user_role_ids` (OCA/server-backend #428). The list-view override anchored its xpath on `role_ids`, so the module failed to install against the current `19.0` head of `base_user_role` ("Element cannot be located in parent view") and took every dependent module down with it.

### 19.0.2.0.1

- fix(role): allow assigning groups to a brand-new role in a single save. Clicking **Add a line** in the role form's Groups tab used to trigger inline creation of a blank `res.groups` row, which raised a required-field validation error and aborted the save. The `implied_ids` field's inner list now uses `create="0"` so the button opens an "Add" picker against existing groups, and `res.users.role.create()` extracts `implied_ids` before `super().create()` and writes them to the role's `group_id` afterwards — mirroring the existing `write()` workaround in `base_user_role` for the same `_inherits` cache-clearing bug.
Expand Down
13 changes: 12 additions & 1 deletion spp_user_roles/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,17 @@ <h2><a class="toc-backref" href="#toc-entry-1">Changelog</a></h2>
</div>
</div>
<div class="section" id="section-1">
<h1>19.0.2.0.2</h1>
<ul class="simple">
<li>fix(views): follow the <tt class="docutils literal">base_user_role</tt> rename of
<tt class="docutils literal">res.users.role_ids</tt> to <tt class="docutils literal">user_role_ids</tt> (OCA/server-backend #428).
The list-view override anchored its xpath on <tt class="docutils literal">role_ids</tt>, so the
module failed to install against the current <tt class="docutils literal">19.0</tt> head of
<tt class="docutils literal">base_user_role</tt> (“Element cannot be located in parent view”) and
took every dependent module down with it.</li>
</ul>
</div>
<div class="section" id="section-2">
<h1>19.0.2.0.1</h1>
<ul class="simple">
<li>fix(role): allow assigning groups to a brand-new role in a single
Expand All @@ -517,7 +528,7 @@ <h1>19.0.2.0.1</h1>
<tt class="docutils literal">base_user_role</tt> for the same <tt class="docutils literal">_inherits</tt> cache-clearing bug.</li>
</ul>
</div>
<div class="section" id="section-2">
<div class="section" id="section-3">
<h1>19.0.2.0.0</h1>
<ul class="simple">
<li>Initial migration to OpenSPP2</li>
Expand Down
4 changes: 2 additions & 2 deletions spp_user_roles/views/user.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
</field>
</record>

<!-- Override list view to use stored role_ids field for proper display -->
<!-- Override list view to use the stored roles field instead of base_user_role.user_role_ids -->
<record id="view_res_users_tree_inherit_spp_user_roles" model="ir.ui.view">
<field name="name">res.users.list.inherit.spp.user.roles</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base_user_role.view_res_users_tree_inherit" />
<field name="priority">99</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='role_ids']" position="replace">
<xpath expr="//field[@name='user_role_ids']" position="replace">
<field name="role_ids_stored" widget="many2many_tags" optional="show" />
</xpath>
</field>
Expand Down
Loading