Skip to content

[15.0][ADD] base_view_action_visibility#1263

Open
AungKoKoLin1997 wants to merge 1 commit intoOCA:15.0from
qrtl:15.0-add-base_view_action_visibility
Open

[15.0][ADD] base_view_action_visibility#1263
AungKoKoLin1997 wants to merge 1 commit intoOCA:15.0from
qrtl:15.0-add-base_view_action_visibility

Conversation

@AungKoKoLin1997
Copy link
Copy Markdown
Contributor

@AungKoKoLin1997 AungKoKoLin1997 commented Mar 24, 2026

This module allows hiding standard view actions (Duplicate and Delete) on a per-model basis through configuration on the ir.model settings. You can hide these actions for all users, or hide them and specify which security groups are allowed to still see them.

@qrtl QT6466

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-base_view_action_visibility branch 2 times, most recently from b5d0501 to 2506501 Compare March 24, 2026 09:53
@AungKoKoLin1997
Copy link
Copy Markdown
Contributor Author

pre-commit issue fixes at #1264.

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-base_view_action_visibility branch from 2506501 to 2b7bb9b Compare March 26, 2026 01:26

if not has_duplicate_restriction and not has_delete_restriction:
return result

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
if view_type == "tree" and not has_delete_restriction:
return result

<field name="model">ir.model</field>
<field name="inherit_id" ref="base.view_model_form" />
<field name="arch" type="xml">
<xpath expr="//notebook" position="before">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
<xpath expr="//notebook" position="before">
<xpath expr="//sheet/notebook" position="before">

ir_model = (
self.env["ir.model"].sudo().search([("model", "=", self._name)], limit=1)
)
if view_type not in ("form", "tree") or not ir_model:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we also handle kanban?

@yostashiro
Copy link
Copy Markdown
Member

Just attaching some screen shots...
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants