fix #I7J61Y [app_website_blog_editor]让博文分类的显示按sequence排序

This commit is contained in:
Chill
2023-07-07 18:47:02 +08:00
parent 5c82965036
commit ae44f2023c
25 changed files with 439 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from odoo import api, models, fields, _
from odoo.tools.safe_eval import safe_eval
class BlogBlog(models.Model):
@@ -9,3 +10,9 @@ class BlogBlog(models.Model):
# 排序
sequence = fields.Integer(string='Sequence', default=20, index=True, help="Determine the display order")
def action_view_blog_post(self):
self.ensure_one()
action = self.env.ref('website_blog.action_blog_post').read()[0]
action['domain'] = [('blog_id', '=', self.id)]
return action