Skip to content
Closed
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
1 change: 0 additions & 1 deletion spp_dms/security/security.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@

<record id="group_dms_user" model="res.groups">
<field name="name">User (Deprecated)</field>
<field name="privilege_id" ref="privilege_dms" />
<field
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To ensure that the privilege_id is actually cleared from existing records in the database during a module upgrade, simply removing the line from the XML is often insufficient in Odoo. In many cases, Odoo retains the existing value in the database if the field is omitted from the record definition during an update. It is recommended to explicitly set the field to False to guarantee it is hidden from the privilege selector as intended.

Suggested change
<field
<field name="privilege_id" eval="False" />
<field

name="comment"
>DEPRECATED: Legacy group maintained for backwards compatibility. Use group_dms_officer instead.</field>
Expand Down
2 changes: 1 addition & 1 deletion spp_dms/views/main_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
id="main_menu_spp_dms"
name="DMS"
web_icon="spp_dms,static/description/OpenSPP-Icons-DMS.png"
groups="spp_dms.group_dms_user"
groups="spp_dms.group_dms_viewer"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The PR aims to ensure that any assigned DMS role grants access to the application. However, the group_dms_config_admin group (which corresponds to the "Config Access" role in the privilege selector) is not included in this menu's groups attribute and does not inherit from group_dms_viewer. Consequently, users assigned only the "Config Access" role will be unable to see the DMS app on the home screen. You should include this group to ensure all functional DMS roles have visibility of the root menu.

Suggested change
groups="spp_dms.group_dms_viewer"
groups="spp_dms.group_dms_viewer,spp_dms.group_dms_config_admin"

/>
<menuitem
id="menu_spp_dms_config"
Expand Down
Loading