diff --git a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_getPreferredTradeBaseAmountItemList.xml b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_getPreferredTradeBaseAmountItemList.xml new file mode 100644 index 0000000000000000000000000000000000000000..a11e6477d552271dc51d8a123fc3e4b5bd3ecc47 --- /dev/null +++ b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_getPreferredTradeBaseAmountItemList.xml @@ -0,0 +1,147 @@ +<?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>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>from Products.ERP5Type.Utils import UpperCase\n +\n +portal_categories = context.portal_categories\n +portal_preferences = context.portal_preferences\n +method_id = portal_preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\')\n +\n +item_list = getattr(portal_categories.base_amount, method_id)(local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\', base=1)\n +preferred_list = portal_preferences.getPreferredTradeBaseAmountList()\n +\n +if not preferred_list:\n + return item_list\n +else:\n + return [item for item in item_list if item[1] in preferred_list]\n +</string> </value> + </item> + <item> + <key> <string>_code</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>Products.ERP5Type.Utils</string> + <string>UpperCase</string> + <string>_getattr_</string> + <string>context</string> + <string>portal_categories</string> + <string>portal_preferences</string> + <string>method_id</string> + <string>getattr</string> + <string>item_list</string> + <string>preferred_list</string> + <string>append</string> + <string>$append0</string> + <string>_getiter_</string> + <string>item</string> + <string>_getitem_</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>Base_getPreferredTradeBaseAmountItemList</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_viewTradeFieldLibrary/my_view_mode_base_application_list.xml b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_viewTradeFieldLibrary/my_view_mode_base_application_list.xml index 74e47e23c761796aa0bc72edbf2e983289bbc7a2..77dec2fc4a95965b7cad8e62b3f82a2026a60f2f 100644 --- a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_viewTradeFieldLibrary/my_view_mode_base_application_list.xml +++ b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_viewTradeFieldLibrary/my_view_mode_base_application_list.xml @@ -14,8 +14,8 @@ <value> <list> <string>description</string> - <string>title</string> <string>items</string> + <string>title</string> </list> </value> </item> @@ -57,6 +57,10 @@ <key> <string>tales</string> </key> <value> <dictionary> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>field_id</string> </key> <value> <string></string> </value> @@ -75,6 +79,10 @@ <key> <string>target</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> </dictionary> </value> </item> @@ -94,6 +102,12 @@ <key> <string>form_id</string> </key> <value> <string>Base_viewFieldLibrary</string> </value> </item> + <item> + <key> <string>items</string> </key> + <value> + <list/> + </value> + </item> <item> <key> <string>target</string> </key> <value> <string>Click to edit the target</string> </value> @@ -119,7 +133,7 @@ <dictionary> <item> <key> <string>_text</string> </key> - <value> <string>python: getattr(here.portal_categories.base_amount, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(base=1, local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\')</string> </value> + <value> <string>here/Base_getPreferredTradeBaseAmountItemList</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_viewTradeFieldLibrary/my_view_mode_base_contribution_list.xml b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_viewTradeFieldLibrary/my_view_mode_base_contribution_list.xml index 61049865e1c4769de3ca08c2f4f68422326af65e..7af6d1eb90d43264f5a939c790da22216767754f 100644 --- a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_viewTradeFieldLibrary/my_view_mode_base_contribution_list.xml +++ b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_viewTradeFieldLibrary/my_view_mode_base_contribution_list.xml @@ -14,8 +14,8 @@ <value> <list> <string>description</string> - <string>title</string> <string>items</string> + <string>title</string> </list> </value> </item> @@ -57,6 +57,10 @@ <key> <string>tales</string> </key> <value> <dictionary> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>field_id</string> </key> <value> <string></string> </value> @@ -75,6 +79,10 @@ <key> <string>target</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> </dictionary> </value> </item> @@ -94,6 +102,12 @@ <key> <string>form_id</string> </key> <value> <string>Base_viewFieldLibrary</string> </value> </item> + <item> + <key> <string>items</string> </key> + <value> + <list/> + </value> + </item> <item> <key> <string>target</string> </key> <value> <string>Click to edit the target</string> </value> @@ -119,7 +133,7 @@ <dictionary> <item> <key> <string>_text</string> </key> - <value> <string>python: getattr(here.portal_categories.base_amount, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(base=1, local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\')</string> </value> + <value> <string>here/Base_getPreferredTradeBaseAmountItemList</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_trade/bt/change_log b/bt5/erp5_trade/bt/change_log index f31e84051525bf3a6d6be59154b24c964d33328a..b73a7da89f9da60127cc927ceaa343a9c3392898 100644 --- a/bt5/erp5_trade/bt/change_log +++ b/bt5/erp5_trade/bt/change_log @@ -1,3 +1,6 @@ +2010-05-21 yusei +* Display preferred base amounts in base contribution list and base application list. + 2010-05-21 yusei * Change base amount preference. Only one preferred list on trade is enough. * Revert previous changes. On movements, display uses defined on the corresponding resource only. diff --git a/bt5/erp5_trade/bt/revision b/bt5/erp5_trade/bt/revision index 90afd51b6079368850d3ee0a641eb136d66cda3c..dcdf7f59d9ebfb6a30c844b3d0d5b6d92bec0814 100644 --- a/bt5/erp5_trade/bt/revision +++ b/bt5/erp5_trade/bt/revision @@ -1 +1 @@ -940 \ No newline at end of file +942 \ No newline at end of file