Autocomplete/Info Window doesn't work correctly with Search fields with Reference
Description
Environment
causes
is duplicated by
relates to
Activity
@Pieter van der Reijden reported in forums:
https://groups.google.com/g/idempiere/c/Qh09T0MgWVo/m/wyQnzMsiDAAJ
BTW. I also noticed that the trial balance shows the accout IDs in version 9 instead of the Account search key/name which are shown in version 8.2.
This was caused by the changes on this ticket.
Found this, for example for products:
when reference is defined as Display=Name and DisplayValue=Y → then the product is displayed as “Seeder-Seeder”
when reference is defined as Display=Name and DisplayValue=N → then the product is displayed as “Seeder”
when reference is defined as Display=M_Product_ID → then the product is displayed using the identifiers of the product, this is → Seeder_Seeder (Value_Name) - this is the consistent way to configure a reference to show the same as Search/Table without a reference
So, with pull request 1055 I’m applying that change to 188 references (I left 46 untouched as it seems to have some reason to want to display a different set of columns).
Also I changed the code to use MSysConfig.IDENTIFIER_SEPARATOR in the case of showing Value+another_column - to make it also more consistent with the expected for Search/Table
Regards,
Carlos Ruiz
This is closely related to IDEMPIERE-4562, but a bit different.
The problem here is present also in English, for the test case you can search Azalea product in Sales Order window vs Inventory Move window.
In Sales Order window the product field is filled with Azalea Bush_Azalea Bush and when clicking on the product icon the info window manages the case properly
But when using the product field in Inventory Move window, the field is filled with Azalea Bush-Azalea Bush - note the difference, the field here has a reference set and is using a dash instead of an underscore as the separator between Value and Name.
I have suggested as a solution that fields with a reference must be filled exactly in the same way as fields without a reference, this is, rendering the table identifiers.
This is related to Autocomplete on Search implemented on https://idempiere.atlassian.net/browse/IDEMPIERE-1540#icft=IDEMPIERE-1540
Test case as GardenAdmin:
Window: Inventory Move
Tab: Move Line
Field: Product
fill the product field with the letters "Aza"
Result without Autocomplete -> "Azalea Bush" product is found
Result with Autocomplete -> sometimes it finds the "Azalea Bush" product properly - but sometimes it opens the product info window with the search key filled with the value "Azalea Bush-Azalea Bush" - I think it depends on your previous search if is found or not