parent
40339ae025
commit
39ed85c18d
|
@ -23,7 +23,6 @@
|
||||||
<label for="quantity_max"/>
|
<label for="quantity_max"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="quantity_max" class="oe_inline"/>
|
<field name="quantity_max" class="oe_inline"/>
|
||||||
<field name="company_uom_id" readonly="1" class="oe_inline"/>
|
|
||||||
</div>
|
</div>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr='//group[@name="invoice_on_timesheets"]' position="replace">
|
<xpath expr='//group[@name="invoice_on_timesheets"]' position="replace">
|
||||||
|
|
|
@ -985,42 +985,14 @@
|
||||||
</data>
|
</data>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
<record id="product_normal_form_supply_view" model="ir.ui.view">
|
<record id="product_normal_form_supply_view" model="ir.ui.view">
|
||||||
<field name="name">product.normal.form.mrp.inherit</field>
|
<field name="name">product.normal.form.mrp.inherit</field>
|
||||||
<field name="model">product.product</field>
|
<field name="model">product.product</field>
|
||||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//field[@name='procure_method']" position="after">
|
<xpath expr="//field[@name='procure_method']" position="after">
|
||||||
<field name="supply_method" groups="base.group_user"/>
|
<field name="supply_method" groups="base.group_user"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</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="inherit_id" ref="stock.view_normal_procurement_locations_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<page string="Procurement & Locations" position="inside">
|
|
||||||
<separator string="Bill of Materials"/>
|
|
||||||
<field name="bom_ids" widget="one2many_list" mode="tree" context="{'default_product_id': active_id}">
|
|
||||||
<tree string="Bill of Materials">
|
|
||||||
<field name="name" string="Component Name"/>
|
|
||||||
<field name="product_qty" string="Quantity of Product"/>
|
|
||||||
<field name="type"/>
|
|
||||||
<field name="date_start"/>
|
|
||||||
<field name="date_stop"/>
|
|
||||||
</tree>
|
|
||||||
<form string="Bill of Material">
|
|
||||||
<field name="name" string="Component Name"/>
|
|
||||||
<field name="bom_id"/>
|
|
||||||
<field name="product_qty" string="Quantity of Product"/>
|
|
||||||
<field name="type"/>
|
|
||||||
<field name="date_start"/>
|
|
||||||
<field name="date_stop"/>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</page>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
@ -1078,5 +1050,24 @@
|
||||||
id="menu_mrp_production_order_action" name="Orders Planning"
|
id="menu_mrp_production_order_action" name="Orders Planning"
|
||||||
parent="menu_mrp_planning" sequence="1"/>
|
parent="menu_mrp_planning" sequence="1"/>
|
||||||
|
|
||||||
|
|
||||||
|
<record model="ir.actions.act_window" id="product_open_bom">
|
||||||
|
<field name="context">{'default_product_id': active_id, 'search_default_product_id': active_id}</field>
|
||||||
|
<field name="name">Bill of Materials</field>
|
||||||
|
<field name="res_model">mrp.bom</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="product_form_view_bom_button">
|
||||||
|
<field name="name">product.product.procurement</field>
|
||||||
|
<field name="model">product.product</field>
|
||||||
|
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//div[@name='buttons']" position="inside">
|
||||||
|
<button string="Bill of Materials" name="%(product_open_bom)d" type="action"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|
|
@ -26,7 +26,7 @@ from tools.translate import _
|
||||||
class product_product(osv.osv):
|
class product_product(osv.osv):
|
||||||
_inherit = "product.product"
|
_inherit = "product.product"
|
||||||
_columns = {
|
_columns = {
|
||||||
"bom_ids": fields.one2many('mrp.bom', 'product_id','Bill of Materials', [('bom_id','=',False)]),
|
"bom_ids": fields.one2many('mrp.bom', 'product_id','Bill of Materials', domain=[('bom_id','=',False)]),
|
||||||
}
|
}
|
||||||
def copy(self, cr, uid, id, default=None, context=None):
|
def copy(self, cr, uid, id, default=None, context=None):
|
||||||
if not default:
|
if not default:
|
||||||
|
|
|
@ -261,12 +261,12 @@
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<act_window
|
<act_window
|
||||||
context="{'search_default_warehouse_id': active_id, 'default_warehouse_id': active_id}"
|
context="{'search_default_warehouse_id': active_id, 'default_warehouse_id': active_id}"
|
||||||
id="act_stock_warehouse_2_stock_warehouse_orderpoint"
|
id="act_stock_warehouse_2_stock_warehouse_orderpoint"
|
||||||
name="Reordering Rules"
|
name="Reordering Rules"
|
||||||
res_model="stock.warehouse.orderpoint"
|
res_model="stock.warehouse.orderpoint"
|
||||||
src_model="stock.warehouse"
|
src_model="stock.warehouse"
|
||||||
groups="stock.group_stock_user"/>
|
groups="stock.group_stock_user"/>
|
||||||
|
|
||||||
<act_window
|
<act_window
|
||||||
context="{'product_uom': locals().has_key('uom_id') and uom_id, 'default_procurement_id': active_id}"
|
context="{'product_uom': locals().has_key('uom_id') and uom_id, 'default_procurement_id': active_id}"
|
||||||
|
@ -283,23 +283,11 @@
|
||||||
<menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_configuration" sequence="5"/>
|
<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"/>
|
<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>
|
<record model="ir.actions.act_window" id="product_open_orderpoint">
|
||||||
<field name="model">product.product</field>
|
<field name="context">{'default_product_id': active_id, 'search_default_product_id': active_id}</field>
|
||||||
<field name="inherit_id" ref="stock.view_normal_procurement_locations_form"/>
|
<field name="name">Orderpoints</field>
|
||||||
<field name="arch" type="xml">
|
<field name="res_model">stock.warehouse.orderpoint</field>
|
||||||
<page string="Procurement & Locations" position="inside">
|
|
||||||
<separator string="Minimum Stock Rules"/>
|
|
||||||
<field name="orderpoint_ids" widget="one2many_list" mode="tree" context="{'default_product_id': active_id}">
|
|
||||||
<tree string="Reordering Rules">
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="warehouse_id"/>
|
|
||||||
<field name="product_min_qty"/>
|
|
||||||
<field name="product_max_qty"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</page>
|
|
||||||
</field>
|
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="product_form_view_procurement_button">
|
<record model="ir.ui.view" id="product_form_view_procurement_button">
|
||||||
|
@ -307,10 +295,9 @@
|
||||||
<field name="model">product.product</field>
|
<field name="model">product.product</field>
|
||||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//field[@name='image_medium']" position="after">
|
<xpath expr="//div[@name='buttons']" position="inside">
|
||||||
<div class='oe_right oe_button_box'>
|
<button string="Request Procurement" name="%(act_make_procurement)d" type="action"/>
|
||||||
<button string="Procurement Request" name="%(act_make_procurement)d" type="action"/>
|
<button string="Orderpoints" name="%(product_open_orderpoint)d" type="action"/>
|
||||||
</div>
|
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -72,6 +72,8 @@
|
||||||
<label for="categ_id" class="oe_edit_only"/>
|
<label for="categ_id" class="oe_edit_only"/>
|
||||||
<h2><field name="categ_id"/></h2>
|
<h2><field name="categ_id"/></h2>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="oe_right oe_button_box" name="buttons">
|
||||||
|
</div>
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="Information">
|
<page string="Information">
|
||||||
<group>
|
<group>
|
||||||
|
|
Loading…
Reference in New Issue