Merge pull request #22199 from marination/qi-on-return

fix: Don't prompt for Quality Inspection on Return Documents.
This commit is contained in:
Deepesh Garg 2020-06-14 17:09:51 +05:30 committed by GitHub
commit 11253a91f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,8 @@ class QualityInspectionNotSubmittedError(frappe.ValidationError): pass
class StockController(AccountsController):
def validate(self):
super(StockController, self).validate()
self.validate_inspection()
if not self.get('is_return'):
self.validate_inspection()
self.validate_serialized_batch()
self.validate_customer_provided_item()