Remove colors attribute + product form views
This commit is contained in:
parent
81177bfe23
commit
ced159aa1b
10
product.py
10
product.py
|
@ -12,11 +12,6 @@ class Template:
|
||||||
__metaclass__ = PoolMeta
|
__metaclass__ = PoolMeta
|
||||||
__name__ = 'product.template'
|
__name__ = 'product.template'
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def view_attributes(cls):
|
|
||||||
return [('/tree', 'colors',
|
|
||||||
If(Less(Eval('quantity', 1), 1), 'red', 'black'))]
|
|
||||||
|
|
||||||
def sum_product(self, name):
|
def sum_product(self, name):
|
||||||
Location = Pool().get('stock.location')
|
Location = Pool().get('stock.location')
|
||||||
|
|
||||||
|
@ -33,11 +28,6 @@ class Product:
|
||||||
__metaclass__ = PoolMeta
|
__metaclass__ = PoolMeta
|
||||||
__name__ = 'product.product'
|
__name__ = 'product.product'
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def view_attributes(cls):
|
|
||||||
return [('/tree', 'colors',
|
|
||||||
If(Less(Eval('quantity', 1), 1), 'red', 'black'))]
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_quantity(cls, products, name):
|
def get_quantity(cls, products, name):
|
||||||
pool = Pool()
|
pool = Pool()
|
||||||
|
|
|
@ -9,12 +9,6 @@ The COPYRIGHT file at the top level of this repository contains the full copyrig
|
||||||
<field name="type">tree</field>
|
<field name="type">tree</field>
|
||||||
<field name="name">template_qty_tree</field>
|
<field name="name">template_qty_tree</field>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.ui.view" id="template_qty_view_form">
|
|
||||||
<field name="model">product.template</field>
|
|
||||||
<field name="type" eval="None"/>
|
|
||||||
<field name="inherit" ref="product.template_view_form"/>
|
|
||||||
<field name="name">template_qty_form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record model="ir.action.act_window" id="act_template_qty_form">
|
<record model="ir.action.act_window" id="act_template_qty_form">
|
||||||
<field name="name">Qty Products</field>
|
<field name="name">Qty Products</field>
|
||||||
|
@ -46,7 +40,6 @@ The COPYRIGHT file at the top level of this repository contains the full copyrig
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.ui.view" id="product_qty_view_form">
|
<record model="ir.ui.view" id="product_qty_view_form">
|
||||||
<field name="model">product.product</field>
|
<field name="model">product.product</field>
|
||||||
<field name="type" eval="None"/>
|
|
||||||
<field name="inherit" ref="product.product_view_form"/>
|
<field name="inherit" ref="product.product_view_form"/>
|
||||||
<field name="name">product_qty_form</field>
|
<field name="name">product_qty_form</field>
|
||||||
</record>
|
</record>
|
||||||
|
@ -97,7 +90,6 @@ The COPYRIGHT file at the top level of this repository contains the full copyrig
|
||||||
<data depends="product_manufacturer">
|
<data depends="product_manufacturer">
|
||||||
<record model="ir.ui.view" id="template_qty_manufacturer_view_tree">
|
<record model="ir.ui.view" id="template_qty_manufacturer_view_tree">
|
||||||
<field name="model">product.template</field>
|
<field name="model">product.template</field>
|
||||||
<field name="type" eval="None"/>
|
|
||||||
<field name="inherit" ref="template_qty_view_tree"/>
|
<field name="inherit" ref="template_qty_view_tree"/>
|
||||||
<field name="name">template_qty_manufacturer_tree</field>
|
<field name="name">template_qty_manufacturer_tree</field>
|
||||||
</record>
|
</record>
|
||||||
|
@ -106,7 +98,6 @@ The COPYRIGHT file at the top level of this repository contains the full copyrig
|
||||||
<data depends="purchase">
|
<data depends="purchase">
|
||||||
<record model="ir.ui.view" id="template_qty_purchase_view_tree">
|
<record model="ir.ui.view" id="template_qty_purchase_view_tree">
|
||||||
<field name="model">product.template</field>
|
<field name="model">product.template</field>
|
||||||
<field name="type" eval="None"/>
|
|
||||||
<field name="inherit" ref="template_qty_view_tree"/>
|
<field name="inherit" ref="template_qty_view_tree"/>
|
||||||
<field name="name">template_qty_purchase_tree</field>
|
<field name="name">template_qty_purchase_tree</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<!-- This file is part of product_kit module for Tryton.
|
|
||||||
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
|
||||||
<data>
|
|
||||||
<xpath expr="/form/field[@name='description']"
|
|
||||||
position="after">
|
|
||||||
<label name="quantity"/>
|
|
||||||
<field name="quantity"/>
|
|
||||||
<label name="forecast_quantity"/>
|
|
||||||
<field name="forecast_quantity"/>
|
|
||||||
</xpath>
|
|
||||||
</data>
|
|
|
@ -1,12 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
|
||||||
copyright notices and license terms. -->
|
|
||||||
<data>
|
|
||||||
<xpath expr="/form/notebook/page[@id='general']/field[@name='cost_price_method']"
|
|
||||||
position="after">
|
|
||||||
<label name="quantity"/>
|
|
||||||
<field name="quantity"/>
|
|
||||||
<label name="forecast_quantity"/>
|
|
||||||
<field name="forecast_quantity"/>
|
|
||||||
</xpath>
|
|
||||||
</data>
|
|
|
@ -2,7 +2,7 @@
|
||||||
<!-- This file is part product_qty module for Tryton.
|
<!-- This file is part product_qty module for Tryton.
|
||||||
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
||||||
<data>
|
<data>
|
||||||
<xpath expr="/tree/field[@name="category"]" position="after">
|
<xpath expr="/tree/field[@name="forecast_quantity"]" position="after">
|
||||||
<field name="manufacturer"/>
|
<field name="manufacturer"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<!-- This file is part product_qty module for Tryton.
|
<!-- This file is part product_qty module for Tryton.
|
||||||
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
||||||
<data>
|
<data>
|
||||||
<xpath expr="/tree/field[@name="category"]" position="after">
|
<xpath expr="/tree/field[@name="categories"]" position="after">
|
||||||
<field name="product_suppliers" tree_invisible="1"/>
|
<field name="product_suppliers" tree_invisible="1"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -6,9 +6,9 @@ The COPYRIGHT file at the top level of this repository contains the full copyrig
|
||||||
<field name="list_price"/>
|
<field name="list_price"/>
|
||||||
<field name="cost_price"/>
|
<field name="cost_price"/>
|
||||||
<field name="type"/>
|
<field name="type"/>
|
||||||
<field name="category"/>
|
|
||||||
<field name="default_uom"/>
|
<field name="default_uom"/>
|
||||||
<field name="quantity"/>
|
<field name="quantity"/>
|
||||||
<field name="forecast_quantity"/>
|
<field name="forecast_quantity"/>
|
||||||
<field name="active" tree_invisible="1"/>
|
<field name="active" tree_invisible="1"/>
|
||||||
|
<field name="categories" tree_invisible="1"/>
|
||||||
</tree>
|
</tree>
|
||||||
|
|
Loading…
Reference in New Issue