[Minor] Variable assignment before reference

Variable = 'inspection_required_fieldname'
This commit is contained in:
Manas Solanki 2016-11-18 14:52:13 +05:30 committed by GitHub
parent 99dac07a56
commit 60db98aaff

View File

@ -262,6 +262,7 @@ class StockController(AccountsController):
'''Checks if quality inspection is set for Items that require inspection. '''Checks if quality inspection is set for Items that require inspection.
On submit, throw an exception''' On submit, throw an exception'''
inspection_required_fieldname = None
if self.doctype in ["Purchase Receipt", "Purchase Invoice"]: if self.doctype in ["Purchase Receipt", "Purchase Invoice"]:
inspection_required_fieldname = "inspection_required_before_purchase" inspection_required_fieldname = "inspection_required_before_purchase"
elif self.doctype in ["Delivery Note", "Sales Invoice"]: elif self.doctype in ["Delivery Note", "Sales Invoice"]: