Autocomplete/Info Window doesn't work correctly with Search fields with Reference

Description

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

Environment

None

Activity

Carlos Ruiz
January 3, 2022 at 5:23 PM

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.

Carlos Ruiz
December 16, 2021 at 1:03 PM

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

Carlos Ruiz
November 20, 2020 at 10:48 PM

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.

Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created September 7, 2020 at 11:47 AM
Updated November 10, 2023 at 12:52 PM
Resolved January 3, 2022 at 5:40 PM