[REM] mrp: removed deprecated and unused code
bzr revid: qdp-launchpad@openerp.com-20131028090054-39qvajzoto3xb9dz
This commit is contained in:
parent
171c086414
commit
3e023b667b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue