frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
20.77k stars 7.14k forks source link

Creating a new Item without maintaining stock allows to update the stock in sales invoice,also allows to return the item #4845

Closed ravindra-lakal closed 8 years ago

ravindra-lakal commented 8 years ago

Whenever i create new item without "Maintaining Stock" then while making sales invoice if i select option as "Update Stock" then sales invoice get submitted. Actually it's not affecting in stock ,but should gives Error message when sales Invoice get submitted. Example:- In one sales Invoice->I have 15 items for which i have not maintained stock. when I check Update stock Checkbox then it becomes mandatory for me to select a Warehouse . I can even return these items. following are the steps to reproduce the issue 1.Create New Item - do not maintain stock

  1. Go to Sales Invoice ->Create New Sales Invoice Select Option as "Update Stock" 3.Sales Invoice gets Submitted. 4 Click make -> Return it also allows to return it.
nabinhait commented 8 years ago

By design we allowed both stock and non-stock items in a single Sales Invoice / Delivery Note. Is there any problem?

ravindra-lakal commented 8 years ago

I have an app in that all my items are non stock items

nabinhait commented 8 years ago

Then why are you checking "Update Stock" options?

tundebabzy commented 7 years ago

Hello @nabinhait . Your reaction to @ravindra-lakal last post shows that you expect users to only click the update stock checkbox for only maintained stock items. But imagine a case where an Item is legitimately mistakenly created as an unmaintained stock item. As a user who legitimately clicks the update stock option for maintained stock items, I think it is an obligation to at least give a warning to the user who is unknowingly trying to update stock of unmaintained stock items.

I vote for the update stock option be made strict to prevent accidents like this and to uphold POLA (principle of least astonishment).