[REF] Fix W503 vs newest pep8 check

This commit is contained in:
Lionel Sausin (Numérigraphe)
2015-02-26 12:26:05 +01:00
parent 8add4bea7e
commit 853f5d4056
2 changed files with 6 additions and 6 deletions

View File

@@ -43,8 +43,8 @@ class ProductProduct(orm.Model):
# Doing this lets us change the function and not redefine fields
super(ProductProduct, self).__init__(pool, cr)
for coldef in self._columns.values():
if (isinstance(coldef, fields.function)
and coldef._multi == 'qty_available'):
if (isinstance(coldef, fields.function) and
coldef._multi == 'qty_available'):
coldef._fnct = _product_available_fnct
def _product_available(self, cr, uid, ids, field_names=None, arg=False,
@@ -73,8 +73,8 @@ class ProductProduct(orm.Model):
# We need it to compute immediately_usable_qty
# We DO want to change the caller's list so we're NOT going to
# work on a copy of field_names.
if ('virtual_available' not in field_names
and 'immediately_usable_qty' in field_names):
if ('virtual_available' not in field_names and
'immediately_usable_qty' in field_names):
field_names.append('virtual_available')
# Compute the core quantities

View File

@@ -67,8 +67,8 @@ class ProductProduct(orm.Model):
INNER JOIN sale_order
ON (sale_order_line.order_id = sale_order.id)
WHERE product_id in %s
AND sale_order_line.state = 'draft' """
+ date_str + shop_str +
AND sale_order_line.state = 'draft' """ +
date_str + shop_str +
"GROUP BY sale_order_line.product_id, product_uom",
(tuple(ids),) + date_args + shop_args)
results = cr.fetchall()