mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
fix #I7J61Y [app_website_blog_editor]让博文分类的显示按sequence排序
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user