You must be logged in to complete the [Count Inventory On Hand

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

You must be logged in to complete the [Count Inventory On Hand

joelfradkin@gmail.com
in Groovy:
I am getting :
 You must be logged in to complete the [Count Inventory On Hand for a Product constrained by a facilityId at a given date.] process.

when calling countProductInventoryOnHand?
I can call
result = dispatcher.runSync("getInventoryAvailableByFacility", [facilityId : facilityId, productId : productId);

I can post to createPhysicalInventoryAndVariance in the same inventory service.
I do auth, so I should be logged in? I am confused any one have a clue why?
Joel Fradkin
Reply | Threaded
Open this post in threaded view
|

Re: You must be logged in to complete the [Count Inventory On Hand

joelfradkin@gmail.com
Got it to run by looking at the other one that works and added
login-required="false".
Really odd, I mean I was logged in?
I tried changing the servicedef to say no auth, but that did not help.
What else was odd is it must default to needing login, as I did not see it was required and I changed. It just was not there at all and my service def said no to auth, but I guess in the end if you dont want logged in you have to specify. But since I was logged in I am still confused.
 
Joel Fradkin
Reply | Threaded
Open this post in threaded view
|

Re: You must be logged in to complete the [Count Inventory On Hand

Gil Portenseigne
Hi, you should have given the userLogin variable in the context to your service. It's better than desactivate login on the service.

I quote an exemple from another groovy file in ofbiz :

checkMap = [orderId : orderId, userLogin : session.getAttribute("userLogin"), checkAction : "VIEW"];
checkResult = dispatcher.runSync("checkSupplierRelatedOrderPermission", checkMap);

Gil



Le 23/10/2014 19:44, [hidden email] a écrit :
Got it to run by looking at the other one that works and added 
login-required="false".
Really odd, I mean I was logged in?
I tried changing the servicedef to say no auth, but that did not help.
What else was odd is it must default to needing login, as I did not see it
was required and I changed. It just was not there at all and my service def
said no to auth, but I guess in the end if you dont want logged in you have
to specify. But since I was logged in I am still confused.
 



-----
Joel Fradkin
--
View this message in context: http://ofbiz.135035.n4.nabble.com/You-must-be-logged-in-to-complete-the-Count-Inventory-On-Hand-tp4657325p4657328.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


--

Gil Portenseigne
Consultant ERP OFBiz
Société Néréide
3b Les isles
37270 Veretz
Tel : 09 74 53 46 09, puis 1, poste 61
Mob : 06 82 740 444

www.nereide.fr

Membre d'OFBiz France
www.ofbiz-fr.org

 

Reply | Threaded
Open this post in threaded view
|

Re: You must be logged in to complete the [Count Inventory On Hand

joelfradkin@gmail.com
Thank you. I can try that and turn it back on or even go back to using the original routine.
I may have to ditch it though. I added a conversion factor. I believe I am going to have to get the appropriate supplier record (where I am storing the conversion factor) because I also need a cost for the report, and the pricing is in supplier count, not stocking count. Too bad if the conversion factor and price never changed be lots easier to code :)
Joel Fradkin