Skip to content
Snippets Groups Projects
Commit 7a146e6f authored by Demesmaeker's avatar Demesmaeker
Browse files

[FIX] sale_purchase: change to _action_cancel


An activity should be posted only when a SO is cancelled, this happens
after _action_cancel as action_cancel doesn't always cancel the order.

sale_purchase was forgotten in commit
7c8f15d4141d4ae130da59d58ee2eaff39e363c4

closes odoo/odoo#81569

Related: odoo/enterprise#26866
Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
parent 27a6d5df
No related branches found
No related tags found
No related merge requests found
......@@ -23,8 +23,8 @@ class SaleOrder(models.Model):
order.order_line.sudo()._purchase_service_generation()
return result
def action_cancel(self):
result = super(SaleOrder, self).action_cancel()
def _action_cancel(self):
result = super()._action_cancel()
# When a sale person cancel a SO, he might not have the rights to write
# on PO. But we need the system to create an activity on the PO (so 'write'
# access), hence the `sudo`.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment