From e8576b55b6b8969fea36eb61dbda47ab799a4138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Thu, 14 Jan 2010 18:24:30 +0000 Subject: [PATCH] fix the way we get currency precision for default supply lines git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31763 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../my_internal_base_price.xml | 31 ++++++++++++++++++ .../my_purchase_base_price.xml | 31 ++++++++++++++++++ .../my_sale_base_price.xml | 31 ++++++++++++++++++ .../matrixbox_base_price.xml | 32 +++++++++++++++++-- .../matrixbox_base_price.xml | 32 +++++++++++++++++-- .../matrixbox_base_price.xml | 32 +++++++++++++++++-- bt5/erp5_pdm/bt/revision | 2 +- 7 files changed, 184 insertions(+), 7 deletions(-) diff --git a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Base_viewPDMFieldLibrary/my_internal_base_price.xml b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Base_viewPDMFieldLibrary/my_internal_base_price.xml index c3f583c6ea..5288624d72 100644 --- a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Base_viewPDMFieldLibrary/my_internal_base_price.xml +++ b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Base_viewPDMFieldLibrary/my_internal_base_price.xml @@ -13,6 +13,7 @@ <key> <string>delegated_list</string> </key> <value> <list> + <string>precision</string> <string>title</string> </list> </value> @@ -63,10 +64,20 @@ <key> <string>form_id</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>precision</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> <item> <key> <string>target</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> </dictionary> </value> </item> @@ -82,6 +93,10 @@ <key> <string>form_id</string> </key> <value> <string>Base_viewPDMFieldLibrary</string> </value> </item> + <item> + <key> <string>precision</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>target</string> </key> <value> <string>Click to edit the target</string> </value> @@ -96,4 +111,20 @@ </dictionary> </pickle> </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: here.getQuantityPrecisionFromResource(here.getInternalSupplyLinePriceCurrency())</string> </value> + </item> + </dictionary> + </pickle> + </record> </ZopeData> diff --git a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Base_viewPDMFieldLibrary/my_purchase_base_price.xml b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Base_viewPDMFieldLibrary/my_purchase_base_price.xml index 4b577f69a6..e4fcdd80d3 100644 --- a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Base_viewPDMFieldLibrary/my_purchase_base_price.xml +++ b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Base_viewPDMFieldLibrary/my_purchase_base_price.xml @@ -13,6 +13,7 @@ <key> <string>delegated_list</string> </key> <value> <list> + <string>precision</string> <string>title</string> </list> </value> @@ -63,10 +64,20 @@ <key> <string>form_id</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>precision</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> <item> <key> <string>target</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> </dictionary> </value> </item> @@ -82,6 +93,10 @@ <key> <string>form_id</string> </key> <value> <string>Base_viewPDMFieldLibrary</string> </value> </item> + <item> + <key> <string>precision</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>target</string> </key> <value> <string>Click to edit the target</string> </value> @@ -96,4 +111,20 @@ </dictionary> </pickle> </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: here.getQuantityPrecisionFromResource(here.getPurchaseSupplyLinePriceCurrency())</string> </value> + </item> + </dictionary> + </pickle> + </record> </ZopeData> diff --git a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Base_viewPDMFieldLibrary/my_sale_base_price.xml b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Base_viewPDMFieldLibrary/my_sale_base_price.xml index a5339b64d9..1d39658ced 100644 --- a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Base_viewPDMFieldLibrary/my_sale_base_price.xml +++ b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Base_viewPDMFieldLibrary/my_sale_base_price.xml @@ -13,6 +13,7 @@ <key> <string>delegated_list</string> </key> <value> <list> + <string>precision</string> <string>title</string> </list> </value> @@ -63,10 +64,20 @@ <key> <string>form_id</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>precision</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> <item> <key> <string>target</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> </dictionary> </value> </item> @@ -82,6 +93,10 @@ <key> <string>form_id</string> </key> <value> <string>Base_viewPDMFieldLibrary</string> </value> </item> + <item> + <key> <string>precision</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>target</string> </key> <value> <string>Click to edit the target</string> </value> @@ -96,4 +111,20 @@ </dictionary> </pickle> </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: here.getQuantityPrecisionFromResource(here.getSaleSupplyLinePriceCurrency())</string> </value> + </item> + </dictionary> + </pickle> + </record> </ZopeData> diff --git a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewDefaultInternalSupplyLine/matrixbox_base_price.xml b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewDefaultInternalSupplyLine/matrixbox_base_price.xml index 5558c41e3c..c7519be943 100644 --- a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewDefaultInternalSupplyLine/matrixbox_base_price.xml +++ b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewDefaultInternalSupplyLine/matrixbox_base_price.xml @@ -12,7 +12,9 @@ <item> <key> <string>delegated_list</string> </key> <value> - <list/> + <list> + <string>default</string> + </list> </value> </item> <item> @@ -53,6 +55,12 @@ <key> <string>tales</string> </key> <value> <dictionary> + <item> + <key> <string>default</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> <item> <key> <string>field_id</string> </key> <value> <string></string> </value> @@ -72,9 +80,13 @@ <key> <string>values</string> </key> <value> <dictionary> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>field_id</string> </key> - <value> <string>my_matrixbox_base_price</string> </value> + <value> <string>my_internal_base_price</string> </value> </item> <item> <key> <string>form_id</string> </key> @@ -90,4 +102,20 @@ </dictionary> </pickle> </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: cell is not None and cell.getProperty(\'base_price\') or \'\'</string> </value> + </item> + </dictionary> + </pickle> + </record> </ZopeData> diff --git a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewDefaultPurchaseSupplyLine/matrixbox_base_price.xml b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewDefaultPurchaseSupplyLine/matrixbox_base_price.xml index 5558c41e3c..bde7797c6d 100644 --- a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewDefaultPurchaseSupplyLine/matrixbox_base_price.xml +++ b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewDefaultPurchaseSupplyLine/matrixbox_base_price.xml @@ -12,7 +12,9 @@ <item> <key> <string>delegated_list</string> </key> <value> - <list/> + <list> + <string>default</string> + </list> </value> </item> <item> @@ -53,6 +55,12 @@ <key> <string>tales</string> </key> <value> <dictionary> + <item> + <key> <string>default</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> <item> <key> <string>field_id</string> </key> <value> <string></string> </value> @@ -72,9 +80,13 @@ <key> <string>values</string> </key> <value> <dictionary> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>field_id</string> </key> - <value> <string>my_matrixbox_base_price</string> </value> + <value> <string>my_purchase_base_price</string> </value> </item> <item> <key> <string>form_id</string> </key> @@ -90,4 +102,20 @@ </dictionary> </pickle> </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: cell is not None and cell.getProperty(\'base_price\') or \'\'</string> </value> + </item> + </dictionary> + </pickle> + </record> </ZopeData> diff --git a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewDefaultSaleSupplyLine/matrixbox_base_price.xml b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewDefaultSaleSupplyLine/matrixbox_base_price.xml index 5558c41e3c..bdb5a88784 100644 --- a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewDefaultSaleSupplyLine/matrixbox_base_price.xml +++ b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewDefaultSaleSupplyLine/matrixbox_base_price.xml @@ -12,7 +12,9 @@ <item> <key> <string>delegated_list</string> </key> <value> - <list/> + <list> + <string>default</string> + </list> </value> </item> <item> @@ -53,6 +55,12 @@ <key> <string>tales</string> </key> <value> <dictionary> + <item> + <key> <string>default</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> <item> <key> <string>field_id</string> </key> <value> <string></string> </value> @@ -72,9 +80,13 @@ <key> <string>values</string> </key> <value> <dictionary> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>field_id</string> </key> - <value> <string>my_matrixbox_base_price</string> </value> + <value> <string>my_sale_base_price</string> </value> </item> <item> <key> <string>form_id</string> </key> @@ -90,4 +102,20 @@ </dictionary> </pickle> </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: cell is not None and cell.getProperty(\'base_price\') or \'\'</string> </value> + </item> + </dictionary> + </pickle> + </record> </ZopeData> diff --git a/bt5/erp5_pdm/bt/revision b/bt5/erp5_pdm/bt/revision index 1e59c84a3a..97964b3fde 100644 --- a/bt5/erp5_pdm/bt/revision +++ b/bt5/erp5_pdm/bt/revision @@ -1 +1 @@ -420 \ No newline at end of file +422 \ No newline at end of file -- 2.30.9