为什么要使用xml-rpc制造订单Odoo v9取消消费的产品?

时间:2016-11-14 20:14:52

标签: openerp odoo-9

我正在创建制造订单

# Create production 
new_manufacturing = models.execute_kw(db, uid, password,
            'mrp.production', 'create',
            [{'product_id':155,'product_uom':1, 'bom_id':54, 'product_qty': 1.0}],)

# confirm production
models.exec_workflow(db, uid, password, "mrp.production", 'button_confirm', new_manufacturing)
models.execute_kw(db, uid, password, 'mrp.production', 'force_production', [new_manufacturing])

#context consume product wizard.
context={'active_id': new_manufacturing, 'active_ids': [new_manufacturing], "active_model": "mrp.production"}

produce_id = models.execute_kw(db, uid, password,
'mrp.product.produce', 'create',
[{}, context])

models.execute_kw(db, uid, password, 'mrp.product.produce', 'do_produce', [[produce_id], context])

然后取消消费的产品(物料清单) printscreen1 printscreen2

0 个答案:

没有答案