if not can_access: parent_sign_token = record._portal_get_parent_hash_token(pid) can_access = parent_sign_token and consteq(_hash, parent_sign_token) return can_access elif token: # Token Case: token is the global one of the document token_field = request.env[res_model]._mail_post...