[IMP]improved product form
bzr revid: dhr@tinyerp.com-20120426051717-1qwywvi0r3f62l9r
This commit is contained in:
parent
f0b5466bca
commit
15dae73907
|
@ -1120,4 +1120,10 @@ class mrp_production_product_line(osv.osv):
|
|||
}
|
||||
mrp_production_product_line()
|
||||
|
||||
class product_product(osv.osv):
|
||||
_inherit="product.product"
|
||||
_columns = {
|
||||
'bom_ids': fields.one2many('mrp.bom', 'product_id', 'Bill of Material')
|
||||
}
|
||||
product_product()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -975,7 +975,23 @@
|
|||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_normal_form_view" model="ir.ui.view">
|
||||
<field name="name">product.normal.form.mrp.inherit</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="store" position="after">
|
||||
<group col="2" colspan="4">
|
||||
<separator string="Bill of Materials" colspan="4"/>
|
||||
<field name="bom_ids" nolabel="1" domain="[('bom_id','=',False)]">
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window
|
||||
context="{'search_default_product_id': [active_id]}"
|
||||
id="act_product_manufacturing_open"
|
||||
|
@ -997,7 +1013,7 @@
|
|||
groups="mrp.group_mrp_user"/>
|
||||
|
||||
<act_window
|
||||
domain="[('bom_id','=',False)]"
|
||||
domain="[('bom_id','=',False)]"
|
||||
context="{'search_default_product_id': [active_id],'default_product_id':active_id}"
|
||||
id="act_product_product_2_mrp_bom"
|
||||
name="Bill of Materials"
|
||||
|
|
|
@ -283,8 +283,8 @@
|
|||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="misc" position="after">
|
||||
<group col="2" colspan="2" attrs="{'invisible':[('type', '=', 'service')]}">
|
||||
<separator string="Minimum Stock Rules" colspan="2"/>
|
||||
<group col="2" colspan="4" attrs="{'invisible':[('type', '=', 'service')]}">
|
||||
<separator string="Minimum Stock Rules" colspan="4"/>
|
||||
<field name="orderpoint_ids" context="{'default_product_uom': uom_id}" nolabel="1">
|
||||
<tree string="Minimum Stock Rule" editable="bottom">
|
||||
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
|
||||
|
|
|
@ -217,6 +217,7 @@
|
|||
</div>
|
||||
<div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger">
|
||||
<img t-att-src="kanban_image('product.product', 'product_image', record.id.value)" width="48" style="float: left; padding: 0 4px 4px 0"/>
|
||||
Code: <field name="code"/>
|
||||
<div t-if="record.type.raw_value == 'service'">No Stock</div>
|
||||
<t t-if="record.type.raw_value != 'service'">
|
||||
<div>Stock: <field name="qty_available"/> on hand, <field name="virtual_available"/> available</div>
|
||||
|
|
|
@ -145,6 +145,7 @@
|
|||
<div class="oe_product_desc">
|
||||
<h4><a type="edit"><field name="name"></field></a></h4>
|
||||
<ul>
|
||||
<li>Code: <field name="code"></field></li>
|
||||
<li t-if="record.type.raw_value != 'service'">Stock on hand: <field name="qty_available"/> <field name="uom_id"/></li>
|
||||
<li t-if="record.type.raw_value != 'service'">Stock available: <field name="virtual_available"/> <field name="uom_id"/></li>
|
||||
<li>Price: <field name="lst_price"></field></li>
|
||||
|
|
Loading…
Reference in New Issue