Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5825 มุมมอง

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.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
เม.ย. 16
6118
1
พ.ย. 24
20043
1
ม.ค. 24
3146
How to install odoo 10 in ubuntu 20.04? แก้ไขแล้ว
1
ก.ย. 23
2916
1
ก.ค. 23
3272