Commit a3390b4f authored by Yusei Tahara's avatar Yusei Tahara

2008-1-21 yusei

* Section drop down list in accounting transactions should always show existing values.(bug #510)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18801 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent de327a75
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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>section = context.portal_preferences.getPreferredSectionCategory() or\\\n
context.portal_preferences.getPreferredAccountingTransactionSectionCategory()\n
\n
section_value = None\n
result = []\n
\n
if section is not None:\n
section_value = context.portal_categories.resolveCategory(section)\n
\n
if section_value is not None:\n
result = section_value.getGroupRelatedValueList(portal_type=\'Organisation\')\n
\n
current_destination_section = context.getDestinationSectionValue()\n
\n
if current_destination_section is not None and current_destination_section not in result:\n
result.append(current_destination_section)\n
\n
return [(i.getTitle(), i.getRelativeUrl()) for i in result]\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>section</string>
<string>None</string>
<string>section_value</string>
<string>result</string>
<string>current_destination_section</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>i</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingTransaction_getDestinationSectionItemList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -69,12 +69,22 @@ ...@@ -69,12 +69,22 @@
if section_cat in (None, \'\') : \n if section_cat in (None, \'\') : \n
section_cat = context.getPortalDefaultSectionCategory()\n section_cat = context.getPortalDefaultSectionCategory()\n
\n \n
# get the organisations belonging to this group\n section_cat_obj = None\n
section_cat_obj = context.portal_categories.resolveCategory(section_cat)\n result = []\n
valids = section_cat_obj.getGroupRelatedValueList(portal_type=\'Organisation\')\n \n
if section_cat is not None:\n
# get the organisations belonging to this group\n
section_cat_obj = context.portal_categories.resolveCategory(section_cat)\n
\n
if section_cat_obj is not None:\n
result = section_cat_obj.getGroupRelatedValueList(portal_type=\'Organisation\')\n
\n
current_source_section = context.getSourceSectionValue()\n
if current_source_section is not None and current_source_section not in result:\n
result.append(current_source_section)\n
\n \n
# convert to ListField format\n # convert to ListField format\n
return [(valid.getTitle(), valid.getRelativeUrl()) for valid in valids]\n return [(i.getTitle(), i.getRelativeUrl()) for i in result]\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -122,11 +132,12 @@ return [(valid.getTitle(), valid.getRelativeUrl()) for valid in valids]\n ...@@ -122,11 +132,12 @@ return [(valid.getTitle(), valid.getRelativeUrl()) for valid in valids]\n
<string>section_cat</string> <string>section_cat</string>
<string>None</string> <string>None</string>
<string>section_cat_obj</string> <string>section_cat_obj</string>
<string>valids</string> <string>result</string>
<string>current_source_section</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>valid</string> <string>i</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -275,7 +275,7 @@ ...@@ -275,7 +275,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>here/Base_getPreferredSectionItemList</string> </value> <value> <string>here/AccountingTransaction_getDestinationSectionItemList</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
2008-1-21 yusei
* Section drop down list in accounting transactions should always show existing values.(bug #510)
2008-1-18 yusei 2008-1-18 yusei
* proxify accounting transaction view forms. * proxify accounting transaction view forms.
......
547 548
\ No newline at end of file \ No newline at end of file
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