[FIX] stock_location passes tests
bzr revid: fp@openerp.com-20130803065824-fw9jd87r7qe14kf5
This commit is contained in:
parent
4cc2974358
commit
f35de070dc
|
@ -93,11 +93,9 @@ class procurement_order(osv.osv):
|
||||||
self.message_post(cr, uid, [procurement.id], body=_('No source location defined!'), context=context)
|
self.message_post(cr, uid, [procurement.id], body=_('No source location defined!'), context=context)
|
||||||
return False
|
return False
|
||||||
move_obj = self.pool.get('stock.move')
|
move_obj = self.pool.get('stock.move')
|
||||||
print 'Create Move'
|
|
||||||
move_dict = self._run_move_create(cr, uid, procurement, context=context)
|
move_dict = self._run_move_create(cr, uid, procurement, context=context)
|
||||||
move_id = move_obj.create(cr, uid, move_dict, context=context)
|
move_id = move_obj.create(cr, uid, move_dict, context=context)
|
||||||
move_obj.action_confirm(cr, uid, [move_id], context=context)
|
move_obj.action_confirm(cr, uid, [move_id], context=context)
|
||||||
print 'Confirm Move'
|
|
||||||
self.write(cr, uid, [procurement.id], {'move_id': move_id}, context=context)
|
self.write(cr, uid, [procurement.id], {'move_id': move_id}, context=context)
|
||||||
return move_id
|
return move_id
|
||||||
return super(procurement_order, self)._run(cr, uid, procurement, context)
|
return super(procurement_order, self)._run(cr, uid, procurement, context)
|
||||||
|
|
|
@ -58,7 +58,6 @@
|
||||||
!record {model: stock.picking , id: stock_picking_in0}:
|
!record {model: stock.picking , id: stock_picking_in0}:
|
||||||
partner_id: res_partner_address_0
|
partner_id: res_partner_address_0
|
||||||
company_id: base.main_company
|
company_id: base.main_company
|
||||||
invoice_state: none
|
|
||||||
move_lines:
|
move_lines:
|
||||||
- date_expected: !eval time.strftime('%Y-%m-%d %H:%M:%S')
|
- date_expected: !eval time.strftime('%Y-%m-%d %H:%M:%S')
|
||||||
location_dest_id: stock.stock_location_stock
|
location_dest_id: stock.stock_location_stock
|
||||||
|
@ -69,15 +68,12 @@
|
||||||
product_uom: product.product_uom_unit
|
product_uom: product.product_uom_unit
|
||||||
product_uos_qty: 6.0
|
product_uos_qty: 6.0
|
||||||
name: Pushed Flow Test
|
name: Pushed Flow Test
|
||||||
picking_type_id: stock.stock_picking_type_in
|
picking_type_id: stock.picking_type_in
|
||||||
-
|
-
|
||||||
I confirm picking.
|
I confirm picking.
|
||||||
-
|
-
|
||||||
!python {model: stock.picking }: |
|
!python {model: stock.picking }: |
|
||||||
self.draft_force_assign(cr, uid, [ref("stock_picking_in0")], {"lang": "en_US",
|
self.force_assign(cr, uid, [ref("stock_picking_in0")], {})
|
||||||
"search_default_available": 1, "tz": False, "active_model": "ir.ui.menu",
|
|
||||||
"contact_display": "partner_address", "active_ids": [ref("stock.menu_action_picking_tree")],
|
|
||||||
"active_id": ref("stock.menu_action_picking_tree"), })
|
|
||||||
-
|
-
|
||||||
I check that the outgoing order of the supplier is create with two move line.
|
I check that the outgoing order of the supplier is create with two move line.
|
||||||
Stock/Input To Quality test and Quality test To Stock.
|
Stock/Input To Quality test and Quality test To Stock.
|
||||||
|
@ -85,7 +81,7 @@
|
||||||
I check the move is in waiting state.
|
I check the move is in waiting state.
|
||||||
-
|
-
|
||||||
!python {model: stock.picking }: |
|
!python {model: stock.picking }: |
|
||||||
picking_id = self.search(cr, uid, [('origin','=','Pushed Flow Test'),('type','=','out')])
|
picking_id = self.search(cr, uid, [('origin','=','Pushed Flow Test'),('picking_type_id','=',ref('stock.picking_type_out'))])
|
||||||
if picking_id:
|
if picking_id:
|
||||||
pick=self.browse(cr,uid,picking_id[0])
|
pick=self.browse(cr,uid,picking_id[0])
|
||||||
for move in pick.move_lines:
|
for move in pick.move_lines:
|
||||||
|
@ -95,7 +91,7 @@
|
||||||
-
|
-
|
||||||
!python {model: stock.picking }: |
|
!python {model: stock.picking }: |
|
||||||
import time
|
import time
|
||||||
picking_id = self.search(cr, uid, [('partner_id','=',ref('res_partner_microlinktechnologies0')),('type','=','in')])
|
picking_id = self.search(cr, uid, [('partner_id','=',ref('res_partner_microlinktechnologies0')),('picking_type_id','=',ref('stock.picking_type_in'))])
|
||||||
if picking_id:
|
if picking_id:
|
||||||
pick=self.browse(cr,uid,picking_id[0])
|
pick=self.browse(cr,uid,picking_id[0])
|
||||||
move =pick.move_lines[0]
|
move =pick.move_lines[0]
|
||||||
|
@ -113,7 +109,7 @@
|
||||||
I check the Outgoing Orders is automatically done.
|
I check the Outgoing Orders is automatically done.
|
||||||
-
|
-
|
||||||
!python {model: stock.picking }: |
|
!python {model: stock.picking }: |
|
||||||
picking_id = self.search(cr, uid, [('origin','=','Pushed Flow Test'),('type','=','out')])
|
picking_id = self.search(cr, uid, [('origin','=','Pushed Flow Test'),('picking_type_id','=',ref('stock.picking_type_out'))])
|
||||||
if picking_id:
|
if picking_id:
|
||||||
pick=self.browse(cr,uid,picking_id[0])
|
pick=self.browse(cr,uid,picking_id[0])
|
||||||
assert(pick.state == 'done'), 'Picking is not in done state'
|
assert(pick.state == 'done'), 'Picking is not in done state'
|
||||||
|
|
Loading…
Reference in New Issue