(self, field, key)
return """
<script type="text/javascript">
$(document).ready(function() {
  $("input[name='%s']").ERP5Autocomplete({search_portal_type: %s,
                                          search_catalog_key: "%s"});
});
</script>""" % (
      escape(key),
      escape(json.dumps([x[0] for x in field.get_value('portal_type')])),
      escape(field.get_value('catalog_index')),
    )
Use jquery-ui autocompletion for all relation fields by default, requiring
    only erp5_autocompletion_ui bt5 to be installed
Use jquery-ui autocompletion for all relation fields by default, requiring
    only erp5_autocompletion_ui bt5 to be installed
Use jquery - ui autocompletion for all relation fields by default requiring only erp5_autocompletion_ui bt5 to be installed
def render_autocomplete(self, field, key):
    """
    Use jquery-ui autocompletion for all relation fields by default, requiring
    only erp5_autocompletion_ui bt5 to be installed
    """
    # XXX: Allow to specify more parameters to jquery-ui autocomplete widget?
    return """
<script type="text/javascript">
$(document).ready(function() {
  $("input[name='%s']").ERP5Autocomplete({search_portal_type: %s,
                                          search_catalog_key: "%s"});
});
</script>""" % (
      escape(key),
      escape(json.dumps([x[0] for x in field.get_value('portal_type')])),
      escape(field.get_value('catalog_index')),
    )
def render_autocomplete ( self , field , key ) : # XXX: Allow to specify more parameters to jquery-ui autocomplete widget? return """
<script type="text/javascript">
$(document).ready(function() {
  $("input[name='%s']").ERP5Autocomplete({search_portal_type: %s,
                                          search_catalog_key: "%s"});
});
</script>""" % ( escape ( key ) , escape ( json . dumps ( [ x [ 0 ] for x in field . get_value ( 'portal_type' ) ] ) ) , escape ( field . get_value ( 'catalog_index' ) ) , )