[IMP] various: Change the label Model insted of Object

Currently, sometimes users are getting confusing between the concepts
of 'objects' and 'models' when doing advanced configuration or
customization.

So, In this commit we replace 'object' label by 'model'.And also add
quicksearch on the relation field.

TaskId: 2209594
Related Ent PR: https://github.com/odoo/enterprise/pull/9556

closes odoo/odoo#48647

Closes: #48647
Related: odoo/enterprise#9556
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
Nisha patel
2020-03-31 11:31:24 +00:00
committed by Barad Mahendra
parent 04af701f76
commit 4fe9eda03d
5 changed files with 10 additions and 9 deletions
+3 -3
View File
@@ -446,9 +446,9 @@ class IrModelFields(models.Model):
name = fields.Char(string='Field Name', default='x_', required=True, index=True)
complete_name = fields.Char(index=True)
model = fields.Char(string='Object Name', required=True, index=True,
model = fields.Char(string='Model Name', required=True, index=True,
help="The technical name of the model this field belongs to")
relation = fields.Char(string='Object Relation',
relation = fields.Char(string='Related Model',
help="For relationship fields, the technical name of the target model")
relation_field = fields.Char(help="For one2many fields, the field on the target model that implement the opposite many2one relationship")
relation_field_id = fields.Many2one('ir.model.fields', compute='_compute_relation_field_id',
@@ -1589,7 +1589,7 @@ class IrModelAccess(models.Model):
name = fields.Char(required=True, index=True)
active = fields.Boolean(default=True, help='If you uncheck the active field, it will disable the ACL without deleting it (if you delete a native ACL, it will be re-created when you reload the module).')
model_id = fields.Many2one('ir.model', string='Object', required=True, index=True, ondelete='cascade')
model_id = fields.Many2one('ir.model', string='Model', required=True, index=True, ondelete='cascade')
group_id = fields.Many2one('res.groups', string='Group', ondelete='cascade', index=True)
perm_read = fields.Boolean(string='Read Access')
perm_write = fields.Boolean(string='Write Access')
+1 -1
View File
@@ -18,7 +18,7 @@ class IrRule(models.Model):
name = fields.Char(index=True)
active = fields.Boolean(default=True, help="If you uncheck the active field, it will disable the record rule without deleting it (if you delete a native record rule, it may be re-created when you reload the module).")
model_id = fields.Many2one('ir.model', string='Object', index=True, required=True, ondelete="cascade")
model_id = fields.Many2one('ir.model', string='Model', index=True, required=True, ondelete="cascade")
groups = fields.Many2many('res.groups', 'rule_group_rel', 'rule_group_id', 'group_id')
domain_force = fields.Text(string='Domain')
perm_read = fields.Boolean(string='Apply for Read', default=True)
+4 -3
View File
@@ -388,8 +388,9 @@
<field name="ttype"/>
<field name="required"/>
<field name="readonly"/>
<field name="relation"/>
<group expand="0" string="Group By">
<filter string="Object" name="group_by_object" domain="[]" context="{'group_by':'model_id'}"/>
<filter string="Model" name="group_by_object" domain="[]" context="{'group_by':'model_id'}"/>
<filter string="Field Type" name="group_by_ttype" domain="[]" context="{'group_by':'ttype'}"/>
</group>
</search>
@@ -503,7 +504,7 @@
<field name="noupdate"/>
<group expand="0" string="Group By">
<filter string="Module" name="group_by_module" domain="[]" context="{'group_by':'module'}"/>
<filter string="Object" name="group_by_object" domain="[]" context="{'group_by':'model'}"/>
<filter string="Model" name="group_by_object" domain="[]" context="{'group_by':'model'}"/>
</group>
</search>
</field>
@@ -683,7 +684,7 @@
<field name="group_id"/>
<group expand="0" string="Group By" colspan="11" col="11" groups="base.group_no_one">
<filter string="Group" name="group" domain="[]" context="{'group_by': 'group_id'}"/>
<filter string="Object" name="group_by_object" domain="[]" context="{'group_by': 'model_id'}"/>
<filter string="Model" name="group_by_object" domain="[]" context="{'group_by': 'model_id'}"/>
</group>
</search>
</field>
+1 -1
View File
@@ -81,7 +81,7 @@
<separator/>
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
<group string="Group By">
<filter string="Object" name="group_by_object" domain="[]" context="{'group_by': 'model_id'}"/>
<filter string="Model" name="group_by_object" domain="[]" context="{'group_by': 'model_id'}"/>
</group>
</search>
</field>
+1 -1
View File
@@ -84,7 +84,7 @@
<filter string="Active" name="active" domain="[('active', '=',True)]"/>
<filter string="Inactive" name="inactive" domain="[('active', '=',False)]"/>
<group expand="0" string="Group By">
<filter string="Object" name="object" domain="[]" context="{'group_by':'model'}"/>
<filter string="Model" name="object" domain="[]" context="{'group_by':'model'}"/>
<filter string="Type" name="type" domain="[]" context="{'group_by':'type'}"/>
<filter string="Inherit" name="inherit" domain="[]" context="{'group_by':'inherit_id'}"/>
</group>