diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index c003711ceb1..9d73705d567 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -966,7 +966,7 @@ product.normal.form.mrp.inherit product.product - + False @@ -977,7 +977,7 @@ order using the bill of materials assigned to this product. The delivery order will be ready once the production is done.

- +
@@ -1052,7 +1052,5 @@ - - diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index d19e792243f..1c2decb4cdd 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -32,6 +32,19 @@ import decimal_precision as dp # then wizard for picking lists & move # +class product_template(osv.osv): + _inherit="product.template" + _columns = { + 'type': fields.selection([('product','Stockable Product'),('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Will change the way procurements are processed. Consumable are product where you don't manage stock."), + 'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procurement Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until re-supplying. 'Make to Order': When needed, purchase or produce for the procurement request."), + 'supply_method': fields.selection([('produce','Manufacture'),('buy','Buy')], 'Supply Method', required=True, help="Produce will generate production order or tasks, according to the product type. Buy will trigger purchase orders when requested."), + } + _defaults = { + 'procure_method': lambda *a: 'make_to_stock', + 'supply_method': lambda *a: 'buy', + } +product_template() + class mrp_property_group(osv.osv): """ Group of mrp properties. @@ -627,14 +640,8 @@ class product_product(osv.osv): _inherit="product.product" _columns = { 'orderpoint_ids': fields.one2many('stock.warehouse.orderpoint', 'product_id', 'Minimum Stock Rules'), - 'type': fields.selection([('product','Stockable Product'),('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Will change the way procurements are processed. Consumable are product where you don't manage stock."), - 'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procurement Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until re-supplying. 'Make to Order': When needed, purchase or produce for the procurement request."), - } - _defaults = { - 'procure_method': lambda *a: 'make_to_stock', } product_product() - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/procurement/procurement_demo.xml b/addons/procurement/procurement_demo.xml index e4cf500007d..e28927815e3 100644 --- a/addons/procurement/procurement_demo.xml +++ b/addons/procurement/procurement_demo.xml @@ -3,23 +3,28 @@ make_to_order + produce make_to_order + produce product make_to_order + produce product make_to_order + produce product make_to_order + produce @@ -67,6 +72,7 @@ product make_to_order + produce @@ -76,11 +82,13 @@ product make_to_order + produce product make_to_order + produce @@ -114,6 +122,7 @@ product make_to_order + produce @@ -168,6 +177,7 @@ make_to_order + produce diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml index debbe03c961..8c3ae9a2336 100644 --- a/addons/procurement/procurement_view.xml +++ b/addons/procurement/procurement_view.xml @@ -303,8 +303,9 @@