Skip to content
Snippets Groups Projects
Commit 42be67dc authored by Yenthe666's avatar Yenthe666
Browse files

[IMP] base: add model constraint search view


The constraint view in Odoo has no good quick search options to filter/group and find
specific constraints easily.
This commits allows you to easily group and search for the most used values of
constraints. This will make the finding of constraints easier for functional people.

closes odoo/odoo#41288

Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
parent 53a7dcea
No related branches found
No related tags found
No related merge requests found
......@@ -543,10 +543,28 @@
</tree>
</field>
</record>
<record id="view_model_constraint_search" model="ir.ui.view">
<field name="model">ir.model.constraint</field>
<field name="arch" type="xml">
<search string="Constraints">
<field name="model"/>
<field name="name"/>
<field name="message"/>
<group expand="1" string="Group By">
<filter name="module" string="Module" context="{'group_by' : 'module'}"/>
<filter name="model" string="Model" context="{'group_by': 'model'}"/>
<filter name="type" string="Constraint type" context="{'group_by' : 'type'}"/>
</group>
</search>
</field>
</record>
<record id="action_model_constraint" model="ir.actions.act_window">
<field name="name">Model Constraints</field>
<field name="res_model">ir.model.constraint</field>
<field name="view_id" ref="view_model_constraint_list"/>
<field name="search_view_id" ref="view_model_constraint_search"/>
</record>
<menuitem action="action_model_constraint" id="ir_model_constraint_menu" parent="base.next_id_9"
groups="base.group_no_one"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment