'add the given/current user to list of users who have seen this document (_seen)'

def add_seen(self, user=None):

    if (not user):
        user = frappe.session.user
    if self.meta.track_seen:
        if self._seen:
            _seen = json.loads(self._seen)
        else:
            _seen = []
        if (user not in _seen):
            _seen.append(user)
            self.db_set(u'_seen', json.dumps(_seen), update_modified=False)
            frappe.local.flags.commit = True
