[minor] Check if item is stock item before validating Warehouse while Purchase Return (#9282)
[minor] Check if item is stock item before validating Warehouse while Purchase Return (#9282)

* Check if item is stock item before validating Warehouse

* changed logic to decide warehouse_mandatory

gsnbng/erpnext,geekroot/erpnext,geekroot/erpnext,indictranstech/erpnext,Aptitudetech/ERPNext,gsnbng/erpnext,gsnbng/erpnext,indictranstech/erpnext,gsnbng/erpnext,indictranstech/erpnext,geekroot/erpnext,geekroot/erpnext,indictranstech/erpnext