Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14][MRP] mrp.production._generate_backorder_productions instantly consuming() Components #81448

Open
joshkreud opened this issue Dec 15, 2021 · 0 comments

Comments

@joshkreud
Copy link

Impacted versions:

14 / Probably 15

Steps to reproduce:

  1. Create Manufacturing Order
  2. Finish less than production amount and create Backorders

Current behavior:

The backordered production gets qty_producing from its workoders.
See:

for old_wo, wo in zip(production.workorder_ids, backorder_mo.workorder_ids):
wo.qty_produced = max(old_wo.qty_produced - old_wo.qty_producing, 0)
if wo.product_tracking == 'serial':
wo.qty_producing = 1
else:
wo.qty_producing = wo.qty_remaining
if wo.qty_producing == 0:
wo.action_cancel()

This means, that the backordered production, already sets qty_done on all stock.moves that are not serial tracked.

Expected behavior:

qty_producing should either be set by the user in the mrp.production, or by mrp.workorder.button_start

Why should we need to set mrp.workoder.qty_producing upon creating the backorder anyways?

GIF:

MRP_Workorder_backorder_consumed

@joshkreud joshkreud changed the title [14] _generate_backorder_productions instantly consuming Components [14][MRP] _generate_backorder_productions instantly consuming Components Dec 15, 2021
@joshkreud joshkreud changed the title [14][MRP] _generate_backorder_productions instantly consuming Components [14][MRP] mrp.production._generate_backorder_productions instantly consuming() Components Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant