修复完善取消订单问题

This commit is contained in:
mgw
2025-02-19 15:14:05 +08:00
parent a4b40bee16
commit 0969967570
4 changed files with 70 additions and 17 deletions

View File

@@ -72,7 +72,7 @@ class StatusChange(models.Model):
logging.info('函数已经执行=============')
# 使用super()来调用原始方法(在本例中为'sale.order'模型的'action_cancel'方法)
res = super(StatusChange, self).action_cancel()
res = super(StatusChange, self.with_context(disable_cancel_warning=True)).action_cancel()
# 原有方法执行后进行额外的操作如调用外部API
logging.info('函数已经执行=============2')