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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
erp5
Commits
1c44edc1
Commit
1c44edc1
authored
Jan 27, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounting py3
parent
4a83fb6a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
12 deletions
+17
-12
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
bt5/erp5_accounting/TestTemplateItem/portal_components/test.erp5.testAccounting.py
...emplateItem/portal_components/test.erp5.testAccounting.py
+2
-2
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.py
View file @
1c44edc1
...
...
@@ -50,9 +50,6 @@ def display(x):
display_cache
[
x
]
=
display_funct
(
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
,
simulation_state
=
None
):
"""Returns a list of Account path items. """
...
...
@@ -71,7 +68,7 @@ def getItemList(category=None, portal_path=None, mirror=0, omit_filter=0,
portal_type
=
'Account'
,
base
=
0
,
display_method
=
display
,
sort_
method
=
sort
,
sort_
key
=
display
,
filter
=
filter_dict
)
return
item_list
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAgedBalanceLineList.py
View file @
1c44edc1
...
...
@@ -118,7 +118,7 @@ for brain in portal.portal_simulation.getMovementHistoryList(
if
by_mirror_section_list_dict
:
for
row
in
portal_catalog
(
select_list
=
[
'title'
],
uid
=
by_mirror_section_list_dict
.
keys
(
),
uid
=
list
(
by_mirror_section_list_dict
.
keys
()
),
):
title
=
row
.
title
for
line
in
by_mirror_section_list_dict
[
row
.
uid
]:
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAgedBalanceReportSectionList.py
View file @
1c44edc1
import
six
from
Products.ERP5Type.Message
import
translateString
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
section_category
=
request
[
'section_category'
]
section_category_strict
=
request
[
'section_category_strict'
]
...
...
@@ -30,16 +38,16 @@ previous_period = 0
for
idx
,
period
in
enumerate
(
period_list
):
if
idx
!=
0
:
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)'
,
mapping
=
{
'period_number'
:
1
+
idx
,
'from'
:
previous_period
,
'to'
:
period
}
)))
)
'to'
:
period
}
)))
editable_columns
.
append
((
'period_%s'
%
idx
,
''
))
selection_columns
.
append
((
'period_%s'
%
(
idx
+
1
),
unicode
(
translateString
(
'Older (more than ${day_count} days)'
,
mapping
=
{
'day_count'
:
period_list
[
-
1
]})))
)
translate
(
'Older (more than ${day_count} days)'
,
mapping
=
{
'day_count'
:
period_list
[
-
1
]})))
editable_columns
.
append
((
'period_%s'
%
(
idx
+
1
),
''
))
selection_params
=
dict
(
section_category
=
section_category
,
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingTransactionLineList.py
View file @
1c44edc1
...
...
@@ -9,6 +9,6 @@ sort_dict = { 'income': 0,
'refundable_vat'
:
-
1
}
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
)
bt5/erp5_accounting/TestTemplateItem/portal_components/test.erp5.testAccounting.py
View file @
1c44edc1
...
...
@@ -3394,9 +3394,9 @@ class TestAccountingExport(AccountingTestCase):
'40 - Payable'
,
self
.
account_module
.
payable
.
Account_getFormattedTitle
())
# check that this account name can be found in the content
self
.
assertIn
(
'40 - Payable'
,
content_xml
)
self
.
assertIn
(
b
'40 - Payable'
,
content_xml
)
# check that we don't have unknown categories
self
.
assertNotIn
(
'???'
,
content_xml
)
self
.
assertNotIn
(
b
'???'
,
content_xml
)
class
TestTransactions
(
AccountingTestCase
):
...
...
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