From 4dd9751d5eb97a782e87c99873e39437c8f445af Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 17 Dec 2012 11:31:04 +0100 Subject: [PATCH] [IMP] mrp, procurement: procurement workflow documented bzr revid: qdp-launchpad@openerp.com-20121217103104-vrlm8z02ha6cpa13 --- addons/mrp/procurement.py | 1 + addons/procurement/procurement.py | 11 +++++++---- addons/procurement/procurement_workflow.xml | 5 +++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/addons/mrp/procurement.py b/addons/mrp/procurement.py index 00d0cc00fd7..7064589b1ee 100644 --- a/addons/mrp/procurement.py +++ b/addons/mrp/procurement.py @@ -35,6 +35,7 @@ class procurement_order(osv.osv): } def check_produce_product(self, cr, uid, procurement, context=None): + ''' Depict the capacity of the procurement workflow to produce products (not services)''' return True def check_bom_exists(self, cr, uid, ids, context=None): diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index 68360152399..29fe7881db2 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -234,12 +234,14 @@ class procurement_order(osv.osv): return False def check_produce_service(self, cr, uid, procurement, context=None): + """ Depicts the capacity of the procurement workflow to deal with production of services. + By default, it's False. Overwritten by project_mrp module. + """ return False def check_produce_product(self, cr, uid, procurement, context=None): - """ Finds BoM of a product if not found writes exception message. - @param procurement: Current procurement. - @return: True or False. + """ Depicts the capacity of the procurement workflow to deal with production of products. + By default, it's False. Overwritten by mrp module. """ return False @@ -274,7 +276,8 @@ class procurement_order(osv.osv): return True def check_buy(self, cr, uid, ids): - """ability of the workflow to manage the supply_method == 'buy'. + """ Depicts the capacity of the procurement workflow to manage the supply_method == 'buy'. + By default, it's False. Overwritten by purchase module. """ return False diff --git a/addons/procurement/procurement_workflow.xml b/addons/procurement/procurement_workflow.xml index ff17c2e6b73..d5708e23382 100644 --- a/addons/procurement/procurement_workflow.xml +++ b/addons/procurement/procurement_workflow.xml @@ -159,6 +159,11 @@ + not check_produce() and not check_buy()