diff --git a/sale_loyalty_limit/models/sale_order.py b/sale_loyalty_limit/models/sale_order.py index 768ad042f..fe7658024 100644 --- a/sale_loyalty_limit/models/sale_order.py +++ b/sale_loyalty_limit/models/sale_order.py @@ -14,7 +14,7 @@ def _program_check_compute_points(self, programs): if program.max_customer_application: customer_domain = [ ("order_line.loyalty_program_id", "=", program.id), - ("id", "!=", self.id), + ("id", "!=", self._origin.id), ( "commercial_partner_id", "=", @@ -68,7 +68,7 @@ def _program_check_compute_points(self, programs): salesman_rule.user_id.id, ), ("order_id.state", "!=", "cancel"), - ("order_id", "!=", self.id), + ("order_id", "!=", self._origin.id), ], ["order_id"], ["order_id"],