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

- use preferred sales use in the sale order fast input

- extend a bit Base_getResourceItemList to display or not the default quantity unit of the resource in the title

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28435 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f2c5afb4
......@@ -78,7 +78,7 @@ for resource in context.portal_catalog.searchResults(\n
validation_state=validation_state,\n
sort_on=((\'portal_type\', \'asc\'),\n
(\'title\', \'asc\'))) :\n
if resource.getQuantityUnit():\n
if show_default_quantity_unit and resource.getQuantityUnit():\n
result.append(\n
(\'%s (%s)\' % (resource.getTitle(),\n
translateString(resource.getQuantityUnitTitle()),),\n
......@@ -101,7 +101,7 @@ return result\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>use_list, validation_state=\'validated\', portal_type=None</string> </value>
<value> <string>use_list, validation_state=\'validated\', portal_type=None, show_default_quantity_unit=True</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -121,7 +121,7 @@ return result\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>3</int> </value>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -130,6 +130,7 @@ return result\n
<string>use_list</string>
<string>validation_state</string>
<string>portal_type</string>
<string>show_default_quantity_unit</string>
<string>_getitem_</string>
<string>_getattr_</string>
<string>container</string>
......@@ -161,6 +162,7 @@ return result\n
<tuple>
<string>validated</string>
<none/>
<int>1</int>
</tuple>
</value>
</item>
......
......@@ -13,9 +13,9 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
<string>default</string>
<string>items</string>
<string>title</string>
</list>
</value>
</item>
......@@ -133,7 +133,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(\'\', \'\')] + [(x.getTitle(), x.getRelativeUrl()) for x in here.portal_catalog(portal_type=[\'Product\',\'Service\'])]</string> </value>
<value> <string>python: context.Base_getResourceItemList(use_list=preferences.getPreferredPurchaseUseList(), validation_state=\'validated\', show_default_quantity_unit=False)</string> </value>
</item>
</dictionary>
</pickle>
......
716
\ No newline at end of file
717
\ No newline at end of file
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