[MERGE] Merge trunk
bzr revid: fme@openerp.com-20120514154613-gokdo23ywtati9su
This commit is contained in:
commit
e66d9e0f41
|
@ -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 Materials'),
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -413,7 +413,6 @@
|
|||
</page>
|
||||
</notebook>
|
||||
<newline/>
|
||||
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -450,7 +449,7 @@
|
|||
<field name="type">tree</field>
|
||||
<field name="field_parent">child_complete_ids</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="BoM Structure" colors="blue:method">
|
||||
<tree string="Bill of Materials" colors="blue:method">
|
||||
<field name="sequence" invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
|
@ -975,6 +974,19 @@
|
|||
</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="misc" position="after">
|
||||
<separator string="Bill of Materials" colspan="4"/>
|
||||
<field name="bom_ids" nolabel="1" colspan="4" context="{'default_product_id': active_id}"/>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window
|
||||
context="{'search_default_product_id': [active_id]}"
|
||||
id="act_product_manufacturing_open"
|
||||
|
@ -995,15 +1007,6 @@
|
|||
src_model="product.product"
|
||||
groups="mrp.group_mrp_user"/>
|
||||
|
||||
<act_window
|
||||
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"
|
||||
res_model="mrp.bom"
|
||||
src_model="product.product"
|
||||
groups="mrp.group_mrp_user"/>
|
||||
|
||||
<!-- Menu for Resource for MRP-->
|
||||
|
||||
<record id="mrp_workcenter_action" model="ir.actions.act_window">
|
||||
|
|
|
@ -571,8 +571,9 @@ stock_warehouse_orderpoint()
|
|||
class product_product(osv.osv):
|
||||
_inherit="product.product"
|
||||
_columns = {
|
||||
'orderpoint_ids': fields.one2many('stock.warehouse.orderpoint', 'product_id', 'Minimum Stock Rule')
|
||||
'orderpoint_ids': fields.one2many('stock.warehouse.orderpoint', 'product_id', 'Minimum Stock Rules'),
|
||||
}
|
||||
|
||||
product_product()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -251,15 +251,6 @@
|
|||
src_model="stock.warehouse"
|
||||
groups="stock.group_stock_user"/>
|
||||
|
||||
<!-- add product_uom to context to be the default value when adding new orderpoints -->
|
||||
<act_window
|
||||
context="{'product_uom': locals().has_key('uom_id') and uom_id,'search_default_product_id': [active_id], 'default_product_id': active_id}"
|
||||
id="act_product_product_2_stock_warehouse_orderpoint"
|
||||
name="Minimum Stock Rules"
|
||||
res_model="stock.warehouse.orderpoint"
|
||||
src_model="product.product"
|
||||
groups="stock.group_stock_user"/>
|
||||
|
||||
<act_window
|
||||
context="{'product_uom': locals().has_key('uom_id') and uom_id, 'default_procurement_id': active_id}"
|
||||
id="act_procurement_2_stock_warehouse_orderpoint"
|
||||
|
@ -275,30 +266,18 @@
|
|||
<menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_configuration" sequence="5"/>
|
||||
<menuitem action="action_orderpoint_form" id="menu_stock_order_points" parent="stock.menu_stock_configuration" sequence="10"/>
|
||||
|
||||
|
||||
<record id="product_normal_form_view" model="ir.ui.view">
|
||||
<field name="name">product.normal.form.orderpoint.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="misc" position="after">
|
||||
<group col="2" colspan="2" attrs="{'invisible':[('type', '=', 'service')]}">
|
||||
<separator string="Minimum Stock Rules" colspan="2"/>
|
||||
<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"/>
|
||||
<field name="location_id"/>
|
||||
<field name="product_min_qty"/>
|
||||
<field name="product_max_qty"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
<group name="misc" position="after">
|
||||
<separator string="Minimum Stock Rules" colspan="4"/>
|
||||
<field name="orderpoint_ids" nolabel="1" colspan="4" context="{'default_product_id': active_id}"/>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -216,6 +216,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"/></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