Skip to Content
Menu
This question has been flagged
1 Reply
5371 Views

Using the XML-RPC I am trying to complete a partial transfer of a stock.picking. I have been able to successfully complete a full transfer with the below code, but  I need to control which individual lines and their quantities to be included in the transfer.

Below is the code being used to create the transfer and process the transfer:

 incoming = sock.execute( dbname, uid, pwd, 'stock.picking', 'search', [( 'origin', '=', po_read['name'] )] )

context = {'active_ids': incoming, 'active_id': incoming[0], 'active_model':'stock.picking'}

transfer_create = sock.execute( dbname, uid, pwd, 'stock.transfer_details', 'create', {'picking_id': incoming[0]}, context )

sock.execute( dbname, uid, pwd, 'stock.transfer_details', 'do_detailed_transfer', transfer_create )

Can someone advise me how what to pass so that only certain lines of the stock.picking are created for the transfer?

I'm guessing I need to do something before do_retailed_transfer is run but I'm not sure what. Please Help :)

Thanks! 

Avatar
Discard
Dear ,

Thank you for emailing Cotton Babies. Our customer service system has received your email. Your ticket number is LUI-38162-284. Please reference this ticket number if you contact Cotton Babies about this issue.

If the issue you emailed about is time sensitive (address change, shipping upgrades, payment updates, order cancellations), please make note of the ticket number above and then give us a call at 1-888-332-2243.

Our customer service team is available to respond to customer messages on normal business days, 9am - 5pm CST.  We are occasionally closed for holidays.  Our goal is to respond to customer emails within one business day.

Just emailing for help with a return? Returns are easy! More information and instructions for processing a return can be found here:

http://www.cottonbabies.com/info.php#returns

Our Cloth Diapering Basics may have answers to many of your questions:
http://www.cottonbabies.com/clothdiapers.php

We know your time is extremely valuable, thank you for writing us, we will get back to you as soon as we possibly can.

Kindest regards,


Cotton Babies Customer Service Team
contactus@cottonbabies.com
1-888-332-2243
Dear ,

Thank you for emailing Cotton Babies. Our customer service system has received your email. Your ticket number is DPE-39677-794. Please reference this ticket number if you contact Cotton Babies about this issue.

If the issue you emailed about is time sensitive (address change, shipping upgrades, payment updates, order cancellations), please make note of the ticket number above and then give us a call at 1-888-332-2243.

Our customer service team is available to respond to customer messages on normal business days, 9am - 5pm CST.  We are occasionally closed for holidays.  Our goal is to respond to customer emails within one business day.

Just emailing for help with a return? Returns are easy! More information and instructions for processing a return can be found here:

http://www.cottonbabies.com/info.php#returns

Our Cloth Diapering Basics may have answers to many of your questions:
http://www.cottonbabies.com/clothdiapers.php

We know your time is extremely valuable, thank you for writing us, we will get back to you as soon as we possibly can.

Kindest regards,


Cotton Babies Customer Service Team
contactus@cottonbabies.com
1-888-332-2243
Best Answer

Currently in Odoo 8 there is no specific function where you could partially deliver a shipment based on few selected lines.

In your code when you are calling this method: transfer_create = sock.execute( dbname, uid, pwd, 'stock.transfer_details', 'create', {'picking_id': incoming[0]}, context ), all the move lines are automatically added in the transfer wizard and you don't have control over it.

What you can do is create a custom function for partial shipment which takes the picking ID and move ID/IDs as input and does the transfer and call it from XML-RPC. 

Avatar
Discard
Related Posts Replies Views Activity
1
Jul 20
5140
1
Jan 24
1183
1
Jul 23
1680
0
Feb 23
1488
0
Oct 22
2199