Commit edd87d14 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

erp5_pdm: fix matrixbox in SaleSupplyLine_viewAdditionalPrice with optional variation support.

parent ed0b0450
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
<value> <value>
<list> <list>
<string>matrixbox</string> <string>matrixbox</string>
<string>matrixbox1</string>
<string>mapped_value_property_list</string> <string>mapped_value_property_list</string>
</list> </list>
</value> </value>
...@@ -93,6 +94,9 @@ ...@@ -93,6 +94,9 @@
<string>matrixbox_additional_price</string> <string>matrixbox_additional_price</string>
<string>matrixbox_predicate_category_list</string> <string>matrixbox_predicate_category_list</string>
<string>matrixbox_variation_category_list</string> <string>matrixbox_variation_category_list</string>
<string>matrixbox1_additional_price</string>
<string>matrixbox1_predicate_category_list</string>
<string>matrixbox1_variation_category_list</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -114,6 +118,7 @@ ...@@ -114,6 +118,7 @@
<value> <value>
<list> <list>
<string>my_additional_price</string> <string>my_additional_price</string>
<string>my_additional_price_variation_base_category_list</string>
<string>my_additional_price_quantity_step_list</string> <string>my_additional_price_quantity_step_list</string>
</list> </list>
</value> </value>
......
...@@ -216,11 +216,11 @@ ...@@ -216,11 +216,11 @@
</item> </item>
<item> <item>
<key> <string>as_cell_range_script_id</string> </key> <key> <string>as_cell_range_script_id</string> </key>
<value> <string>SupplyLine_asOptionVariationCellRange</string> </value> <value> <string>SupplyLine_asCellRange</string> </value>
</item> </item>
<item> <item>
<key> <string>cell_base_id</string> </key> <key> <string>cell_base_id</string> </key>
<value> <string>path_optional_additional_price</string> </value> <value> <string>path_additional_price</string> </value>
</item> </item>
<item> <item>
<key> <string>cell_getter_method</string> </key> <key> <string>cell_getter_method</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>matrixbox1_additional_price</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>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<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>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_additional_price</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPDMFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.getProperty(\'discount_ratio\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -34,7 +34,7 @@ else: ...@@ -34,7 +34,7 @@ else:
getPVariationBaseCategoryList() getPVariationBaseCategoryList()
else: else:
property_id = '%s_variation_base_category_list' % base_id[len('path_'):] property_id = '%s_variation_base_category_list' % base_id[len('path_'):]
selected_base_category_list = context.getProperty(property_id) selected_base_category_list = context.getProperty(property_id, [])
base_category_list_list = [[x] for x in selected_base_category_list] base_category_list_list = [[x] for x in selected_base_category_list]
# Generate cell range # Generate cell range
......
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