Files
odoo_source/addons/mrp/views
Tiffany Chang (tic) f4fde9ec58 [FIX] mrp: allow adding byproducts to confirmed MO
Steps to reproduce:
- Create + confirm a MO
- Add a byproduct with a Produced (qty) > 1
- Change the `qty_producing` to a non-zero qty

Expected result:
  Byproduct's "Produced" qty stays unchanged and its "To Produce" is 0
Actual result:
  Byproduct's "To Produce" defaults to 1 and its "Produced" qty is
  updated to scale to the according to the amount `qty_producing` (i.e.
  if `product_qty` = 2 and `qty_producing` = 1, then by-product's
  "Produced" = .5

Additionally, a Missing Record error pops up because of missing
stock.move.line

Solution, don't allow byproducts added after MO is confirmed to default
to 0. Additionally allow byproducts to have 0 "To Produce" quantity and
don't sum the cost share of merged byproduct moves since when Produced
> To Produce then an extra move is created and the cost share ends up
being doubled during the merge.

closes odoo/odoo#85130

Task: 2716164
X-original-commit: 51ff14a56b909bdf22c9f1c4540347655578e1f4
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-02-22 16:16:31 +00:00
..
2022-01-21 07:57:49 +00:00