add editor

This commit is contained in:
Ivan Office
2024-03-13 20:23:23 +08:00
parent fb65968cda
commit 338c47d083
66 changed files with 1590 additions and 3 deletions

View File

@@ -290,7 +290,7 @@
<div class="oe_demo" style=" margin: 30px auto 0; padding: 0 15px 0 0; border:none; width: 96%;">
<p>This moduld allows user to quickly customize and debranding Odoo. Quick debug, Language Switcher,
Online Documentation Access,Quick Data Clear. </p>
<p class="mb16">Support odoo 16,15,14,13, 12, 11, 10, 9. Including community and enterprise version. </p>
<p class="mb16">Support Odoo 17,16,15,14,13, 12, 11, 10, 9. Including community and enterprise version. </p>
</div>
</section>

View File

@@ -32,7 +32,7 @@
<div class="oe_demo" style=" margin: 30px auto 0; padding: 0 15px 0 0; border:none; width: 96%;">
<p>This moduld allows user to quickly customize and debranding Odoo. Quick debug, Language Switcher,
Online Documentation Access,Quick Data Clear. </p>
<p class="mb16">Support odoo 16,15,14,13, 12, 11, 10, 9. Including community and enterprise version. </p>
<p class="mb16">Support Odoo 17,16,15,14,13, 12, 11, 10, 9. Including community and enterprise version. </p>
</div>
<div class="oe_demo" style=" margin: 30px auto 0; padding: 0 15px 0 0; border:none; width: 96%;">
<p>If you want to change the login page. </p>

View File

@@ -45,7 +45,7 @@
5. Add grid line form list view. Easy to read list data.</li>
为表格list增加行列分隔线易于看数据。
11. Multi-language Support. Multi-Company Support.
12. Support Odoo 16,15,14,13,12, Enterprise and Community and odoo.sh Edition.
12. Support Odoo 17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition.
13. Full Open Source.
==========
1.

View File

@@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
from . import models
from . import controllers
from .hooks import pre_init_hook
from .hooks import post_init_hook
from .hooks import uninstall_hook

View File

@@ -0,0 +1,95 @@
# -*- coding: utf-8 -*-
# Created on 2022-09-01
# author: 欧度智能https://www.odooai.cn
# email: 300883@qq.com
# resource of odooai
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
# Odoo16在线用户手册长期更新
# https://www.odooai.cn/documentation/16.0/zh_CN/index.html
# Odoo16在线开发者手册长期更新
# https://www.odooai.cn/documentation/16.0/zh_CN/developer.html
# Odoo13在线用户手册长期更新
# https://www.odooai.cn/documentation/user/13.0/zh_CN/index.html
# Odoo13在线开发者手册长期更新
# https://www.odooai.cn/documentation/13.0/index.html
# Odoo10在线中文用户手册长期更新
# https://www.odooai.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# https://www.odooai.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# https://www.odooai.cn/odoo10_developer_document_offline/
##############################################################################
# Copyright (C) 2009-TODAY odooai.cn Ltd. https://www.odooai.cn
# Author: Ivan Deng300883@qq.com
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
# See <http://www.gnu.org/licenses/>.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
##############################################################################
{
'name': "Website Blogs,Page Editor in source code. mass edit blog and page.Odoo网页与博文源码编辑器",
'version': '24.03.12',
'author': 'odooai.cn',
'category': 'Website',
'website': 'https://www.odooai.cn',
'live_test_url': 'https://demo.odooapp.cn',
'license': 'LGPL-3',
'sequence': 2,
'price': 0.00,
'currency': 'EUR',
'images': ['static/description/banner.gif'],
'depends': [
'website_blog',
],
'summary': '''
Make developer to easy build website. Edit odoo page in source code. Quick edit website page, Quick clone website blog.
Quick seo website page and blog. mass edit page and blog.
''',
'description': '''
Make developer to easy build website.
1. Edit website page and website blog in source code mode
2. Mass edit website page and blog property like url key and name, etc..
3. Mass translate website page, website blog, website product to any language. this need extra pay for app_ai_seo
4. Easy mass seo builder. Use AI to edit website. mass setup seo. this need extra pay for app_ai_seo
11. Multi-language Support. Multi-Company Support.
12. Support Odoo 17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition.
13. Full Open Source.
==========
程序员网站开发专用
1. 快速网页编辑,博客编辑,源码方式编辑网站内容
2. 批量网页内容编辑,批量博客编辑
3. 批量翻译网站页面,博客,产品信息。快速生成全球化网站,需要额外付费模块 app_ai_seo
4. 批量SEO提升网站排名。使用Ai编辑及优化网站需要额外付费模块 app_ai_seo
11. 多语言支持,多公司支持
12. Odoo 16,15,14,13,12, 企业版社区版在线SaaS.sh版等全版本支持
13. 代码完全开源
''',
'data': [
'views/blog_blog_views.xml',
'views/blog_tag_category_views.xml',
'views/blog_tag_views.xml',
'views/blog_post_views.xml',
'views/website_views.xml',
'views/website_page_views.xml',
'views/res_config_settings_views.xml'
# 'report/.xml',
],
'demo': [],
# 'pre_init_hook': 'pre_init_hook',
# 'post_init_hook': 'post_init_hook',
# 'uninstall_hook': 'uninstall_hook',
'installable': True,
'application': True,
'auto_install': False,
}

View File

@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
from . import main

View File

@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
import re
import werkzeug
from odoo import http, fields, tools
from odoo.addons.http_routing.models.ir_http import slug, unslug
from odoo.addons.website.controllers.main import QueryURL
from odoo.http import request
from odoo.addons.website_blog.controllers.main import WebsiteBlog
class WebsiteBlog(WebsiteBlog):
def _prepare_blog_values(self, blogs, blog=False, date_begin=False, date_end=False, tags=False, state=False, page=False, search=None):
blogs = blogs.sorted(key='sequence')
res = super(WebsiteBlog, self)._prepare_blog_values(blogs, blog, date_begin, date_end, tags, state, page, search)
return res

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="group_01" model="product.attribute.value.group">
<field name="name">CHN</field>
<field name="ref">CN</field>
</record>
<record id="group_02" model="product.attribute.value.group">
<field name="name">Eur</field>
<field name="ref">EU</field>
</record>
<record id="group_03" model="product.attribute.value.group">
<field name="name">US</field>
<field name="ref">US</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
# Created on 2018-10-12
# author: 欧度智能https://www.odooai.cn
# email: 300883@qq.com
# resource of odooai
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
# Odoo在线中文用户手册长期更新
# https://www.odooai.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# https://www.odooai.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# https://www.odooai.cn/odoo10_developer_document_offline/
# description:
from odoo import api, SUPERUSER_ID, _
def pre_init_hook(cr):
pass
# cr.execute("")
def post_init_hook(cr, registry):
pass
# cr.execute("")
def uninstall_hook(cr, registry):
pass
# cr.execute("")

View File

@@ -0,0 +1,129 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * app_website_blog_editor
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e-20230721\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-01 19:15+0000\n"
"PO-Revision-Date: 2023-10-01 19:15+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: app_website_blog_editor
#: model:ir.model,name:app_website_blog_editor.model_blog_blog
#: model:ir.model.fields,field_description:app_website_blog_editor.field_blog_post__blog_id
msgid "Blog"
msgstr "博客分类"
#. module: app_website_blog_editor
#: model:ir.model,name:app_website_blog_editor.model_blog_post
msgid "Blog Post"
msgstr "博文"
#. module: app_website_blog_editor
#: model:ir.model,name:app_website_blog_editor.model_blog_tag
msgid "Blog Tag"
msgstr "博客标签"
#. module: app_website_blog_editor
#: model:ir.model,name:app_website_blog_editor.model_blog_tag_category
msgid "Blog Tag Category"
msgstr "博客标签分类"
#. module: app_website_blog_editor
#: model:ir.model,name:app_website_blog_editor.model_res_config_settings
msgid "Config Settings"
msgstr "配置设置"
#. module: app_website_blog_editor
#: model_terms:ir.ui.view,arch_db:app_website_blog_editor.app_view_blog_post_form
#: model_terms:ir.ui.view,arch_db:app_website_blog_editor.app_view_blog_post_search
msgid "Content"
msgstr "博客图文"
#. module: app_website_blog_editor
#: model:ir.model.fields,help:app_website_blog_editor.field_blog_blog__sequence
#: model:ir.model.fields,help:app_website_blog_editor.field_blog_tag__sequence
#: model:ir.model.fields,help:app_website_blog_editor.field_blog_tag_category__sequence
msgid "Determine the display order"
msgstr "确定显示顺序"
#. module: app_website_blog_editor
#: model:ir.model.fields,field_description:app_website_blog_editor.field_website_page__is_force_all
msgid "Force All Website"
msgstr "用于站群"
#. module: app_website_blog_editor
#: model_terms:ir.ui.view,arch_db:app_website_blog_editor.app_website_pages_view_search
msgid "Group By"
msgstr "分组依据"
#. module: app_website_blog_editor
#: model:ir.model.fields,help:app_website_blog_editor.field_website_page__is_force_all
msgid "If check, the page would use to all website, even u change."
msgstr "如果选中,该页面将用于所有网站,甚至 u 更改。"
#. module: app_website_blog_editor
#: model_terms:ir.ui.view,arch_db:app_website_blog_editor.app_res_config_settings_form_view
msgid "If set, replaces the blog post background image as the meta image."
msgstr "如果设置,默认将博文背景图片替换为元图像。"
#. module: app_website_blog_editor
#: model_terms:ir.ui.view,arch_db:app_website_blog_editor.app_view_blog_post_search
msgid "Not Published"
msgstr "未发布"
#. module: app_website_blog_editor
#: model:ir.model,name:app_website_blog_editor.model_website_page
msgid "Page"
msgstr "网页"
#. module: app_website_blog_editor
#: model_terms:ir.ui.view,arch_db:app_website_blog_editor.app_view_blog_post_search
msgid "Published"
msgstr "发表"
#. module: app_website_blog_editor
#: model:ir.model.fields,field_description:app_website_blog_editor.field_blog_blog__seo_name
msgid "Seo name"
msgstr "SEO链接名"
#. module: app_website_blog_editor
#: model:ir.model.fields,field_description:app_website_blog_editor.field_blog_blog__sequence
#: model:ir.model.fields,field_description:app_website_blog_editor.field_blog_tag__sequence
#: model:ir.model.fields,field_description:app_website_blog_editor.field_blog_tag_category__sequence
msgid "Sequence"
msgstr "顺序"
#. module: app_website_blog_editor
#: model_terms:ir.ui.view,arch_db:app_website_blog_editor.app_view_blog_post_list
msgid "Settings"
msgstr "设置"
#. module: app_website_blog_editor
#: model_terms:ir.ui.view,arch_db:app_website_blog_editor.app_view_blog_post_list
#: model_terms:ir.ui.view,arch_db:app_website_blog_editor.app_website_pages_tree_view
msgid "Source Code"
msgstr "源代码"
#. module: app_website_blog_editor
#: model_terms:ir.ui.view,arch_db:app_website_blog_editor.app_view_blog_post_search
msgid "Title"
msgstr "标题"
#. module: app_website_blog_editor
#: model:ir.model.fields,field_description:app_website_blog_editor.field_res_config_settings__sync_blog_meta_background_img
#: model_terms:ir.ui.view,arch_db:app_website_blog_editor.app_res_config_settings_form_view
msgid "Use a meta image by default for blog post background"
msgstr "博客文章背景默认使用元图像"
#. module: app_website_blog_editor
#: model_terms:ir.ui.view,arch_db:app_website_blog_editor.app_website_pages_view_search
msgid "Website"
msgstr "网站"

View File

@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
# Part of odooai.cn. See LICENSE file for full copyright and licensing details.
# Created on 2019-04-20
# author: 欧度智能http://www.odooai.cn
# email: 300883@qq.com
# resource of odooai
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo12在线用户手册长期更新
# http://www.odooai.cn/documentation/user/12.0/en/index.html
# Odoo12在线开发者手册长期更新
# http://www.odooai.cn/documentation/12.0/index.html
# Odoo10在线中文用户手册长期更新
# http://www.odooai.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# http://www.odooai.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# http://www.odooai.cn/odoo10_developer_document_offline/
# description:
from . import blog_tag_category
from . import blog_tag
from . import blog_blog
from . import blog_post
from . import ir_ui_view
from . import website_page
from . import res_config_settings

View File

@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
from odoo import api, models, fields, _
from odoo.tools.safe_eval import safe_eval
class BlogBlog(models.Model):
_inherit = 'blog.blog'
_order = 'sequence, name'
seo_name = fields.Char(tracking=True)
# 排序
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').sudo().read()[0]
action['domain'] = [('blog_id', '=', self.id)]
return action
# def unlink(self):
# # active的先不删除设置为 deactive
# to_deactive = self.filtered(lambda r: r.active)
# self = self - to_deactive
# to_deactive.write({
# 'active': False,
# })
# if self:
# return super(BlogBlog, self).unlink()
# else:
# return False

View File

@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
import json
from odoo import api, models, fields, _
from odoo.tools.safe_eval import safe_eval
class BlogPost(models.Model):
_inherit = 'blog.post'
# 不允许暴力删除
blog_id = fields.Many2one('blog.blog', ondelete='restrict')
def write(self, vals):
if vals.get('website_meta_og_img'):
sync_blog_meta_background_img = self.env['ir.config_parameter'].sudo().get_param('app_website_blog_editor.sync_blog_meta_background_img')
if sync_blog_meta_background_img:
web_base_url = self.env['ir.config_parameter'].sudo().get_param('web.base.url', default='')
img_url = vals.get('website_meta_og_img').replace(web_base_url, '')
for rec in self:
cover_properties = json.loads(rec.cover_properties)
cover_properties.update({
'background-image': 'url("%s")' % img_url,
})
vals.update({
'cover_properties': json.dumps(cover_properties)
})
return super(BlogPost, self).write(vals)
def action_post_debug_view(self):
self.ensure_one()
action = self.env.ref('website_blog.action_blog_post').sudo().read()[0]
action['views'] = [(self.env.ref('website_blog.view_blog_post_form').id, 'form')]
action['res_id'] = self.id
return action
def action_post_code_view(self):
self.ensure_one()
action = self.env.ref('website_blog.action_blog_post').sudo().read()[0]
action['views'] = [(self.env.ref('app_website_blog_editor.app_blog_post_form_view_code').id, 'form')]
action['res_id'] = self.id
return action

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")

View File

@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
from odoo import api, fields, models
class IrUiView(models.Model):
_inherit = 'ir.ui.view'
def write(self, vals):
# 处理强制全局, Create时不管
for view in self:
if len(view.page_ids) == 1:
page = view.page_ids[0]
if page.is_force_all:
self = self.with_context(no_cow=1)
return super(IrUiView, self).write(vals)

View File

@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
from odoo import fields, models, _
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
sync_blog_meta_background_img = fields.Boolean('Use a meta image by default for blog post background', config_parameter='app_website_blog_editor.sync_blog_meta_background_img')
def set_values(self):
res = super().set_values()
self.env['ir.config_parameter'].set_param('app_website_blog_editor.sync_blog_meta_background_img', self.sync_blog_meta_background_img)
return res

View File

@@ -0,0 +1,51 @@
# -*- coding: utf-8 -*-
from odoo import api, fields, models
class WebsitePage(models.Model):
_inherit = 'website.page'
is_force_all = fields.Boolean('Force All Website', default=False,
help='If check, the page would use to all website, even u change.\n Important, The page url must be uniq in all website')
def write(self, vals):
# 处理强制全局, Create时不管
for page in self:
if page.is_force_all or vals.get('is_force_all'):
vals.update({
'website_id': False
})
return super(WebsitePage, self).write(vals)
def action_page_debug_view(self):
# 直接覆盖原生
self.ensure_one()
return {
'type': 'ir.actions.act_window',
'res_model': 'ir.ui.view',
'res_id': self.view_id.id,
'view_mode': 'form',
'view_id': self.env.ref('app_website_blog_editor.app_view_view_form_extend_debug').id,
}
def action_page_code_view(self):
self.ensure_one()
return {
'type': 'ir.actions.act_window',
'res_model': 'ir.ui.view',
'res_id': self.view_id.id,
'view_mode': 'form',
'view_id': self.env.ref('website.view_view_form_extend').id,
}
def action_page_form_view(self):
self.ensure_one()
return {
'type': 'ir.actions.act_window',
'res_model': 'website.page',
'res_id': self.id,
'view_mode': 'form',
'view_id': self.env.ref('website.website_pages_form_view').id,
}

View File

@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- model权限 -->
<record id="acc_module" model="ir.model.access">
<field name="name">acc_module_user</field>
<field name="model_id" ref="model_app_order"/>
<field name="group_id" ref="base.group_user"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_create" eval="1"/>
<field name="perm_unlink" eval="1"/>
</record>
<!-- 应用权限目录 -->
<record model="ir.module.category" id="app_module_category_1">
<field name="name">App...</field>
<field name="description">Helps you manage your ...</field>
<field name="sequence">8</field>
</record>
<!-- 权限用户 -->
<!-- 普通 -->
<record id="group_app_user" model="res.groups">
<field name="name">App User</field>
<field name="category_id" ref="app_module_category_1"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="comment">The user will be able to ...</field>
</record>
<!-- 管理员,可以配置 -->
<record id="group_app_admin" model="res.groups">
<field name="name">App Admin</field>
<field name="category_id" ref="app_module_category_1"/>
<field name="implied_ids" eval="[(4, ref('group_app_user'))]"/>
<field name="comment">The user will be able to config ...</field>
</record>
<!-- group_erp_manager自动有完整权限 -->
<record id="base.group_erp_manager" model="res.groups">
<field name="implied_ids" eval="[(4, ref('group_app_admin'))]"/>
</record>
<!-- Rules -->
<record id="rule_user" model="ir.rule">
<field name="name">Users are allowed to access their own m///</field>
<field name="model_id" ref="model_app_order"/>
<field name="domain_force">['|', ('partner_id', 'in', [user.partner_id.id]), ('user_id.id', '=', user.id)]</field>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
</record>
<!--End -->
</data>
</odoo>

View File

@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_product_attribute_value_group_user,product_attribute_value_group.user,app_product_variant_pro.model_product_attribute_value_group,base.group_user,1,0,0,0
access_product_attribute_value_group_manager,product_attribute_value_group.manager,app_product_variant_pro.model_product_attribute_value_group,base.group_erp_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_product_attribute_value_group_user product_attribute_value_group.user app_product_variant_pro.model_product_attribute_value_group base.group_user 1 0 0 0
3 access_product_attribute_value_group_manager product_attribute_value_group.manager app_product_variant_pro.model_product_attribute_value_group base.group_erp_manager 1 1 1 1

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View File

@@ -0,0 +1,190 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
# -*- coding: utf-8 -*-
##############################################################################
# Copyright (C) 2009~2023 odooAi.cn
##############################################################################
-->
<html>
<!-- begin title-->
<section class="oe_container container o_cc o_cc2">
<h2 class="text-center bg-warning text-white pt24 pb24">Website Blogs,Page Editor in source code.</h2>
<h3 class="text-center">Mass edit blog and page</h3>
<h4 class="text-center">Odoo网页与博文源码编辑</h4>
</section>
<!-- end title-->
<!-- begin grid features-->
<section class="oe_container container s_text_block o_colored_level pt16 pb16">
<h2 class="text-center bg-info text-white pt16 pb16">- Features -</h2>
</section>
<section class="s_features_grid pt24 pb24 o_colored_level" data-snippet="s_features_grid" data-name="Features Grid">
<div class="container">
<div class="row">
<div class="col-lg-6 s_col_no_bgcolor pb24">
<div class="row">
<div class="col-lg-12 pt16 pb16 o_colored_level" data-name="Box" data-tilt-feature="">
<i class="fa bg-primary text-white s_features_grid_icon rounded fa-2x">1</i>
<div class="s_features_grid_content">
<h4 class="pt16">
Edit website page and website blog in source code mode
</h4>
</div>
</div>
<div class="col-lg-12 pt16 pb16 o_colored_level" data-name="Box">
<i class="fa fa-2x rounded bg-primary text-white s_features_grid_icon">2</i>
<div class="s_features_grid_content">
<h4 class="pt16">
Mass edit website page and blog property like url key and name, etc..
</h4>
</div>
</div>
<div class="col-lg-12 pt16 pb16 o_colored_level" data-name="Box" data-tilt-feature="">
<i class="fa bg-primary text-white s_features_grid_icon rounded fa-2x">3</i>
<div class="s_features_grid_content">
<h4 class="pt16">
Mass translate website page, blog, product to any language.
</h4>
<p> this need extra pay for app_ai_seo<br></p>
</div>
</div>
</div>
</div>
<div class="col-lg-6 s_col_no_bgcolor pb24">
<div class="row">
<div class="col-lg-12 pt16 pb16 o_colored_level" data-name="Box" data-tilt-feature="">
<i class="fa bg-primary text-white s_features_grid_icon rounded fa-2x">4</i>
<div class="s_features_grid_content">
<h4 class="pt16">
Easy mass SEO builder
</h4>
<p>Mass setup seo. this need extra pay for app_ai_seo<br></p>
</div>
</div>
<div class="col-lg-12 pt16 pb16 o_colored_level" data-name="Box" data-tilt-feature="">
<i class="fa fa-2x rounded bg-primary text-white s_features_grid_icon">11</i>
<div class="s_features_grid_content">
<h4 class="pt16">
Full Open Source.Multi-language Support. Multi-Company Support
</h4>
<p>Support Odoo 17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition.</p>
<p>代码完全开源多语言支持多公司支持。Odoo 16,15,14,13,12, 企业版社区版在线SaaS.sh版等全版本支持</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- end grid features-->
<!-- begin snapshot-->
<!-- quick demo-->
<section class="oe_container container">
<div class="oe_row oe_spaced">
<h2 class="bg-warning text-center pt8 pb8">1. Edit website page and website blog in source code mode</h2>
<h4 class="oe_slogan"> editor for website page </h4>
<div class="oe_demo oe_screenshot img img-fluid">
<img src="demo1.jpg"/>
</div>
<h4 class="oe_slogan"> editor for website blog </h4>
<div class="oe_demo oe_screenshot img img-fluid">
<img src="demo2.jpg"/>
</div>
<h4 class="oe_slogan"> editor source code</h4>
<div class="oe_demo oe_screenshot img img-fluid">
<img src="demo3.jpg"/>
</div>
<h4 class="oe_slogan"> editor visual mode</h4>
<div class="oe_demo oe_screenshot img img-fluid">
<img src="demo4.jpg"/>
</div>
</div>
</section>
<section class="oe_container container">
<div class="oe_row oe_spaced">
<h2 class="bg-warning text-center pt8 pb8">2. Mass edit website page and blog property like url key and name, etc..</h2>
<h4 class="oe_slogan"> </h4>
<div class="oe_demo oe_screenshot img img-fluid">
<img src="demo5.jpg"/>
</div>
</div>
</section>
<section class="oe_container container">
<div class="oe_row oe_spaced">
<h2 class="bg-warning text-center pt8 pb8">3. Mass translate website page, website blog, website product to any language.</h2>
<h4 class="oe_slogan">this need extra pay for app_web_translator </h4>
<div class="oe_demo oe_screenshot img img-fluid">
<img src="demo6.jpg"/>
</div>
</div>
</section>
<section class="oe_container container">
<div class="oe_row oe_spaced">
<h2 class="bg-warning text-center pt8 pb8">4. Easy mass seo builder. Use AI to edit website. mass setup seo.</h2>
<h4 class="oe_slogan">this need extra pay for app_ai_seo, also app_web_translator including </h4>
<div class="oe_demo oe_screenshot img img-fluid">
<img src="demo7.jpg"/>
</div>
</div>
</section>
<!-- end quick demo-->
<!-- begin howto-->
<section class="oe_container container s_text_block o_colored_level pt16 pb16">
<h2 class="text-center bg-info text-white pt16 pb16">- How to setup and use -</h2>
<h3>This app need no extra module. The price already included</h3>
</section>
<section class="oe_container container">
<div class="oe_row oe_spaced">
<h4 class="pt16">
1. Free download and Install
</h4>
<h4 class="pt16">
2. Enjoy and easy use
</h4>
<h4 class="pt16">3. More information in our FAQ</h4>
<div class="row">
https://www.odooai.cn/faq
</div>
</div>
</section>
<!-- end howto-->
<!-- begin upsell-->
<!-- end upsell-->
<!-- begin support-->
<section class="container oe_dark">
<div class="oe_row oe_spaced text-center">
<div class="row">
<h2 class="oe_slogan">Technical Help & Support</h2>
</div>
<div class="col-md-12 pad0">
<div class="oe_mt16">
<p><h4 class="pt16">
For any type of technical help & support requests, Feel free to contact us</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:odoo@china.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> odoo@china.com</a>
<p><h4 class="pt16">
Via QQ: 300883 (App user would not get QQ or any other IM support. Only for odoo project customize.)</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:300883@qq.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> 300883@qq.com</a>
</div>
<div class="oe_mt16">
<h4 class="pt16">Visit our website for more support.</h4>
<h4 class="pt16">https://www.odooai.cn</h4>
</div>
</div>
</div>
</section>
<!-- end support-->
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -0,0 +1,30 @@
<?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>
<record id="app_view_blog_blog_form" model="ir.ui.view">
<field name="name">app.blog.blog.form</field>
<field name="model">blog.blog</field>
<field name="inherit_id" ref="website_blog.view_blog_blog_form"/>
<field name="arch" type="xml">
<xpath expr="//sheet//group" position="before">
<div class="oe_button_box" name="button_box">
<button name="action_view_blog_post" type="object" class="oe_stat_button">
<field name="blog_post_count" widget="statinfo"/>
</button>
</div>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="app_view_blog_post_list" model="ir.ui.view">
<field name="name">app.blog.post.list</field>
<field name="model">blog.post</field>
<field name="inherit_id" ref="website_blog.view_blog_post_list"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="before">
<field name="id" optional="show"/>
</xpath>
<xpath expr="//field[@name='name']" position="attributes">
<attribute name="optional">show</attribute>
</xpath>
<xpath expr="//field[@name='website_url']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//field[@name='is_seo_optimized']" position="attributes">
<attribute name="optional">show</attribute>
</xpath>
<xpath expr="//field[@name='is_published']" position="attributes">
<attribute name="optional">show</attribute>
</xpath>
<xpath expr="//field[@name='website_url']" position="after">
<field name="seo_name" optional="show"/>
<field name="website_meta_keywords" optional="show"/>
<field name="website_meta_title" optional="hide"/>
<field name="website_meta_description" optional="hide"/>
<field name="tag_ids" widget="many2many_tags" optional="hide"/>
</xpath>
<xpath expr="//field[@name='author_id']" position="before">
<field name="visits" optional="show"/>
</xpath>
<xpath expr="//field[@name='write_date']" position="after">
<field name="published_date" optional="hide"/>
</xpath>
<xpath expr="//field[@name='is_seo_optimized']" position="before">
<button name="action_post_debug_view" type="object" title="Settings" icon="fa-bug fa-lg"/>
<button name="action_post_code_view" type="object" title="Source Code" icon="fa-code fa-lg"/>
</xpath>
</field>
</record>
<record id="app_view_blog_post_form" model="ir.ui.view">
<field name="name">app.blog.post.form</field>
<field name="model">blog.post</field>
<field name="inherit_id" ref="website_blog.view_blog_post_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='seo']" position="after">
<page name="post_content" string="Content">
<field name="content" widget="html" nolabel="1" class="oe-bordered-editor"
options="{'style-inline': true, 'codeview': true, 'dynamic_placeholder': true}"/>
</page>
</xpath>
<xpath expr="//field[@name='visits']" position="attributes">
<attribute name="readonly">0</attribute>
</xpath>
<xpath expr="//field[@name='website_meta_keywords']" position="after">
<field name="seo_name"/>
<field name="website_url"/>
</xpath>
</field>
</record>
<record id="app_blog_post_form_view_code" model="ir.ui.view">
<field name="name">app.blog.post.code</field>
<field name="model">blog.post</field>
<field name="priority">99</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="app_view_blog_post_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='content']" position="replace">
<field name="content" nolabel="1" widget="ace"/>
</xpath>
</field>
</record>
<!--search-->
<record id="app_view_blog_post_search" model="ir.ui.view">
<field name="name">app.blog.post.search</field>
<field name="model">blog.post</field>
<field name="inherit_id" ref="website_blog.view_blog_post_search"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="replace">
<field name="name" string="Title"/>
<field name="content" string="Content"/>
<field name="seo_name"/>
<field name="website_meta_keywords"/>
<field name="website_meta_title"/>
<field name="website_meta_description"/>
</xpath>
<xpath expr="//filter[@name='inactive']" position="after">
<filter string="Published" name="filter_published" domain="[('is_published','=',True)]"/>
<filter string="Not Published" name="filter_un_published" domain="[('is_published','!=',True)]"/>
</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>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="app_res_config_settings_form_view" model="ir.ui.view">
<field name="name">app.res.config.settings.form</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="website.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@id='social_default_image_setting']" position="after">
<div class="col-12 col-lg-6 o_setting_box" id="blog_default_image_setting">
<div class="o_setting_left_pane">
<field name="sync_blog_meta_background_img"/>
</div>
<div class="o_setting_right_pane">
<label string="Use a meta image by default for blog post background" for="sync_blog_meta_background_img"/>
<div class="text-muted">
If set, replaces the blog post background image as the meta image.
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="app_website_pages_tree_view" model="ir.ui.view">
<field name="name">app.website.page.list</field>
<field name="model">website.page</field>
<field name="inherit_id" ref="website.website_pages_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="before">
<field name="id" groups="base.group_no_one" optional="show"/>
</xpath>
<xpath expr="//field[@name='name']" position="attributes">
<attribute name="optional">show</attribute>
</xpath>
<xpath expr="//field[@name='website_indexed']" position="attributes">
<attribute name="optional">show</attribute>
</xpath>
<xpath expr="//field[@name='website_url']" position="attributes">
<attribute name="optional">show</attribute>
</xpath>
<xpath expr="//field[@name='is_in_menu']" position="attributes">
<attribute name="optional">show</attribute>
</xpath>
<xpath expr="//field[@name='is_published']" position="attributes">
<attribute name="optional">show</attribute>
</xpath>
<xpath expr="//field[@name='is_seo_optimized']" position="attributes">
<attribute name="optional">show</attribute>
</xpath>
<xpath expr="//field[@name='website_id'][2]" position="attributes">
<attribute name="optional">show</attribute>
</xpath>
<xpath expr="//field[@name='is_published']" position="before">
<field name="is_force_all" widget="boolean_toggle" optional="show"/>
</xpath>
<xpath expr="//field[@name='website_url']" position="after">
<field name="seo_name" invisible="1"/>
<field name="website_meta_keywords" optional="show"/>
<field name="website_meta_title" optional="hide"/>
<field name="website_meta_description" optional="hide"/>
</xpath>
<xpath expr="//field[@name='is_seo_optimized']" position="before">
<button name="action_page_debug_view" position="move"/>
<button name="action_page_code_view" type="object" title="Source Code" icon="fa-code fa-lg"/>
<button name="action_page_form_view" type="object" title="Properties Set" icon="fa-file-text-o fa-lg" />
</xpath>
<xpath expr="//button[@name='action_page_debug_view']" position="attributes">
<attribute name="groups"/>
</xpath>
</field>
</record>
<!-- form-->
<!-- 编辑时的属性-->
<record id="app_website_page_properties_view_form" model="ir.ui.view">
<field name="name">app.website.page.properties.form.view</field>
<field name="model">website.page</field>
<field name="mode">extension</field>
<field name="inherit_id" ref="website.website_page_properties_view_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='is_published']" position="before">
<field name="is_force_all" widget="boolean_toggle"/>
</xpath>
</field>
</record>
<!-- 编辑form各主属性-->
<record id="app_website_pages_form_view" model="ir.ui.view">
<field name="name">app.website.page.form</field>
<field name="model">website.page</field>
<field name="mode">extension</field>
<field name="inherit_id" ref="website.website_pages_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='is_published']" position="before">
<field name="is_force_all" widget="boolean_toggle"/>
</xpath>
</field>
</record>
<!-- 可视编辑器-->
<record id="app_view_view_form_extend_debug" model="ir.ui.view">
<field name="name">app.website.page.form</field>
<field name="model">website.page</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="website.view_view_form_extend"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='arch_base']" position="attributes">
<attribute name="widget">html</attribute>
</xpath>
</field>
</record>
<!--search-->
<record id="app_website_pages_view_search" model="ir.ui.view">
<field name="name">app.website.page.search</field>
<field name="model">website.page</field>
<field name="inherit_id" ref="website.website_pages_view_search"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='url']" position="after">
<field name="website_meta_keywords"/>
<field name="website_meta_title"/>
<field name="website_meta_description"/>
<group expand="0" string="Group By">
<filter string="Website" name="groupby_website_id" domain="[]" context="{'group_by': 'website_id'}"/>
</group>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="app_view_website_tree" model="ir.ui.view">
<field name="name">app.website.tree</field>
<field name="model">website</field>
<field name="inherit_id" ref="website.view_website_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='default_lang_id']" position="after">
<field name="language_ids" optional="hide" widget="many2many_tags"/>
</xpath>
<xpath expr="//field[@name='theme_id']" position="after">
<field name="cdn_activated" optional="hide" widget="boolean_toggle"/>
<field name="cdn_url" optional="hide"/>
</xpath>
<xpath expr="//field[@name='default_lang_id']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//field[@name='theme_id']" position="attributes">
<attribute name="optional">show</attribute>
</xpath>
</field>
</record>
<record id="app_view_website_form" model="ir.ui.view">
<field name="name">app.website.form</field>
<field name="model">website</field>
<field name="inherit_id" ref="website.view_website_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='language_count']" position="before">
<field name="cdn_activated" widget="boolean_toggle"/>
</xpath>
</field>
</record>
</data>
</odoo>

