[Erp5-report] r18801 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/er...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jan 21 14:00:28 CET 2008
Author: yusei
Date: Mon Jan 21 14:00:28 2008
New Revision: 18801
URL: http://svn.erp5.org?rev=18801&view=rev
Log:
2008-1-21 yusei
* Section drop down list in accounting transactions should always show existing values.(bug #510)
Added:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getDestinationSectionItemList.xml
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getSourceSectionItemList.xml
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewFieldLibrary/my_destination_section.xml
erp5/trunk/bt5/erp5_accounting/bt/change_log
erp5/trunk/bt5/erp5_accounting/bt/revision
Added: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getDestinationSectionItemList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getDestinationSectionItemList.xml?rev=18801&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getDestinationSectionItemList.xml (added)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getDestinationSectionItemList.xml Mon Jan 21 14:00:28 2008
@@ -1,0 +1,166 @@
+<?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>
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getSourceSectionItemList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getSourceSectionItemList.xml?rev=18801&r1=18800&r2=18801&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getSourceSectionItemList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getSourceSectionItemList.xml Mon Jan 21 14:00:28 2008
@@ -69,12 +69,22 @@
if section_cat in (None, \'\') : \n
section_cat = context.getPortalDefaultSectionCategory()\n
\n
-# get the organisations belonging to this group\n
-section_cat_obj = context.portal_categories.resolveCategory(section_cat)\n
-valids = section_cat_obj.getGroupRelatedValueList(portal_type=\'Organisation\')\n
+section_cat_obj = None\n
+result = []\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
# 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>
</item>
<item>
@@ -122,11 +132,12 @@
<string>section_cat</string>
<string>None</string>
<string>section_cat_obj</string>
- <string>valids</string>
+ <string>result</string>
+ <string>current_source_section</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
- <string>valid</string>
+ <string>i</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewFieldLibrary/my_destination_section.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewFieldLibrary/my_destination_section.xml?rev=18801&r1=18800&r2=18801&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewFieldLibrary/my_destination_section.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_viewFieldLibrary/my_destination_section.xml Mon Jan 21 14:00:28 2008
@@ -275,7 +275,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
- <value> <string>here/Base_getPreferredSectionItemList</string> </value>
+ <value> <string>here/AccountingTransaction_getDestinationSectionItemList</string> </value>
</item>
</dictionary>
</pickle>
Modified: erp5/trunk/bt5/erp5_accounting/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/change_log?rev=18801&r1=18800&r2=18801&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/change_log (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/change_log Mon Jan 21 14:00:28 2008
@@ -1,3 +1,6 @@
+2008-1-21 yusei
+* Section drop down list in accounting transactions should always show existing values.(bug #510)
+
2008-1-18 yusei
* proxify accounting transaction view forms.
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=18801&r1=18800&r2=18801&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision Mon Jan 21 14:00:28 2008
@@ -1,1 +1,1 @@
-547
+548
More information about the Erp5-report
mailing list