Tryton - Issues

 

Issue6430

Title explode_bom does not delete existing inputs/outputs moves
Priority bug Status chatting
Superseder Missing delete in on_change keywords
View: 4140
Nosy List ced, nblock, reviewbot
Type behavior Components production
Assigned To Keywords review
Reviews 36311002
View: 36311002

Created on 2017-04-10.11:36:41 by nblock, last changed by ced.

Messages
msg33180 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-04-10.13:37:12
Indeed I just finally understood what is happening so I will describe it to let other understand also.
The method explode_bom just remove the existing inputs/outputs moves instead of deleting them. So we have draft move not linked to any production that are left.
So for me, it is not the production_split that must be fixed but the bom_explode. But unfortunately, we do not have a way to delete record via on_change see issue4140.
review36311002 updated at https://codereview.tryton.org/36311002/#ps30001
New review36311002 at https://codereview.tryton.org/36311002/#ps10003
msg33175 (view) Author: [hidden] (nblock) Date: 2017-04-10.11:36:41
The split of a production causes stale stock moves.

Steps to reproduce:
- Create products A, B, and C.
- Create a BOM with A, B as inputs and C as output (each with quantity: 1).
- Create a production of e.g. 12 pieces of C using the BOM.
- Open the forecast of the stock level of product A. You will see an expected
  stock amount of -12.
- Split the production, e.g. to 4x3.
- Reload the forecast, and you will see a number significantly different
  from -12, probably -36.
- Open the stock movements, and filter by product A. You will see two
  movements with 12 items from stock to production, and 4 movements with 3 items
  from stock to production.

Trytond: 4.2
production-split: 4.2.0
History
Date User Action Args
2017-04-10 13:38:18cedsettitle: Production split causes stale stock moves -> explode_bom does not delete existing inputs/outputs moves
2017-04-10 13:37:30cedsetsuperseder: + Missing delete in on_change keywords
component: + production, - production_split
2017-04-10 13:37:13cedsettype: behavior
messages: + msg33180
nosy: + ced
2017-04-10 13:06:51reviewbotsetmessages: + msg33178
2017-04-10 11:41:21reviewbotsetstatus: unread -> chatting
nosy: + reviewbot
messages: + msg33176
2017-04-10 11:41:21reviewbotsetreviews: 36311002
keyword: + review
2017-04-10 11:36:41nblockcreate

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