Use autocompletion from main model

I am also interested in a standard way to create a new record from autocomplete.
I find myself often opening sale, in order to create a Party, then discard the sale.

I would be happy to sponsor B2CK to implement this as a standard feature of tryton.

Why do you prefer to open a sale to create a Party than, you know, opening the party form?
Why is it easier for you to use the sale form than the party form?

ie: What is the issue with the party form, that people want to work around it?

From my knowledge, with autocomplete, you need a O2M field in order to get the autocomplete record creation helper.
What I am saying is that I think it should be possible to create a party using autocomplete sources, from Parties.

Perhaps it is possible, but I am not aware how to do it.

1 Like

Ideally the “New” toolbar button when clicked on a Model with autocomplete should first raise a popup with an autocomplete input that allows to prefill the new record with the selected option (or nothing if no option is selected).

IMHO, this can be annoying when you don’t want to use it. Perhaps a new button could be added (only visible for new records with “autocomplete”) that opens this popup.

The point is to force a search before create to avoid duplicates but this makes sense only on referential data.

The less obnoxious option is to have a wizzard under Launch Action button.

Or something a bit like a button with a dropdown. But it adds clutter to the UI.

If people didn’t make the search when on the list view of the parties they won’t make it when creating a new party, no?

I do not think so. For me users forcus on create a new record will just open the menu entry and click directly new. Having there a popup that reminds them to do a search will be an improvement. And I think it may be used most of the time as the content typed will not be lost if no option is found if we reused it as record name like we do for Many2One.

It could be interesting to have a button (like Pack button in Packages) in list view in case a search has no results.

For example:
I need party with VAT number DE1234.
I search for 1234, I get no results.
If there are no results, and the search DE1234 is a valid VAT number and yields autocomplete entities, then show a button “Create Party DE1234 using autocomplete” at the bottom of the view.

I do not want to slow down tryton, calling autocomplete on every search, in this sense it is good to call autocomplete only if there are no results. For parties where the key is the VAT number it works well, but it could be annoying if the autocomplete key is a name, and there is a similar name in the database..