Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Rushabh Mehta
2013-05-02 14:47:10 +05:30
22 changed files with 424 additions and 60 deletions

View File

@@ -1,8 +1,8 @@
[
{
"creation": "2013-03-01 19:09:43",
"creation": "2013-03-05 14:50:38",
"docstatus": 0,
"modified": "2013-03-01 08:22:16",
"modified": "2013-05-01 15:49:47",
"modified_by": "Administrator",
"owner": "harshada@webnotestech.com"
},
@@ -24,14 +24,19 @@
"permlevel": 0
},
{
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
"name": "__common__",
"parent": "Batch",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"read": 1,
"report": 1,
"role": "Material Master Manager",
"submit": 0
"submit": 0,
"write": 1
},
{
"doctype": "DocType",
@@ -94,28 +99,6 @@
"oldfieldtype": "Date"
},
{
"doctype": "DocField",
"fieldname": "trash_reason",
"fieldtype": "Small Text",
"label": "Trash Reason",
"oldfieldname": "trash_reason",
"oldfieldtype": "Small Text",
"read_only": 1
},
{
"cancel": 1,
"create": 1,
"doctype": "DocPerm",
"permlevel": 0,
"report": 1,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"doctype": "DocPerm",
"match": "",
"permlevel": 1
"doctype": "DocPerm"
}
]

View File

@@ -114,7 +114,8 @@ class DocType:
def update_serial_purchase_details(self, obj, d, serial_no, is_submit, purpose = '', rejected=None):
exists = webnotes.conn.sql("select name, status, docstatus from `tabSerial No` where name = '%s'" % (serial_no))
if is_submit:
if exists and exists[0][2] != 2 and purpose not in ['Material Transfer', 'Sales Return']:
if exists and exists[0][2] != 2 and \
purpose not in ['Material Transfer', "Material Receipt", 'Sales Return']:
msgprint("Serial No: %s already %s" % (serial_no, exists and exists[0][1]), raise_exception = 1)
elif exists:
s = Document('Serial No', exists and exists[0][0])