Skip to content
Snippets Groups Projects
Commit f34eb8b0 authored by Demesmaeker's avatar Demesmaeker Committed by Victor Feyens
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

Backport of 7a146e6f

closes odoo/odoo#90959

Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
parent 2bfa5ae6
No related branches found
No related tags found
No related merge requests found
......@@ -28,8 +28,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