From b765e45c81419c0bf65589fd369d6e4cc9526235 Mon Sep 17 00:00:00 2001 From: "Randhir Mayatra (OpenERP)" Date: Fri, 28 Sep 2012 18:11:31 +0530 Subject: [PATCH] [IMP] move the procure method in product to procurement bzr revid: rma@tinyerp.com-20120928124131-7wrkholp6ltfk23g --- addons/procurement/procurement.py | 4 ++++ addons/procurement/procurement_demo.xml | 28 ++++++++++++++++++++----- addons/procurement/procurement_view.xml | 26 +++++++++++++++++++++++ addons/product/product.py | 1 - addons/product/product_demo.xml | 15 +------------ addons/product/product_view.xml | 8 +++---- 6 files changed, 57 insertions(+), 25 deletions(-) diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index 0fc9203dea1..d19e792243f 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -630,6 +630,10 @@ class product_product(osv.osv): '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() diff --git a/addons/procurement/procurement_demo.xml b/addons/procurement/procurement_demo.xml index 6fc6716de80..e4cf500007d 100644 --- a/addons/procurement/procurement_demo.xml +++ b/addons/procurement/procurement_demo.xml @@ -1,15 +1,25 @@ + + make_to_order + + + make_to_order + product + make_to_order product + make_to_order + product + make_to_order @@ -26,6 +36,7 @@ product + make_to_order @@ -38,6 +49,7 @@ product + make_to_order @@ -54,6 +66,7 @@ product + make_to_order @@ -62,14 +75,12 @@ product - - - - product + make_to_order product + make_to_order @@ -102,6 +113,7 @@ product + make_to_order @@ -126,6 +138,7 @@ product + make_to_order @@ -142,6 +155,7 @@ product + make_to_order @@ -152,6 +166,10 @@ product + + make_to_order + + product @@ -167,7 +185,7 @@ product - + \ No newline at end of file diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml index bf73b383216..debbe03c961 100644 --- a/addons/procurement/procurement_view.xml +++ b/addons/procurement/procurement_view.xml @@ -303,6 +303,32 @@