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

Update stock report and field library to use parameters named node_category &...

Update stock report and field library to use parameters named node_category & section_category instead of site & group
parent 46da672b
......@@ -54,8 +54,8 @@
result_list = []\n
for brain in context.portal_simulation.getCurrentInventoryList(\n
node_category=site,\n
section_category=group,\n
node_category=node_category,\n
section_category=section_category,\n
group_by_resource=True,\n
group_by_variation=True,\n
group_by_node=False,\n
......@@ -86,7 +86,7 @@ return sorted(result_list, key=lambda brain: (brain.getResourceReference(), brai
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>at_date=None, site=None, group=None, positive_stock=None, negative_stock=None, zero_stock=None, **kw</string> </value>
<value> <string>at_date=None, node_category=None, section_category=None, positive_stock=None, negative_stock=None, zero_stock=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -99,8 +99,8 @@
<key> <string>left</string> </key>
<value>
<list>
<string>your_site_title</string>
<string>your_group_title</string>
<string>your_node_category</string>
<string>your_section_category</string>
<string>your_at_date</string>
</list>
</value>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_site_title</string> </value>
<value> <string>your_node_category</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -71,7 +71,7 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_report_mode_site_title</string> </value>
<value> <string>my_report_mode_node_category</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</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_report_mode_section_category</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -93,8 +93,8 @@
<key> <string>left</string> </key>
<value>
<list>
<string>your_site</string>
<string>your_group</string>
<string>your_node_category</string>
<string>your_section_category</string>
<string>your_at_date</string>
<string>your_portal_skin</string>
<string>your_format</string>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_site</string> </value>
<value> <string>your_node_category</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -71,7 +71,7 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_dialog_mode_site</string> </value>
<value> <string>my_dialog_mode_node_category</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
......
......@@ -11,14 +11,12 @@
<value>
<list>
<string>required</string>
<string>title</string>
<string>items</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_dialog_mode_site</string> </value>
<value> <string>your_section_category</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -62,12 +60,6 @@
<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>
......@@ -81,41 +73,24 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_list_field</string> </value>
<value> <string>my_dialog_mode_section_category</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
<value> <string>Base_viewTradeFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
<value> <int>0</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[field.getId().replace(\'your_\', \'\', 1)], preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -115,7 +115,6 @@
<string>my_view_mode_destination_section_title</string>
<string>my_view_mode_source_section_title</string>
<string>my_report_mode_at_date</string>
<string>my_report_mode_site_title</string>
<string>my_view_mode_listbox_variation_category_item_list</string>
<string>my_view_mode_quantity_unit</string>
<string>my_view_mode_resource_title</string>
......@@ -233,7 +232,7 @@
<string>my_dialog_mode_negative_stock</string>
<string>my_dialog_mode_positive_stock</string>
<string>my_dialog_mode_zero_stock</string>
<string>my_dialog_mode_site</string>
<string>my_dialog_mode_node_category</string>
<string>my_dialog_mode_listbox_container_quantity</string>
<string>my_dialog_mode_container_count</string>
<string>my_dialog_mode_container_type</string>
......@@ -304,6 +303,7 @@
<string>my_view_mode_listbox_read_only_effective_date</string>
<string>my_view_mode_listbox_read_only_expiration_date</string>
<string>my_view_mode_preferred_tax_use_list</string>
<string>my_report_mode_node_category</string>
</list>
</value>
</item>
......
......@@ -11,13 +11,14 @@
<value>
<list>
<string>items</string>
<string>required</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_group</string> </value>
<value> <string>my_dialog_mode_node_category</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -67,6 +68,10 @@
<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>
......@@ -84,7 +89,7 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_category</string> </value>
<value> <string>my_list_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
......@@ -96,13 +101,17 @@
<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>Group</string> </value>
<value> <string>Site</string> </value>
</item>
</dictionary>
</value>
......@@ -118,7 +127,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: getattr(here.portal_categories[field.getId().replace(\'your_\', \'\', 1)], preferences.getPreference(\'preferred_category_child_item_list_method_id\', \'getCategoryChildCompactLogicalPathItemList\'))(local_sort_id=(\'int_index\', \'translated_title\'), checked_permission=\'View\')</string> </value>
<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>
......
......@@ -11,13 +11,12 @@
<value>
<list>
<string>default</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_group_title</string> </value>
<value> <string>my_report_mode_node_category</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -71,10 +70,6 @@
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
......@@ -88,7 +83,7 @@
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_report_mode_site_title</string> </value>
<value> <string>my_dialog_mode_node_category</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
......@@ -98,10 +93,6 @@
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Group</string> </value>
</item>
</dictionary>
</value>
</item>
......@@ -116,7 +107,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.portal_categories.group.restrictedTraverse(here.REQUEST.get(\'group\', \'\')).getTranslatedTitle()</string> </value>
<value> <string>request/node_category | nothing</string> </value>
</item>
</dictionary>
</pickle>
......
<?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>description</string>
<string>display_width</string>
<string>editable</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_report_mode_site_title</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>description</string> </key>
<value> <string>The name of a document in ERP5</string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</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>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: here.portal_categories.site.restrictedTraverse(here.REQUEST.get(\'site\', \'\')).getTranslatedTitle()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
1163
\ No newline at end of file
1164
\ No newline at end of file
......@@ -693,7 +693,7 @@ class TestTradeReports(ERP5ReportTestCase):
# Old date
################################
request.form['at_date'] = DateTime(2005, 1, 1)
request.form['site'] = 'demo_site_A'
request.form['node_category'] = 'site/demo_site_A'
line_list = self.portal.inventory_module.Base_viewStockReportBySite.listbox.\
get_value('default',
......@@ -705,7 +705,7 @@ class TestTradeReports(ERP5ReportTestCase):
# Middle date
################################
request.form['at_date'] = DateTime(2006, 4, 4)
request.form['site'] = 'demo_site_A'
request.form['node_category'] = 'site/demo_site_A'
line_list = self.portal.inventory_module.Base_viewStockReportBySite.listbox.\
get_value('default',
......@@ -733,7 +733,7 @@ class TestTradeReports(ERP5ReportTestCase):
# Futur date
################################
request.form['at_date'] = DateTime(2008, 4, 4)
request.form['site'] = 'demo_site_A'
request.form['node_category'] = 'site/demo_site_A'
line_list = self.portal.inventory_module.Base_viewStockReportBySite.listbox.\
get_value('default',
......@@ -852,7 +852,7 @@ class TestTradeReports(ERP5ReportTestCase):
# Don't Display Positive Stock
################################
request.form['at_date'] = DateTime(2008, 4, 4)
request.form['site'] = 'demo_site_A'
request.form['node_category'] = 'site/demo_site_A'
request.form['positive_stock'] = 1
line_list = \
self.portal.inventory_module.Base_viewStockReportBySite.listbox.\
......@@ -881,7 +881,7 @@ class TestTradeReports(ERP5ReportTestCase):
# Don't Display Negative Stock
################################
request.form['at_date'] = DateTime(2008, 4, 4)
request.form['site'] = 'demo_site_A'
request.form['node_category'] = 'site/demo_site_A'
request.form['positive_stock'] = 0
request.form['negative_stock'] = 1
......@@ -918,7 +918,7 @@ class TestTradeReports(ERP5ReportTestCase):
# Don't Display Zero Stock
################################
request.form['at_date'] = DateTime(2008, 4, 4)
request.form['site'] = 'demo_site_A'
request.form['node_category'] = 'site/demo_site_A'
request.form['positive_stock'] = 0
request.form['negative_stock'] = 0
request.form['zero_stock'] = 1
......@@ -958,7 +958,7 @@ class TestTradeReports(ERP5ReportTestCase):
# And Negative Stock
################################
request.form['at_date'] = DateTime(2008, 4, 4)
request.form['site'] = 'demo_site_A'
request.form['node_category'] = 'site/demo_site_A'
request.form['positive_stock'] = 1
request.form['negative_stock'] = 1
request.form['zero_stock'] = 0
......@@ -981,7 +981,7 @@ class TestTradeReports(ERP5ReportTestCase):
# Don't Display Positive And Zero Stock
########################################
request.form['at_date'] = DateTime(2008, 4, 4)
request.form['site'] = 'demo_site_A'
request.form['node_category'] = 'site/demo_site_A'
request.form['positive_stock'] = 1
request.form['negative_stock'] = 0
request.form['zero_stock'] = 1
......@@ -1004,7 +1004,7 @@ class TestTradeReports(ERP5ReportTestCase):
# Don't Display Negative And Zero Stock
########################################
request.form['at_date'] = DateTime(2008, 4, 4)
request.form['site'] = 'demo_site_A'
request.form['node_category'] = 'site/demo_site_A'
request.form['positive_stock'] = 0
request.form['negative_stock'] = 1
request.form['zero_stock'] = 1
......@@ -1034,7 +1034,7 @@ class TestTradeReports(ERP5ReportTestCase):
# Don't Display Positive,Negative And Zero Stock
################################################
request.form['at_date'] = DateTime(2008, 4, 4)
request.form['site'] = 'demo_site_A'
request.form['node_category'] = 'site/demo_site_A'
request.form['positive_stock'] = 1
request.form['negative_stock'] = 1
request.form['zero_stock'] = 1
......
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