[jira] [Commented] (OFBIZ-7324) From facility location should be product based in stock move form.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-7324) From facility location should be product based in stock move form.

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-7324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15327107#comment-15327107 ]

Montalbano Florian commented on OFBIZ-7324:
-------------------------------------------

Hi again,
I took your comment into consideration. I tried to use the "targetParameterIter" but I encountered some difficulties.
Here is how I used it in the ftl file :
{code}
<@htmlTemplate.lookupField formName="quickStockMove" name="locationSeqId" id="locationSeqId" fieldFormName="LookupProductInventoryLocation?facilityId=${facilityId}" targetParameterIter=["productId"]/>
{code}

The value of productId is passed through the request parameters but with the name "parm0". So, the lookup doesn't know what to do with this value.

I found where the name of the request's parameters was set and I found a fix to put the name of the field of the form as the name of the parameter in the request. But as the fix is in the file "fieldlookup.js", I'm pretty sure that this will create some problem.

Here is the change I've made in the function "_dialogOpen" :
Before :
{code}
queryArgs += "&parm" + i + "=" + jQuery(options.args[i]).val();
{code}
After :
{code}
queryArgs += "&" + jQuery(options.args[i]).attr("name") + "=" + jQuery(options.args[i]).val();
{code}
(there is similar code in "lookup_popup2" but i'm not sure of what this code does so I didn't touch it for now)

This allows to name the parameters of the request with the name of the field in the form.
For this specific issue it works. I searched for occurences of "parm0" and "parm1" in the trunk source but there were only 3 relevant matches.

Would this change be useful for the OFBiz project ?

> From facility location should be product based in stock move form.
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-7324
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7324
>             Project: OFBiz
>          Issue Type: Improvement
>            Reporter: Deepak Dixit
>            Assignee: Deepak Dixit
>
> From facility location should be product based in stock move form.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)