Skip to content

Commit

Permalink
[13.0] [FIX] stock_request_ux: Avoid validation errors when cancel re…
Browse files Browse the repository at this point in the history
…maining.
  • Loading branch information
nicomacr authored and jjscarafia committed Dec 18, 2020
1 parent d2b4802 commit 2d55c46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stock_request_ux/models/stock_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def action_cancel(self):
def button_cancel_remaining(self):
for rec in self:
old_product_uom_qty = rec.product_uom_qty
rec.product_uom_qty = rec.qty_done
# we need to do this using direct write because this constraints "_check_type" in original module.
rec._write({'product_uom_qty': rec.qty_done})
to_cancel_moves = rec.move_ids.filtered(
lambda x: x.state not in ['done', 'cancel'])
# to_cancel_moves.cancel_move()
Expand Down

0 comments on commit 2d55c46

Please sign in to comment.