If I do something like this:
Code:
rpc_bom = RPCProxy('mrp.bom')
parent_data = {'product_uom':parent_uom,
'name':parent_name,
'product_id': parent_product_id,
'product_qty': parent_qty
}
child_data = {'product_uom':child_uom,
'name':child_name,
'product_id': child_product_id,
'product_qty': child_qty
}
parent_id = rpc_bom.create(parent_data)
child_id = rpc_bom.create(child_data)
Both BOMs exist, both boms show up in the database and when looked up in the list of BOMs with the web or GTK ui.
But when I do this:
Code:
rpc_bom.write(child_id, {'bom_id': parent_id}
The child is no longer discoverable in the list of BOMs in the web/GTK UI (although it is still in the DB, and can be seen listed inside the parent BOM).
However, if I were to skip the problematic step above, and do it manually in the UI instead, it behaves as expected -- it is a component of the parent BOM, but still exists visibly as its own BOM. This is the behaviour I would like my code to reproduce.
Help?