restrict material_request_type in Material Request form

This commit is contained in:
Anand Doshi 2013-03-18 18:20:09 +05:30
parent cfbd192782
commit 839fee3e71

View File

@ -105,6 +105,9 @@ class DocType(BuyingController):
import utilities
utilities.validate_status(self.doc.status, ["Draft", "Submitted", "Stopped",
"Cancelled"])
# restrict material request type
self.validate_value("material_request_type", "in", ["Purchase", "Transfer"])
# Get Purchase Common Obj
pc_obj = get_obj(dt='Purchase Common')