Commit 97ee413e authored by Jérome Perrin's avatar Jérome Perrin

fixup! accounting_l10n_fr py3

parent dbc2eba2
...@@ -45,11 +45,8 @@ attachment_list = ( ...@@ -45,11 +45,8 @@ attachment_list = (
'content': zipbuffer.getvalue(), 'content': zipbuffer.getvalue(),
'name': zipfilename, }, ) 'name': zipfilename, }, )
subject = translateString('French Accounting Transaction File') subject = six.text_type(
if six.PY2: translateString('French Accounting Transaction File'))
subject = unicode(subject)
else:
subject = str(subject)
portal.ERP5Site_notifyReportComplete( portal.ERP5Site_notifyReportComplete(
user_name=user_name, user_name=user_name,
......
...@@ -29,7 +29,7 @@ if ledger is not None: ...@@ -29,7 +29,7 @@ if ledger is not None:
if isinstance(ledger, list) or isinstance(ledger, tuple): if isinstance(ledger, list) or isinstance(ledger, tuple):
ledger_uid = [portal_categories.ledger.restrictedTraverse(item).getUid() for item in ledger] ledger_uid = [portal_categories.ledger.restrictedTraverse(item).getUid() for item in ledger]
else: else:
ledger_uid = portal_categories.ledger.restrictedTraverse(item).getUid() ledger_uid = portal_categories.ledger.restrictedTraverse(ledger).getUid()
else: else:
ledger_uid = None ledger_uid = None
......
...@@ -26,7 +26,7 @@ if ledger is not None: ...@@ -26,7 +26,7 @@ if ledger is not None:
if isinstance(ledger, list) or isinstance(ledger, tuple): if isinstance(ledger, list) or isinstance(ledger, tuple):
kw['ledger_uid'] = [portal_categories.ledger.restrictedTraverse(item).getUid() for item in ledger] kw['ledger_uid'] = [portal_categories.ledger.restrictedTraverse(item).getUid() for item in ledger]
else: else:
kw['ledger_uid'] = portal_categories.ledger.restrictedTraverse(item).getUid() kw['ledger_uid'] = portal_categories.ledger.restrictedTraverse(ledger).getUid()
sum_ = 0.0 sum_ = 0.0
for accountNumber in accounts: for accountNumber in accounts:
......
...@@ -25,7 +25,7 @@ if ledger is not None: ...@@ -25,7 +25,7 @@ if ledger is not None:
if isinstance(ledger, list) or isinstance(ledger, tuple): if isinstance(ledger, list) or isinstance(ledger, tuple):
kw['ledger_uid'] = [portal_categories.ledger.restrictedTraverse(item).getUid() for item in ledger] kw['ledger_uid'] = [portal_categories.ledger.restrictedTraverse(item).getUid() for item in ledger]
else: else:
kw['ledger_uid'] = portal_categories.ledger.restrictedTraverse(item).getUid() kw['ledger_uid'] = portal_categories.ledger.restrictedTraverse(ledger).getUid()
sum_ = 0.0 sum_ = 0.0
for account in accounts: for account in accounts:
......
...@@ -30,7 +30,7 @@ if ledger is not None: ...@@ -30,7 +30,7 @@ if ledger is not None:
if isinstance(ledger, list) or isinstance(ledger, tuple): if isinstance(ledger, list) or isinstance(ledger, tuple):
kw['ledger_uid'] = [portal_categories.ledger.restrictedTraverse(item).getUid() for item in ledger] kw['ledger_uid'] = [portal_categories.ledger.restrictedTraverse(item).getUid() for item in ledger]
else: else:
kw['ledger_uid'] = portal_categories.ledger.restrictedTraverse(item).getUid() kw['ledger_uid'] = portal_categories.ledger.restrictedTraverse(ledger).getUid()
# Find accounts that can be expanded according category membership # Find accounts that can be expanded according category membership
...@@ -47,7 +47,7 @@ accounts_to_expand_by_tp = rec_cat.getAccountTypeRelatedValueList(**params) + \ ...@@ -47,7 +47,7 @@ accounts_to_expand_by_tp = rec_cat.getAccountTypeRelatedValueList(**params) + \
total_balance = 0.0 total_balance = 0.0
for account_gap_number in accounts: for account_gap_number in accounts:
# We get all acounts strict member of this GAP category # We get all accounts strict member of this GAP category
gap = context.restrictedTraverse('portal_categories/' + getURL(account_gap_number)) gap = context.restrictedTraverse('portal_categories/' + getURL(account_gap_number))
for account in gap.getGapRelatedValueList(portal_type='Account'): for account in gap.getGapRelatedValueList(portal_type='Account'):
......
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