View File

View File

@@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
from . import models
from . import controllers
from .hooks import pre_init_hook
from .hooks import post_init_hook
from .hooks import uninstall_hook

View File

@@ -0,0 +1,84 @@
# -*- coding: utf-8 -*-
# Created on 2022-09-01
# author: 欧度智能https://www.odooai.cn
# email: 300883@qq.com
# resource of odooai
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
# Odoo16在线用户手册长期更新
# https://www.odooai.cn/documentation/16.0/zh_CN/index.html
# Odoo16在线开发者手册长期更新
# https://www.odooai.cn/documentation/16.0/zh_CN/developer.html
# Odoo13在线用户手册长期更新
# https://www.odooai.cn/documentation/user/13.0/zh_CN/index.html
# Odoo13在线开发者手册长期更新
# https://www.odooai.cn/documentation/13.0/index.html
# Odoo10在线中文用户手册长期更新
# https://www.odooai.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# https://www.odooai.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# https://www.odooai.cn/odoo10_developer_document_offline/
##############################################################################
# Copyright (C) 2009-TODAY odooai.cn Ltd. https://www.odooai.cn
# Author: Ivan Deng300883@qq.com
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
# See <http://www.gnu.org/licenses/>.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
##############################################################################
{
'name': "Website Product Editor in Backend",
'version': '24.03.12',
'author': 'odooai.cn',
'category': 'Website',
'website': 'https://www.odooai.cn',
'live_test_url': 'https://demo.odooapp.cn',
'license': 'LGPL-3',
'sequence': 2,
'price': 0.00,
'currency': 'EUR',
'images': ['static/description/banner.png'],
'depends': [
'website_sale',
],
'summary': '''
Odoo App of odooai.cn
''',
'description': '''
Support Odoo 17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition
1.
2.
11. Multi-language Support. Multi-Company Support.
12. Support Odoo 17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition.
13. Full Open Source.
==========
1.
2.
11. 多语言支持,多公司支持
12. Odoo 16,15,14,13,12, 企业版社区版在线SaaS.sh版等全版本支持
13. 代码完全开源
''',
'data': [
'views/product_template_views.xml',
'views/product_public_category_views.xml',
# 'report/.xml',
],
'demo': [],
# 'pre_init_hook': 'pre_init_hook',
# 'post_init_hook': 'post_init_hook',
# 'uninstall_hook': 'uninstall_hook',
'installable': True,
'application': True,
'auto_install': False,
}

