Thanks for Contribution. I have make some test about this change. I found a problem.
if I Create a MO to make 2 Piece Product-A.
Product-A`s BOM
-- Product-A-M QTY:1
1.I click "split in Serial Numbers" and assign 1 serial number "A-M-001" to Product-A-M, so I get two line in "Products to Consume":
|Product-A-M | 1 | |
|Product-A-M | 1 | A-M-001|
2.I consume and produce 1 Product-A. The line without serial number will be consume. Because there are same qty in "Products to Consume" then system will sort by id.
I suggest change the sort code from
moves = sorted(raw_product, key=lambda k: (k.product_qty))
to
moves = sorted(raw_product, key=lambda k: (k.prodlot_id), reverse=True)
is better.
Hi All,
Thanks for Contribution. I have make some test about this change. I found a problem.
if I Create a MO to make 2 Piece Product-A.
Product-A`s BOM
-- Product-A-M QTY:1
1.I click "split in Serial Numbers" and assign 1 serial number "A-M-001" to Product-A-M, so I get two line in "Products to Consume":
|Product-A-M | 1 | |
|Product-A-M | 1 | A-M-001|
2.I consume and produce 1 Product-A. The line without serial number will be consume. Because there are same qty in "Products to Consume" then system will sort by id.
I suggest change the sort code from
moves = sorted(raw_product, key=lambda k: (k.product_qty))
to
moves = sorted(raw_product, key=lambda k: (k.prodlot_id), reverse=True)
is better.
Best regards
Joshua