Commit 21c5fb50 authored by Jérome Perrin's avatar Jérome Perrin

- remove unused "discount" column in CurrencyExchangeLine_view

- use category API for some parts

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38302 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e86b3a65
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
......@@ -53,9 +50,9 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>currency_exchange_type_list = [x[0] for x in context.portal_categories.currency_exchange_type.getCategoryChildItemList(base=1)[1:]]\n
<value> <string>currency_exchange_type_list = context.portal_categories.currency_exchange_type.getCategoryChildRelativeUrlList(base=True)\n
resource_list = [\'resource/%s\' % context.getParentValue().getRelativeUrl()]\n
price_currency_list = [\'price_currency/%s\' % context.getPriceCurrency()]\n
price_currency_list = [context.getPriceCurrency(base=True)]\n
\n
return (currency_exchange_type_list, resource_list, price_currency_list)\n
</string> </value>
......@@ -96,13 +93,9 @@ return (currency_exchange_type_list, resource_list, price_currency_list)\n
<tuple>
<string>argv</string>
<string>kw</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>_getitem_</string>
<string>_getattr_</string>
<string>context</string>
<string>x</string>
<string>True</string>
<string>currency_exchange_type_list</string>
<string>resource_list</string>
<string>price_currency_list</string>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
</pickle>
<pickle>
<dictionary>
......@@ -86,7 +83,6 @@
<value>
<list>
<string>listbox_base_price</string>
<string>listbox_discount</string>
</list>
</value>
</item>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
......@@ -17,6 +14,7 @@
<string>editable_columns</string>
<string>hidden</string>
<string>title</string>
<string>url_columns</string>
</list>
</value>
</item>
......@@ -88,6 +86,12 @@
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>url_columns</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
......@@ -106,16 +110,12 @@
<value>
<list>
<tuple>
<string>currency_exchange_type_title</string>
<string>currency_exchange_type_translated_title</string>
<string>Exchange Type</string>
</tuple>
<tuple>
<string>base_price</string>
<string>Price</string>
</tuple>
<tuple>
<string>discount</string>
<string>Manual Price</string>
<string>Exchange Rate</string>
</tuple>
</list>
</value>
......@@ -126,11 +126,7 @@
<list>
<tuple>
<string>base_price</string>
<string>Price</string>
</tuple>
<tuple>
<string>discount</string>
<string>Manual Price</string>
<string>Exchange Rate</string>
</tuple>
</list>
</value>
......@@ -155,6 +151,12 @@
<key> <string>title</string> </key>
<value> <string>Currency Exchange Cells</string> </value>
</item>
<item>
<key> <string>url_columns</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
......@@ -163,10 +165,7 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
......@@ -177,4 +176,17 @@
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:[(column, None) for (column, title) in field.get_value(\'columns\')]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_discount</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_money_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</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>Discount</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
......@@ -62,11 +59,11 @@ kwd = {\'base_id\': base_id}\n
context.updateCellRange(script_id=\'CurrencyExchangeLine_asCellRange\', base_id=base_id)\n
cell_range_key_list = context.getCellRangeKeyList(base_id = base_id)\n
resource_list = [\'resource/%s\' % context.getParentValue().getRelativeUrl()]\n
price_currency_list = [\'price_currency/%s\' % context.getPriceCurrency()]\n
membership_list = resource_list+price_currency_list\n
price_currency_list = [context.getPriceCurrency(base=True)]\n
membership_list = resource_list + price_currency_list\n
context.setMembershipCriterionBaseCategoryList([x.split(\'/\')[0] for x in membership_list])\n
context.setMembershipCriterionCategoryList(membership_list)\n
context.setResource(context.getParentValue().getRelativeUrl())\n
context.setResourceValue(context.getParentValue())\n
context.setMappedValuePropertyList((\'base_price\',\'discount\'))\n
if cell_range_key_list != [[None, None]] :\n
i = 0\n
......@@ -127,6 +124,7 @@ if cell_range_key_list != [[None, None]] :\n
<string>_getattr_</string>
<string>cell_range_key_list</string>
<string>resource_list</string>
<string>True</string>
<string>price_currency_list</string>
<string>membership_list</string>
<string>append</string>
......
829
\ No newline at end of file
831
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment