Step-1 Go to audittrail module.
Step-2 audittrail->audittrail.py.
Step-3 After that used below code in audittrail.py file.
if self.check_rules(cr, SUPERUSER_ID, field_obj._obj, method):
x2m_model_ids = pool.get('ir.model').search(cr, SUPERUSER_ID, [('model', '=', field_obj._obj)])
x2m_model_id = x2m_model_ids and x2m_model_ids[0] or False
assert x2m_model_id, _("'%s' Model does not exist..." %(field_obj._obj))
x2m_model = pool.get('ir.model').browse(cr, SUPERUSER_ID, x2m_model_id)
0 Comment(s)