-
- Downloads
[FIX] base: consider `multi_edit="1"` views editable
Since odoo/odoo#95729 nodes with a `groups=` are completely removed from the views when the user is not part of the group, instead of being made invisible. In that PR, views have been adapted to add back fields, with invisible="1", when they were required, for instance when they were used in a domain of another field which was still there despite the user is not part of the given group. As `tree` views having `multi_edit="1"` where not considered as editable views, the domain of fields in these views were not validated: - https://github.com/odoo/odoo/blob/1fb8fa16ab7dc298d54f089d7163fb556dbc5fcc/odoo/addons/base/models/ir_ui_view.py#L1460 - https://github.com/odoo/odoo/blob/1fb8fa16ab7dc298d54f089d7163fb556dbc5fcc/odoo/addons/base/models/ir_ui_view.py#L1321-L1322 while they are well required for the web client, in `multi_edit="1"` this is possible to edit relational/many2one field, and therefore it will do `name_search` calls using the domain of the field, and therefore the fields used in these domains must always be present in the views. Without it, a crash in the web client occurs when attempting to edit the relational/many2one field. This revision targets to consider the `multi_edit="1"` tree views as editable, to make the field domains validated as they should be. Hence, views are adapted to add back fields with `invisible="1"` when they are required in domains of other fields. Part-of: odoo/odoo#103743
Showing
- addons/analytic/views/analytic_account_views.xml 1 addition, 0 deletionsaddons/analytic/views/analytic_account_views.xml
- addons/analytic/views/analytic_line_views.xml 2 additions, 0 deletionsaddons/analytic/views/analytic_line_views.xml
- addons/crm/views/crm_lead_views.xml 2 additions, 0 deletionsaddons/crm/views/crm_lead_views.xml
- addons/hr_contract/views/hr_contract_views.xml 1 addition, 0 deletionsaddons/hr_contract/views/hr_contract_views.xml
- addons/hr_expense/views/hr_expense_views.xml 2 additions, 0 deletionsaddons/hr_expense/views/hr_expense_views.xml
- addons/mrp/views/mrp_production_views.xml 2 additions, 0 deletionsaddons/mrp/views/mrp_production_views.xml
- addons/mrp/views/mrp_routing_views.xml 2 additions, 0 deletionsaddons/mrp/views/mrp_routing_views.xml
- addons/mrp/views/mrp_workcenter_views.xml 1 addition, 0 deletionsaddons/mrp/views/mrp_workcenter_views.xml
- addons/project/views/project_views.xml 18 additions, 1 deletionaddons/project/views/project_views.xml
- addons/repair/views/repair_views.xml 1 addition, 0 deletionsaddons/repair/views/repair_views.xml
- addons/stock/views/stock_location_views.xml 1 addition, 0 deletionsaddons/stock/views/stock_location_views.xml
- addons/stock/views/stock_picking_views.xml 1 addition, 0 deletionsaddons/stock/views/stock_picking_views.xml
- addons/stock/views/stock_scrap_views.xml 2 additions, 0 deletionsaddons/stock/views/stock_scrap_views.xml
- addons/stock_picking_batch/views/stock_picking_batch_views.xml 1 addition, 0 deletions...s/stock_picking_batch/views/stock_picking_batch_views.xml
- addons/web/static/tests/helpers/mock_server.js 4 additions, 6 deletionsaddons/web/static/tests/helpers/mock_server.js
- odoo/addons/base/models/ir_ui_view.py 1 addition, 1 deletionodoo/addons/base/models/ir_ui_view.py
Loading
Please register or sign in to comment