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
Mikolaï Krol
erp5
Commits
cd5f316c
Commit
cd5f316c
authored
Oct 24, 2013
by
Mame Coumba Sall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Account_getDestinationSectionItemList and corresponding test as it's not used anymore
parent
80181d7e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
121 deletions
+1
-121
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getDestinationSectionItemList.xml
...erp5_accounting/Account_getDestinationSectionItemList.xml
+0
-100
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_zDistinctSectionList.xml
...al_skins/erp5_accounting/Account_zDistinctSectionList.xml
+1
-1
product/ERP5/tests/testAccounting.py
product/ERP5/tests/testAccounting.py
+0
-20
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getDestinationSectionItemList.xml
deleted
100644 → 0
View file @
80181d7e
<?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>
_body
</string>
</key>
<value>
<string>
node_uid=None\n
if not account:\n
if (hasattr(context, \'getPortalType\') and context.getPortalType() == \'Account\') :\n
node_uid = context.getUid()\n
elif same_type(account, \'\') :\n
account = context.getPortalObject().restrictedTraverse(account)\n
node_uid = account.getUid()\n
\n
\n
ptype_translated_dict = {}\n
def translatePortalType(ptype) :\n
"""Translate portal_type without retrieving the object from ZODB."""\n
if not ptype_translated_dict.has_key(ptype) :\n
ptype_translated_dict[ptype] = context.Base_translateString(ptype)\n
return ptype_translated_dict[ptype]\n
\n
section_uid = []\n
if section_category:\n
section_uid = context.Base_getSectionUidListForSectionCategory(\n
section_category, strict_membership=section_category_strict_membership)\n
\n
\n
item_list = [("", "")]\n
for entity in context.Account_zDistinctSectionList(node_uid=node_uid,\n
section_uid=section_uid):\n
item_list.append(("%s (%s)" % ( entity[\'title\'],\n
translatePortalType(entity[\'portal_type\'])),\n
entity[\'relative_url\']))\n
\n
return item_list\n
</string>
</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>
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_zDistinctSectionList.xml
View file @
cd5f316c
...
...
@@ -154,7 +154,7 @@ ORDER BY\n
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
XXX It's better to use getInventoryList group by mirror section
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
product/ERP5/tests/testAccounting.py
View file @
cd5f316c
...
...
@@ -3242,26 +3242,6 @@ class TestTransactions(AccountingTestCase):
self
.
assertEquals
(
500
,
accounting_transaction
.
AccountingTransaction_getTotalDebit
())
self
.
assertEquals
(
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
.
assertEquals
([(
''
,
''
),
(
'Organisation 1 (Organisation)'
,
organisation1
.
getRelativeUrl
())],
self
.
portal
.
Account_getDestinationSectionItemList
())
class
TestAccountingWithSequences
(
ERP5TypeTestCase
):
"""The first test for Accounting
...
...
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