From 8187b71e814902da4f817f7d0d877dc87938769a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Mon, 13 Sep 2010 14:00:55 +0000 Subject: [PATCH] - set int_index on currency exchange cells, based on currency_exchange_type's int_indexs - make a bigger precision on exchange rate field git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38310 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_base/CurrencyExchangeLine_view/listbox.xml | 12 ++++++++++++ .../CurrencyExchangeLine_view/listbox_base_price.xml | 5 +++++ .../scripts/CurrencyExchangeLine_updateMatrix.xml | 5 +++++ bt5/erp5_base/bt/revision | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchangeLine_view/listbox.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchangeLine_view/listbox.xml index 5b65a8ab81..f587628c16 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchangeLine_view/listbox.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchangeLine_view/listbox.xml @@ -13,6 +13,7 @@ <string>columns</string> <string>editable_columns</string> <string>hidden</string> + <string>sort</string> <string>title</string> <string>url_columns</string> </list> @@ -143,6 +144,17 @@ <key> <string>hidden</string> </key> <value> <int>0</int> </value> </item> + <item> + <key> <string>sort</string> </key> + <value> + <list> + <tuple> + <string>int_index</string> + <string>ASC</string> + </tuple> + </list> + </value> + </item> <item> <key> <string>target</string> </key> <value> <string>Click to edit the target</string> </value> diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchangeLine_view/listbox_base_price.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchangeLine_view/listbox_base_price.xml index 82f29a4044..dac6a439cd 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchangeLine_view/listbox_base_price.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchangeLine_view/listbox_base_price.xml @@ -10,6 +10,7 @@ <key> <string>delegated_list</string> </key> <value> <list> + <string>precision</string> <string>title</string> </list> </value> @@ -79,6 +80,10 @@ <key> <string>form_id</string> </key> <value> <string>Base_viewFieldLibrary</string> </value> </item> + <item> + <key> <string>precision</string> </key> + <value> <int>10</int> </value> + </item> <item> <key> <string>target</string> </key> <value> <string>Click to edit the target</string> </value> diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/currency_exchange_line_interaction_workflow/scripts/CurrencyExchangeLine_updateMatrix.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/currency_exchange_line_interaction_workflow/scripts/CurrencyExchangeLine_updateMatrix.xml index 1b042d6a0b..4326929bb6 100644 --- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/currency_exchange_line_interaction_workflow/scripts/CurrencyExchangeLine_updateMatrix.xml +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/currency_exchange_line_interaction_workflow/scripts/CurrencyExchangeLine_updateMatrix.xml @@ -79,6 +79,10 @@ if cell_range_key_list != [[None, None]] :\n c.setCriterion(\'stop_date\', min=context.getStartDate(), max=context.getStopDate())\n if c.getBasePrice() is None and context.getBasePrice() is not None:\n c.setBasePrice(context.getBasePrice())\n + # set an int index for display\n + currency_exchange_type_value_list = c.getValueList(\'currency_exchange_type\')\n + if currency_exchange_type_value_list:\n + c.setIntIndex(currency_exchange_type_value_list[0].getIntIndex())\n </string> </value> </item> <item> @@ -138,6 +142,7 @@ if cell_range_key_list != [[None, None]] :\n <string>category_list</string> <string>_apply_</string> <string>c</string> + <string>currency_exchange_type_value_list</string> </tuple> </value> </item> diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision index 3e90fddaba..885c7e85d7 100644 --- a/bt5/erp5_base/bt/revision +++ b/bt5/erp5_base/bt/revision @@ -1 +1 @@ -833 \ No newline at end of file +834 \ No newline at end of file -- 2.30.9