Commit 8aa8b9a1 authored by Luca Cristaldi's avatar Luca Cristaldi

Fix pep8 issue

parent 305d30dc
......@@ -626,7 +626,7 @@ class Fee(ModelSQL, ModelView):
if account.party_required:
party = self.member.party
maturity_date= self.period.start_date + \
maturity_date = self.period.start_date + \
self.period.membership_type.maturity_delay
return MoveLine(
......
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from proteus import Model
from decimal import Decimal
from datetime import timedelta, date
from dateutil.relativedelta import relativedelta
from proteus import Model
from trytond.modules.company.tests.tools import get_company
from trytond.modules.account.tests.tools import get_accounts
......@@ -12,15 +11,22 @@ from trytond.modules.account.tests.tools import get_accounts
__all__ = ['create_membership_type']
def date_interval(startDate,deltaTime,quantity):
firstDate = startDate
def date_interval(start_date, delta_time, quantity):
first_date = start_date
for period in range(quantity):
lastDate = firstDate + deltaTime
yield (firstDate,lastDate)
firstDate = lastDate + timedelta(days=1)
def create_membership_type(name, amount=Decimal(42), account=None,
journal=None, today=None, company=None):
last_date = first_date + delta_time
yield (first_date, last_date)
first_date = last_date + timedelta(days=1)
def create_membership_type(
name,
amount=Decimal(42),
account=None,
journal=None,
today=None,
company=None
):
MembershipType = Model.get('association.membership.type')
Journal = Model.get('account.journal')
......@@ -51,4 +57,4 @@ def create_membership_type(name, amount=Decimal(42), account=None,
amount=amount
)
return membership_type
\ No newline at end of file
return membership_type
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment