[REM] Removed the unwanted code.
bzr revid: psa@tinyerp.com-20130911123044-xgw123lfj62cx71x
This commit is contained in:
parent
9ffd1e1346
commit
f716d9bf9c
|
@ -657,15 +657,13 @@ class mrp_production(osv.osv):
|
|||
@return: True
|
||||
"""
|
||||
move_obj = self.pool.get('stock.move')
|
||||
self.write(cr, uid, ids, {'state': 'ready'}, context=context)
|
||||
self.write(cr, uid, ids, {'state': 'ready'})
|
||||
|
||||
for (production_id,name) in self.name_get(cr, uid, ids):
|
||||
production = self.browse(cr, uid, production_id, context=context)
|
||||
if not production.move_prod_id and not production.move_lines:
|
||||
move_obj.write(cr, uid, [i.id for i in production.move_created_ids], {'state': 'assigned'}, context=context)
|
||||
production = self.browse(cr, uid, production_id)
|
||||
if production.move_prod_id and production.move_prod_id.location_id.id != production.location_dest_id.id:
|
||||
move_obj.write(cr, uid, [production.move_prod_id.id],
|
||||
{'location_id': production.location_dest_id.id}, context=context)
|
||||
{'location_id': production.location_dest_id.id})
|
||||
return True
|
||||
|
||||
def action_production_end(self, cr, uid, ids, context=None):
|
||||
|
@ -879,7 +877,6 @@ class mrp_production(osv.osv):
|
|||
'procure_method': production_line.product_id.procure_method,
|
||||
'move_id': shipment_move_id,
|
||||
'company_id': production.company_id.id,
|
||||
'sale_line_id': production.move_prod_id and production.move_prod_id.sale_line_id and production.move_prod_id.sale_line_id.id
|
||||
})
|
||||
wf_service.trg_validate(uid, procurement_order._name, procurement_id, 'button_confirm', cr)
|
||||
return procurement_id
|
||||
|
|
|
@ -72,14 +72,6 @@
|
|||
<field name="signal"></field>
|
||||
<field name="condition">picking_id and picking_id.state=='done'</field>
|
||||
</record>
|
||||
|
||||
<record id="prod_trans_in_production_done_final" model="workflow.transition">
|
||||
<field name="act_from" ref="prod_act_ready"/>
|
||||
<field name="act_to" ref="prod_act_done"/>
|
||||
<field name="signal">button_produce_done</field>
|
||||
<field name="condition">not move_lines and test_production_done()</field>
|
||||
</record>
|
||||
|
||||
<record id="prod_trans_ready_in_production" model="workflow.transition">
|
||||
<field name="act_from" ref="prod_act_ready"/>
|
||||
<field name="act_to" ref="prod_act_in_production"/>
|
||||
|
|
|
@ -148,18 +148,6 @@ class StockMove(osv.osv):
|
|||
res.append(new_move)
|
||||
return res
|
||||
|
||||
def action_done(self, cr, uid, ids, context=None):
|
||||
res = super(StockMove, self).action_done(cr, uid, ids, context=context)
|
||||
production_obj = self.pool.get('mrp.production')
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
for move in self.browse(cr, uid, ids, context=context):
|
||||
production_ids = production_obj.search(cr, uid, [('move_created_ids', 'in', [move.id])], context=context)
|
||||
if production_ids:
|
||||
product_data = production_obj.browse(cr, uid, production_ids[0], context=context)
|
||||
if product_data.move_created_ids2 and move.state=='done':
|
||||
wf_service.trg_validate(uid, 'mrp.production', product_data.id, 'button_produce_done', cr)
|
||||
return res
|
||||
|
||||
StockMove()
|
||||
|
||||
|
||||
|
@ -177,13 +165,6 @@ class StockPicking(osv.osv):
|
|||
todo.extend(move_obj._action_explode(cr, uid, move))
|
||||
return list(set(todo))
|
||||
|
||||
def test_cancel(self, cr, uid, ids, context=None):
|
||||
res = super(StockPicking, self).test_cancel(cr, uid, ids, context=context)
|
||||
for pick in self.browse(cr, uid, ids, context=context):
|
||||
if not pick.move_lines:
|
||||
return False
|
||||
return res
|
||||
|
||||
StockPicking()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue