Skip to content

Commit

Permalink
[FIX] tg_sale_commission: для избежания путаницы, в портале не показы…
Browse files Browse the repository at this point in the history
…ваем заказы без выплат
  • Loading branch information
em230418 committed Nov 14, 2024
1 parent ef51d1e commit b4ead4b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tg_sale_commission/controllers/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ def portal_my_affiliate_orders(self, affiliate_id, **kw):

SaleOrder = request.env["sale.order"]
order_ids = affiliate._get_order_dict().get(affiliate.id, [])
domain = [("id", "in", order_ids)]
domain = [
("id", "in", order_ids),
("invoice_ids.payment_state", "in", ["paid", "in_payment"]),
]

orders = SaleOrder.sudo().search(domain)
values.update(
Expand Down

0 comments on commit b4ead4b

Please sign in to comment.