mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
opt trans, misc
This commit is contained in:
@@ -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>
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user