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 @@ ...@@ -16,13 +16,13 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>action_type/object_view</string> <string>action_type/object_jio_report</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>category</string> </key> <key> <string>category</string> </key>
<value> <string>object_view</string> </value> <value> <string>object_jio_report</string> </value>
</item> </item>
<item> <item>
<key> <string>condition</string> </key> <key> <string>condition</string> </key>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/Resource_viewInventory</string> </value> <value> <string>string:${object_url}/Resource_viewInventoryDialog</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -23,5 +23,8 @@ for assignment in context.contentValues(portal_type='Assignment'): ...@@ -23,5 +23,8 @@ for assignment in context.contentValues(portal_type='Assignment'):
if group: if group:
preference.setPreferredSectionCategory(group) preference.setPreferredSectionCategory(group)
preference.setPreferredAccountingTransactionSectionCategory(group) preference.setPreferredAccountingTransactionSectionCategory(group)
site = assignment.getSite(base=True)
if site:
preference.setPreferredNodeCategory(site)
return preference return preference
...@@ -1153,7 +1153,8 @@ class TestERP5Base(ERP5TypeTestCase): ...@@ -1153,7 +1153,8 @@ class TestERP5Base(ERP5TypeTestCase):
def test_user_creation(self): def test_user_creation(self):
person = self.portal.person_module.newContent(portal_type='Person') person = self.portal.person_module.newContent(portal_type='Person')
assignment = person.newContent(portal_type='Assignment', assignment = person.newContent(portal_type='Assignment',
group='nexedi/storever') group='nexedi/storever',
site='distibution/tokyo')
self.assertNotEquals(None, assignment.getGroupValue()) self.assertNotEquals(None, assignment.getGroupValue())
assignment.open() assignment.open()
self.portal.portal_workflow.doActionFor(person, 'create_user_action', self.portal.portal_workflow.doActionFor(person, 'create_user_action',
...@@ -1182,6 +1183,9 @@ class TestERP5Base(ERP5TypeTestCase): ...@@ -1182,6 +1183,9 @@ class TestERP5Base(ERP5TypeTestCase):
# for his assignment group # for his assignment group
self.assertEqual('group/nexedi/storever', self.assertEqual('group/nexedi/storever',
self.portal.portal_preferences.getPreferredSectionCategory()) self.portal.portal_preferences.getPreferredSectionCategory())
# and assignment function
self.assertEqual('site/distibution/tokyo',
self.portal.portal_preferences.getPreferredNodeCategory())
def test_default_address_acquisition(self): def test_default_address_acquisition(self):
# more complete version of test_04_SubordinationAndAddress # more complete version of test_04_SubordinationAndAddress
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/Resource_viewMovementHistory</string> </value> <value> <string>string:${object_url}/Resource_viewMovementHistoryDialog</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>action_type/object_view</string> <string>action_type/object_jio_report</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>category</string> </key> <key> <string>category</string> </key>
<value> <string>object_view</string> </value> <value> <string>object_jio_report</string> </value>
</item> </item>
<item> <item>
<key> <string>condition</string> </key> <key> <string>condition</string> </key>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <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> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/Resource_viewMovementHistory</string> </value> <value> <string>string:${object_url}/Resource_viewMovementHistoryDialog</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>action_type/object_view</string> <string>action_type/object_jio_report</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>category</string> </key> <key> <string>category</string> </key>
<value> <string>object_view</string> </value> <value> <string>object_jio_report</string> </value>
</item> </item>
<item> <item>
<key> <string>condition</string> </key> <key> <string>condition</string> </key>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <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> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -229,6 +229,10 @@ ...@@ -229,6 +229,10 @@
<string>my_base_price_per_slice</string> <string>my_base_price_per_slice</string>
<string>my_report_mode_listbox_variation_category_item_list</string> <string>my_report_mode_listbox_variation_category_item_list</string>
<string>my_view_mode_read_only_title</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> </list>
</value> </value>
</item> </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 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 = Object(uid="new_")
obj["node_title"] = "" obj["node_title"] = ""
obj["section_title"] = "" obj["section_title"] = ""
obj["variation_text"] = "" obj["variation_text"] = ""
obj["getCurrentInventory"] = context.getCurrentInventory(selection_domain=kw.get('selection_domain', None)) obj["getCurrentInventory"] = context.getCurrentInventory(**inventory_kw)
obj["getAvailableInventory"] = context.getAvailableInventory(selection_domain=kw.get('selection_domain', None)) obj["getAvailableInventory"] = context.getAvailableInventory(**inventory_kw)
obj["inventory"] = context.getFutureInventory(selection_domain=kw.get('selection_domain', None)) obj["inventory"] = context.getFutureInventory(**inventory_kw)
return [obj,] return [obj,]
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <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>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
...@@ -35,8 +35,22 @@ ...@@ -35,8 +35,22 @@
</item> </item>
<item> <item>
<key> <string>action</string> </key> <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> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item> <item>
<key> <string>encoding</string> </key> <key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value> <value> <string>UTF-8</string> </value>
...@@ -72,9 +86,7 @@ ...@@ -72,9 +86,7 @@
<item> <item>
<key> <string>center</string> </key> <key> <string>center</string> </key>
<value> <value>
<list> <list/>
<string>my_title</string>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -91,13 +103,20 @@ ...@@ -91,13 +103,20 @@
<item> <item>
<key> <string>left</string> </key> <key> <string>left</string> </key>
<value> <value>
<list/> <list>
<string>my_title</string>
<string>your_section_category</string>
<string>your_node_category</string>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>right</string> </key> <key> <string>right</string> </key>
<value> <value>
<list/> <list>
<string>your_metric_type</string>
<string>your_quantity_unit</string>
</list>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -105,7 +124,7 @@ ...@@ -105,7 +124,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Resource_viewInventory</string> </value> <value> <string>Resource_viewInventoryDialog</string> </value>
</item> </item>
<item> <item>
<key> <string>method</string> </key> <key> <string>method</string> </key>
...@@ -113,11 +132,11 @@ ...@@ -113,11 +132,11 @@
</item> </item>
<item> <item>
<key> <string>name</string> </key> <key> <string>name</string> </key>
<value> <string>Resource_viewInventory</string> </value> <value> <string>Resource_viewInventoryDialog</string> </value>
</item> </item>
<item> <item>
<key> <string>pt</string> </key> <key> <string>pt</string> </key>
<value> <string>form_view</string> </value> <value> <string>form_dialog</string> </value>
</item> </item>
<item> <item>
<key> <string>row_length</string> </key> <key> <string>row_length</string> </key>
...@@ -139,6 +158,10 @@ ...@@ -139,6 +158,10 @@
<key> <string>update_action</string> </key> <key> <string>update_action</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
...@@ -351,9 +351,7 @@ ...@@ -351,9 +351,7 @@
</item> </item>
<item> <item>
<key> <string>count_method</string> </key> <key> <string>count_method</string> </key>
<value> <value> <string></string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
...@@ -363,6 +361,10 @@ ...@@ -363,6 +361,10 @@
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>default_display_style</string> </key>
<value> <string>table</string> </value>
</item>
<item> <item>
<key> <string>default_params</string> </key> <key> <string>default_params</string> </key>
<value> <value>
...@@ -373,20 +375,21 @@ ...@@ -373,20 +375,21 @@
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>display_style_list</string> </key>
<value>
<list/>
</value>
</item>
<item> <item>
<key> <string>domain_root_list</string> </key> <key> <string>domain_root_list</string> </key>
<value> <value>
<list> <list/>
<tuple>
<string>site</string>
<string>Site</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>domain_tree</string> </key> <key> <string>domain_tree</string> </key>
<value> <int>1</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
...@@ -429,22 +432,30 @@ ...@@ -429,22 +432,30 @@
<list/> <list/>
</value> </value>
</item> </item>
<item>
<key> <string>global_search_column</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item>
<key> <string>hide_rows_on_no_search_criterion</string> </key>
<value> <int>0</int> </value>
</item>
<item> <item>
<key> <string>lines</string> </key> <key> <string>lines</string> </key>
<value> <int>20</int> </value> <value> <int>20</int> </value>
</item> </item>
<item> <item>
<key> <string>list_action</string> </key> <key> <string>list_action</string> </key>
<value> <string>Resource_viewInventory</string> </value> <value> <string>Resource_viewInventoryDialog</string> </value>
</item> </item>
<item> <item>
<key> <string>list_method</string> </key> <key> <string>list_method</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -453,6 +464,10 @@ ...@@ -453,6 +464,10 @@
<list/> <list/>
</value> </value>
</item> </item>
<item>
<key> <string>page_navigation_template</string> </key>
<value> <string>ListBox_viewSliderPageNavigationRenderer</string> </value>
</item>
<item> <item>
<key> <string>page_template</string> </key> <key> <string>page_template</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -473,6 +488,10 @@ ...@@ -473,6 +488,10 @@
<key> <string>report_tree</string> </key> <key> <string>report_tree</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item>
<key> <string>row_css_method</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>search</string> </key> <key> <string>search</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
...@@ -512,13 +531,25 @@ ...@@ -512,13 +531,25 @@
<item> <item>
<key> <string>stat_method</string> </key> <key> <string>stat_method</string> </key>
<value> <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> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Stock per Variation</string> </value> <value> <string>Stock per Variation</string> </value>
</item> </item>
<item>
<key> <string>untranslatable_columns</string> </key>
<value>
<list/>
</value>
</item>
<item> <item>
<key> <string>url_columns</string> </key> <key> <string>url_columns</string> </key>
<value> <value>
...@@ -533,19 +564,13 @@ ...@@ -533,19 +564,13 @@
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <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> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -558,25 +583,12 @@ ...@@ -558,25 +583,12 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>method_name</string> </key> <key> <string>method_name</string> </key>
<value> <string>getFutureInventoryCount</string> </value> <value> <string>Resource_getFutureInventoryList</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="4" aka="AAAAAAAAAAQ="> <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> <pickle>
<global name="Method" module="Products.Formulator.MethodField"/> <global name="Method" module="Products.Formulator.MethodField"/>
</pickle> </pickle>
......
...@@ -134,9 +134,7 @@ ...@@ -134,9 +134,7 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <value> <string></string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -297,17 +295,4 @@ ...@@ -297,17 +295,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </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> </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 @@ ...@@ -35,8 +35,22 @@
</item> </item>
<item> <item>
<key> <string>action</string> </key> <key> <string>action</string> </key>
<value> <string>Resource_viewInventoryDialog</string> </value>
</item>
<item>
<key> <string>action_title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item> <item>
<key> <string>encoding</string> </key> <key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value> <value> <string>UTF-8</string> </value>
...@@ -104,7 +118,7 @@ ...@@ -104,7 +118,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Resource_viewMovementHistory</string> </value> <value> <string>Resource_viewMovementHistoryDialog</string> </value>
</item> </item>
<item> <item>
<key> <string>method</string> </key> <key> <string>method</string> </key>
...@@ -112,11 +126,11 @@ ...@@ -112,11 +126,11 @@
</item> </item>
<item> <item>
<key> <string>name</string> </key> <key> <string>name</string> </key>
<value> <string>Resource_viewMovementHistory</string> </value> <value> <string>Resource_viewMovementHistoryDialog</string> </value>
</item> </item>
<item> <item>
<key> <string>pt</string> </key> <key> <string>pt</string> </key>
<value> <string>form_view</string> </value> <value> <string>form_dialog</string> </value>
</item> </item>
<item> <item>
<key> <string>row_length</string> </key> <key> <string>row_length</string> </key>
...@@ -128,7 +142,7 @@ ...@@ -128,7 +142,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Resource Inventory</string> </value> <value> <string>Movement History</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode_mode</string> </key> <key> <string>unicode_mode</string> </key>
...@@ -138,6 +152,10 @@ ...@@ -138,6 +152,10 @@
<key> <string>update_action</string> </key> <key> <string>update_action</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
...@@ -436,7 +436,7 @@ ...@@ -436,7 +436,7 @@
</item> </item>
<item> <item>
<key> <string>list_action</string> </key> <key> <string>list_action</string> </key>
<value> <string>Resource_viewInventory</string> </value> <value> <string>Resource_viewInventoryDialog</string> </value>
</item> </item>
<item> <item>
<key> <string>list_method</string> </key> <key> <string>list_method</string> </key>
......
...@@ -14,32 +14,26 @@ Test stock browser for components portal type ...@@ -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/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <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 --> <!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
index python: 2; node_title string: erp5_pdm_ui_test_source_node_title;
current_inventory python: -1.0; inventory_list_count python: 1;
available_inventory python: -1.0; current_inventory python: -1;
future_inventory python: -1.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> </tal:block>
<!-- Check for total value --> <!-- Check destination -->
<tal:block tal:define="current_inventory python: 0.0; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
available_inventory python: 0.0; node_title string: erp5_pdm_ui_test_destination_node_title;
future_inventory python: 0.0; 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>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
...@@ -76,7 +70,7 @@ Test stock browser for components portal type ...@@ -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/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/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> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
......
...@@ -13,38 +13,32 @@ Test stock browser for confirmed state ...@@ -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/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <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 --> <!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
index python: 2; node_title string: erp5_pdm_ui_test_source_node_title;
current_inventory python: 0.0; inventory_list_count python: 1;
available_inventory python: -1.0; current_inventory python: 0;
future_inventory python: -1.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> </tal:block>
<!-- Check for total value --> <!-- Check destination -->
<tal:block tal:define="current_inventory python: 0.0; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
available_inventory python: -1.0; node_title string: erp5_pdm_ui_test_destination_node_title;
future_inventory python: 0.0; 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>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way --> <!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros --> <!-- TODO: If possible, move to macros -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</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 ...@@ -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/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/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> <tr>
<td>assertElementPresent</td> <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> <html>
<head><title>Test stock browser for confirmed state</title></head> <head><title>Test stock browser for delivered state</title></head>
<body> <body>
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="4"> <tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state Test stock browser for delivered state
</td></tr> </td></tr>
</thead> </thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=delivered"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=delivered">
...@@ -13,38 +13,32 @@ Test stock browser for confirmed state ...@@ -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/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <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 --> <!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
index python: 2; node_title string: erp5_pdm_ui_test_source_node_title;
current_inventory python: -1.0; inventory_list_count python: 1;
available_inventory python: -1.0; current_inventory string: -1;
future_inventory python: -1.0; 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> </tal:block>
<!-- Check for total value --> <!-- Check destination -->
<tal:block tal:define="current_inventory python: 0.0; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
available_inventory python: 0.0; node_title string: erp5_pdm_ui_test_destination_node_title;
future_inventory python: 0.0; 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>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way --> <!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros --> <!-- TODO: If possible, move to macros -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</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 ...@@ -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/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/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> <tr>
<td>assertElementPresent</td> <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> <html>
<head><title>Test stock browser for confirmed state</title></head> <head><title>Test stock browser for ordered state</title></head>
<body> <body>
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="4"> <tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state Test stock browser for ordered state
</td></tr> </td></tr>
</thead> </thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=ordered"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=ordered">
...@@ -13,38 +13,32 @@ Test stock browser for confirmed state ...@@ -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/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <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 --> <!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
index python: 2; node_title string: erp5_pdm_ui_test_source_node_title;
current_inventory python: 0.0; inventory_list_count python: 1;
available_inventory python: 0.0; current_inventory python: 0;
future_inventory python: -1.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> </tal:block>
<!-- Check for total value --> <!-- Check destination -->
<tal:block tal:define="current_inventory python: 0.0; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
available_inventory python: 0.0; node_title string: erp5_pdm_ui_test_destination_node_title;
future_inventory python: 0.0; 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>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way --> <!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros --> <!-- TODO: If possible, move to macros -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</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 ...@@ -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/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/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> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
......
<html> <html>
<head><title>Test stock browser for confirmed state</title></head> <head><title>Test stock browser for planned state</title></head>
<body> <body>
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="4"> <tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state Test stock browser for planned state
</td></tr> </td></tr>
</thead> </thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=planned"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=planned">
...@@ -13,38 +13,32 @@ Test stock browser for confirmed state ...@@ -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/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <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 --> <!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
index python: 2; node_title string: erp5_pdm_ui_test_source_node_title;
current_inventory python: 0.0; inventory_list_count python: 1;
available_inventory python: 0.0; current_inventory python: 0;
future_inventory python: -1.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> </tal:block>
<!-- Check for total value --> <!-- Check destination -->
<tal:block tal:define="current_inventory python: 0.0; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
available_inventory python: 0.0; node_title string: erp5_pdm_ui_test_destination_node_title;
future_inventory python: 0.0; 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>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way --> <!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros --> <!-- TODO: If possible, move to macros -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</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 ...@@ -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/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/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> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
......
<html> <html>
<head><title>Test stock browser for confirmed state</title></head> <head><title>Test stock browser for ready state</title></head>
<body> <body>
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="4"> <tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state Test stock browser for ready state
</td></tr> </td></tr>
</thead> </thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=ready"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=ready">
...@@ -13,38 +13,32 @@ Test stock browser for confirmed state ...@@ -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/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <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 --> <!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
index python: 2; node_title string: erp5_pdm_ui_test_source_node_title;
current_inventory python: 0.0; inventory_list_count python: 1;
available_inventory python: -1.0; current_inventory python: 0;
future_inventory python: -1.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> </tal:block>
<!-- Check for total value --> <!-- Check destination -->
<tal:block tal:define="current_inventory python: 0.0; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
available_inventory python: -1.0; node_title string: erp5_pdm_ui_test_destination_node_title;
future_inventory python: 0.0; 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>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way --> <!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros --> <!-- TODO: If possible, move to macros -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</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 ...@@ -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/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/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> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
......
<html> <html>
<head><title>Test stock browser for confirmed state</title></head> <head><title>Test stock browser for started state</title></head>
<body> <body>
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="4"> <tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state Test stock browser for started state
</td></tr> </td></tr>
</thead> </thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=started"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=started">
...@@ -13,38 +13,32 @@ Test stock browser for confirmed state ...@@ -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/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <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 --> <!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
index python: 2; node_title string: erp5_pdm_ui_test_source_node_title;
current_inventory python: -1.0; inventory_list_count python: 1;
available_inventory python: -1.0; current_inventory python: -1;
future_inventory python: -1.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> </tal:block>
<!-- Check for total value --> <!-- Check destination -->
<tal:block tal:define="current_inventory python: -1.0; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
available_inventory python: -1.0; node_title string: erp5_pdm_ui_test_destination_node_title;
future_inventory python: 0.0; 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>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way --> <!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros --> <!-- TODO: If possible, move to macros -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</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 ...@@ -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/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/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> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
......
<html> <html>
<head><title>Test stock browser for confirmed state</title></head> <head><title>Test stock browser for stopped state</title></head>
<body> <body>
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="4"> <tr><td rowspan="1" colspan="4">
Test stock browser for confirmed state Test stock browser for stopped state
</td></tr> </td></tr>
</thead> </thead>
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=stopped"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=stopped">
...@@ -13,38 +13,32 @@ Test stock browser for confirmed state ...@@ -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/PdmZuite_CommonTemplateForRenderjsUi/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <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 --> <!-- Check source -->
<tal:block tal:define="title python: 'erp5_pdm_ui_test_source_node_title'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
index python: 2; node_title string: erp5_pdm_ui_test_source_node_title;
current_inventory python: -1.0; inventory_list_count python: 1;
available_inventory python: -1.0; current_inventory python: -1;
future_inventory python: -1.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> </tal:block>
<!-- Check for total value --> <!-- Check destination -->
<tal:block tal:define="current_inventory python: 0.0; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
available_inventory python: 0.0; node_title string: erp5_pdm_ui_test_destination_node_title;
future_inventory python: 0.0; 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>
<tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" /> <tal:block metal:use-macro="here/PdmZuite_CommonTemplateForRenderjsUi/macros/check_links_for_stocks" />
<!-- Check the links in hardcoded way --> <!-- Check the links in hardcoded way -->
<!-- TODO: If possible, move to micros --> <!-- TODO: If possible, move to macros -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a</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 ...@@ -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/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/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> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
......
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal" <tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"> xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block metal:define-macro="init" <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" /> <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr> <tr>
<td>open</td> <td>open</td>
...@@ -27,7 +28,8 @@ ...@@ -27,7 +28,8 @@
<tr> <tr>
<td>open</td> <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> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -67,9 +69,9 @@ ...@@ -67,9 +69,9 @@
<tal:block metal:define-macro="go_to_stock_view"> <tal:block metal:define-macro="go_to_stock_view">
<tr> <tr>
<td colspan="3"><b>Go to Stock view</b></td> <td colspan="3"><b>Go to Stock report</b></td>
</tr> </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 metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" />
</tal:block> </tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
...@@ -103,21 +105,6 @@ ...@@ -103,21 +105,6 @@
<td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a/@href</td> <td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]/a/@href</td>
<td>regexp:.*view_movement_history.*</td> <td>regexp:.*view_movement_history.*</td>
</tr> </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> <tr>
<td colspan="3"><p></p></td> <td colspan="3"><p></p></td>
</tr> </tr>
......
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal" <tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"> 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 --> <!-- 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 metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block> </tal:block>
<!-- Check the correct title --> <!-- Check node title -->
<tr> <tr>
<td>assertText</td> <td>assertText</td>
<td tal:content="python: '//div[@data-gadget-scope=\'field_listbox\']//table/tbody/tr[%s]/td[1]' % index">inventory value</td> <td>//div[@data-gadget-scope='field_listbox']//table/tbody/tr[1]/td[1]</td>
<td tal:content="python: title"></td> <td tal:content="node_title"></td>
</tr> </tr>
<!-- Check that inventory and movement list are consistent while in loop --> <!-- Check that inventory and movement list are consistent while in loop -->
...@@ -21,19 +100,10 @@ ...@@ -21,19 +100,10 @@
]"> ]">
<tr> <tr>
<td>assertText</td> <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: '//div[@data-gadget-scope=\'field_listbox\']//table/tbody/tr[1]/td[%s]' % (inventory_tuple[1])">inventory value</td>
<td tal:content="python: int(inventory_tuple[0])"></td> <td tal:content="python: inventory_tuple[0]"></td>
</tr>
</tal:block>
<tr>
<td colspan="3"><p></p></td>
</tr> </tr>
</tal:block> </tal:block>
<tal:block metal:define-macro="check_total_for_inventory">
<tr> <tr>
<td colspan="3"><b>Total for inventories</b></td> <td colspan="3"><b>Total for inventories</b></td>
</tr> </tr>
...@@ -45,20 +115,23 @@ ...@@ -45,20 +115,23 @@
<tr> <tr>
<td>assertText</td> <td>assertText</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tfoot/tr[1]/td[3]</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>
<tr> <tr>
<td>assertText</td> <td>assertText</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tfoot/tr[1]/td[4]</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>
<tr> <tr>
<td>assertText</td> <td>assertText</td>
<td>//div[@data-gadget-scope='field_listbox']//table/tfoot/tr[1]/td[5]</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>
<tr> <tr>
<td colspan="3"><p></p></td> <td colspan="3"><p></p></td>
</tr> </tr>
</tal:block> </tal:block>
</tal:block> </tal:block>
\ No newline at end of file
...@@ -10,27 +10,27 @@ Test stock browser for confirmed state ...@@ -10,27 +10,27 @@ Test stock browser for confirmed state
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=confirmed"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=confirmed">
<!-- Setup {{{ --> <!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} --> <!-- }}} -->
<!-- Check source --> <!-- Check source -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_source_site'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
movement_count python: 1; inventory_list_count python: 1;
current_inventory python: 0.0; current_inventory python: 0.0;
available_inventory python: -1.0; available_inventory python: -1.0;
future_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> </tal:block>
<!-- Check destination --> <!-- Check destination -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_destination_site'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
movement_count python: 1; inventory_list_count python: 1;
current_inventory python: 0.0; current_inventory python: 0.0;
available_inventory python: 0.0; available_inventory python: 0.0;
future_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> </tal:block>
</tbody></table> </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 ...@@ -10,27 +10,27 @@ Test stock browser for delivered state
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=delivered"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=delivered">
<!-- Setup {{{ --> <!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} --> <!-- }}} -->
<!-- Check source --> <!-- Check source -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_source_site'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
movement_count python: 1; inventory_list_count python: 1;
current_inventory python: -1.0; current_inventory python: -1.0;
available_inventory python: -1.0; available_inventory python: -1.0;
future_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> </tal:block>
<!-- Check destination --> <!-- Check destination -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_destination_site'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
movement_count python: 1; inventory_list_count python: 1;
current_inventory python: 1.0; current_inventory python: 1.0;
available_inventory python: 1.0; available_inventory python: 1.0;
future_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> </tal:block>
</tbody></table> </tbody></table>
......
...@@ -10,19 +10,19 @@ Test stock browser for draft state ...@@ -10,19 +10,19 @@ Test stock browser for draft state
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=draft"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=draft">
<!-- Setup {{{ --> <!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} --> <!-- }}} -->
<!-- Check source --> <!-- Check source -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_source_site'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
movement_count python: 0;"> inventory_list_count python: 0;">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block> </tal:block>
<!-- Check destination --> <!-- Check destination -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_destination_site'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
movement_count python: 0;"> inventory_list_count python: 0;">
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/check_inventory" />
</tal:block> </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 ...@@ -10,27 +10,27 @@ Test stock browser for ordered state
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=ordered"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=ordered">
<!-- Setup {{{ --> <!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} --> <!-- }}} -->
<!-- Check source --> <!-- Check source -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_source_site'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
movement_count python: 1; inventory_list_count python: 1;
current_inventory python: 0.0; current_inventory python: 0.0;
available_inventory python: 0.0; available_inventory python: 0.0;
future_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> </tal:block>
<!-- Check destination --> <!-- Check destination -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_destination_site'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
movement_count python: 1; inventory_list_count python: 1;
current_inventory python: 0.0; current_inventory python: 0.0;
available_inventory python: 0.0; available_inventory python: 0.0;
future_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> </tal:block>
</tbody></table> </tbody></table>
......
...@@ -10,27 +10,27 @@ Test stock browser for planned state ...@@ -10,27 +10,27 @@ Test stock browser for planned state
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=planned"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=planned">
<!-- Setup {{{ --> <!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} --> <!-- }}} -->
<!-- Check source --> <!-- Check source -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_source_site'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
movement_count python: 1; inventory_list_count python: 1;
current_inventory python: 0.0; current_inventory python: 0.0;
available_inventory python: 0.0; available_inventory python: 0.0;
future_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> </tal:block>
<!-- Check destination --> <!-- Check destination -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_destination_site'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
movement_count python: 1; inventory_list_count python: 1;
current_inventory python: 0.0; current_inventory python: 0.0;
available_inventory python: 0.0; available_inventory python: 0.0;
future_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> </tal:block>
</tbody></table> </tbody></table>
......
...@@ -10,27 +10,27 @@ Test stock browser for ready state ...@@ -10,27 +10,27 @@ Test stock browser for ready state
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=ready"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=ready">
<!-- Setup {{{ --> <!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} --> <!-- }}} -->
<!-- Check source --> <!-- Check source -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_source_site'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
movement_count python: 1; inventory_list_count python: 1;
current_inventory python: 0.0; current_inventory python: 0.0;
available_inventory python: -1.0; available_inventory python: -1.0;
future_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> </tal:block>
<!-- Check destination --> <!-- Check destination -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_destination_site'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
movement_count python: 1; inventory_list_count python: 1;
current_inventory python: 0.0; current_inventory python: 0.0;
available_inventory python: 0.0; available_inventory python: 0.0;
future_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> </tal:block>
</tbody></table> </tbody></table>
......
...@@ -10,27 +10,27 @@ Test stock browser for started state ...@@ -10,27 +10,27 @@ Test stock browser for started state
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=started"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=started">
<!-- Setup {{{ --> <!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} --> <!-- }}} -->
<!-- Check source --> <!-- Check source -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_source_site'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
movement_count python: 1; inventory_list_count python: 1;
current_inventory python: -1.0; current_inventory python: -1.0;
available_inventory python: -1.0; available_inventory python: -1.0;
future_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> </tal:block>
<!-- Check destination --> <!-- Check destination -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_destination_site'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
movement_count python: 1; inventory_list_count python: 1;
current_inventory python: 0.0; current_inventory python: 0.0;
available_inventory python: 0.0; available_inventory python: 0.0;
future_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> </tal:block>
</tbody></table> </tbody></table>
......
...@@ -10,27 +10,27 @@ Test stock browser for stopped state ...@@ -10,27 +10,27 @@ Test stock browser for stopped state
<tbody tal:define="init_method string:PdmZuite_createDelivery?state=stopped"> <tbody tal:define="init_method string:PdmZuite_createDelivery?state=stopped">
<!-- Setup {{{ --> <!-- Setup {{{ -->
<tal:block metal:use-macro="here/PdmZuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/init" />
<!-- }}} --> <!-- }}} -->
<!-- Check source --> <!-- Check source -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_source_site'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_source_site_title';
movement_count python: 1; inventory_list_count python: 1;
current_inventory python: -1.0; current_inventory python: -1.0;
available_inventory python: -1.0; available_inventory python: -1.0;
future_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> </tal:block>
<!-- Check destination --> <!-- Check destination -->
<tal:block tal:define="link_title python: 'erp5_pdm_ui_test_destination_site'; <tal:block tal:define="node_category python: 'erp5_pdm_ui_test_destination_site_title';
movement_count python: 1; inventory_list_count python: 1;
current_inventory python: 1.0; current_inventory python: 1.0;
available_inventory python: 1.0; available_inventory python: 1.0;
future_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> </tal:block>
</tbody></table> </tbody></table>
......
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal" <tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"> 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" /> <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr> <tr>
<td>setTimeout</td> <td>setTimeout</td>
...@@ -31,7 +32,8 @@ ...@@ -31,7 +32,8 @@
<tr> <tr>
<td>open</td> <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> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -62,15 +64,11 @@ ...@@ -62,15 +64,11 @@
</tr> </tr>
<tr> <tr>
<td>open</td> <td>open</td>
<td>${base_url}/product_module/erp5_pdm_ui_test_product/Resource_viewInventory</td> <td>${base_url}/product_module/erp5_pdm_ui_test_product/</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@class="listbox-tree-domain-tree-mode"]</td>
<td></td> <td></td>
</tr> </tr>
</tal:block> </tal:block>
<tal:block metal:define-macro="toggleSaleSupplyLineBasePricePerSlice"> <tal:block metal:define-macro="toggleSaleSupplyLineBasePricePerSlice">
<tr> <tr>
<td>click</td> <td>click</td>
......
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal" <tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"> 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> <tr>
<td>clickAndWait</td> <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> <td></td>
</tr> </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 --> <!-- Check inventory -->
<tr> <tr>
<td>verifyText</td> <td>verifyText</td>
<td>//span[@class="listbox-current-page-total-number"]</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> </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 --> <!-- Check that inventory and movement list are consistent -->
<tal:block tal:repeat="inventory_tuple python: [(current_inventory, 3), <tal:block tal:repeat="inventory_tuple python: [(current_inventory, 3),
...@@ -39,17 +123,29 @@ ...@@ -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 tal:content="python: '//tr[@class=\'listbox-data-line-0 DataA\']/td[%s]/a[1]' % inventory_tuple[1]">link</td>
<td></td> <td></td>
</tr> </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>verifyText</td>
<td>//span[@class="listbox-current-page-total-number"]</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> </tr>
<!-- Go back to inventory view --> <!-- Go back to inventory view -->
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
<td>//a[@class="listbox_title"]</td> <td>//a[@class="listbox_title"]</td>
<td></td> <td></td>
</tr> </tr>
<!-- apply dialog parameters again -->
<tal:block metal:use-macro="here/PdmZuite_checkStockBrowser/macros/_set_dialog_parameters" />
</tal:block> </tal:block>
</tal:block> </tal:block>
</tal:block> </tal:block>
......
...@@ -11,30 +11,120 @@ source_site_title = "erp5_pdm_ui_test_source_site_title" ...@@ -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_id = "erp5_pdm_ui_test_destination_site"
destination_site_title = "erp5_pdm_ui_test_destination_site_title" destination_site_title = "erp5_pdm_ui_test_destination_site_title"
quantity_unit_category = portal.portal_categories.quantity_unit
# validate rules # validate rules
for rule in portal.portal_rules.objectValues(): for rule in portal.portal_rules.objectValues():
if rule.getValidationState() != 'validated': if rule.getValidationState() != 'validated':
rule.validate() rule.validate()
# Create resources # create categories
quantity_unit_category = portal.portal_categories.quantity_unit
if getattr(quantity_unit_category, "unit", None) is None: if getattr(quantity_unit_category, "unit", None) is None:
quantity_unit_category.newContent( quantity_unit_category.newContent(
portal_type="Category", 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.product_module.newContent(
portal_type='Product', portal_type='Product',
id='erp5_pdm_ui_test_product', id='erp5_pdm_ui_test_product',
title='erp5_pdm_ui_test_product_title', title='erp5_pdm_ui_test_product_title',
quantity_unit='unit', quantity_unit_value=quantity_unit_category.unit.piece,
).validate() ).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.component_module.newContent(
portal_type='Component', portal_type='Component',
id='erp5_pdm_ui_test_component', id='erp5_pdm_ui_test_component',
title='erp5_pdm_ui_test_component_title', title='erp5_pdm_ui_test_component_title',
quantity_unit='unit', quantity_unit_value=quantity_unit_category.unit.piece,
).validate() ).validate()
...@@ -48,6 +138,11 @@ for site_id, site_title in ((source_site_id, source_site_title), ...@@ -48,6 +138,11 @@ for site_id, site_title in ((source_site_id, source_site_title),
title=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 # Create nodes
for node_id, node_title, site_url in ((source_node_id, source_node_title, source_site_id), 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)): (destination_node_id, destination_node_title, destination_site_id)):
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string>set_node_category_preference=False</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
<item> <item>
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list/> <list>
<string>default</string>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -50,6 +52,12 @@ ...@@ -50,6 +52,12 @@
<key> <string>tales</string> </key> <key> <string>tales</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -69,6 +77,10 @@ ...@@ -69,6 +77,10 @@
<key> <string>values</string> </key> <key> <string>values</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string>my_dialog_mode_node_category</string> </value> <value> <string>my_dialog_mode_node_category</string> </value>
...@@ -87,4 +99,17 @@ ...@@ -87,4 +99,17 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </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> </ZopeData>
...@@ -261,7 +261,7 @@ class InventoryListBrain(ComputedAttributeGetItemCompatibleMixin): ...@@ -261,7 +261,7 @@ class InventoryListBrain(ComputedAttributeGetItemCompatibleMixin):
if cname_id in ('transformed_resource_title', ): if cname_id in ('transformed_resource_title', ):
return resource.absolute_url() return resource.absolute_url()
# A resource is defined, so try to display the movement list # 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, query_kw = self.getListItemParamDict(cname_id,
selection_index, selection_index,
selection_name selection_name
......
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
<value> <value>
<list> <list>
<string>my_preferred_section_category</string> <string>my_preferred_section_category</string>
<string>my_preferred_node_category</string>
<string>my_preferred_section</string> <string>my_preferred_section</string>
<string>my_preferred_user_interface_language_list</string> <string>my_preferred_user_interface_language_list</string>
<string>my_translated_preference_state_title</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 @@ ...@@ -5,7 +5,7 @@
skins_tool = context.portal_skins skins_tool = context.portal_skins
selection_name_dict = {} 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(): for skin_name, skin_path_list in skins_tool.getSkinPaths():
skins_tool.changeSkin(skin_name) 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