# Stock Management 3.0.0 + esm-stock-management-app 3.2.1: operations/inventory lists always empty, UI cannot save operations (same at\_location\_id error as thread 49811)

**URL:** <https://talk.openmrs.org/t/stock-management-3-0-0-esm-stock-management-app-3-2-1-operations-inventory-lists-always-empty-ui-cannot-save-operations-same-at-location-id-error-as-thread-49811/50339>\
**Category:** Development\
**Tags:** stock-management\
**Created:** [October 28, 2026, 1:11pm UTC](https://talk.openmrs.org/t/stock-management-3-0-0-esm-stock-management-app-3-2-1-operations-inventory-lists-always-empty-ui-cannot-save-operations-same-at-location-id-error-as-thread-49811/50339 "2026-10-28T13:11:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hamza.godana](https://talk.openmrs.org/letter_avatar/hamza.godana/32/5_5575768a8748004e209b776fc1b2916d.png) [@hamza.godana](https://talk.openmrs.org/u/hamza.godana)\
**Post date:** [October 28, 2026, 1:11pm UTC](https://talk.openmrs.org/t/stock-management-3-0-0-esm-stock-management-app-3-2-1-operations-inventory-lists-always-empty-ui-cannot-save-operations-same-at-location-id-error-as-thread-49811/50339/1 "2026-10-28T13:11:04Z")

</div>

Setup: OpenMRS 3 on Tomcat 9 / Hibernate 5.6 (core 2.x), stockmanagement-3.0.0.omod, esm-stock-management-app 3.2.1. Main Pharmacy and Main Store are tagged stock locations, children of the login location, with stockmgmt\_party and stockmgmt\_location\_tree rows. GET /stockmanagement/userrolescope returns the admin scope correctly (all 9 operation types, facility with descendants + Main Pharmacy + Main Store). 1. Saving an Opening Stock operation from the UI fails: Column ‘at\_location\_id’ cannot be null (location selected, session at Main Pharmacy). 2. I inserted one completed Opening Stock operation + 131 lines, batches and transactions directly in the database. GET /stockmanagement/stockoperation and /stockiteminventory return an empty list, and GET stockoperation/ returns “Object with given uuid doesn’t exist”. 3. With the MySQL general log on, the module runs only the two stockmgmt\_user\_role\_scope permission queries and never queries stockmgmt\_stock\_operation or the transaction table. Replaying those permission queries by hand returns the correct parties (1 = Main Pharmacy, 2 = Main Store). This is also true for the first request after a restart, so it is not a cached result. No errors are logged. Which condition makes the module return an empty result after the permission check? Is there a column or row a UI-created operation has that a direct insert lacks? Which esm-stock-management-app version is meant to pair with stockmanagement 3.0.0?

---

<div class="post-metadata">

**Author:** ![veronica](https://talk.openmrs.org/user_avatar/talk.openmrs.org/veronica/32/20174_2.png) [@veronica](https://talk.openmrs.org/u/veronica)\
**Post date:** [October 29, 2026, 8:44am UTC](https://talk.openmrs.org/t/stock-management-3-0-0-esm-stock-management-app-3-2-1-operations-inventory-lists-always-empty-ui-cannot-save-operations-same-at-location-id-error-as-thread-49811/50339/2 "2026-10-29T08:44:19Z")

</div>

Hi Hamza, thanks for the detailed write-up on this issue.

**“Column ‘at\_location\_id’ cannot be null”**

The issue is known and tracked as [O3-6137](https://openmrs.atlassian.net/browse/O3-6137); please check it out. The module relies on `StockOperationDTOValidator` to derive the operation’s location from the source or destination, and webservices.rest 3.x no longer calls validators from `DelegatingCrudResource.create()`, so the field reaches Hibernate as null. Backend [PR 51](https://github.com/openmrs/openmrs-module-stockmanagement/pull/51) moves the derivation into the service so it no longer depends on the REST framework. Until that is merged and released as 3.1.0, no operation of any type can be saved from the UI or the API on a REST 3.x stack, not even as a draft.
