This question has been flagged
1 Reply
4812 Views

Hi,

I want to validate a partial picking document via xmlrpc and I used this.

sock_common = xmlrpclib.ServerProxy ('http://xxxxx/xmlrpc/2/common', allow_none=True)

sock = xmlrpclib.ServerProxy('http://xxxxx/xmlrpc/2/object', allow_none=True)

uid = sock_common.login(dbname, username, pwd)

tran_ids = sock.execute(dbname, uid, pwd, 'stock.immediate.transfer', 'create', {'pick_id': 1253})

try:

    sock.execute_kw(dbname, uid, pwd, 'stock.immediate.transfer', 'process', [tran_ids])

except:

    print ''

try:

    sock.execute_kw(dbname, uid, pwd, 'stock.picking', 'do_new_transfer', [1253], {})

except:

    print ''

I have a picking doc with 2 lines in stock.pack.operation

A x 3; B x 4

I updated the products A and B with qty_done = 1 and 2, so I have outstanding A x 2 and B x 2

If I VALIDATE this doc in Odoo directly, the create backorder prompt pops up and if yes, it will validate this picking doc as Done and creates a new backorder picking doc with A x 2 and B x 2.

But the above codes 

- changed the qty_done from 1 to 3 for A, 2 to 4 for B

- validated the full picking doc

- no backorder picking doc is created


Am I using the correct xmlrcp steps to validate a partial picking document? 


Thanks

Avatar
Discard
Best Answer

Hi! di you know how to solve your problem?

I'm trying to validate a partial transfer via xmlpc but I cannot succeed.

Thanks in advance.

Avatar
Discard