'Test if a transition can be taken. The transition can be taken if:
- the signal name matches,
- the uid is SUPERUSER_ID or the user groups contains the transition\'s
group,
- the condition evaluates to a truish value.'

def wkf_expr_check(self, transition, signal):

    if (transition['signal'] and (signal != transition['signal'])):
        return False
    if ((self.session.uid != odoo.SUPERUSER_ID) and transition['group_id']):
        env = odoo.api.Environment(self.session.cr, self.session.uid, {})
        user_groups = env.user.groups_id
        if (transition['group_id'] not in user_groups.ids):
            return False
    return self.wkf_expr_eval_expr(transition['condition'])
