'Instead of the classic form view, redirect to the post on website
directly if user is an employee or if the post is published.'

@api.multi
def get_access_action(self):

    self.ensure_one()
    if (self.env.user.share and (not self.sudo().website_published)):
        return super(BlogPost, self).get_access_action()
    return {'type': 'ir.actions.act_url', 'url': ('/blog/%s/post/%s' % (self.blog_id.id, self.id)), 'target': 'self', 'res_id': self.id}
