Commit cd5f316c authored by Mame Coumba Sall's avatar Mame Coumba Sall

Remove Account_getDestinationSectionItemList and corresponding test as it's not used anymore

parent 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>
......@@ -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>
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment