[IMP] Pass active_id in context

bzr revid: jco@openerp.com-20140122125211-flbai1rfuhy568f3
This commit is contained in:
Josse Colpaert 2014-01-22 13:52:11 +01:00
parent da22ca89bb
commit 93d932da55
1 changed files with 3 additions and 1 deletions

View File

@ -65,7 +65,9 @@
-
!python {model: mrp.product.produce}: |
qty = self.browse(cr, uid, ref('mrp_product_produce0')).product_qty
lines = self.on_change_qty(cr, uid, [ref('mrp_product_produce0')], qty, [], context=context)
ctx = context.copy()
ctx['active_id'] = ref("mrp_production_mo0")
lines = self.on_change_qty(cr, uid, [ref('mrp_product_produce0')], qty, [], context=ctx)
self.write(cr, uid, [ref('mrp_product_produce0')], lines['value'], context=context)
self.do_produce(cr, uid, [ref("mrp_product_produce0")], {"active_model": "mrp.production", "active_ids":[ref("mrp_production_mo0")], "active_id": ref("mrp_production_mo0")})
-