Split Mrp Production Odoo 14 #160
Unanswered
stevencodelab
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i just create a module to split the work order.
the code for action split is like this
`def action_split_workorder(self):
new_workorders = []
total_qty_to_produce = self.production_id.product_qty
for i in range(int(self.quantity_to_split)):
new_name = f"{self.production_id.name} - {i + 1:04d}"
new_workorder = self.production_id.copy(default={'name': new_name, 'qty_producing': 1})
new_workorders.append(new_workorder.id)
self.production_id.qty_producing -= self.quantity_to_split
The problem is every time I try to split a Manufacturing Order, for example I try to split WH/MO/00356 into 5 Work Orders
there will be 6 WH/MO/00356 Manufacturing Orders like in the pict.
the goals is when i splited the WH/MO/00356 i want only 1 WH/MO/00356 in the tree view so the work order is only have 1 Manufacturing Order sources.
any idea how to fix this issue/problem?
it really help, because i just started to using odoo
thankyou
Beta Was this translation helpful? Give feedback.
All reactions