'Instead of the classic form view, redirect to the online quote for
portal users that have access to a confirmed order.'

@api.multi
def get_access_action(self):

    self.ensure_one()
    if ((self.state == 'cancel') or ((self.state == 'draft') and (not self.env.context.get('mark_so_as_sent')))):
        return super(SaleOrder, self).get_access_action()
    if (self.env.user.share or self.env.context.get('force_website')):
        try:
            self.check_access_rule('read')
        except exceptions.AccessError:
            pass
        else:
            return {'type': 'ir.actions.act_url', 'url': ('/my/orders/%s' % self.id), 'target': 'self', 'res_id': self.id}
    return super(SaleOrder, self).get_access_action()
