如何使用Odoo API取消销售订单?我以为我可以调用action_cancel
方法,因为这是取消按钮从UI调用的方法。
我尝试这样做:
self::$modelClient->execute_kw(self::$db, self::$uid, self::$password, 'sale.order', 'action_cancel', [123]);
但是,我收到错误回复:
TypeError: cannot marshal None unless allow_none is enabled
看来销售订单实际上已被取消,但我将此错误作为回复。有谁知道那个错误意味着什么?
我只是想确保订单被正确取消,错误让我觉得出了问题。