View File

@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
# from . import main

View File

@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
# Created on 2018-10-12
# author: 欧度智能https://www.odooai.cn
# email: 300883@qq.com
# resource of odooai
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
# Odoo在线中文用户手册长期更新
# https://www.odooai.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# https://www.odooai.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# https://www.odooai.cn/odoo10_developer_document_offline/
# description:
from odoo import api, SUPERUSER_ID, _
def pre_init_hook(cr):
pass
# cr.execute("")
def post_init_hook(cr, registry):
pass
# cr.execute("")
def uninstall_hook(cr, registry):
pass
# cr.execute("")

View File

@@ -0,0 +1,21 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * app_website_sale_editor
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0-20230320\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-10 17:30+0000\n"
"PO-Revision-Date: 2023-04-10 17:30+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: app_website_sale_editor
#: model_terms:ir.ui.view,arch_db:app_website_sale_editor.app_product_template_form_view
msgid "Website Description"
msgstr "网站图文"

View File

@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Part of odooai.cn. See LICENSE file for full copyright and licensing details.
# Created on 2019-04-20
# author: 欧度智能http://www.odooai.cn
# email: 300883@qq.com
# resource of odooai
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo12在线用户手册长期更新
# http://www.odooai.cn/documentation/user/12.0/en/index.html
# Odoo12在线开发者手册长期更新
# http://www.odooai.cn/documentation/12.0/index.html
# Odoo10在线中文用户手册长期更新
# http://www.odooai.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# http://www.odooai.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程jquery参考Jinja2模板PostgresSQL参考odoo开发必备
# http://www.odooai.cn/odoo10_developer_document_offline/
# description:
from . import product_template

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
from odoo import api, models, fields, _
from odoo.tools.safe_eval import safe_eval
class ProductTemplate(models.Model):
_inherit = 'product.template'
def action_product_debug_view(self):
self.ensure_one()
action = self.env.ref('website_sale.product_template_action_website').sudo().read()[0]
action['views'] = [(self.env.ref('app_website_sale_editor.app_product_template_form_view_debug').id, 'form')]
action['res_id'] = self.id
return action
def action_product_code_view(self):
self.ensure_one()
action = self.env.ref('website_sale.action_product_pages_list').sudo().read()[0]
action['views'] = [(self.env.ref('app_website_sale_editor.app_product_template_form_view_code').id, 'form')]
action['res_id'] = self.id
return action

View File

@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- model权限 -->
<record id="acc_module" model="ir.model.access">
<field name="name">acc_module_user</field>
<field name="model_id" ref="model_app_order"/>
<field name="group_id" ref="base.group_user"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_create" eval="1"/>
<field name="perm_unlink" eval="1"/>
</record>
<!-- 应用权限目录 -->
<record model="ir.module.category" id="app_module_category_1">
<field name="name">App...</field>
<field name="description">Helps you manage your ...</field>
<field name="sequence">8</field>
</record>
<!-- 权限用户 -->
<!-- 普通 -->
<record id="group_app_user" model="res.groups">
<field name="name">App User</field>
<field name="category_id" ref="app_module_category_1"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="comment">The user will be able to ...</field>
</record>
<!-- 管理员,可以配置 -->
<record id="group_app_admin" model="res.groups">
<field name="name">App Admin</field>
<field name="category_id" ref="app_module_category_1"/>
<field name="implied_ids" eval="[(4, ref('group_app_user'))]"/>
<field name="comment">The user will be able to config ...</field>
</record>
<!-- group_erp_manager自动有完整权限 -->
<record id="base.group_erp_manager" model="res.groups">
<field name="implied_ids" eval="[(4, ref('group_app_admin'))]"/>
</record>
<!-- Rules -->
<record id="rule_user" model="ir.rule">
<field name="name">Users are allowed to access their own m///</field>
<field name="model_id" ref="model_app_order"/>
<field name="domain_force">['|', ('partner_id', 'in', [user.partner_id.id]), ('user_id.id', '=', user.id)]</field>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
</record>
<!--End -->
</data>
</odoo>

View File

@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_product_attribute_value_group_user,product_attribute_value_group.user,app_product_variant_pro.model_product_attribute_value_group,base.group_user,1,0,0,0
access_product_attribute_value_group_manager,product_attribute_value_group.manager,app_product_variant_pro.model_product_attribute_value_group,base.group_erp_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_product_attribute_value_group_user product_attribute_value_group.user app_product_variant_pro.model_product_attribute_value_group base.group_user 1 0 0 0
3 access_product_attribute_value_group_manager product_attribute_value_group.manager app_product_variant_pro.model_product_attribute_value_group base.group_erp_manager 1 1 1 1

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View File

@@ -0,0 +1,95 @@
<section class="oe_container container">
<div class="oe_row oe_spaced" >
<div class="row">
<h2 class="oe_slogan"> </h2>
<h3 class="oe_slogan"> </h3>
<div class="oe_row">
<h3>Latest update: v13.23.03.23</h3>
<div class="row">
<img class="oe_demo oe_screenshot img img-fluid" style="max-height: 100%;" src="banner.png">
</div>
<div class="oe_span12 oe_spaced">
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
<i class="fa fa-hand-o-right"></i><b> Key features: </b>
<ul class="list-unstyled">
<li>
<i class="fa fa-check-square-o text-primary"></i>
Put key function here.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
1.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
11. Multi-language Support. Multi-Company Support.
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
12. Support Odoo 17,16,15,14,13,12, Enterprise and Community and odoo.sh Edition.
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="oe_container container">
<div class="oe_row oe_spaced">
<h2 class="bg-warning text-center pt8 pb8">So Easy to navigator and search any data.</h2>
<h4 class="oe_slogan"> </h4>
<div class="oe_demo oe_screenshot img img-fluid">
<img src=".jpg"/>
</div>
</div>
</section>
<section class="oe_container container">
<div class="oe_row oe_spaced">
<h2 class="bg-warning text-center pt8 pb8">Multi-language Support..</h2>
<h4 class="oe_slogan"> </h4>
<div class="oe_demo oe_screenshot img img-fluid">
<img src="cnreadme.jpg"/>
</div>
</div>
</section>
<section class="container oe_dark">
<div class="oe_row oe_spaced text-center">
<div class="row">
<h2 class="oe_slogan">Technical Help & Support</h2>
</div>
<div class="col-md-12 pad0">
<div class="oe_mt16">
<p><h4>
For any type of technical help & support requests, Feel free to contact us</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:odoo@china.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> odoo@china.com</a>
<p><h4>
Via QQ: 300883 (App user would not get QQ or any other IM support. Only for odoo project customize.)</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:300883@qq.com"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-envelope"></i> 300883@qq.com</a>
</div>
<div class="oe_mt16">
<p><h4>
Visit our website for more support.</h4></p>
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
class="btn btn-warning btn-lg" rel="nofollow" href="https://www.odooai.cn" target="_blank"><span
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
<i class="fa fa-web"></i>https://www.odooai.cn</a>
</div>
</div>
</div>
<div class="oe_row oe_spaced text-center">
<h2>More Powerful addons, Make your odoo very easy to use, easy customize:
<a class="btn btn-primary mb16" href="http://www.odoo.com/apps/modules/browse?author=odooai.cn">odooai.cn Odoo Addons</a>
</h2>
</div>
</section>

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="app_product_public_category_tree_view" model="ir.ui.view">
<field name="name">app.product.public.category.tree</field>
<field name="model">product.public.category</field>
<field name="inherit_id" ref="website_sale.product_public_category_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//tree" position="attributes">
<attribute name="multi_edit">1</attribute>
</xpath>
<xpath expr="//field[@name='display_name']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//field[@name='display_name']" position="before">
<field name="name" optional="show"/>
</xpath>
<xpath expr="//field[@name='website_id']" position="before">
<field name="image_1920" widget="image" class="oe_avatar" options="{'preview_image': 'image_128','size': [40, 40]}"/>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="app_product_template_tree_view" model="ir.ui.view">
<field name="name">app.product.template.tree</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="website_sale.product_pages_tree_view"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='is_seo_optimized']" position="before">
<button name="action_product_debug_view" type="object" title="Content Set" icon="fa-bug fa-lg"/>
<button name="action_product_code_view" type="object" title="Source Code" icon="fa-code fa-lg"/>
</xpath>
<xpath expr="//field[@name='website_url']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//field[@name='is_published']" position="attributes">
<attribute name="optional">show</attribute>
</xpath>
<xpath expr="//field[@name='is_seo_optimized']" position="attributes">
<attribute name="optional">show</attribute>
</xpath>
<xpath expr="//field[@name='is_published']" position="after">
<field name="seo_name" optional="hide"/>
<field name="website_meta_keywords" optional="hide"/>
<field name="website_meta_title" optional="hide"/>
<field name="website_meta_description" optional="hide"/>
</xpath>
</field>
</record>
<record id="app_product_template_form_view" model="ir.ui.view">
<field name="name">app.product.template.common.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//page[@name='sales']" position="after">
<page name="shop_desc" string="Website Description" attrs="{'invisible': [('sale_ok','=',False)]}">
<group>
<group>
<!-- 这里加个快速设置 seo url字段-->
<field name="seo_name"/>
<field name="website_meta_keywords"/>
<field name="website_meta_title"/>
</group>
<group>
<field name="website_meta_description"/>
</group>
</group>
<group string="Content">
<field name="website_description" nolabel="1"/>
</group>
</page>
</xpath>
</field>
</record>
<record id="app_product_template_form_view_code" model="ir.ui.view">
<field name="name">app.product.template.website.code</field>
<field name="model">product.template</field>
<field name="priority">99</field>
<field name="mode">primary</field>
<field name="arch" type="xml">
<form string="Website Product">
<sheet name="product_form">
<div class="oe_button_box" name="button_box" attrs="{'invisible': [('active', '=', False)]}">
<field name="is_published" widget="website_redirect_button"/>
</div>
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="id" invisible="1"/>
<field name="active" invisible="1"/>
<field name="image_1920" widget="image" class="oe_avatar" options="{'preview_image': 'image_128'}"/>
<div class="oe_title">
<label for="name" string="Product Name"/>
<h1>
<div class="d-flex">
<field name="priority" widget="priority" class="me-3"/>
<field class="text-break" name="name" placeholder="e.g. Cheese Burger"/>
</div>
</h1>
</div>
<group>
<group>
<field name="sale_ok" invisible="1"/>
</group>
</group>
<notebook>
<page name="shop_desc" string="Website Description">
<field name="website_description" nolabel="1" widget="ace" attrs="{'invisible': [('sale_ok','=',False)]}"/>
</page>
<page name="seo" string="SEO">
<group>
<field name="seo_name"/>
<field name="website_meta_title" string="Meta Title"/>
<field name="website_meta_description" string="Meta Description"/>
<field name="website_meta_keywords" string="Meta Keywords" help="Separate every keyword with a comma"/>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="app_product_template_form_view_debug" model="ir.ui.view">
<field name="name">app.product.template.website.debug</field>
<field name="model">product.template</field>
<field name="priority">99</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="app_product_template_form_view_code"/>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='website_description']" position="attributes">
<attribute name="widget">html</attribute>
</xpath>
</field>
</record>
<record id="app_product_template_search_view" model="ir.ui.view">
<field name="name">app.product.template.website.search</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_search_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='categ_id']" position="after">
<field name="seo_name"/>
<field name="website_meta_keywords"/>
<field name="website_meta_title"/>
<field name="website_meta_description"/>
</xpath>
</field>
</record>
</data>
</openerp>

View File