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 ...@@ -78,7 +78,7 @@ for resource in context.portal_catalog.searchResults(\n
validation_state=validation_state,\n validation_state=validation_state,\n
sort_on=((\'portal_type\', \'asc\'),\n sort_on=((\'portal_type\', \'asc\'),\n
(\'title\', \'asc\'))) :\n (\'title\', \'asc\'))) :\n
if resource.getQuantityUnit():\n if show_default_quantity_unit and resource.getQuantityUnit():\n
result.append(\n result.append(\n
(\'%s (%s)\' % (resource.getTitle(),\n (\'%s (%s)\' % (resource.getTitle(),\n
translateString(resource.getQuantityUnitTitle()),),\n translateString(resource.getQuantityUnitTitle()),),\n
...@@ -101,7 +101,7 @@ return result\n ...@@ -101,7 +101,7 @@ return result\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <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>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -121,7 +121,7 @@ return result\n ...@@ -121,7 +121,7 @@ return result\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>3</int> </value> <value> <int>4</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
...@@ -130,6 +130,7 @@ return result\n ...@@ -130,6 +130,7 @@ return result\n
<string>use_list</string> <string>use_list</string>
<string>validation_state</string> <string>validation_state</string>
<string>portal_type</string> <string>portal_type</string>
<string>show_default_quantity_unit</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>container</string> <string>container</string>
...@@ -161,6 +162,7 @@ return result\n ...@@ -161,6 +162,7 @@ return result\n
<tuple> <tuple>
<string>validated</string> <string>validated</string>
<none/> <none/>
<int>1</int>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list>
<string>title</string>
<string>default</string> <string>default</string>
<string>items</string> <string>items</string>
<string>title</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <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> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
716 717
\ No newline at end of file \ 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