Skip to content

Commit

Permalink
[FIX] sale_loyalty_limit: fail on new record
Browse files Browse the repository at this point in the history
Avoid search on a new record id (NewIdxxxx) as it will fail on the query
parsin to the db.

TT52185
  • Loading branch information
chienandalu committed Dec 12, 2024
1 parent dc079a9 commit cb3293b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sale_loyalty_limit/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
"=",
Expand Down Expand Up @@ -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"],
Expand Down

0 comments on commit cb3293b

Please sign in to comment.