mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
add editor
This commit is contained in:
7
app_website_sale_editor/__init__.py
Normal file
7
app_website_sale_editor/__init__.py
Normal 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
|
||||
84
app_website_sale_editor/__manifest__.py
Normal file
84
app_website_sale_editor/__manifest__.py
Normal 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 Deng,300883@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,
|
||||
}
|
||||
2
app_website_sale_editor/controllers/__init__.py
Normal file
2
app_website_sale_editor/controllers/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# from . import main
|
||||
32
app_website_sale_editor/hooks.py
Normal file
32
app_website_sale_editor/hooks.py
Normal 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("")
|
||||
|
||||
21
app_website_sale_editor/i18n/zh_CN.po
Normal file
21
app_website_sale_editor/i18n/zh_CN.po
Normal 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 "网站图文"
|
||||
25
app_website_sale_editor/models/__init__.py
Normal file
25
app_website_sale_editor/models/__init__.py
Normal 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
|
||||
26
app_website_sale_editor/models/product_template.py
Normal file
26
app_website_sale_editor/models/product_template.py
Normal 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
|
||||
|
||||
2
app_website_sale_editor/report/__init__.py
Normal file
2
app_website_sale_editor/report/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
51
app_website_sale_editor/security/app_security.xml
Normal file
51
app_website_sale_editor/security/app_security.xml
Normal 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>
|
||||
3
app_website_sale_editor/security/ir.model.access.csv
Normal file
3
app_website_sale_editor/security/ir.model.access.csv
Normal 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
|
||||
|
BIN
app_website_sale_editor/static/description/banner.png
Normal file
BIN
app_website_sale_editor/static/description/banner.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 238 KiB |
BIN
app_website_sale_editor/static/description/icon.png
Normal file
BIN
app_website_sale_editor/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
95
app_website_sale_editor/static/description/index.html
Normal file
95
app_website_sale_editor/static/description/index.html
Normal 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>
|
||||
|
||||
BIN
app_website_sale_editor/static/img/icon_sunpop.png
Normal file
BIN
app_website_sale_editor/static/img/icon_sunpop.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
BIN
app_website_sale_editor/static/img/logo_sunpop.png
Normal file
BIN
app_website_sale_editor/static/img/logo_sunpop.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
0
app_website_sale_editor/static/src/js/sunpop.cn
Normal file
0
app_website_sale_editor/static/src/js/sunpop.cn
Normal file
0
app_website_sale_editor/static/src/xml/sunpop.cn
Normal file
0
app_website_sale_editor/static/src/xml/sunpop.cn
Normal 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>
|
||||
135
app_website_sale_editor/views/product_template_views.xml
Normal file
135
app_website_sale_editor/views/product_template_views.xml
Normal 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>
|
||||
0
app_website_sale_editor/wizard/sunpop.cn
Normal file
0
app_website_sale_editor/wizard/sunpop.cn
Normal file
Reference in New Issue
Block a user