[ADD] added parameters in various methods in order to get proper output for picking-order-policy-yml test cases of sale_stock module
bzr revid: bde@tinyerp.com-20130819062608-o51cjq7s4ayhsttx
This commit is contained in:
parent
3e7dcc7ad1
commit
7356926180
|
@ -658,7 +658,7 @@ class sale_order(osv.osv):
|
|||
for order in self.browse(cr, uid, ids, context=context):
|
||||
proc_ids = []
|
||||
group_id = self.pool.get("procurement.group").create(cr, uid, {
|
||||
'name': order.name, 'partner_id': order.partner_shipping_id.id
|
||||
'name': order.name, 'partner_id': order.partner_shipping_id.id, 'move_type': order.picking_policy
|
||||
}, context=context)
|
||||
order.write({'procurement_group_id': group_id}, context=context)
|
||||
for line in order.order_line:
|
||||
|
|
|
@ -86,6 +86,7 @@ class procurement_order(osv.osv):
|
|||
'rule_id': procurement.rule_id.id,
|
||||
'origin': procurement.origin,
|
||||
'picking_type_id': procurement.rule_id.picking_type_id.id,
|
||||
'price_unit': procurement.sale_line_id.product_id.standard_price
|
||||
}
|
||||
|
||||
def _run(self, cr, uid, procurement, context=None):
|
||||
|
@ -96,6 +97,7 @@ class procurement_order(osv.osv):
|
|||
move_obj = self.pool.get('stock.move')
|
||||
move_dict = self._run_move_create(cr, uid, procurement, context=context)
|
||||
move_id = move_obj.create(cr, uid, move_dict, context=context)
|
||||
self.write(cr, uid, procurement.id, {'move_dest_id': move_id}, context=context)
|
||||
move_obj.action_confirm(cr, uid, [move_id], context=context)
|
||||
return move_id
|
||||
return super(procurement_order, self)._run(cr, uid, procurement, context)
|
||||
|
|
|
@ -1212,6 +1212,7 @@ class stock_move(osv.osv):
|
|||
'state': 'confirmed',
|
||||
'group_id': move.group_id and move.group_id.id or False,
|
||||
'picking_type_id': move.picking_type_id and move.picking_type_id.id or False,
|
||||
'move_lines': [(6, 0, [move.id])]
|
||||
}
|
||||
pick = pick_obj.create(cr, uid, values, context=context)
|
||||
move.write({'picking_id': pick})
|
||||
|
|
Loading…
Reference in New Issue