Tryton - Issues

 

Issue9274

Title The cost recalculation wizard for fifo leaves some prices negative.
Priority bug Status testing
Superseder Nosy List angel, ced, reviewbot
Type behavior Components product_cost_fifo
Assigned To ced Keywords backport, review
Reviews 321471002
View: 321471002

Created on 2020-04-28.16:10:26 by angel, last changed by reviewbot.

Messages
review321471002 updated at https://codereview.tryton.org/321471002/#ps301731002
msg58323 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-05-27.14:28:16
Here is review321471002 which takes all moves in consideration.
msg58321 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-05-27.14:13:22
Indeed this happens when non supplier or production moves exist because they are treated as outgoing moves even if they are increasing the storage quantity.
I think we should compute FIFO with every moves (from or to storage type) and use the cost price for those moves that have no unit price.
msg57693 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-04-28.16:26:50
Please provide an example?
msg57691 (view) Author: [hidden] (angel) Date: 2020-04-28.16:10:26
The formula used can give negatives.
https://hg.tryton.org/modules/product_cost_fifo/file/tip/product.py#l188
History
Date User Action Args
2020-05-27 14:51:55reviewbotsetnosy: + reviewbot
messages: + msg58328
2020-05-27 14:28:16cedsetstatus: in-progress -> testing
reviews: 321471002
messages: + msg58323
keyword: + backport, review
2020-05-27 14:13:23cedsetstatus: need-eg -> in-progress
assignedto: ced
messages: + msg58321
2020-04-28 16:26:50cedsetstatus: unread -> need-eg
nosy: + ced
messages: + msg57693
2020-04-28 16:10:26angelcreate

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