The goal of this revision is to get rid of the `groups_id` field of the model `ir.ui.view`. - This feature wasn't really known or used by most developers, and not straight-forward to understand. Removing it allows one less complicated thing to learn for developers. Besides, thanks to odoo/odoo#95729, changing the behavior of the `groups=` attribute, we can easily get rid of this `groups_id` feature by simply adding `groups=` in the elements of the views using the `groups_id` field, it will have the same effect: adding the elements in the view only for the users part of the specified group. - By getting rid of the groups_id many2many field on ir.ui.view, it makes possible to cache the view architecture without requiring to use the groups in the cache key. Currently, if we want to cache the view architecture, it would be required to use the intersection of the user groups with the groups_id groups of the view, making it costly to compute the cache key, therefore altering the performance point to cache the view architectures. Part-of: odoo/odoo#98551
17 lines
687 B
XML
17 lines
687 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<record id="quant_subcontracting_search_view" model="ir.ui.view">
|
|
<field name="name">stock.quant.subcontracting.search</field>
|
|
<field name="model">stock.quant</field>
|
|
<field name="inherit_id" ref="stock.quant_search_view" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//filter[@name='transit_loc']" position="after">
|
|
<filter string="Subcontracting Locations" name="is_subcontract" domain="[('is_subcontract', '=', True)]" groups="mrp.group_mrp_user"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</odoo>
|
|
|