[Erp5-report] r15161 - in /erp5/trunk/bt5/erp5_base: PortalTypeTemplateItem/portal_types/ S...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jul 6 12:18:48 CEST 2007
Author: seb
Date: Fri Jul 6 12:18:47 2007
New Revision: 15161
URL: http://svn.erp5.org?rev=15161&view=rev
Log:
- allow to override an init script for Currency Exchange Line
- modify CurrencyExchange_getExchangeRateList in order to
retrieve default price value defined on the line instead of only
looking to cells.
Added:
erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchangeLine_init.xml
Modified:
erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Currency%20Exchange%20Line.xml
erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchange_getExchangeRateList.xml
erp5/trunk/bt5/erp5_base/bt/revision
Modified: erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Currency%20Exchange%20Line.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Currency%2520Exchange%2520Line.xml?rev=15161&r1=15160&r2=15161&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Currency%20Exchange%20Line.xml (original)
+++ erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Currency%20Exchange%20Line.xml Fri Jul 6 12:18:47 2007
@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
- <tuple>
- <string>Products.ERP5Type.ERP5Type</string>
- <string>ERP5TypeInformation</string>
- </tuple>
- <none/>
+ <global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/>
+ <tuple/>
</tuple>
</pickle>
<pickle>
@@ -41,6 +38,10 @@
<value>
<list/>
</value>
+ </item>
+ <item>
+ <key> <string>acquire_local_roles</string> </key>
+ <value> <int>1</int> </value>
</item>
<item>
<key> <string>allowed_content_types</string> </key>
@@ -80,6 +81,12 @@
<value> <int>1</int> </value>
</item>
<item>
+ <key> <string>group_list</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
<key> <string>hidden_content_type_list</string> </key>
<value>
<tuple/>
@@ -91,6 +98,10 @@
</item>
<item>
<key> <string>init_script</string> </key>
+ <value> <string>CurrencyExchangeLine_init</string> </value>
+ </item>
+ <item>
+ <key> <string>permission</string> </key>
<value> <string></string> </value>
</item>
<item>
Added: erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchangeLine_init.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchangeLine_init.xml?rev=15161&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchangeLine_init.xml (added)
+++ erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchangeLine_init.xml Fri Jul 6 12:18:47 2007
@@ -1,0 +1,140 @@
+<?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># Allow to override the script in order to do specific stuff\n
+pass\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>**kw</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>kw</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>CurrencyExchangeLine_init</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchange_getExchangeRateList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchange_getExchangeRateList.xml?rev=15161&r1=15160&r2=15161&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchange_getExchangeRateList.xml (original)
+++ erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchange_getExchangeRateList.xml Fri Jul 6 12:18:47 2007
@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
- <tuple>
- <string>Products.PythonScripts.PythonScript</string>
- <string>PythonScript</string>
- </tuple>
- <none/>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
</tuple>
</pickle>
<pickle>
@@ -137,8 +134,16 @@
has_cell_content=0, \n
validation_state=\'validated\',\n
sort_method=sort_by_date)\n
- result = [getattr(mapped_value, \'base_price\', None), \n
- getattr(mapped_value, \'discount\', None)]\n
+ base_price = getattr(mapped_value, \'base_price\', None)\n
+ discount = getattr(mapped_value, \'discount\', None)\n
+ if base_price is None and discount is None:\n
+ mapped_value = context.portal_domains.generateMappedValue(object, \n
+ has_cell_content=1, \n
+ validation_state=\'validated\',\n
+ sort_method=sort_by_date) \n
+ base_price = getattr(mapped_value, \'base_price\', None)\n
+ discount = getattr(mapped_value, \'discount\', None)\n
+ result = [base_price, discount]\n
return result\n
@@ -211,6 +216,8 @@
<string>result</string>
<string>getattr</string>
<string>mapped_value</string>
+ <string>base_price</string>
+ <string>discount</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_base/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/bt/revision?rev=15161&r1=15160&r2=15161&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/bt/revision (original)
+++ erp5/trunk/bt5/erp5_base/bt/revision Fri Jul 6 12:18:47 2007
@@ -1,1 +1,1 @@
-126
+129
More information about the Erp5-report
mailing list