mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] stock_request_cancel_confirm: Add bypass_confirm_wizard to action_cancel
This commit is contained in:
@@ -10,7 +10,9 @@ class StockRequest(models.Model):
|
||||
_has_cancel_reason = "optional" # ["no", "optional", "required"]
|
||||
|
||||
def action_cancel(self):
|
||||
if not self.filtered("cancel_confirm"):
|
||||
if not self.filtered("cancel_confirm") and not self.env.context.get(
|
||||
"bypass_confirm_wizard"
|
||||
):
|
||||
return self.open_cancel_confirm_wizard()
|
||||
return super().action_cancel()
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@ class StockRequestOrder(models.Model):
|
||||
_has_cancel_reason = "optional" # ["no", "optional", "required"]
|
||||
|
||||
def action_cancel(self):
|
||||
if not self.filtered("cancel_confirm"):
|
||||
if not self.filtered("cancel_confirm") and not self.env.context.get(
|
||||
"bypass_confirm_wizard"
|
||||
):
|
||||
return self.open_cancel_confirm_wizard()
|
||||
return super().action_cancel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user