[IMP] base: make title non-clickable for partners' contacts

We have a 'Title' many2one fields while adding contact of a
partner. However, being a regular m2o field, it's clickable
and sometimes users land on form view of title which not
really useful.

This commit adds 'no_open' field option for 'Title' field to
make it non-clickable.

TaskId : 2446112

closes odoo/odoo#64984

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Munaf Khan
2021-01-29 08:43:24 +00:00
committed by Dharmraj Jhala
parent da05b282d9
commit c0738b8999
+1 -1
View File
@@ -299,7 +299,7 @@
<group col="12">
<group colspan="5">
<field name="name" string="Contact Name" attrs="{'required' : [('type', '=', 'contact')]}"/>
<field name="title" placeholder="e.g. Mr."
<field name="title" options="{'no_open': True}" placeholder="e.g. Mr."
attrs="{'invisible': [('type','!=', 'contact')]}"/>
<field name="function" placeholder="e.g. Sales Director"
attrs="{'invisible': [('type','!=', 'contact')]}"/>