It is currently Tue May 22, 2012 11:45 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: NetRPC, mrp.bom -- child BOMs seem to disappear
PostPosted: Thu Jul 14, 2011 9:31 pm 
Offline

Joined: Thu Jun 23, 2011 6:28 pm
Posts: 1
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP