Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Lu Xu
erp5
Commits
8e461687
Commit
8e461687
authored
Jul 05, 2017
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounting: fix some indentation / coding style
parent
098f2527
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
48 deletions
+51
-48
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAvailableGapList.py
...kins/erp5_accounting/AccountModule_getAvailableGapList.py
+3
-3
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getBankAccountsReportSectionList.py
...ounting/AccountModule_getBankAccountsReportSectionList.py
+33
-30
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getOtherPartiesReportSectionList.py
...ounting/AccountModule_getOtherPartiesReportSectionList.py
+15
-15
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAvailableGapList.py
View file @
8e461687
# Return the list of gap roots that can be used.
# Return the list of gap roots that can be used.
# gap category is typically organized such as :
# gap category is typically organized such as :
# gap / country / gap_name
# gap / country / gap_name
# so we always use as "root" the category of depth 2.
# so we always use as "root" the category of depth 2.
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
()),
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getBankAccountsReportSectionList.py
View file @
8e461687
...
@@ -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,34 +25,37 @@ if from_date:
...
@@ -25,34 +25,37 @@ 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
=
(
(
'getStopDate'
,
'Date'
),
(
'title'
,
'Title'
),
(
'reference'
,
'Invoice No'
),
(
'getStopDate'
,
'Date'
),
(
'getDestinationSectionTitle'
,
'Third Party'
),
(
'reference'
,
'Invoice No'
),
(
'source_reference'
,
'Reference'
),
(
'getDestinationSectionTitle'
,
'Third Party'
),
(
'simulation_state'
,
'State'
),
(
'source_reference'
,
'Reference'
),
(
'source_debit'
,
'Debit'
),
(
'simulation_state'
,
'State'
),
(
'source_credit'
,
'Credit'
),
(
'source_debit'
,
'Debit'
),
(
'source_balance'
,
'Balance'
),
(
'source_credit'
,
'Credit'
),
)
(
'source_balance'
,
'Balance'
),
)
for
entity
in
entities
:
for
entity
in
entities
:
result
.
append
(
ReportSection
(
path
=
context
.
getPhysicalPath
(),
result
.
append
(
title
=
'Bank accounts for %s'
%
entity
.
getTitle
(),
ReportSection
(
level
=
1
,
path
=
context
.
getPhysicalPath
(),
form_id
=
None
)
)
title
=
'Bank accounts for %s'
%
entity
.
getTitle
(),
level
=
1
,
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
(
level
=
2
,
title
=
'%s (%s)'
%
(
o
.
getTitle
(),
entity
.
getTitle
()),
path
=
o
.
getPhysicalPath
(),
level
=
2
,
form_id
=
'BankAccount_viewAccountingTransactionList'
,
path
=
o
.
getPhysicalPath
(),
## XXX Here we must use accounting_selection, because stat scripts read this selection
form_id
=
'BankAccount_viewAccountingTransactionList'
,
selection_name
=
'accounting_selection'
,
## XXX Here we must use accounting_selection, because stat scripts read this selection
selection_params
=
params
,
selection_name
=
'accounting_selection'
,
selection_columns
=
entity_columns
selection_params
=
params
,
)
selection_columns
=
entity_columns
,))
)
return
result
return
result
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getOtherPartiesReportSectionList.py
View file @
8e461687
...
@@ -25,14 +25,14 @@ if role_filter_list == [''] :
...
@@ -25,14 +25,14 @@ if role_filter_list == [''] :
role_filter_list
=
None
role_filter_list
=
None
section_uid
=
context
.
Base_getSectionUidListForSectionCategory
(
section_uid
=
context
.
Base_getSectionUidListForSectionCategory
(
request
[
'section_category'
],
request
[
'section_category'
],
request
[
'section_category_strict'
])
request
[
'section_category_strict'
])
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
:
...
@@ -59,16 +59,16 @@ if ledger:
...
@@ -59,16 +59,16 @@ if ledger:
simulation_tool
=
portal
.
portal_simulation
simulation_tool
=
portal
.
portal_simulation
entity_columns
=
[
entity_columns
=
[
(
'date'
,
'Date'
),
(
'date'
,
'Date'
),
(
'Movement_getExplanationTranslatedPortalType'
,
'Type'
),
(
'Movement_getExplanationTranslatedPortalType'
,
'Type'
),
(
'Movement_getNodeGapId'
,
'GAP'
),
(
'Movement_getNodeGapId'
,
'GAP'
),
(
'Movement_getExplanationReference'
,
'Invoice No'
),
(
'Movement_getExplanationReference'
,
'Invoice No'
),
(
'Movement_getExplanationTitle'
,
'Title'
),
(
'Movement_getExplanationTitle'
,
'Title'
),
(
'Movement_getSpecificReference'
,
'Reference'
),
(
'Movement_getSpecificReference'
,
'Reference'
),
(
'getTranslatedSimulationStateTitle'
,
'State'
),
(
'getTranslatedSimulationStateTitle'
,
'State'
),
(
'debit_price'
,
'Debit'
),
(
'debit_price'
,
'Debit'
),
(
'credit_price'
,
'Credit'
),
(
'credit_price'
,
'Credit'
),
(
'running_total_price'
,
'Balance'
),
(
'running_total_price'
,
'Balance'
),
]
]
if
not
request
[
'omit_grouping_reference'
]:
if
not
request
[
'omit_grouping_reference'
]:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment