Error Making a PO from a Material request

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)

Is the material request submitted?

Yes

Inviato da Samsung Mobile

-------- Messaggio originale --------
Da: Ben Cornwell Mott discuss@erpnext.com
Data: 26/08/2016 19:14 (GMT+01:00)
A: Laura Bianchini laura.bianchini@diemmegroup.net
Oggetto: [erpnext-discuss] [ERPNext/Stock] Error Making a PO from a Material request

    Ben_Cornwell_Mott<http://discuss.frappe.io/users/ben_cornwell_mott>

August 26

Is the material request submitted?

Visit Topichttp://discuss.frappe.io/t/error-making-a-po-from-a-material-request/15430/2 or reply to this email to respond.

To unsubscribe from these emails, click herehttp://discuss.frappe.io/email/unsubscribe/be8dc86080c0b7ce84b12bc67e8e2693bd8bda4091a1ac9bf6e0fbb75c520185.

Disclaimer
AVVERTENZE AI SENSI DEL DLGS 196/2003
Le informazioni contenute in questa comunicazione e nel/i documento/i ad essa allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo ? consentito esclusivamente al destinatario del messaggio, per le finalit? indicate nel messaggio stesso. Nel caso questa comunicazione Vi sia pervenuta per errore, Vi preghiamo cortesemente di darcene notizia via e-mail all’indirizzo e di procedere immediatamente alla distruzione del messaggio, cancellandolo dal Vostro sistema. Vi informiamo che costituisce comportamento contrario ai principi dettati dal Dlgs. 196/2003 trattenere il messaggio, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalit? diverse. Grazie.
The information contained in this e-mail message is confidential and intended only for the use of the individual or entity named above. If you are not the intended recipient, please notify us immediately by telephone or e-mail and destroy this communication. Due to the way of the transmission, we do not undertake any liability with respect to the secrecy and confidentiality of the information contained in this e-mail message.

Hi,

I can not explain how it happened but the problem is to change the type of data in the database was docstatus field varchar and not int.

I’ve fix in database the data type and I resolve.