Description
How to reproduce :
1) Go to a person party profile : i.e. https://localhost:8443/partymgr/control/viewprofile?partyId=admin
2) Click on 'Create New' from the 'List Related Accounts' section
3) Click on the 'Look up button' (for searching through the account party id)
4) Notice the title of the pop-up : "Lookup Party with the role Account" and the limited number of result. Lookup Party with the role Account.
5) Click on the 'Find' button (empty search)
6) Notice the new title "Lookup Group" and the new set of result
Root of the behaviour :
In "ofbiz/applications/party/widget/partymgr/LookupScreens.xml", there is the definition of the "LookupAccount" screen. This screen is the pop-up showing up when you click on the 'Lookup button' . It includes two forms :
<include-form name="lookupPartyGroup" location="component://party/widget/partymgr/LookupForms.xml"/>
and
<include-form name="listLookupPartyGroup" location="component://party/widget/partymgr/LookupForms.xml"/>
The first one, is the one used for the search when you click on the 'Find' button. By looking at this form's code, we can see that its target is the "LookupPartyGroup" screen. So when you click on the 'Find' button, a different screen is loaded and the title and the behaviour of the pop-up is modified. This screen is composed from the two same forms than the original one.
Solution ? :
I don't know if it's possible to overload the target of a form when it's called but if it is possible, then we may call the same form with the target "LookupAccount". If not, I think we need to create another form with the target "LookupAccount".
Thanks,
Florian