[REF] refactor code, attribute improvement view should be all in attribute_view instead of 2 modules
This commit is contained in:
@@ -7,8 +7,45 @@
|
|||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="product_attribute_view_form" model="ir.ui.view">
|
||||||
|
<field name="model">product.attribute</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Product Attribute">
|
||||||
|
<sheet>
|
||||||
|
<div class="oe_title" style="width: 390px;">
|
||||||
|
<label class="oe_edit_only" for="name" string="Product Name"/>
|
||||||
|
<h1><field name="name" class="oe_inline"/></h1>
|
||||||
|
</div>
|
||||||
|
<group>
|
||||||
|
<field name="value_ids" colspan="4" nolabel="1"
|
||||||
|
context="{'hide_attribute_id': True}"/>
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="attribute_tree_view" model="ir.ui.view">
|
||||||
|
<field name="model">product.attribute</field>
|
||||||
|
<field name="inherit_id" ref="product.attribute_tree_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//tree" position="attributes">
|
||||||
|
<attribute name="editable"></attribute>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="variants_tree_view" model="ir.ui.view">
|
||||||
|
<field name="model">product.attribute.value</field>
|
||||||
|
<field name="inherit_id" ref="product.variants_tree_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="attribute_id" position="attributes">
|
||||||
|
<attribute name="invisible">context.get('hide_attribute_id')</attribute>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="product.attribute_action" model="ir.actions.act_window">
|
<record id="product.attribute_action" model="ir.actions.act_window">
|
||||||
<field name="res_model">product.attribute</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
@@ -18,11 +18,11 @@
|
|||||||
"bin": [],
|
"bin": [],
|
||||||
},
|
},
|
||||||
"depends": [
|
"depends": [
|
||||||
|
"attribute_usability",
|
||||||
"product_variant_inactive",
|
"product_variant_inactive",
|
||||||
],
|
],
|
||||||
"data": [
|
"data": [
|
||||||
"views/product_view.xml",
|
"views/product_view.xml",
|
||||||
"views/product_attribute_view.xml",
|
|
||||||
],
|
],
|
||||||
"demo": [
|
"demo": [
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<record id="product_attribute_view_form" model="ir.ui.view">
|
|
||||||
<field name="model">product.attribute</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="Product Attribute">
|
|
||||||
<sheet>
|
|
||||||
<div class="oe_title" style="width: 390px;">
|
|
||||||
<label class="oe_edit_only" for="name" string="Product Name"/>
|
|
||||||
<h1><field name="name" class="oe_inline"/></h1>
|
|
||||||
</div>
|
|
||||||
<group>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="value_ids" colspan="4" nolabel="1">
|
|
||||||
<tree editable="bottom">
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="comment"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="attribute_tree_view" model="ir.ui.view">
|
|
||||||
<field name="model">product.attribute</field>
|
|
||||||
<field name="inherit_id" ref="product.attribute_tree_view"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<xpath expr="//tree" position="attributes">
|
|
||||||
<attribute name="editable"></attribute>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="product.attribute_action" model="ir.actions.act_window">
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
Reference in New Issue
Block a user