This commit is contained in:
ivan deng
2023-07-26 22:20:07 +08:00
parent 2fd84c129a
commit cd1422e423
4 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
from odoo import api, models, fields, _
from odoo.tools.safe_eval import safe_eval
class BlogPost(models.Model):
_inherit = 'blog.post'
def action_post_debug_view(self):
self.ensure_one()
action = self.env.ref('website_blog.action_blog_post').read()[0]
action['views'] = [(self.env.ref('website_blog.view_blog_post_form').id, 'form')]
action['res_id'] = self.id
return action