Commit aa3bb22f authored by Jérome Perrin's avatar Jérome Perrin

pdm: Stock Browser Improvements

Make stock browser a dialog where user can select the node category, for compatibility with ERP5JS

Introduce a preference to select the node category by default.

Allow to select quantity unit / metric type in the dialog to get converted inventories.

See merge request !1158
parents 6b4b4cd4 11f6c277
......@@ -16,13 +16,13 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
<string>action_type/object_jio_report</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
<value> <string>object_jio_report</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
......@@ -71,7 +71,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Resource_viewInventory</string> </value>
<value> <string>string:${object_url}/Resource_viewInventoryDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -23,5 +23,8 @@ for assignment in context.contentValues(portal_type='Assignment'):
if group:
preference.setPreferredSectionCategory(group)
preference.setPreferredAccountingTransactionSectionCategory(group)
site = assignment.getSite(base=True)
if site:
preference.setPreferredNodeCategory(site)
return preference
......@@ -1153,7 +1153,8 @@ class TestERP5Base(ERP5TypeTestCase):
def test_user_creation(self):
person = self.portal.person_module.newContent(portal_type='Person')
assignment = person.newContent(portal_type='Assignment',
group='nexedi/storever')
group='nexedi/storever',
site='distibution/tokyo')
self.assertNotEquals(None, assignment.getGroupValue())
assignment.open()
self.portal.portal_workflow.doActionFor(person, 'create_user_action',
......@@ -1182,6 +1183,9 @@ class TestERP5Base(ERP5TypeTestCase):
# for his assignment group
self.assertEqual('group/nexedi/storever',
self.portal.portal_preferences.getPreferredSectionCategory())
# and assignment function
self.assertEqual('site/distibution/tokyo',
self.portal.portal_preferences.getPreferredNodeCategory())
def test_default_address_acquisition(self):
# more complete version of test_04_SubordinationAndAddress
......
......@@ -77,7 +77,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Resource_viewMovementHistory</string> </value>
<value> <string>string:${object_url}/Resource_viewMovementHistoryDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -16,13 +16,13 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
<string>action_type/object_jio_report</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
<value> <string>object_jio_report</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
......@@ -71,7 +71,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Resource_viewInventory?reset=1</string> </value>
<value> <string>string:${object_url}/Resource_viewInventoryDialog?reset=1</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -77,7 +77,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Resource_viewMovementHistory</string> </value>
<value> <string>string:${object_url}/Resource_viewMovementHistoryDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -16,13 +16,13 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
<string>action_type/object_jio_report</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
<value> <string>object_jio_report</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
......@@ -71,7 +71,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Resource_viewInventory?reset=1</string> </value>
<value> <string>string:${object_url}/Resource_viewInventoryDialog?reset=1</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -229,6 +229,10 @@
<string>my_base_price_per_slice</string>
<string>my_report_mode_listbox_variation_category_item_list</string>
<string>my_view_mode_read_only_title</string>
<string>my_dialog_mode_node_category</string>
<string>my_dialog_mode_section_category</string>
<string>my_dialog_mode_quantity_unit</string>
<string>my_dialog_mode_metric_type</string>
</list>
</value>
</item>
......
<?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>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_dialog_mode_metric_type</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>
<item>
<key> <string>title</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_dialog_mode_category</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>Metric Type</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>items</string>
<string>required</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_dialog_mode_node_category</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>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</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_list_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </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>Site</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: getattr(here.portal_categories.site, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\', base=True)</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_dialog_mode_quantity_unit</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>
<item>
<key> <string>title</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_dialog_mode_category</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>Quantity Unit</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_dialog_mode_section_category</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_dialog_mode_section_category</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>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
from Products.PythonScripts.standard import Object
portal = context.getPortalObject()
inventory_list_kw = {
'selection_domain': selection_domain,
'group_by_section': False,
'group_by_node': True,
'group_by_variation': True,
'resource_uid': context.getUid(),
}
if node_category:
inventory_list_kw['node_category'] = node_category
if section_category:
inventory_list_kw['section_category'] = section_category
if quantity_unit:
inventory_list_kw['quantity_unit'] = quantity_unit
if metric_type:
inventory_list_kw['metric_type'] = metric_type
def makeResultLine(brain):
"""Rewap a brain to propagate inventory kw in getCurrentInventory and getAvailableInventory
"""
inventory_kw = {
'node_uid': brain.node_uid,
'resource_uid': brain.resource_uid,
'variation_text': brain.variation_text,
}
if section_category:
inventory_kw['section_category'] = section_category
if quantity_unit:
inventory_kw['quantity_unit'] = quantity_unit
if metric_type:
inventory_kw['metric_type'] = metric_type
def getCurrentInventory():
return portal.portal_simulation.getCurrentInventory(**inventory_kw)
def getAvailableInventory():
return portal.portal_simulation.getAvailableInventory(**inventory_kw)
return Object(
uid='new_',
node_title=brain.node_title,
inventory=getattr(brain, 'converted_quantity', brain.inventory),
getCurrentInventory=getCurrentInventory,
getAvailableInventory=getAvailableInventory,
getVariationCategoryItemList=brain.getVariationCategoryItemList,
variation_category_item_list=[x[0] for x in brain.getObject().getVariationCategoryItemList()],
getListItemUrl=brain.getListItemUrl,
getListItemParamDict=brain.getListItemParamDict,
getListItemUrlDict=brain.getListItemUrlDict,
)
return [
makeResultLine(brain)
for brain in portal.portal_simulation.getFutureInventoryList(
**inventory_list_kw)
]
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>_params</string> </key>
<value> <string>node_category=None, section_category=None, quantity_unit=None, metric_type=None, selection_domain=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Resource_getFutureInventoryList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
from Products.PythonScripts.standard import Object
inventory_kw = {
'selection_domain': selection_domain
}
if node_category:
inventory_kw['node_category'] = node_category
if section_category:
inventory_kw['section_category'] = section_category
if quantity_unit:
inventory_kw['quantity_unit'] = quantity_unit
if metric_type:
inventory_kw['metric_type'] = metric_type
obj = Object(uid="new_")
obj["node_title"] = ""
obj["section_title"] = ""
obj["variation_text"] = ""
obj["getCurrentInventory"] = context.getCurrentInventory(selection_domain=kw.get('selection_domain', None))
obj["getAvailableInventory"] = context.getAvailableInventory(selection_domain=kw.get('selection_domain', None))
obj["inventory"] = context.getFutureInventory(selection_domain=kw.get('selection_domain', None))
obj["getCurrentInventory"] = context.getCurrentInventory(**inventory_kw)
obj["getAvailableInventory"] = context.getAvailableInventory(**inventory_kw)
obj["inventory"] = context.getFutureInventory(**inventory_kw)
return [obj,]
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
<value> <string>node_category=None, section_category=None, quantity_unit=None, metric_type=None, selection_domain=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -35,8 +35,22 @@
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Resource_viewInventoryDialog</string> </value>
</item>
<item>
<key> <string>action_title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
......@@ -72,9 +86,7 @@
<item>
<key> <string>center</string> </key>
<value>
<list>
<string>my_title</string>
</list>
<list/>
</value>
</item>
<item>
......@@ -91,13 +103,20 @@
<item>
<key> <string>left</string> </key>
<value>
<list/>
<list>
<string>my_title</string>
<string>your_section_category</string>
<string>your_node_category</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
<list>
<string>your_metric_type</string>
<string>your_quantity_unit</string>
</list>
</value>
</item>
</dictionary>
......@@ -105,7 +124,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Resource_viewInventory</string> </value>
<value> <string>Resource_viewInventoryDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
......@@ -113,11 +132,11 @@
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Resource_viewInventory</string> </value>
<value> <string>Resource_viewInventoryDialog</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
<value> <string>form_dialog</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
......@@ -139,6 +158,10 @@
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -351,9 +351,7 @@
</item>
<item>
<key> <string>count_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
......@@ -363,6 +361,10 @@
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default_display_style</string> </key>
<value> <string>table</string> </value>
</item>
<item>
<key> <string>default_params</string> </key>
<value>
......@@ -373,20 +375,21 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_style_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value>
<list>
<tuple>
<string>site</string>
<string>Site</string>
</tuple>
</list>
<list/>
</value>
</item>
<item>
<key> <string>domain_tree</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
......@@ -429,22 +432,30 @@
<list/>
</value>
</item>
<item>
<key> <string>global_search_column</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>hide_rows_on_no_search_criterion</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>lines</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>list_action</string> </key>
<value> <string>Resource_viewInventory</string> </value>
<value> <string>Resource_viewInventoryDialog</string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
......@@ -453,6 +464,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_navigation_template</string> </key>
<value> <string>ListBox_viewSliderPageNavigationRenderer</string> </value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
......@@ -473,6 +488,10 @@
<key> <string>report_tree</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>row_css_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>search</string> </key>
<value> <int>0</int> </value>
......@@ -512,13 +531,25 @@
<item>
<key> <string>stat_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>style_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Stock per Variation</string> </value>
</item>
<item>
<key> <string>untranslatable_columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>url_columns</string> </key>
<value>
......@@ -533,19 +564,13 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:[(\'group_by_section\', 0), (\'group_by_node\', 1), (\'group_by_variation\', 1)]</string> </value>
<value> <string>python:[(\'node_category\', request.get(\'node_category\', preferences.getPreferredNodeCategory()))]</string> </value>
</item>
</dictionary>
</pickle>
......@@ -558,25 +583,12 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>getFutureInventoryCount</string> </value>
<value> <string>Resource_getFutureInventoryList</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>getFutureInventoryList</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
......
......@@ -134,9 +134,7 @@
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -297,17 +295,4 @@
</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: [x[0] for x in cell.getVariationCategoryItemList()]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_metric_type</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>
</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>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_dialog_mode_metric_type</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPDMFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>
<string>required</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_node_category</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_dialog_mode_node_category</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPDMFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </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>preferences/getPreferredNodeCategory</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_quantity_unit</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>
</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>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_dialog_mode_quantity_unit</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPDMFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>required</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_section_category</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_dialog_mode_section_category</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPDMFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </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>
......@@ -35,8 +35,22 @@
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Resource_viewInventoryDialog</string> </value>
</item>
<item>
<key> <string>action_title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
......@@ -104,7 +118,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Resource_viewMovementHistory</string> </value>
<value> <string>Resource_viewMovementHistoryDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
......@@ -112,11 +126,11 @@
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Resource_viewMovementHistory</string> </value>
<value> <string>Resource_viewMovementHistoryDialog</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
<value> <string>form_dialog</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
......@@ -128,7 +142,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Resource Inventory</string> </value>
<value> <string>Movement History</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
......@@ -138,6 +152,10 @@
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -436,7 +436,7 @@
</item>
<item>
<key> <string>list_action</string> </key>
<value> <string>Resource_viewInventory</string> </value>
<value> <string>Resource_viewInventoryDialog</string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
......
......@@ -14,32 +14,26 @@ Test stock browser for components portal type
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_destination_node_title';
index python: 1;
current_inventory python: 1.0;
available_inventory python: 1.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
</tal:block>
<!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title';
index python: 2;
current_inventory python: -1.0;
available_inventory python: -1.0;
future_inventory python: -1.0;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
node_title string: erp5_pdm_ui_test_source_node_title;
inventory_list_count python: 1;
current_inventory python: -1;
available_inventory python: -1;
future_inventory python: -1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<!-- Check for total value -->
<tal:block tal:define="current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 0.0;
<!-- Check destination -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
node_title string: erp5_pdm_ui_test_destination_node_title;
inventory_list_count python: 1;
current_inventory python: 1;
available_inventory python: 1;
future_inventory python: 1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_total_for_inventory" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
......@@ -76,7 +70,7 @@ Test stock browser for components portal type
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/go_to_stock_view" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>assertElementPresent</td>
......
......@@ -13,38 +13,32 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_destination_node_title';
index python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
</tal:block>
<!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title';
index python: 2;
current_inventory python: 0.0;
available_inventory python: -1.0;
future_inventory python: -1.0;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
node_title string: erp5_pdm_ui_test_source_node_title;
inventory_list_count python: 1;
current_inventory python: 0;
available_inventory python: -1;
future_inventory python: -1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<!-- Check for total value -->
<tal:block tal:define="current_inventory python: 0.0;
available_inventory python: -1.0;
future_inventory python: 0.0;
<!-- Check destination -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
node_title string: erp5_pdm_ui_test_destination_node_title;
inventory_list_count python: 1;
current_inventory python: 0;
available_inventory python: 0;
future_inventory python: 1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_total_for_inventory" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros -->
<!-- TODO: If possible, move to macros -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
......@@ -75,7 +69,7 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/go_to_stock_view" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>assertElementPresent</td>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testConversionMetricType</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html>
<head><title>Test stock browser for metric type conversions</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="4">
Test stock browser for metric type conversions
</td></tr>
</thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=stopped">
<!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check source -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
metric_type string: Unit/Abstract Unit;
node_title string: erp5_pdm_ui_test_source_node_title;
inventory_list_count python: 1;
current_inventory python: -3;
available_inventory python: -3;
future_inventory python: -3;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<!-- Check destination -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
metric_type string: Unit/Abstract Unit;
node_title string: erp5_pdm_ui_test_destination_node_title;
inventory_list_count python: 1;
current_inventory python: 3;
available_inventory python: 3;
future_inventory python: 3;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to macros -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '1 Records'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[3]</td>
<td>erp5_pdm_ui_test_destination_node_title</td>
</tr>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[5]/a</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
<!-- vim: syntax=html foldmethod=marker -->
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testConversionQuantityUnit</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html>
<head><title>Test stock browser for quantity unit conversions</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="4">
Test stock browser for quantity unit conversions
</td></tr>
</thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=stopped">
<!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check source -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
quantity_unit string: Mass/Kilogram;
node_title string: erp5_pdm_ui_test_source_node_title;
inventory_list_count python: 1;
current_inventory string: -1 500;
available_inventory string: -1 500;
future_inventory string: -1 500;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
quantity_unit string: Mass/Ton;
node_title string: erp5_pdm_ui_test_source_node_title;
inventory_list_count python: 1;
current_inventory string: -1.5;
available_inventory string: -1.5;
future_inventory string: -1.5;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<!-- Check destination -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
quantity_unit string: Mass/Kilogram;
node_title string: erp5_pdm_ui_test_destination_node_title;
inventory_list_count python: 1;
current_inventory string: 1 500;
available_inventory string: 1 500;
future_inventory string: 1 500;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
quantity_unit string: Mass/Ton;
node_title string: erp5_pdm_ui_test_destination_node_title;
inventory_list_count python: 1;
current_inventory string: 1.5;
available_inventory string: 1.5;
future_inventory string: 1.5;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to macros -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '1 Records'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[3]</td>
<td>erp5_pdm_ui_test_destination_node_title</td>
</tr>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[5]/a</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
<!-- vim: syntax=html foldmethod=marker -->
\ No newline at end of file
<html>
<head><title>Test stock browser for confirmed state</title></head>
<head><title>Test stock browser for delivered state</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state
Test stock browser for delivered state
</td></tr>
</thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=delivered">
......@@ -13,38 +13,32 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_destination_node_title';
index python: 1;
current_inventory python: 1.0;
available_inventory python: 1.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
</tal:block>
<!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title';
index python: 2;
current_inventory python: -1.0;
available_inventory python: -1.0;
future_inventory python: -1.0;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
node_title string: erp5_pdm_ui_test_source_node_title;
inventory_list_count python: 1;
current_inventory string: -1;
available_inventory string: -1;
future_inventory string: -1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<!-- Check for total value -->
<tal:block tal:define="current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 0.0;
<!-- Check destination -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
node_title string: erp5_pdm_ui_test_destination_node_title;
inventory_list_count python: 1;
current_inventory string: 1;
available_inventory string: 1;
future_inventory string: 1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_total_for_inventory" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros -->
<!-- TODO: If possible, move to macros -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
......@@ -76,7 +70,7 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/go_to_stock_view" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>assertElementPresent</td>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testNodeCategoryPreference</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html>
<head><title>Test stock browser with node category preference</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="4">
Test stock browser with node category preference
</td></tr>
</thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=stopped;
set_node_category_preference python: True">
<!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
node_title string: erp5_pdm_ui_test_destination_node_title;
inventory_list_count python: 1;
current_inventory python: 1;
available_inventory python: 1;
future_inventory python: 1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to macros -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '1 Records'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[3]</td>
<td>erp5_pdm_ui_test_destination_node_title</td>
</tr>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[5]/a</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
<!-- vim: syntax=html foldmethod=marker -->
\ No newline at end of file
<html>
<head><title>Test stock browser for confirmed state</title></head>
<head><title>Test stock browser for ordered state</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state
Test stock browser for ordered state
</td></tr>
</thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=ordered">
......@@ -13,38 +13,32 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_destination_node_title';
index python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
</tal:block>
<!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title';
index python: 2;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: -1.0;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
node_title string: erp5_pdm_ui_test_source_node_title;
inventory_list_count python: 1;
current_inventory python: 0;
available_inventory python: 0;
future_inventory python: -1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<!-- Check for total value -->
<tal:block tal:define="current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 0.0;
<!-- Check destination -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
node_title string: erp5_pdm_ui_test_destination_node_title;
inventory_list_count python: 1;
current_inventory python: 0;
available_inventory python: 0;
future_inventory python: 1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_total_for_inventory" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros -->
<!-- TODO: If possible, move to macros -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
......@@ -75,7 +69,7 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/go_to_stock_view" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>assertElementPresent</td>
......
<html>
<head><title>Test stock browser for confirmed state</title></head>
<head><title>Test stock browser for planned state</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state
Test stock browser for planned state
</td></tr>
</thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=planned">
......@@ -13,38 +13,32 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_destination_node_title';
index python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
</tal:block>
<!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title';
index python: 2;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: -1.0;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
node_title string: erp5_pdm_ui_test_source_node_title;
inventory_list_count python: 1;
current_inventory python: 0;
available_inventory python: 0;
future_inventory python: -1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<!-- Check for total value -->
<tal:block tal:define="current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 0.0;
<!-- Check destination -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
node_title string: erp5_pdm_ui_test_destination_node_title;
inventory_list_count python: 1;
current_inventory python: 0;
available_inventory python: 0;
future_inventory python: 1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_total_for_inventory" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros -->
<!-- TODO: If possible, move to macros -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
......@@ -76,7 +70,7 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/go_to_stock_view" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>assertElementPresent</td>
......
<html>
<head><title>Test stock browser for confirmed state</title></head>
<head><title>Test stock browser for ready state</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state
Test stock browser for ready state
</td></tr>
</thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=ready">
......@@ -13,38 +13,32 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_destination_node_title';
index python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
</tal:block>
<!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title';
index python: 2;
current_inventory python: 0.0;
available_inventory python: -1.0;
future_inventory python: -1.0;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
node_title string: erp5_pdm_ui_test_source_node_title;
inventory_list_count python: 1;
current_inventory python: 0;
available_inventory python: -1;
future_inventory python: -1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<!-- Check for total value -->
<tal:block tal:define="current_inventory python: 0.0;
available_inventory python: -1.0;
future_inventory python: 0.0;
<!-- Check destination -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
node_title string: erp5_pdm_ui_test_destination_node_title;
inventory_list_count python: 1;
current_inventory python: 0;
available_inventory python: 0;
future_inventory python: 1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_total_for_inventory" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros -->
<!-- TODO: If possible, move to macros -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
......@@ -75,7 +69,7 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/go_to_stock_view" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>assertElementPresent</td>
......
<html>
<head><title>Test stock browser for confirmed state</title></head>
<head><title>Test stock browser for started state</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state
Test stock browser for started state
</td></tr>
</thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=started">
......@@ -13,38 +13,32 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_destination_node_title';
index python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
</tal:block>
<!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title';
index python: 2;
current_inventory python: -1.0;
available_inventory python: -1.0;
future_inventory python: -1.0;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
node_title string: erp5_pdm_ui_test_source_node_title;
inventory_list_count python: 1;
current_inventory python: -1;
available_inventory python: -1;
future_inventory python: -1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<!-- Check for total value -->
<tal:block tal:define="current_inventory python: -1.0;
available_inventory python: -1.0;
future_inventory python: 0.0;
<!-- Check destination -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
node_title string: erp5_pdm_ui_test_destination_node_title;
inventory_list_count python: 1;
current_inventory python: 0;
available_inventory python: 0;
future_inventory python: 1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_total_for_inventory" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros -->
<!-- TODO: If possible, move to macros -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
......@@ -75,7 +69,7 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/go_to_stock_view" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>assertElementPresent</td>
......
<html>
<head><title>Test stock browser for confirmed state</title></head>
<head><title>Test stock browser for stopped state</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state
Test stock browser for stopped state
</td></tr>
</thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=stopped">
......@@ -13,38 +13,32 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Check destination -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_destination_node_title';
index python: 1;
current_inventory python: 1.0;
available_inventory python: 1.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
</tal:block>
<!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title';
index python: 2;
current_inventory python: -1.0;
available_inventory python: -1.0;
future_inventory python: -1.0;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
node_title string: erp5_pdm_ui_test_source_node_title;
inventory_list_count python: 1;
current_inventory python: -1;
available_inventory python: -1;
future_inventory python: -1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<!-- Check for total value -->
<tal:block tal:define="current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 0.0;
<!-- Check destination -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
node_title string: erp5_pdm_ui_test_destination_node_title;
inventory_list_count python: 1;
current_inventory python: 1;
available_inventory python: 1;
future_inventory python: 1;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_total_for_inventory" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowserForRenderjsUi/macros/check_inventory" />
</tal:block>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros -->
<!-- TODO: If possible, move to macros -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</td>
......@@ -75,7 +69,7 @@ Test stock browser for confirmed state
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/go_to_stock_view" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>assertElementPresent</td>
......
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block metal:define-macro="init"
tal:define="resource_relative_url resource_relative_url | string:product_module/erp5_pdm_ui_test_product">
tal:define="resource_relative_url resource_relative_url | string:product_module/erp5_pdm_ui_test_product;
set_node_category_preference set_node_category_preference | python: False">
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
......@@ -27,7 +28,8 @@
<tr>
<td>open</td>
<td>${base_url}/PdmZuite_reset</td>
<td tal:condition="not: set_node_category_preference">${base_url}/PdmZuite_reset</td>
<td tal:condition="set_node_category_preference">${base_url}/PdmZuite_reset?set_node_category_preference:bool=True</td>
<td></td>
</tr>
<tr>
......@@ -67,9 +69,9 @@
<tal:block metal:define-macro="go_to_stock_view">
<tr>
<td colspan="3"><b>Go to Stock view</b></td>
<td colspan="3"><b>Go to Stock report</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Views'}">
<tal:block tal:define="click_configuration python: {'text': 'Export'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......@@ -103,21 +105,6 @@
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a/@href</td>
<td>regexp:.*view_movement_history.*</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[2]/td[1]/a</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[2]/td[1]/a/@href</td>
<td>regexp:.*push_history.*</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[2]/td[1]/a/@href</td>
<td>regexp:.*view_movement_history.*</td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
......
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block metal:define-macro="init" tal:define="base_url python: '/' + here.getPortalObject().getId()">
<!--
Macro to check inventory displayed in stock browser.
This selects the node category and check each of the current, available and future
inventory match. Then for each value, it will click to "drill down" and check that the
movement history list show the expected number of lines.
TODO: this is not yet the case for renderjs version of this test, the drill down is
still only covered in erp5_xhtml_style
Required parameters:
- node_category: the label of the node category to select in the dialog
- node_title: the label of the node organisation expected in the listbox
- inventory_list_count: the number of "invenvory list" lines expected in the first dialog.
- current_inventory: the quantity for the current inventory
- available_inventory: the quantity for the available inventory
- future_inventory: the quantity for the future inventory
Optional parameters:
- select_node_category: if True (the default) the node category will be selected
- quantity_unit: the label of the quantity unit to select in dialog, to enable
quantity unit conversion
- metric_type: the label of the metric type to select in dialog, to enable
metric type conversion
-->
<tal:block
metal:define-macro="check_inventory"
tal:define="base_url python: '/' + here.getPortalObject().getId();
select_node_category select_node_category | python: True;
quantity_unit quantity_unit | python: False;
metric_type metric_type | python: False;">
<tal:block tal:condition="select_node_category">
<tr>
<td colspan="3"><b>Select node category in dialog</b></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="field_your_node_category"]</td>
<td tal:content='node_category'></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
</tal:block>
<tal:block tal:condition="not: select_node_category">
<tr>
<td>assertSelected</td>
<td>//select[@name="field_your_node_category"]</td>
<td tal:content='node_category'></td>
</tr>
</tal:block>
<tal:block tal:condition="quantity_unit">
<tr>
<td colspan="3"><b>Select quantity unit in dialog</b></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="field_your_quantity_unit"]</td>
<td tal:content='quantity_unit'></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
</tal:block>
<tal:block tal:condition="metric_type">
<tr>
<td colspan="3"><b>Select metric type in dialog</b></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="field_your_metric_type"]</td>
<td tal:content='metric_type'></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
</tal:block>
<!-- Check inventory total records -->
<tal:block tal:define="pagination_configuration python: {'header': '(2)', 'footer': '2 Records'}">
<tal:block tal:define="pagination_configuration python: {'header': '(%s)' % inventory_list_count, 'footer': '%s Records' % inventory_list_count}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<!-- Check the correct title -->
<!-- Check node title -->
<tr>
<td>assertText</td>
<td tal:content="python: '//div[@data-gadget-scope=\'field_listbox\']//table/tbody/tr[%s]/td[1]' % index">inventory value</td>
<td tal:content="python: title"></td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]</td>
<td tal:content="node_title"></td>
</tr>
<!-- Check that inventory and movement list are consistent while in loop -->
......@@ -21,19 +100,10 @@
]">
<tr>
<td>assertText</td>
<td tal:content="python: '//div[@data-gadget-scope=\'field_listbox\']//table/tbody/tr[%s]/td[%s]' % (index, inventory_tuple[1])">inventory value</td>
<td tal:content="python: int(inventory_tuple[0])"></td>
</tr>
</tal:block>
<tr>
<td colspan="3"><p></p></td>
<td tal:content="python: '//div[@data-gadget-scope=\'field_listbox\']//table/tbody/tr[1]/td[%s]' % (inventory_tuple[1])">inventory value</td>
<td tal:content="python: inventory_tuple[0]"></td>
</tr>
</tal:block>
<tal:block metal:define-macro="check_total_for_inventory">
<tr>
<td colspan="3"><b>Total for inventories</b></td>
</tr>
......@@ -45,20 +115,23 @@
<tr>
<td>assertText</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tfoot/tr[1]/td[3]</td>
<td tal:content="python: int(current_inventory)"></td>
<td tal:content="python: current_inventory"></td>
</tr>
<tr>
<td>assertText</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tfoot/tr[1]/td[4]</td>
<td tal:content="python: int(available_inventory)"></td>
<td tal:content="python: available_inventory"></td>
</tr>
<tr>
<td>assertText</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tfoot/tr[1]/td[5]</td>
<td tal:content="python: int(future_inventory)"></td>
<td tal:content="python: future_inventory"></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
</tal:block>
\ No newline at end of file
......@@ -10,27 +10,27 @@ Test stock browser for confirmed state
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=confirmed">
<!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} -->
<!-- Check source -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_source_site';
movement_count python: 1;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
inventory_list_count python: 1;
current_inventory python: 0.0;
available_inventory python: -1.0;
future_inventory python: -1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
<!-- Check destination -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_destination_site';
movement_count python: 1;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
inventory_list_count python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
</tbody></table>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>conversion_metric_type</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html>
<head><title>Test stock browser for metric type conversion</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="4">
Test stock browser for metric type conversion
</td></tr>
</thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=delivered">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- Check source -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
metric_type string: Unit/Abstract Unit;
inventory_list_count python: 1;
current_inventory python: -3.0;
available_inventory python: -3.0;
future_inventory python: -3.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
<!-- Check destination -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
metric_type string: Unit/Abstract Unit;
inventory_list_count python: 1;
current_inventory python: 3.0;
available_inventory python: 3.0;
future_inventory python: 3.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>conversion_quantity_unit</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html>
<head><title>Test stock browser for quantity unit conversion</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="4">
Test stock browser for quantity unit conversion
</td></tr>
</thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=delivered">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- Check source -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
quantity_unit string: Mass/Kilogram;
inventory_list_count python: 1;
current_inventory string: -1 500.0;
available_inventory string: -1 500.0;
future_inventory string: -1 500.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
quantity_unit string: Mass/Ton;
inventory_list_count python: 1;
current_inventory python: -1.5;
available_inventory python: -1.5;
future_inventory python: -1.5;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
<!-- Check destination -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
quantity_unit string: Mass/Kilogram;
inventory_list_count python: 1;
current_inventory string: 1 500.0;
available_inventory string: 1 500.0;
future_inventory string: 1 500.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
quantity_unit string: Mass/Ton;
inventory_list_count python: 1;
current_inventory python: 1.5;
available_inventory python: 1.5;
future_inventory python: 1.5;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -10,27 +10,27 @@ Test stock browser for delivered state
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=delivered">
<!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} -->
<!-- Check source -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_source_site';
movement_count python: 1;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
inventory_list_count python: 1;
current_inventory python: -1.0;
available_inventory python: -1.0;
future_inventory python: -1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
<!-- Check destination -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_destination_site';
movement_count python: 1;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
inventory_list_count python: 1;
current_inventory python: 1.0;
available_inventory python: 1.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
</tbody></table>
......
......@@ -10,19 +10,19 @@ Test stock browser for draft state
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=draft">
<!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} -->
<!-- Check source -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_source_site';
movement_count python: 0;">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
inventory_list_count python: 0;">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
<!-- Check destination -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_destination_site';
movement_count python: 0;">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
inventory_list_count python: 0;">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>node_category_preference</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html>
<head><title>Test stock browser with node category preference</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="4">
Test stock browser with node category preference
</td></tr>
</thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=stopped;
set_node_category_preference python: True">
<!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} -->
<!-- Check destination -->
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
select_node_category python:False;
inventory_list_count python: 1;
current_inventory python: 1.0;
available_inventory python: 1.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
</tbody></table>
</body>
</html>
<!-- vim: syntax=html foldmethod=marker -->
\ No newline at end of file
......@@ -10,27 +10,27 @@ Test stock browser for ordered state
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=ordered">
<!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} -->
<!-- Check source -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_source_site';
movement_count python: 1;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
inventory_list_count python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: -1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
<!-- Check destination -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_destination_site';
movement_count python: 1;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
inventory_list_count python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
</tbody></table>
......
......@@ -10,27 +10,27 @@ Test stock browser for planned state
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=planned">
<!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} -->
<!-- Check source -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_source_site';
movement_count python: 1;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
inventory_list_count python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: -1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
<!-- Check destination -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_destination_site';
movement_count python: 1;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
inventory_list_count python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
</tbody></table>
......
......@@ -10,27 +10,27 @@ Test stock browser for ready state
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=ready">
<!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} -->
<!-- Check source -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_source_site';
movement_count python: 1;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
inventory_list_count python: 1;
current_inventory python: 0.0;
available_inventory python: -1.0;
future_inventory python: -1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
<!-- Check destination -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_destination_site';
movement_count python: 1;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
inventory_list_count python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
</tbody></table>
......
......@@ -10,27 +10,27 @@ Test stock browser for started state
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=started">
<!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} -->
<!-- Check source -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_source_site';
movement_count python: 1;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
inventory_list_count python: 1;
current_inventory python: -1.0;
available_inventory python: -1.0;
future_inventory python: -1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
<!-- Check destination -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_destination_site';
movement_count python: 1;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
inventory_list_count python: 1;
current_inventory python: 0.0;
available_inventory python: 0.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
</tbody></table>
......
......@@ -10,27 +10,27 @@ Test stock browser for stopped state
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=stopped">
<!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} -->
<!-- Check source -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_source_site';
movement_count python: 1;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
inventory_list_count python: 1;
current_inventory python: -1.0;
available_inventory python: -1.0;
future_inventory python: -1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
<!-- Check destination -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_destination_site';
movement_count python: 1;
<tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
inventory_list_count python: 1;
current_inventory python: 1.0;
available_inventory python: 1.0;
future_inventory python: 1.0;
">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block>
</tbody></table>
......
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block metal:define-macro="init">
<tal:block metal:define-macro="init"
tal:define="set_node_category_preference set_node_category_preference | python: False">
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>setTimeout</td>
......@@ -31,7 +32,8 @@
<tr>
<td>open</td>
<td>${base_url}/PdmZuite_reset</td>
<td tal:condition="not: set_node_category_preference">${base_url}/PdmZuite_reset</td>
<td tal:condition="set_node_category_preference">${base_url}/PdmZuite_reset?set_node_category_preference:bool=True</td>
<td></td>
</tr>
<tr>
......@@ -62,15 +64,11 @@
</tr>
<tr>
<td>open</td>
<td>${base_url}/product_module/erp5_pdm_ui_test_product/Resource_viewInventory</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@class="listbox-tree-domain-tree-mode"]</td>
<td>${base_url}/product_module/erp5_pdm_ui_test_product/</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="toggleSaleSupplyLineBasePricePerSlice">
<tr>
<td>click</td>
......
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block metal:define-macro="init" tal:define="base_url python: '/' + here.getPortalObject().getId()">
<!-- Click on + link -->
<tal:block metal:define-macro="init">
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" />
<tr>
<td>clickAndWait</td>
<td tal:content='string://button[@value="site/${link_title}.0"]'>link=node</td>
<td>//button[@name="Base_doReport:method"]</td>
<td></td>
</tr>
</tal:block>
<!-- Internal macro to apply filter in dialog. -->
<tal:block metal:define-macro="_set_dialog_parameters">
<tal:block tal:condition="select_node_category">
<!-- Select node category in dialog -->
<tr>
<td>select</td>
<td>//select[@name="field_your_node_category"]</td>
<td tal:content='node_category'></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>Base_callDialogMethod:method</td>
<td></td>
</tr>
</tal:block>
<tal:block tal:condition="not: select_node_category">
<tr>
<td>assertSelected</td>
<td>//select[@name="field_your_node_category"]</td>
<td tal:content='node_category'></td>
</tr>
</tal:block>
<tal:block tal:condition="quantity_unit">
<!-- Select quantity unit in dialog -->
<tr>
<td>select</td>
<td>//select[@name="field_your_quantity_unit"]</td>
<td tal:content='quantity_unit'></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>Base_callDialogMethod:method</td>
<td></td>
</tr>
</tal:block>
<tal:block tal:condition="metric_type">
<!-- Select metric type in dialog -->
<tr>
<td>select</td>
<td>//select[@name="field_your_metric_type"]</td>
<td tal:content='metric_type'></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>Base_callDialogMethod:method</td>
<td></td>
</tr>
</tal:block>
</tal:block>
<!--
Macro to check inventory displayed in stock browser.
This selects the node category and check each of the current, available and future
inventory match. Then for each value, it will click to "drill down" and check that the
movement history list show the expected number of lines.
Required parameters:
- node_category: the label of the node category to select in the dialog
- inventory_list_count: the number of "invenvory list" lines expected in the first dialog.
- current_inventory: the quantity for the current inventory
- available_inventory: the quantity for the available inventory
- future_inventory: the quantity for the future inventory
Optional parameters:
- select_node_category: if True (the default) the node category will be selected
- quantity_unit: the label of the quantity unit to select in dialog, to enable
quantity unit conversion
- metric_type: the label of the metric type to select in dialog, to enable
metric type conversion
-->
<tal:block
metal:define-macro="check_inventory"
tal:define="base_url python: '/' + here.getPortalObject().getId();
select_node_category select_node_category | python: True;
quantity_unit quantity_unit | python: False;
metric_type metric_type | python: False;">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/_set_dialog_parameters" />
<!-- Check inventory -->
<tr>
<td>verifyText</td>
<td>//span[@class="listbox-current-page-total-number"]</td>
<td tal:content="python: '%s records' % movement_count">number of record(s)</td>
<td tal:content="python: '%s records' % inventory_list_count">number of record(s)</td>
</tr>
<tal:block tal:condition="python: movement_count != 0">
<tal:block tal:condition="python: inventory_list_count != 0">
<!-- Check that inventory and movement list are consistent -->
<tal:block tal:repeat="inventory_tuple python: [(current_inventory, 3),
......@@ -39,17 +123,29 @@
<td tal:content="python: '//tr[@class=\'listbox-data-line-0 DataA\']/td[%s]/a[1]' % inventory_tuple[1]">link</td>
<td></td>
</tr>
<tr>
<!-- we expect to have one movement, except if the inventory was 0, then we should have 0 movements. -->
<tr tal:condition="python: inventory_tuple[0]">
<td>verifyText</td>
<td>//span[@class="listbox-current-page-total-number"]</td>
<td>1 records</td>
</tr>
<tr tal:condition="python: not inventory_tuple[0]">
<td>verifyText</td>
<td>//span[@class="listbox-current-page-total-number"]</td>
<td tal:content="python: '%s records' % int(abs(inventory_tuple[0]))">number of movement(s)</td>
<td>0 records</td>
</tr>
<!-- Go back to inventory view -->
<tr>
<td>clickAndWait</td>
<td>//a[@class="listbox_title"]</td>
<td></td>
</tr>
<!-- apply dialog parameters again -->
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/_set_dialog_parameters" />
</tal:block>
</tal:block>
</tal:block>
......
......@@ -11,30 +11,120 @@ source_site_title = "erp5_pdm_ui_test_source_site_title"
destination_site_id = "erp5_pdm_ui_test_destination_site"
destination_site_title = "erp5_pdm_ui_test_destination_site_title"
quantity_unit_category = portal.portal_categories.quantity_unit
# validate rules
for rule in portal.portal_rules.objectValues():
if rule.getValidationState() != 'validated':
rule.validate()
# Create resources
# create categories
quantity_unit_category = portal.portal_categories.quantity_unit
if getattr(quantity_unit_category, "unit", None) is None:
quantity_unit_category.newContent(
portal_type="Category",
id="unit"
id="unit",
title="Unit",
)
if getattr(quantity_unit_category.unit, "piece", None) is None:
quantity_unit_category.unit.newContent(
portal_type="Category",
id="piece",
title="Piece",
)
if getattr(quantity_unit_category, "mass", None) is None:
quantity_unit_category.newContent(
portal_type="Category",
id="mass",
title="Mass",
)
if getattr(quantity_unit_category.mass, "kilogram", None) is None:
quantity_unit_category.mass.newContent(
portal_type="Category",
id="kilogram",
title="Kilogram",
)
if getattr(quantity_unit_category.mass, "ton", None) is None:
quantity_unit_category.mass.newContent(
portal_type="Category",
id="ton",
title="Ton",
)
metric_type_category = portal.portal_categories.metric_type
if getattr(metric_type_category, "unit", None) is None:
metric_type_category.newContent(
portal_type="Category",
id="unit",
title="Unit",
)
if getattr(metric_type_category.unit, "abstract_unit", None) is None:
metric_type_category.unit.newContent(
portal_type="Category",
id="abstract_unit",
title="Abstract Unit",
)
if getattr(metric_type_category, "mass", None) is None:
metric_type_category.newContent(
portal_type="Category",
id="mass",
title="Mass",
)
# create default quantity unit conversion groups
if getattr(portal.quantity_unit_conversion_module, 'unit_conversion_group', None) is None:
portal.quantity_unit_conversion_module.newContent(
portal_type='Quantity Unit Conversion Group',
id='unit_conversion_group',
quantity_unit_value=quantity_unit_category.unit.piece,
).validate()
# XXX we need a 1=1 for unit, because there's no other unit definition in this group
if getattr(portal.quantity_unit_conversion_module.unit_conversion_group, 'unit', None) is None:
portal.quantity_unit_conversion_module.unit_conversion_group.newContent(
portal_type='Quantity Unit Conversion Definition',
id='unit',
quantity_unit_value=quantity_unit_category.unit.piece,
quantity=1,
).validate()
if getattr(portal.quantity_unit_conversion_module, 'mass_conversion_group', None) is None:
portal.quantity_unit_conversion_module.newContent(
portal_type='Quantity Unit Conversion Group',
id='mass_conversion_group',
quantity_unit_value=quantity_unit_category.mass.kilogram,
).validate()
if getattr(portal.quantity_unit_conversion_module.mass_conversion_group, 'ton', None) is None:
portal.quantity_unit_conversion_module.mass_conversion_group.newContent(
portal_type='Quantity Unit Conversion Definition',
id='ton',
quantity_unit_value=quantity_unit_category.mass.ton,
quantity=1000,
).validate()
# unit conversions are cached, so reset cache if we changed them
portal.portal_caches.clearCacheFactory(('erp5_content_long', ))
# Create resources
portal.product_module.newContent(
portal_type='Product',
id='erp5_pdm_ui_test_product',
title='erp5_pdm_ui_test_product_title',
quantity_unit='unit',
quantity_unit_value=quantity_unit_category.unit.piece,
).validate()
portal.product_module.erp5_pdm_ui_test_product.newContent(
portal_type='Measure',
metric_type_value=metric_type_category.mass,
quantity_unit_value=quantity_unit_category.mass.kilogram,
quantity=1500,
)
portal.product_module.erp5_pdm_ui_test_product.newContent(
portal_type='Measure',
metric_type_value=metric_type_category.unit.abstract_unit,
quantity_unit_value=quantity_unit_category.unit.piece,
quantity=3,
)
portal.component_module.newContent(
portal_type='Component',
id='erp5_pdm_ui_test_component',
title='erp5_pdm_ui_test_component_title',
quantity_unit='unit',
quantity_unit_value=quantity_unit_category.unit.piece,
).validate()
......@@ -48,6 +138,11 @@ for site_id, site_title in ((source_site_id, source_site_title),
title=site_title
)
# configure preference
portal.portal_preferences.getActivePreference().setPreferredNodeCategory(
'site/' + destination_site_id if set_node_category_preference else None
)
# Create nodes
for node_id, node_title, site_url in ((source_node_id, source_node_title, source_site_id),
(destination_node_id, destination_node_title, destination_site_id)):
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
<value> <string>set_node_category_preference=False</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -9,7 +9,9 @@
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
<list>
<string>default</string>
</list>
</value>
</item>
<item>
......@@ -50,6 +52,12 @@
<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>
......@@ -69,6 +77,10 @@
<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_dialog_mode_node_category</string> </value>
......@@ -87,4 +99,17 @@
</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>preferences/getPreferredNodeCategory</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -261,7 +261,7 @@ class InventoryListBrain(ComputedAttributeGetItemCompatibleMixin):
if cname_id in ('transformed_resource_title', ):
return resource.absolute_url()
# A resource is defined, so try to display the movement list
form_id = 'Resource_viewMovementHistory'
form_id = 'Resource_viewMovementHistoryDialog'
query_kw = self.getListItemParamDict(cname_id,
selection_index,
selection_name
......
......@@ -81,6 +81,7 @@
<value>
<list>
<string>my_preferred_section_category</string>
<string>my_preferred_node_category</string>
<string>my_preferred_section</string>
<string>my_preferred_user_interface_language_list</string>
<string>my_translated_preference_state_title</string>
......
<?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>items</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_node_category</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>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</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_list_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</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>Site</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: getattr(here.portal_categories.site, preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(base=1, local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -5,7 +5,7 @@
skins_tool = context.portal_skins
selection_name_dict = {}
ok_to_share_selection_form_list = ['Resource_viewInventory', 'Resource_viewMovementHistory']
ok_to_share_selection_form_list = ['Resource_viewInventoryDialog', 'Resource_viewMovementHistoryDialog']
for skin_name, skin_path_list in skins_tool.getSkinPaths():
skins_tool.changeSkin(skin_name)
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>mode</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/string</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Preferred Site category for reports.</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>preferred_node_category_property</string> </value>
</item>
<item>
<key> <string>mode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>preference</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>property_default</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>write_permission</string> </key>
<value> <string>Modify portal content</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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