PEP8 fixes

This commit is contained in:
Jordi Esteve 2014-08-30 15:14:54 +02:00
parent 8311e518b7
commit f84eed597a
1 changed files with 7 additions and 5 deletions

View File

@ -80,7 +80,7 @@ class SaleLine:
cost = Decimal(str(self.quantity or '0.0')) * \
(self.cost_price or Decimal('0.0'))
if self.amount:
return Decimal(self.amount-cost)
return Decimal(self.amount - cost)
return Decimal('0.0')
def get_margin(self, name):
@ -89,7 +89,9 @@ class SaleLine:
'''
Currency = Pool().get('currency.currency')
if self.type == 'line':
cost = Decimal(str(self.quantity)) * (self.cost_price or Decimal('0.0'))
cost = Decimal(str(self.quantity)) * (self.cost_price or
Decimal('0.0'))
return Currency.round(self.sale.currency, self.amount - cost)
else:
return Decimal('0.0')