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
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
2c90bf63
Commit
2c90bf63
authored
Jan 27, 2024
by
Jérome Perrin
Committed by
Arnaud Fontaine
Jul 15, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounting py3
parent
b4281e34
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
10 deletions
+15
-10
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.py
...5_accounting/AccountingTransactionLine_getNodeItemList.py
+1
-4
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAgedBalanceLineList.py
...ing/AccountingTransactionModule_getAgedBalanceLineList.py
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAgedBalanceReportSectionList.py
...ntingTransactionModule_getAgedBalanceReportSectionList.py
+12
-4
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingTransactionLineList.py
...AccountingTransaction_getAccountingTransactionLineList.py
+1
-1
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.py
View file @
2c90bf63
...
@@ -50,9 +50,6 @@ def display(x):
...
@@ -50,9 +50,6 @@ def display(x):
display_cache
[
x
]
=
display_funct
(
x
)
display_cache
[
x
]
=
display_funct
(
x
)
return
display_cache
[
x
]
return
display_cache
[
x
]
def
sort
(
x
,
y
):
return
cmp
(
display
(
x
),
display
(
y
))
def
getItemList
(
category
=
None
,
portal_path
=
None
,
mirror
=
0
,
omit_filter
=
0
,
def
getItemList
(
category
=
None
,
portal_path
=
None
,
mirror
=
0
,
omit_filter
=
0
,
simulation_state
=
None
):
simulation_state
=
None
):
"""Returns a list of Account path items. """
"""Returns a list of Account path items. """
...
@@ -71,7 +68,7 @@ def getItemList(category=None, portal_path=None, mirror=0, omit_filter=0,
...
@@ -71,7 +68,7 @@ def getItemList(category=None, portal_path=None, mirror=0, omit_filter=0,
portal_type
=
'Account'
,
portal_type
=
'Account'
,
base
=
0
,
base
=
0
,
display_method
=
display
,
display_method
=
display
,
sort_
method
=
sort
,
sort_
key
=
display
,
filter
=
filter_dict
)
filter
=
filter_dict
)
return
item_list
return
item_list
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAgedBalanceLineList.py
View file @
2c90bf63
...
@@ -118,7 +118,7 @@ for brain in portal.portal_simulation.getMovementHistoryList(
...
@@ -118,7 +118,7 @@ for brain in portal.portal_simulation.getMovementHistoryList(
if
by_mirror_section_list_dict
:
if
by_mirror_section_list_dict
:
for
row
in
portal_catalog
(
for
row
in
portal_catalog
(
select_list
=
[
'title'
],
select_list
=
[
'title'
],
uid
=
by_mirror_section_list_dict
.
keys
(
),
uid
=
list
(
by_mirror_section_list_dict
.
keys
()
),
):
):
title
=
row
.
title
title
=
row
.
title
for
line
in
by_mirror_section_list_dict
[
row
.
uid
]:
for
line
in
by_mirror_section_list_dict
[
row
.
uid
]:
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAgedBalanceReportSectionList.py
View file @
2c90bf63
import
six
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Form.Report
import
ReportSection
from
Products.ERP5Form.Report
import
ReportSection
if
six
.
PY2
:
def
translate
(
*
args
,
**
kw
):
return
unicode
(
translateString
(
*
args
,
**
kw
))
else
:
def
translate
(
*
args
,
**
kw
):
return
str
(
translateString
(
*
args
,
**
kw
))
request
=
container
.
REQUEST
request
=
container
.
REQUEST
section_category
=
request
[
'section_category'
]
section_category
=
request
[
'section_category'
]
section_category_strict
=
request
[
'section_category_strict'
]
section_category_strict
=
request
[
'section_category_strict'
]
...
@@ -30,16 +38,16 @@ previous_period = 0
...
@@ -30,16 +38,16 @@ previous_period = 0
for
idx
,
period
in
enumerate
(
period_list
):
for
idx
,
period
in
enumerate
(
period_list
):
if
idx
!=
0
:
if
idx
!=
0
:
previous_period
=
period_list
[
idx
-
1
]
previous_period
=
period_list
[
idx
-
1
]
selection_columns
.
append
((
'period_%s'
%
idx
,
unicode
(
translateString
(
selection_columns
.
append
((
'period_%s'
%
idx
,
translate
(
'Period ${period_number} (from ${from} to ${to} days)'
,
'Period ${period_number} (from ${from} to ${to} days)'
,
mapping
=
{
'period_number'
:
1
+
idx
,
mapping
=
{
'period_number'
:
1
+
idx
,
'from'
:
previous_period
,
'from'
:
previous_period
,
'to'
:
period
}
)))
)
'to'
:
period
}
)))
editable_columns
.
append
((
'period_%s'
%
idx
,
''
))
editable_columns
.
append
((
'period_%s'
%
idx
,
''
))
selection_columns
.
append
((
'period_%s'
%
(
idx
+
1
),
selection_columns
.
append
((
'period_%s'
%
(
idx
+
1
),
unicode
(
translateString
(
'Older (more than ${day_count} days)'
,
translate
(
'Older (more than ${day_count} days)'
,
mapping
=
{
'day_count'
:
period_list
[
-
1
]})))
)
mapping
=
{
'day_count'
:
period_list
[
-
1
]})))
editable_columns
.
append
((
'period_%s'
%
(
idx
+
1
),
''
))
editable_columns
.
append
((
'period_%s'
%
(
idx
+
1
),
''
))
selection_params
=
dict
(
section_category
=
section_category
,
selection_params
=
dict
(
section_category
=
section_category
,
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingTransactionLineList.py
View file @
2c90bf63
...
@@ -9,6 +9,6 @@ sort_dict = { 'income': 0,
...
@@ -9,6 +9,6 @@ sort_dict = { 'income': 0,
'refundable_vat'
:
-
1
}
'refundable_vat'
:
-
1
}
def
getAccountingTransactionLineSortKey
(
line
):
def
getAccountingTransactionLineSortKey
(
line
):
return
sort_dict
.
get
(
line
.
getId
(),
line
.
getIntIndex
()
or
line
.
getIntId
(
))
return
sort_dict
.
get
(
line
.
getId
(),
(
line
.
getIntIndex
()
or
line
.
getIntId
()
or
0
))
return
sorted
(
context
.
contentValues
(
portal_type
=
portal_type
,
checked_permission
=
"View"
),
key
=
getAccountingTransactionLineSortKey
)
return
sorted
(
context
.
contentValues
(
portal_type
=
portal_type
,
checked_permission
=
"View"
),
key
=
getAccountingTransactionLineSortKey
)
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