Commit 62637ff0 authored by Nicolas Dumazet's avatar Nicolas Dumazet

Fix display of price and quantity for Cells listed on PackingList views

Packing List views are a bit particular because they use getMovementList.
All the listbox lines are movements. Similarly, some lines can bear
variation categories. It means that the "enabled" TALES test:
  python: cell.isMovement() and not cell.getVariationCategoryList()
is problematic for this view.

For quantity fields, the Base_viewFieldLibrary.my_view_mode_quantity
fits perfectly our usecase.
For price, we need to get price precision from the cell, so
Base_viewFieldLibrary.my_view_mode_price does not fit. On the other hand,
Base_viewTradeFieldLibrary.my_view_mode_price does include the "enabled" TALES,
which we do not want.
We thus create a new "my_view_mode_movement_listbox_price" field in
Base_viewTradeFieldLibrary for this usage.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37500 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 727926bc
......@@ -305,6 +305,7 @@
<string>my_view_mode_movement_use</string>
<string>my_view_mode_listbox_resource_relative_url</string>
<string>my_view_mode_listbox_movement_relative_url</string>
<string>my_view_mode_movement_listbox_price</string>
</list>
</value>
</item>
......
<?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>enabled</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_view_mode_movement_listbox_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>enabled</string> </key>
<value> <string></string> </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>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_price</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</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>
</ZopeData>
......@@ -74,7 +74,7 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_price</string> </value>
<value> <string>my_view_mode_movement_listbox_price</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
......
......@@ -74,11 +74,11 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_quantity</string> </value>
<value> <string>my_view_mode_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
......
......@@ -74,7 +74,7 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_price</string> </value>
<value> <string>my_view_mode_movement_listbox_price</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
......
......@@ -74,11 +74,11 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_quantity</string> </value>
<value> <string>my_view_mode_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
......
......@@ -74,11 +74,11 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_quantity</string> </value>
<value> <string>my_view_mode_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
......
......@@ -74,11 +74,11 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_quantity</string> </value>
<value> <string>my_view_mode_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
......
......@@ -74,7 +74,7 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_price</string> </value>
<value> <string>my_view_mode_movement_listbox_price</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
......
......@@ -74,11 +74,11 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_quantity</string> </value>
<value> <string>my_view_mode_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
......
967
\ No newline at end of file
968
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