fix #I67W45 app_common可用

This commit is contained in:
Chill
2023-02-02 16:05:37 +08:00
parent d567751160
commit 6669fd37e8
8 changed files with 13 additions and 208 deletions

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Created on 20120-01-05
# Created on 2023-02-02
# author: 广州尚鹏https://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
@@ -33,7 +33,7 @@
{
'name': "Sunpop Odooapp Common Func",
'version': '16.22.11.30',
'version': '16.23.02.02',
'author': 'Sunpop.cn',
'category': 'Base',
'website': 'https://www.sunpop.cn',
@@ -47,18 +47,18 @@
基础核心必须没有要被依赖字段及视图等实现auto_install
''',
'description': '''
Support Odoo 15, Enterprise and Community Edition
Support Odoo 16, Enterprise and Community Edition
1.
2.
3. Multi-language Support.
4. Multi-Company Support.
5. Support Odoo 15, Enterprise and Community Edition
5. Support Odoo 16, Enterprise and Community Edition
==========
1.
2.
3. 多语言支持
4. 多公司支持
5. Odoo 15, 企业版,社区版,多版本支持
5. Odoo 16, 企业版,社区版,多版本支持
''',
'depends': [
'base',

View File

@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Part of Sunpop.cn. See LICENSE file for full copyright and licensing details.
# Created on 2019-04-20
# Created on 2023-02-02
# author: 广州尚鹏http://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop

View File

@@ -415,7 +415,8 @@
<rng:element name="create">
<rng:ref name="overload"/>
<rng:attribute name="string"/>
<rng:attribute name="context"/>
<rng:optional><rng:attribute name="context"/></rng:optional>
<rng:optional><rng:attribute name="name"/></rng:optional>
</rng:element>
</rng:define>
@@ -425,6 +426,7 @@
<rng:oneOrMore>
<rng:choice>
<rng:ref name="create"/>
<rng:ref name="button"/>
</rng:choice>
</rng:oneOrMore>
</rng:element>

View File

@@ -58,6 +58,8 @@
<rng:optional><rng:attribute name="bg-white"/></rng:optional>
<rng:optional><rng:attribute name="banner_route"/></rng:optional>
<rng:optional><rng:attribute name="sample"/></rng:optional>
<rng:optional><rng:attribute name="action"/></rng:optional>
<rng:optional><rng:attribute name="type"/></rng:optional>
<rng:optional>
<rng:attribute name="limit">
<rng:data type="int"/>

View File

@@ -4,7 +4,7 @@
<h2 class="oe_slogan"> </h2>
<h3 class="oe_slogan"> </h3>
<div class="oe_row">
<h3>Lastest update: v15.21.11.30</h3>
<h3>Lastest update: v16.22.02.02</h3>
<div class="oe_span12">
<img class="oe_demo oe_screenshot" style="max-height: 100%;" src="banner.png">
</div>
@@ -26,7 +26,7 @@
</li>
<li>
<i class="fa fa-check-square-o text-primary"></i>
5. Support Odoo 15, 14, 13, 12, 11, Enterprise and Community Edition.
5. Support Odoo 16, 15, 14, 13, 12, 11, Enterprise and Community Edition.
</li>
</ul>
</div>

View File

@@ -1,116 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="app_product_brand_search_view" model="ir.ui.view">
<field name="name">product.brand.search</field>
<field name="model">product.brand</field>
<field name="arch" type="xml">
<search string="Product Brand">
<field name="name"/>
<field name="partner_id"/>
</search>
</field>
</record>
<act_window
id="action_open_brand_products"
name="Brand Products"
res_model="product.template"
view_mode="kanban,form,tree"
domain="[('product_brand_id', '=', active_id)]"/>
<act_window
id="action_open_single_product_brand"
name="Product Brand"
res_model="product.brand"
view_mode="kanban,form,tree"
target="current"
domain="[('product_ids', 'in', active_id)]"/>
<record id="app_product_brand_form_view" model="ir.ui.view">
<field name="name">product.brand.form</field>
<field name="model">product.brand</field>
<field name="arch" type="xml">
<form>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="%(action_open_brand_products)d"
type="action"
class="oe_stat_button"
icon="fa-cubes">
<field name="products_count" widget="statinfo" string="Products"/>
</button>
</div>
<field name="logo" widget="image" class="oe_avatar"/>
<div class="oe_title">
<label for="name" string="Brand Name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
</div>
<group>
<group>
<field name="partner_id"/>
</group>
</group>
<group string="Description">
<field name="description" nolabel="1"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="product_brand_tree_view" model="ir.ui.view">
<field name="name">product.brand.tree</field>
<field name="model">product.brand</field>
<field name="arch" type="xml">
<tree string="product.brand">
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="description"/>
<field name="partner_id"/>
</tree>
</field>
</record>
<record id="product_brand_kanban_view" model="ir.ui.view">
<field name="name">product.brand.kanban</field>
<field name="model">product.brand</field>
<field name="arch" type="xml">
<kanban>
<field name="id"/>
<field name="logo"/>
<field name="products_count"/>
<field name="description"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click">
<div class="o_kanban_image">
<img t-att-src="kanban_image('product.brand', 'logo', record.id.raw_value)" alt="Logo"/>
</div>
<div class="oe_kanban_details">
<h4>
<field name="name"/>
</h4>
<div>
<a name="%(action_open_brand_products)d" type="action">
<t t-esc="record.products_count.value"/> Products
</a>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record model="ir.actions.act_window" id="action_product_brand">
<field name="name">Brand</field>
<field name="res_model">product.brand</field>
<field name="view_mode">kanban,form,tree</field>
</record>
<menuitem id="menu_product_brand" name="Product Brands"
action="action_product_brand"
sequence="8"
parent="stock.menu_product_in_config_stock"/>
</odoo>

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!--产品list可调整显示顺序-->
<record id="app_product_product_tree_view" model="ir.ui.view">
<field name="name">app.product.product.tree</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_product_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='type']" position="after">
<field name="abc_classification" widget="label_selection"
options="{'classes': {'a': 'danger', 'b': 'primary', 'c': 'default'}}"/>
</xpath>
</field>
</record>
<record id="product_product_action" model="ir.actions.act_window">
<field name="name">Product Manager</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.product</field>
<field name="view_mode">tree,form</field>
</record>
</data>
</odoo>

View File

@@ -1,59 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_product_template_search_brand" model="ir.ui.view">
<field name="name">product.template.search.brand</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_search_view"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="product_brand_id"/>
<filter string="Brand" name="groupby_brand" domain="[]"
context="{'group_by': 'product_brand_id'}"/>
<separator/>
</field>
</field>
</record>
<record id="product_template_form_brand_add" model="ir.ui.view">
<field name="name">product.template.product.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<field name="sale_ok" position="before">
<field name="product_brand_id" placeholder="Brand"/>
<div/>
</field>
</field>
</record>
<record id="view_product_template_kanban_brand" model="ir.ui.view">
<field name="name">product kanban view add brand</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_kanban_view"/>
<field name="arch" type="xml">
<xpath expr="//div[hasclass('oe_kanban_details')]/strong[1]" position="after">
<div>
<a t-if="record.product_brand_id" type="action"
name="%(action_open_single_product_brand)d">
<field name="product_brand_id"/>
</a>
</div>
</xpath>
</field>
</record>
<record id="view_product_template_tree_brand" model="ir.ui.view">
<field name="name">product tree view add brand</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_tree_view"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="product_brand_id"/>
</field>
</field>
</record>
</data>
</odoo>