'attributes(record, field_name, field, options, values)
Generates the metadata attributes (prefixed by ``data-oe-``) for the
root node of the field conversion.
The default attributes are:
* ``model``, the name of the record\'s model
* ``id`` the id of the record to which the field belongs
* ``type`` the logical field type (widget, may not match the field\'s
``type``, may not be any Field subclass name)
* ``translate``, a boolean flag (``0`` or ``1``) denoting whether the
field is translatable
* ``readonly``, has this attribute if the field is readonly
* ``expression``, the original expression
:returns: OrderedDict (attribute name, attribute value).'

@api.model
def attributes(self, record, field_name, options, values=None):

    data = OrderedDict()
    field = record._fields[field_name]
    if ((not options['inherit_branding']) and (not options['translate'])):
        return data
    data['data-oe-model'] = record._name
    data['data-oe-id'] = record.id
    data['data-oe-field'] = field.name
    data['data-oe-type'] = options.get('type')
    data['data-oe-expression'] = options.get('expression')
    if field.readonly:
        data['data-oe-readonly'] = 1
    return data
