mrp_advanced_operations: Progressbar is wrong
Bug #1067290 reported by
Daniel Stenlöv
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Avanzosc developments |
Fix Released
|
Undecided
|
Daniel Stenlöv |
Bug Description
The progressbar does give a faulty value.
If you have more then 1 compomponent that gets produced it will show the progress as 100% for each finished product. So if you produce for example 4 products in one operation it will show 400%.
There is a secondary problem with the progress and that is if you cancel half of the productions it will still show 400%. It should however show 50% since half of the production is done.
Related branches
summary: |
- [mrp_advanced_operations] Progressbar is wrong + mrp_advanced_operations: Progressbar is wrong |
tags: | added: mrp-6.1 |
Changed in avanzosc: | |
status: | New → Fix Released |
assignee: | nobody → Daniel Stenlöv (XCLUDE) (daniel-stenlov-xclude) |
To post a comment you must log in.
The error seems to be because of two things. First the production number seems to be wrong. The total production produced are based on the final product, not final product + the bi product. So the totalt number of products to be produced should be the total quantity of the final product and the bi products.
The secondary error seems to be that it calculated the product to be finished even if the product is cancelled. This could be fixed with an easy check if the product is in done state like this:
---------- CUT ----------
if ((finish_ move.product_ id.id == finish_ move.operation_ id.product_ id.id) or (finish_ move.product_ id.id == real_operation. product. id) and (finish_move.state == 'done')):
qty += finish_ move.product_ qty
---------- CUT ----------