跳至內容
選單
此問題已被標幟
1 回覆
5802 瀏覽次數

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

頭像
捨棄
最佳答案

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.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
4月 16
6108
1
11月 24
20019
1
1月 24
3123
1
9月 23
2894
1
7月 23
3258