From 9659327e91d40504abfefeef4b01315e5f8961c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Thu, 5 Aug 2010 09:37:02 +0000 Subject: [PATCH] display base and rate properly git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@37520 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../InvoiceLine_viewFieldLibrary/my_price.xml | 54 +++++++++++++++++++ .../my_quantity.xml | 27 ++++++++-- 2 files changed, 77 insertions(+), 4 deletions(-) diff --git a/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceLine_viewFieldLibrary/my_price.xml b/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceLine_viewFieldLibrary/my_price.xml index 8216ce303b..a75f096f19 100644 --- a/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceLine_viewFieldLibrary/my_price.xml +++ b/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceLine_viewFieldLibrary/my_price.xml @@ -14,6 +14,8 @@ <value> <list> <string>enabled</string> + <string>input_style</string> + <string>title</string> </list> </value> </item> @@ -69,10 +71,22 @@ <key> <string>form_id</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>input_style</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> <item> <key> <string>target</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>title</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> + </value> + </item> </dictionary> </value> </item> @@ -92,10 +106,18 @@ <key> <string>form_id</string> </key> <value> <string>Base_viewFieldLibrary</string> </value> </item> + <item> + <key> <string>input_style</string> </key> + <value> <string>-1 234.5</string> </value> + </item> <item> <key> <string>target</string> </key> <value> <string>Click to edit the target</string> </value> </item> + <item> + <key> <string>title</string> </key> + <value> <string>Price</string> </value> + </item> </dictionary> </value> </item> @@ -118,4 +140,36 @@ </dictionary> </pickle> </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: context.getUse(base=True) in preferences.getPreferredPriceRatioUseList() and \'-12.3%\' or preferences.getPreference(\'preferred_money_quantity_style\', \'-1 234.5\')</string> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="4" aka="AAAAAAAAAAQ="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: context.getUse(base=True) in preferences.getPreferredPriceRatioUseList() and \'Ratio\' or \'Price\'</string> </value> + </item> + </dictionary> + </pickle> + </record> </ZopeData> diff --git a/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceLine_viewFieldLibrary/my_quantity.xml b/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceLine_viewFieldLibrary/my_quantity.xml index ba1bf3cab4..014847a5ba 100644 --- a/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceLine_viewFieldLibrary/my_quantity.xml +++ b/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceLine_viewFieldLibrary/my_quantity.xml @@ -14,6 +14,7 @@ <value> <list> <string>enabled</string> + <string>title</string> </list> </value> </item> @@ -73,6 +74,12 @@ <key> <string>target</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>title</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> </dictionary> </value> </item> @@ -80,10 +87,6 @@ <key> <string>values</string> </key> <value> <dictionary> - <item> - <key> <string>description</string> </key> - <value> <string>Default quantity</string> </value> - </item> <item> <key> <string>enabled</string> </key> <value> <int>1</int> </value> @@ -126,4 +129,20 @@ </dictionary> </pickle> </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: context.getUse(base=True) in preferences.getPreferredPriceRatioUseList() and \'Base\' or \'Quantity\'</string> </value> + </item> + </dictionary> + </pickle> + </record> </ZopeData> -- 2.30.9