Merge pull request #18736 from Mangesh-Khairnar/fix-travis

fix: travis
This commit is contained in:
Mangesh-Khairnar 2019-08-14 16:33:34 +05:30 committed by GitHub
commit 2e1d7cbdc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
from erpnext.stock.doctype.quality_inspection_template.quality_inspection_template \
import get_template_details
@ -12,7 +11,6 @@ class QualityInspection(Document):
def validate(self):
if not self.readings and self.item_code:
self.get_item_specification_details()
self.validate_inspection_type()
def get_item_specification_details(self):
if not self.quality_inspection_template:
@ -29,14 +27,6 @@ class QualityInspection(Document):
child.value = d.value
child.status = "Accepted"
def validate_inspection_type(self):
if self.inspection_type != "In Process":
inspection_required = frappe.db.get_value("Item", filters={
'name': self.item_code
}, fieldname=['inspection_required_before_purchase', 'inspection_required_before_delivery'])
if 0 in inspection_required:
frappe.throw(_('Inspection type for the item can only be in process.'))
def get_quality_inspection_template(self):
template = ''
if self.bom_no: