You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "JFradkin@styleline.com" <JF...@styleline.com> on 2014/08/18 16:27:19 UTC

LookupProduct

LookupProduct seems to return multiple entries for the same product supplier
combo.
I see this as a result of receiving. Each time I recieve it appears to add a
record for that supplier with the last price.
I do not wish to have the same information duplicated, but I do nto see
where I can distinct.
I searched the forums, and Google, and see examples of adding
distinct="true", or adding a find option, but since this is a look-up
screen, I am guessing it uses some global look up (as a specific groovy does
not seem to be defined).

Is there an easy way to add distinct to lookup screens? (I see this called
from the initial receive inventory screen, on the product find, and also on
the adding items to P.O. on the inventory find).



-----
Joel Fradkin
--
View this message in context: http://ofbiz.135035.n4.nabble.com/LookupProduct-tp4653978.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: LookupProduct

Posted by "JFradkin@styleline.com" <JF...@styleline.com>.
Yes Thank you "They are actually different seen from a supplier POV ".
I am just saying they are not different from the users point of view, so I
chose to modify the data to not include duplicate product id (what we are
selecting). I chose to display the most recent min qty.
Since my mod is in my project it does not impact any one, but I believe you
guys might want to consider what the user is seeing. Since the drop down is
no selecting an item, it might be good idea to modify the drop down, but
that's just my opinion.



-----
Joel Fradkin
--
View this message in context: http://ofbiz.135035.n4.nabble.com/LookupProduct-tp4653978p4654089.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: LookupProduct

Posted by Jacques Le Roux <ja...@les7arts.com>.
Did you get my answer?

Jacques

Le 19/08/2014 16:04, JFradkin@styleline.com a écrit :
> When a user views the look-up product for supplier he sees multiple entries
> for the same product with no difference in the presented data (except
> perhaps min order qty). This is very confusing.
> At a minimum I feel it should be a distinct. I chose to only have each
> product once, and use the most recent record so it has the min order qty
> from the last received. I appreciate the explanation.
>
>
>
> -----
> Joel Fradkin
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/LookupProduct-tp4653978p4654041.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Re: LookupProduct

Posted by "JFradkin@styleline.com" <JF...@styleline.com>.
When a user views the look-up product for supplier he sees multiple entries
for the same product with no difference in the presented data (except
perhaps min order qty). This is very confusing.
At a minimum I feel it should be a distinct. I chose to only have each
product once, and use the most recent record so it has the min order qty
from the last received. I appreciate the explanation.



-----
Joel Fradkin
--
View this message in context: http://ofbiz.135035.n4.nabble.com/LookupProduct-tp4653978p4654041.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: LookupProduct

Posted by Jacques Le Roux <ja...@les7arts.com>.
Le 18/08/2014 17:12, JFradkin@styleline.com a écrit :
> Its actually lookupSupplierProduct, sorry I was must of been looking at it
> wrong?
> In any case I just added my own groovey to get distinct data.
> Not sure if the multiple records for the same item is desired effect as
> price is not in the returned data, so they are duplicate multiple rows,
> unless I messed up the receiving some how, maybe there is not supposed to
> multiple supplier records each time you buy. Although I believe I tested
> using the original code (I only modify stuff in my hot-deploy project, so
> original ofbiz stuff is pristine).
>

If you look at the entity entity-name="SupplierProduct" definition, you will see that the PK is constitued of

       <prim-key field="productId"/>
       <prim-key field="partyId"/>
       <prim-key field="currencyUomId"/>
       <prim-key field="minimumOrderQuantity"/>
       <prim-key field="availableFromDate"/>

That's why you get what seems to you multiple products. They are actually different seen from a supplier POV

Jacques


>
> -----
> Joel Fradkin
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/LookupProduct-tp4653978p4653980.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Re: LookupProduct

Posted by "JFradkin@styleline.com" <JF...@styleline.com>.
Its actually lookupSupplierProduct, sorry I was must of been looking at it
wrong?
In any case I just added my own groovey to get distinct data.
Not sure if the multiple records for the same item is desired effect as
price is not in the returned data, so they are duplicate multiple rows,
unless I messed up the receiving some how, maybe there is not supposed to
multiple supplier records each time you buy. Although I believe I tested
using the original code (I only modify stuff in my hot-deploy project, so
original ofbiz stuff is pristine).



-----
Joel Fradkin
--
View this message in context: http://ofbiz.135035.n4.nabble.com/LookupProduct-tp4653978p4653980.html
Sent from the OFBiz - User mailing list archive at Nabble.com.