Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create Puchase order version 0.8.22 #4294

Open
JZafarr opened this issue Sep 24, 2023 · 8 comments
Open

Unable to create Puchase order version 0.8.22 #4294

JZafarr opened this issue Sep 24, 2023 · 8 comments

Comments

@JZafarr
Copy link

JZafarr commented Sep 24, 2023

Hi there,
Im unable to create a Purchase Order in verion 0.8.22. I get the following error.

Screenshot 2023-09-25 002231

Steps to reproduce

  1. Log into demo.openboxes.com
  2. Choose Amsterdam - HQ as your location
  3. Navigate to Purchasing > Create Purchase Order

Stracktrace

java.lang.NullPointerException: Cannot get property 'name' on null object

	at gsp_openboxes_purchaseOrder_enterOrderDetails_gsp$_run_closure2_closure6.doCall(gsp_openboxes_purchaseOrder_enterOrderDetails_gsp.groovy:119)

	at gsp_openboxes_purchaseOrder_enterOrderDetails_gsp$_run_closure2_closure6.doCall(gsp_openboxes_purchaseOrder_enterOrderDetails_gsp.groovy)

	at gsp_openboxes_purchaseOrder_enterOrderDetails_gsp$_run_closure2.doCall(gsp_openboxes_purchaseOrder_enterOrderDetails_gsp.groovy:174)

	at gsp_openboxes_purchaseOrder_enterOrderDetails_gsp$_run_closure2.doCall(gsp_openboxes_purchaseOrder_enterOrderDetails_gsp.groovy)

	at gsp_openboxes_purchaseOrder_enterOrderDetails_gsp.run(gsp_openboxes_purchaseOrder_enterOrderDetails_gsp.groovy:177)

	at org.pih.warehouse.order.PurchaseOrderController$_closure3.doCall(PurchaseOrderController.groovy:40)

	at org.pih.warehouse.order.PurchaseOrderController$_closure3.doCall(PurchaseOrderController.groovy)

	at grails.plugin.springcache.web.GrailsFragmentCachingFilter.doFilter(GrailsFragmentCachingFilter.groovy:66)

	at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:86)

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)

	at java.lang.Thread.run(Thread.java:748)

Workaround

  1. Set an Organization for the current location (i.e. Amstedam - HQ)
    image
  2. Navigate to Purchasing > Create Purchase Order
    image
  3. Click Next button to continue editing Purchase Order
    image
@jmiranda
Copy link
Member

Thanks for the bug report @JZafarr. This probably has to do with the fact that suppliers and depots are now expected to have an organization associated with them. The fix would be to create and assign an organization to all of your supplier and depot locations before creating a PO. You will probably need to delete the PO you just created. Let me know f you're having trouble with that (i.e. the delete option might only be available from the page where you're seeing this error).

Lastly, I'll keep this ticket open to remind me to add null safety for this particular property access.

@kkrawczyk123
Copy link

@jmiranda I accidentally induced this error today, see: https://www.loom.com/share/c066b82b346f4ee394fa2331f09619a2?sid=bfcba165-f2af-49ec-b6eb-64aedabbe662

@JZafarr Does look like what you experienced?

@JZafarr
Copy link
Author

JZafarr commented Sep 26, 2023

@jmiranda Thanks for the instructions. I will do that and let you know the results. Also now that I have your attention, is there a way to print labels as I cannot find any such setting.

@kkrawczyk123 Could be, i havent defined any suppliers yet but looks similar.

@jmiranda
Copy link
Member

is there a way to print labels as I cannot find any such setting.

Can you elaborate what you meant by this? I assume you want to print ZPL labels but want to confirm and get more details on your use case / requirements.

@JZafarr
Copy link
Author

JZafarr commented Sep 27, 2023

is there a way to print labels as I cannot find any such setting.

Can you elaborate what you meant by this? I assume you want to print ZPL labels but want to confirm and get more details on your use case / requirements.

I want to print labels for pallets, boxes and individual items. A label with either a barcode or a QR Code with item description and a count if possible
A 4 x 4 inch label for pallets and boxes and 2 x 1 inch label for individual items. Something like that

@jmiranda
Copy link
Member

Check out the following thread (including the video).
https://community.openboxes.com/t/barcode-printing/293/10

It's been a while since I used this feature so let me know if you encounter any issues.

Printing to two different size labels probably won't be possible at the moment, but it might not be a huge lift if you need that. However, we should create a separate ticket for that work.

@jmiranda
Copy link
Member

FYI, I created a new ticket for the label size issue #4303

@sentry-io
Copy link

sentry-io bot commented Sep 29, 2023

Sentry issue: OPENBOXES-DEMO-1-1E9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants