changeset 7:e0b02d043ff7

Fix flake8 for sql equals True
author Cédric Krier <ced@b2ck.com>
date Thu, 29 Mar 2018 15:17:03 +0200
parents dc64b5ef5178
children 31f5d22e96cb
files sale_reporting_customer_revenue/sale_reporting.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sale_reporting_customer_revenue/sale_reporting.py	Wed Mar 07 12:08:04 2018 +0100
+++ b/sale_reporting_customer_revenue/sale_reporting.py	Thu Mar 29 15:17:03 2018 +0200
@@ -8,6 +8,8 @@
 from trytond.pool import Pool
 from trytond.transaction import Transaction
 
+sql_true = True
+
 
 def _currency_rate():
     "Return a SQL query with currency, rate, start_date and end_date"
@@ -163,7 +165,7 @@
                 Sum(subquery.revenue_invoiced).as_('revenue_invoiced'),
                 where=(sale.company == context.get('company'))
                 & (sale.state.in_(['confirmed', 'processing', 'done']))
-                & (sale_line.subcontractor != True),
+                & (sale_line.subcontractor != sql_true),
                 group_by=[sale.party, sale.company]))
         return query