Issue 9440

Title
Use initial cost price for returned product
Priority
feature
Status
resolved
Superseder
Wrong cost price computation in drop shipment (issue 9439)
Nosy list
bernatnan, ced, reviewbot, roundup-bot
Assigned to
ced
Keywords
review

Created on 2020-06-24.12:22:40 by ced, last changed 2 months ago by roundup-bot.

Messages

New changeset 20a64c0c9b51 by Cédric Krier in branch 'default':
Use original cost price for returned move
https://hg.tryton.org/tryton-env/rev/20a64c0c9b51
New changeset 9c34a1b0ddad by Cédric Krier in branch 'default':
Use original cost price for returned move
https://hg.tryton.org/modules/stock/rev/9c34a1b0ddad
New changeset d7461ce47a81 by Cédric Krier in branch 'default':
Use original cost price for returned move
https://hg.tryton.org/modules/sale_supply_drop_shipment/rev/d7461ce47a81
New changeset 0173ea044cf9 by Cédric Krier in branch 'default':
Use original cost price for returned move
https://hg.tryton.org/modules/sale/rev/0173ea044cf9
New changeset 1ee58c8f9471 by Cédric Krier in branch 'default':
Use original cost price for returned move
https://hg.tryton.org/modules/product_cost_fifo/rev/1ee58c8f9471
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-06-25.17:07:41
Better to put LGTM on review.
Author: [hidden] (bernatnan)
Date: 2020-06-25.15:35:09
LGTM
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-06-24.12:22:40
For now when a FIFO product is returned, we use the current cost price of this product. So this means that when it will be shipped again, we will use the cost price of the product when it was returned.
This may not be very good especially if the cost price was 0 because there was no product in stock at the moment of return.
Indeed we should use the cost price that was used when the product was shipped. This can be done by using the sale and line origins.
For the exceptional case a returned move is done without being linked to a sale return, we can still use the current cost price. But we should allow to customize this behavior using an extendable method.
History
Date User Action Args
2020-08-10 23:39:13roundup-botsetmessages: + msg59685
2020-08-10 23:39:01roundup-botsetmessages: + msg59684
2020-08-10 23:38:49roundup-botsetmessages: + msg59683
2020-08-10 23:38:37roundup-botsetmessages: + msg59682
2020-08-10 23:38:24roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg59681
2020-07-14 19:12:48reviewbotsetmessages: + msg59332
2020-06-25 17:07:41cedsetmessages: + msg58878
2020-06-25 15:35:09bernatnansetnosy: + bernatnan
messages: + msg58875
2020-06-25 12:50:56reviewbotsetmessages: + msg58872
2020-06-24 12:30:07reviewbotsetnosy: + reviewbot
messages: + msg58852

Showing 10 items. Show all history (warning: this could be VERY long)