fix: sales order reqd only checks for stock items (#19865)
This commit is contained in:
parent
4350846f1e
commit
7e958da6d6
@ -535,10 +535,8 @@ class SalesInvoice(SellingController):
|
||||
for i in dic:
|
||||
if frappe.db.get_single_value('Selling Settings', dic[i][0]) == 'Yes':
|
||||
for d in self.get('items'):
|
||||
is_stock_item = frappe.get_cached_value('Item', d.item_code, 'is_stock_item')
|
||||
if (d.item_code and is_stock_item == 1\
|
||||
and not d.get(i.lower().replace(' ','_')) and not self.get(dic[i][1])):
|
||||
msgprint(_("{0} is mandatory for Stock Item {1}").format(i,d.item_code), raise_exception=1)
|
||||
if (d.item_code and not d.get(i.lower().replace(' ','_')) and not self.get(dic[i][1])):
|
||||
msgprint(_("{0} is mandatory for Item {1}").format(i,d.item_code), raise_exception=1)
|
||||
|
||||
|
||||
def validate_proj_cust(self):
|
||||
|
@ -77,7 +77,6 @@
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"description": "Only for Stock Items",
|
||||
"fieldname": "so_required",
|
||||
"fieldtype": "Select",
|
||||
"label": "Sales Order Required",
|
||||
@ -138,7 +137,7 @@
|
||||
"icon": "fa fa-cog",
|
||||
"idx": 1,
|
||||
"issingle": 1,
|
||||
"modified": "2019-11-25 18:35:51.472653",
|
||||
"modified": "2019-12-09 13:38:36.486298",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Selling Settings",
|
||||
|
Loading…
x
Reference in New Issue
Block a user