update 开发模板

This commit is contained in:
ivan deng
2023-04-22 23:52:51 +08:00
parent 08981879a5
commit 163f5ed1d5
16 changed files with 364 additions and 55 deletions

View File

@@ -63,6 +63,9 @@
13. 代码完全开源
''',
'data': [
'views/blog_blog_views.xml',
'views/blog_tag_category_views.xml',
'views/blog_tag_views.xml',
'views/blog_post_views.xml',
# 'report/.xml',
],

View File

@@ -22,4 +22,6 @@
# http://www.sunpop.cn/odoo10_developer_document_offline/
# description:
# from . import models
from . import blog_tag_category
from . import blog_tag
from . import blog_blog

View File

@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
from odoo import api, models, fields, _
class BlogBlog(models.Model):
_inherit = 'blog.blog'
_order = 'sequence, name'
# 排序
sequence = fields.Integer(string='Sequence', default=20, index=True, help="Determine the display order")

View File

@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
from odoo import api, models, fields, _
class BlogTag(models.Model):
_inherit = 'blog.tag'
_order = 'sequence, name'
# 排序
sequence = fields.Integer(string='Sequence', default=20, index=True, help="Determine the display order")

View File

@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
from odoo import api, models, fields, _
class BlogTagCategory(models.Model):
_inherit = 'blog.tag.category'
_order = 'sequence, name'
# 排序
sequence = fields.Integer(string='Sequence', default=20, index=True, help="Determine the display order")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 KiB

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 67 KiB

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="app_view_blog_blog_list" model="ir.ui.view">
<field name="name">app.blog.blog.list</field>
<field name="model">blog.blog</field>
<field name="inherit_id" ref="website_blog.view_blog_blog_list"/>
<field name="arch" type="xml">
<xpath expr="//field[1]" position="before">
<field name="sequence" widget="handle"/>
<field name="id" optional="hide"/>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="app_blog_tag_category_tree" model="ir.ui.view">
<field name="name">app.blog_tag_category_tree</field>
<field name="model">blog.tag.category</field>
<field name="inherit_id" ref="website_blog.blog_tag_category_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[1]" position="before">
<field name="sequence" widget="handle"/>
<field name="id" optional="hide"/>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="app_blog_tag_tree" model="ir.ui.view">
<field name="name">app.blog_tag_tree</field>
<field name="model">blog.tag</field>
<field name="inherit_id" ref="website_blog.blog_tag_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[1]" position="before">
<field name="sequence" widget="handle"/>
<field name="id" optional="hide"/>
</xpath>
</field>
</record>
</odoo>