You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a backorder MO to fulfill the remaining quantities to produce, the new MO is created with cancelled operations. Instead, I would like for it to create the new backorder MO without cancelling those operations.
How to fix this issue ?
I already try to override the action_backorder function like this but still nothing happen
def action_backorder(self):
res = super(MrpProductionBackOrder, self).action_backorder()
backorder_move_vals= []
for move in self.move_finished_ids.filtered(lambda x: x.state not in('done', 'cancel')):
if move.product_uom_qty:
continue
backorder_move_vals.append(move._prepare_move_copy_values(move.product_uom_qty))
if backorder_move_vals:
backorder_production = self.copy({
'move_raw_ids': [],
'move_finished_ids': backorder_move_vals,
'backorder_id': self.id,
'date_planned_start': False,
'date_planned_finished': False,
'state': 'draft',
'workorder_ids':[],
'move_dest_ids':[],
})
backorder_production._onchange_move_raw()
backorder_production.action_assign()
return res
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When creating a backorder MO to fulfill the remaining quantities to produce, the new MO is created with cancelled operations. Instead, I would like for it to create the new backorder MO without cancelling those operations.
How to fix this issue ?
I already try to override the action_backorder function like this but still nothing happen
def action_backorder(self):
res = super(MrpProductionBackOrder, self).action_backorder()
Beta Was this translation helpful? Give feedback.
All reactions