This question has been flagged
2 Replies
8211 Views

change res.partner field name  readonly.

 

Avatar
Discard
Best Answer

inherit partner form view and add this code


 <xpath expr="//field[@name='name']" position="attributes">

     <attribute name="readonly">1</attribute>

</xpath>

Avatar
Discard
Best Answer

Another way to do this is through model:

Try:

class ResPartner(models.Model):
_inherit = 'res.partner'

name = fields.Char(readonly=True)

Hope it help.

Avatar
Discard