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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Iliya Manolov
erp5
Commits
d9a2a92d
Commit
d9a2a92d
authored
Jul 05, 2017
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounting: remove unused Account_getDestinationSectionItemList
parent
309579c4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
117 deletions
+0
-117
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getDestinationSectionItemList.py
.../erp5_accounting/Account_getDestinationSectionItemList.py
+0
-30
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getDestinationSectionItemList.xml
...erp5_accounting/Account_getDestinationSectionItemList.xml
+0
-66
product/ERP5/tests/testAccounting.py
product/ERP5/tests/testAccounting.py
+0
-21
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getDestinationSectionItemList.py
deleted
100644 → 0
View file @
309579c4
node_uid
=
None
if
not
account
:
if
(
hasattr
(
context
,
'getPortalType'
)
and
context
.
getPortalType
()
==
'Account'
)
:
node_uid
=
context
.
getUid
()
elif
same_type
(
account
,
''
)
:
account
=
context
.
getPortalObject
().
restrictedTraverse
(
account
)
node_uid
=
account
.
getUid
()
ptype_translated_dict
=
{}
def
translatePortalType
(
ptype
)
:
"""Translate portal_type without retrieving the object from ZODB."""
if
not
ptype_translated_dict
.
has_key
(
ptype
)
:
ptype_translated_dict
[
ptype
]
=
context
.
Base_translateString
(
ptype
)
return
ptype_translated_dict
[
ptype
]
section_uid
=
[]
if
section_category
:
section_uid
=
context
.
Base_getSectionUidListForSectionCategory
(
section_category
,
strict_membership
=
section_category_strict_membership
)
item_list
=
[(
""
,
""
)]
for
entity
in
context
.
Account_zDistinctSectionList
(
node_uid
=
node_uid
,
section_uid
=
section_uid
):
item_list
.
append
((
"%s (%s)"
%
(
entity
[
'title'
],
translatePortalType
(
entity
[
'portal_type'
])),
entity
[
'relative_url'
]))
return
item_list
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getDestinationSectionItemList.xml
deleted
100644 → 0
View file @
309579c4
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
account=\'\', section_category=\'\', section_category_strict_membership=True
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Account_getDestinationSectionItemList
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
TODO: rename into AccountModule_getMirrorSectionItemList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/tests/testAccounting.py
View file @
d9a2a92d
...
...
@@ -4160,27 +4160,6 @@ class TestTransactions(AccountingTestCase):
self
.
assertEqual
(
500
,
accounting_transaction
.
AccountingTransaction_getTotalDebit
())
self
.
assertEqual
(
400
,
accounting_transaction
.
AccountingTransaction_getTotalCredit
())
def
test_Account_getDestinationSectionItemList
(
self
):
organisation1
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
,
title
=
'Organisation 1'
)
organisation2
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
,
title
=
'Organisation 2'
)
self
.
_makeOne
(
portal_type
=
'Sale Invoice Transaction'
,
simulation_state
=
'delivered'
,
destination_section_value
=
organisation1
,
start_date
=
DateTime
(
2006
,
2
,
2
),
lines
=
(
dict
(
source_value
=
self
.
portal
.
account_module
.
receivable
,
source_debit
=
100
),
dict
(
source_value
=
self
.
portal
.
account_module
.
goods_sales
,
source_credit
=
100.00
)))
self
.
assertEqual
([(
''
,
''
),
(
'Organisation 1 (Organisation)'
,
organisation1
.
getRelativeUrl
())],
self
.
portal
.
Account_getDestinationSectionItemList
())
def
test_AccountingTransaction_getListBoxColumnList_does_not_enable_section_column_when_only_two_sections
(
self
):
# AccountingTransaction_getListBoxColumnList is the script returning the
# columns to display in AccountingTransaction_view.
...
...
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