diff --git a/modules/purchase_blanket_agreement/purchase.py b/modules/purchase_blanket_agreement/purchase.py index 91abc9ff37..e101c50f90 100644 --- a/modules/purchase_blanket_agreement/purchase.py +++ b/modules/purchase_blanket_agreement/purchase.py @@ -425,7 +425,7 @@ class BlanketAgreement(Workflow, ModelSQL, ModelView, ChatMixin): cls.set_date(agreements, 'to_date') for agreement in agreements: if agreement.to_date > today: - if any(l.remaining_quantity > 0 for l in agreement.lines): + if any(l.remaining_quantity for l in agreement.lines): warning_key = Warning.format( 'closed_remaining_quantity', [agreement]) if Warning.check(warning_key): diff --git a/modules/sale_blanket_agreement/sale.py b/modules/sale_blanket_agreement/sale.py index 235caa12af..4c2ac2da8c 100644 --- a/modules/sale_blanket_agreement/sale.py +++ b/modules/sale_blanket_agreement/sale.py @@ -426,7 +426,7 @@ class BlanketAgreement(Workflow, ModelSQL, ModelView, ChatMixin): cls.set_date(agreements, 'to_date') for agreement in agreements: if agreement.to_date > today: - if any(l.remaining_quantity > 0 for l in agreement.lines): + if any(l.remaining_quantity for l in agreement.lines): warning_key = Warning.format( 'closed_remaining_quantity', [agreement]) if Warning.check(warning_key):