From 3e023b667b9efa41aec98cdbf22d9c2f4588c350 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 28 Oct 2013 10:00:54 +0100 Subject: [PATCH] [REM] mrp: removed deprecated and unused code bzr revid: qdp-launchpad@openerp.com-20131028090054-39qvajzoto3xb9dz --- addons/mrp/procurement.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/addons/mrp/procurement.py b/addons/mrp/procurement.py index d342198e461..a3a884da151 100644 --- a/addons/mrp/procurement.py +++ b/addons/mrp/procurement.py @@ -61,10 +61,6 @@ class procurement_order(osv.osv): result['property_ids'] = [(6, 0, [x.id for x in line.property_ids])] return result - 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): """ Finds the bill of material for the product from procurement order. @return: True or False @@ -81,30 +77,6 @@ class procurement_order(osv.osv): return False return True - def check_conditions_confirm2wait(self, cr, uid, ids): - """ condition on the transition to go from 'confirm' activity to 'confirm_wait' activity """ - res = super(procurement_order, self).check_conditions_confirm2wait(cr, uid, ids) - return res and not self.get_phantom_bom_id(cr, uid, ids) - - def get_phantom_bom_id(self, cr, uid, ids, context=None): - for procurement in self.browse(cr, uid, ids, context=context): - if procurement.move_dest_id: - phantom_bom_id = self.pool.get('mrp.bom').search(cr, uid, [ - ('product_id', '=', procurement.move_dest_id.product_id.id), - ('bom_id', '=', False), - ('type', '=', 'phantom')]) - return phantom_bom_id - return False - - def action_produce_assign_product(self, cr, uid, ids, context=None): - """ This is action which call from workflow to assign production order to procurements - @return: True - """ - procurement_obj = self.pool.get('procurement.order') - res = procurement_obj.make_mo(cr, uid, ids, context=context) - res = res.values() - return len(res) and res[0] or 0 - def make_mo(self, cr, uid, ids, context=None): """ Make Manufacturing(production) order from procurement @return: New created Production Orders procurement wise