修复完善取消订单问题
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user