Commit 9d46973e authored by Arnaud Fontaine's avatar Arnaud Fontaine

erp5_autocompletion_ui: Autocompletion property value set to the field should...

erp5_autocompletion_ui: Autocompletion property value set to the field should be the one queried from the Catalog.
parent 7582ea77
......@@ -51,7 +51,6 @@
<item>
<key> <string>_body</string> </key>
<value> <string>return {\'label\': obj.getTitle(),\n
\'value\': obj.getTitle(),\n
\'description\': obj.getRelativeUrl()}\n
</string> </value>
</item>
......
......@@ -63,10 +63,12 @@ for brain in context.portal_catalog(**kw):\n
obj = brain.getObject()\n
\n
# There may be objects with different Portal Types, so the only way seems\n
# to call the script for each object...\n
# to call the script for each object... The returned dict should only contains\n
# \'label\' (first line displayed) and \'description\' (optional: second line displayed)\n
result_dict = obj.getTypeBasedMethod(\'getCompletionDict\',\n
fallback_script_id=\'Base_getCompletionDict\')(obj)\n
\n
result_dict[\'value\'] = obj.getProperty(search_catalog_key)\n
result_dict_list.append(result_dict)\n
\n
from json import dumps\n
......
2014-02-07 arnaud.fontaine
* Autocompletion property value set to the field should be the one queried from the Catalog.
2014-02-07 arnaud.fontaine
* Consider that description may not be needed, thus only one line, the label, is displayed.
......
16
\ No newline at end of file
17
\ 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