You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using inter company and dropshipping, if delivery is not complete (but with partial deliveries and backorders), quantities computed as delivered in the "customer" company are wrong.
To Reproduce
16.0:
Steps to reproduce the behavior:
In a runboat, install purchase_sale_stock_inter_company
Configure My Company (Chicago) :
Sale from purchase = True
Warehouse = Chicago 1
Sale user = Marc Demo
Sale Orders Auto Validation = True
Configure My Company (San Francisco) :
Sale from purchase = True
Warehouse = Your Company
Sale user = Marc Demo
Sale Orders Auto Validation = True
Enable dropshipping
Configure product "FURN_6666" :
Dropship route = True
Add a first supplier price with supplier = "My Company (San Francisco)"
Switch to My company (Chicago)
Open customer "Deco Addict" and click on Sales/Quotations
Click New button to create a new quotation
Add a line for product "FURN_6666" with qty = 5
Confirm quotation.
Go to generated PO with My Company (San Francisco) as supplier and confirm it
Switch to My company (San Francisco)
Go to the new created inter company SO for customer My company (Chicago)
Go to the generated PO for the external suppllier (by default "Wood corner") and confirm it
Go to the dropship and set done quantity = 3, validate and create a backorder (everything is fine in both companies)
Finish the delivery (qty = 2)
Expected behavior
In both companies, we should have 2 dropship pickings for each sales orders in "done" state and quantities should be 3 for the first one and 2 for the second (the backorder).
Each sale order should have a computed delivered quanity of 5.
Here, quantities are OK in My Company (San Francisco) (the "supplier" company)
But quantities are not OK in My Company (Chicago) (the "customer" company) because quantities are reset to 0 on the first dropship picking when validating the backorder. So final computed delivered quantity is only 2 !
Additional context
The steps to reproduce are quite long, but I think the bug is related to the _action_done method of stock.picking
Module
purchase_sale_stock_inter_company
Describe the bug
When using inter company and dropshipping, if delivery is not complete (but with partial deliveries and backorders), quantities computed as delivered in the "customer" company are wrong.
To Reproduce
16.0:
Steps to reproduce the behavior:
Expected behavior
In both companies, we should have 2 dropship pickings for each sales orders in "done" state and quantities should be 3 for the first one and 2 for the second (the backorder).
Each sale order should have a computed delivered quanity of 5.
Here, quantities are OK in My Company (San Francisco) (the "supplier" company)
But quantities are not OK in My Company (Chicago) (the "customer" company) because quantities are reset to 0 on the first dropship picking when validating the backorder. So final computed delivered quantity is only 2 !
Additional context
The steps to reproduce are quite long, but I think the bug is related to the _action_done method of stock.picking
multi-company/purchase_sale_stock_inter_company/models/stock_picking.py
Lines 14 to 57 in c5bb14c
I'll propose a PR with a test confirming this issue and a fix.
The text was updated successfully, but these errors were encountered: