def get_readonly_fields ( self , request , obj = None ) : return list ( self . readonly_fields ) + [ field . name for field in obj . _meta . fields ]
odoo+python+add read only field
Set all fields readonly .
def get_readonly_fields(self, request, obj=None):
        """Set all fields readonly."""
        return list(self.readonly_fields) + [field.name for field in obj._meta.fields]