[IMP] mrp: Yaml improved.
bzr revid: uco@tinyerp.com-20100729094449-pwwijfucbm9bnax5
This commit is contained in:
@@ -256,7 +256,22 @@
|
||||
-
|
||||
!python {model: stock.partial.picking}: |
|
||||
pick_obj = self.pool.get('stock.picking')
|
||||
picking_ids = pick_obj.search(cr, uid, [('type','=','in')])
|
||||
self.view_init(cr, uid, ['date'],context={'active_ids': picking_ids})
|
||||
self.do_partial(cr, uid, [1], context={'active_ids': picking_ids})
|
||||
picking_ids = pick_obj.search(cr, uid, [('address_id.name','=','Tang'),('state','=','assigned')])
|
||||
partial = self.browse(cr, uid, 1, context)
|
||||
partial_datas = {
|
||||
'delivery_date': partial.date
|
||||
}
|
||||
for pick in pick_obj.browse(cr, uid, picking_ids):
|
||||
for m in pick.move_lines:
|
||||
partial_datas['move%s'%(m.id)] = {
|
||||
'product_id': m.product_id.id,
|
||||
'product_qty': m.product_qty,
|
||||
'product_uom': m.product_uom.id
|
||||
}
|
||||
if (pick.type == 'in') and (m.product_id.cost_method == 'average'):
|
||||
partial_datas['move%s'%(m.id)].update({
|
||||
'product_price': m.product_price,
|
||||
'product_currency': m.product_currency
|
||||
})
|
||||
pick_obj.do_partial(cr, uid, picking_ids, partial_datas, context=context)
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
seller_ids:
|
||||
- delay: 1
|
||||
name: base.res_partner_maxtor
|
||||
qty: 300.0
|
||||
min_qty: 300.0
|
||||
standard_price: 1.0
|
||||
supply_method: buy
|
||||
type: product
|
||||
@@ -68,7 +68,7 @@
|
||||
seller_ids:
|
||||
- delay: 1
|
||||
name: base.res_partner_asus
|
||||
qty: 100.0
|
||||
min_qty: 100.0
|
||||
standard_price: 1.0
|
||||
supply_method: buy
|
||||
type: product
|
||||
|
||||
Reference in New Issue
Block a user