Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
6115 Zobrazení

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
Zrušit
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
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvc 20
5815
1
led 24
3138
1
čvc 23
3261
0
úno 23
2481
0
říj 22
3293