Today making a PO from a Material request I get this error:
Cannot map because following condition fails: docstatus=1’
Error Report
Python 2.7.3: /home/erpnext/frappe-bench/env/bin/python2.7 (prefix: /home/erpnext/frappe-bench/env)
Timestamp:
2016-08-26 19:54:07.275854
Relapsed
1
Exception
args ('Cannot map because following condition fails: docstatus=1',)
http_status_code 417
message 'Cannot map because following condition fails: docstatus=1'
Locals
encode
inspect
msg u'Cannot map because following condition fails: docstatus=1'
raise_exception
Traceback
/home/erpnext/frappe-bench/apps/frappe/frappe/app.py: 69
67
68 if frappe.local.form_dict.cmd:
69 response = frappe.handler.handle()
70
71 elif frappe.request.path.startswith("/api/"):
Locals
/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py: 77
75
76 if cmd!='login':
77 execute_cmd(cmd)
78
79 return build_response("json")
Locals
/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py: 94
92 is_whitelisted(method)
93
94 ret = frappe.call(method, **frappe.form_dict)
95
96 # returns with a message
Locals
/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py: 788
786 del newargs["flags"]
787
788 return fn(*args, **newargs)
789
790 def make_property_setter(args, ignore_validate=False, validate_fields_for_doctype=True):
Locals
/home/erpnext/frappe-bench/apps/erpnext/erpnext/stock/doctype/material_request/material_request.py: 205
203 "condition": lambda doc: doc.ordered_qty < doc.qty
204 }
205 }, target_doc, set_missing_values)
206
207 return doclist
Locals
/home/erpnext/frappe-bench/apps/frappe/frappe/model/mapper.py: 28
26 target_doc.raise_no_permission_to("create")
27
28 map_doc(source_doc, target_doc, table_maps[source_doc.doctype])
29
30 row_exists_for_parentfield = {}
Locals
/home/erpnext/frappe-bench/apps/frappe/frappe/model/mapper.py: 82
80 if source_doc.get(key) != condition[1]:
81 frappe.throw(_("Cannot map because following condition fails: ")
82 + key + "=" + cstr(condition[1]))
83
84 map_fields(source_doc, target_doc, table_map, source_parent)
Locals
/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py: 257
255 :param msg: Message.
256 :param exc: Exception class. Default `frappe.ValidationError`"""
257 msgprint(msg, raise_exception=exc)
258
259 def create_folder(path, with_init=False):
Locals
/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py: 250
248
249 message_log.append((small and '__small:' or '')+cstr(msg or ''))
250 _raise_exception()
251
252 def throw(msg, exc=ValidationError):
Locals
/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py: 235
233 import inspect
234 if inspect.isclass(raise_exception) and issubclass(raise_exception, Exception):
235 raise raise_exception, encode(msg)
236 else:
237 raise ValidationError, encode(msg)