Commit 8e461687 authored by Jérome Perrin's avatar Jérome Perrin

accounting: fix some indentation / coding style

parent 098f2527
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
item_list = [('', '')] item_list = [('', '')]
countries = context.portal_categories.gap.objectValues() countries = context.portal_categories.gap.objectValues()
for country in countries : for country in countries:
for gap in country.objectValues() : for gap in country.objectValues():
path = gap.getRelativeUrl() path = gap.getRelativeUrl()
item_list.append( item_list.append(
((country.getTranslatedTitle() + '/'+ gap.getTranslatedTitle()), ((country.getTranslatedTitle() + '/'+ gap.getTranslatedTitle()),
......
...@@ -12,12 +12,12 @@ from_date = request.get('from_date', None) ...@@ -12,12 +12,12 @@ from_date = request.get('from_date', None)
result = [] result = []
params = { params = {
'to_date' : to_date, 'to_date': to_date,
'section_category' : transaction_section_category, 'section_category': transaction_section_category,
'simulation_state' : transaction_simulation_state, 'simulation_state': transaction_simulation_state,
'accounting_transaction_line_currency' : None, 'accounting_transaction_line_currency': None,
'report_depth' : 5 'report_depth': 5
} }
if from_date: if from_date:
params['from_date'] = from_date params['from_date'] = from_date
...@@ -25,7 +25,8 @@ if from_date: ...@@ -25,7 +25,8 @@ if from_date:
groupCategory = context.portal_categories.restrictedTraverse(transaction_section_category) groupCategory = context.portal_categories.restrictedTraverse(transaction_section_category)
entities = groupCategory.getGroupRelatedValueList(portal_type = ('Organisation', 'Person')) entities = groupCategory.getGroupRelatedValueList(portal_type = ('Organisation', 'Person'))
entity_columns = ( ('title', 'Title'), entity_columns = (
('title', 'Title'),
('getStopDate', 'Date'), ('getStopDate', 'Date'),
('reference', 'Invoice No'), ('reference', 'Invoice No'),
('getDestinationSectionTitle', 'Third Party'), ('getDestinationSectionTitle', 'Third Party'),
...@@ -34,25 +35,27 @@ entity_columns = ( ('title', 'Title'), ...@@ -34,25 +35,27 @@ entity_columns = ( ('title', 'Title'),
('source_debit', 'Debit'), ('source_debit', 'Debit'),
('source_credit', 'Credit'), ('source_credit', 'Credit'),
('source_balance', 'Balance'), ('source_balance', 'Balance'),
) )
for entity in entities : for entity in entities :
result.append( ReportSection(path=context.getPhysicalPath(), result.append(
ReportSection(
path=context.getPhysicalPath(),
title='Bank accounts for %s'%entity.getTitle(), title='Bank accounts for %s'%entity.getTitle(),
level=1, level=1,
form_id=None) ) form_id=None) )
for bank in entity.searchFolder(portal_type='Bank Account'): for bank in entity.searchFolder(portal_type='Bank Account'):
o = bank.getObject() o = bank.getObject()
result.append( result.append(
ReportSection(title='%s (%s)'%(o.getTitle(), entity.getTitle()), ReportSection(
title='%s (%s)'%(o.getTitle(), entity.getTitle()),
level=2, level=2,
path=o.getPhysicalPath(), path=o.getPhysicalPath(),
form_id='BankAccount_viewAccountingTransactionList', form_id='BankAccount_viewAccountingTransactionList',
## XXX Here we must use accounting_selection, because stat scripts read this selection ## XXX Here we must use accounting_selection, because stat scripts read this selection
selection_name = 'accounting_selection', selection_name = 'accounting_selection',
selection_params = params, selection_params = params,
selection_columns = entity_columns selection_columns = entity_columns,))
)
)
return result return result
...@@ -30,9 +30,9 @@ section_uid = context.Base_getSectionUidListForSectionCategory( ...@@ -30,9 +30,9 @@ section_uid = context.Base_getSectionUidListForSectionCategory(
result = [] result = []
params = { params = {
'at_date' : at_date 'at_date': at_date,
, 'section_uid': section_uid 'section_uid': section_uid,
, 'simulation_state': simulation_state 'simulation_state': simulation_state
} }
if from_date: if from_date:
......
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