patzly / grocy-android

ERP beyond your fridge, now on your phone – An awesome companion app for grocy
https://patrickzedler.com/grocy/
GNU General Public License v3.0
872 stars 84 forks source link

Open page to product field by default #528

Open userbradley opened 2 years ago

userbradley commented 2 years ago

hello!

I use the grocy app on a zebra scanner, and it would be awesome if when I go to any page, like Purchase it automatically opens the text field so I can scan.

I have a null keyboard installed so it wont open the keyboard, but still takes input.

It would be cool to toggle that option in settings for the app, as I can't imagine many people use a zebra touch scanner for the app

dominiczedler commented 2 years ago

Hey, did you try it with the option "External scanner support"? This is for hardware barcode scanners and it has exactly the behavior you describe. Or you can try the quick mode (long tap on the title bar) which auto focuses all fields which are required.

userbradley commented 2 years ago

Damn, not sure how I missed that! That's exactly the behaviour I was looking for!

Thank you!

userbradley commented 2 years ago

Hey, so I tried this and it still does not work!

Let me know what you need from my side to troubleshoot this issue!

dominiczedler commented 2 years ago

@userbradley What's the behavior you would like to have and what is the behavior currently in the app, after you enabled the option "External scanner support" in settings?

dominiczedler commented 2 years ago

@userbradley I think you don't have activated quick mode on the purchase page. You can open the purchase page with activated quick mode through the main overview page floating action button (long tap) or you can long tap on the title "Purchase" on the purchase page. In the latter case the quick mode status is stored and will be restored whenever you open the page again.

userbradley commented 2 years ago

Hey @MrJohnZoidberg - Yeah that seems to have solved it!

That works after the suggested Long tap, how ever once I scan a wrong barcode then go to scan another one, after pressing x at the bottom, it loses the focus field!


I would like the same behaviour with Stock Overview where I can scan a barcode straight from the page, and it shows the items.


Not sure if this is a feature request, but would it be possible to accept locations as Barcode input? (text field) - as I want to barcode my shelves for location codes... let me know!

dominiczedler commented 2 years ago

how ever once I scan a wrong barcode then go to scan another one, after pressing x at the bottom, it loses the focus field!

I will look into it :-)

I would like the same behaviour with Stock Overview where I can scan a barcode straight from the page, and it shows the items.

Sorry, this is not really possible, because there must be a field for an input and the search field is only visible after you tap on the search icon... But I hope this is not a big problem, the focus is on the field right after you tap on the icon.

Not sure if this is a feature request, but would it be possible to accept locations as Barcode input? (text field) - as I want to barcode my shelves for location codes... let me know!

Do you mean grocy codes for locations?

userbradley commented 2 years ago
  1. Woo! Let me know if you want me to open a Feature Request!
  2. No worries, was a nice to have!
  3. Yes and no. So I know that grocy does not support/ create location codes by default which is Fine. I was going to make an aztec code for my locations, and then put them on the shelves. So opposed to clicking location and scrolling down a pretty long list, I can scan the product barcode, then the location barcode and it's purchased and stored in a location.

Example of a location and it's barcode:

image image

I'm going to make the assumption you can use what ever logic you use to autofill the Product name in the search bar, can be used for the location code?

Dude, I really appreciate everything you've done! <3

jlsjonas commented 2 years ago

As these location tags shouldn't match any product/other the system could potentially just have a smart input field when working with a(n external) barcode scanner that matches product first, and looks for a location match after (this way you're not "forced" to enter/change the location if not required.

userbradley commented 2 years ago

My thoughts exactly, The API doesn't validate the location, only on submission where it throws an error.

Shouldn't be too painful to implement if the location barcode is exactly the same as the location code in the system

dominiczedler commented 2 years ago

Sorry for the long response time. I don't know whether it makes sense for such a tiny open source project to implement such a specific feature. Maybe only you and a few other people use grocy in this way with so many locations and barcodes for them... So for us two developers it really doesn't make sense to work on the feature (which indeed would improve the workflows for you, no question), because we won't use it and for me it would take many hours with changing things, implementing new dialogs and test workflows.

I will let the issue open for others, maybe some developers could help with that if they would use the feature.