Odoo Help

0

XML RPC - Partial Transfer Stock.Picking

By
Jesse Rye
on 4/7/16, 12:50 AM 929 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! 

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
on 5/9/16, 5:12 PM
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
on 5/9/16, 5:12 PM
0
Shyam Kishore
On 4/15/16, 10:00 AM

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. 

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 4/7/16, 12:50 AM
Seen: 929 times
Last updated: 4/15/16, 10:00 AM