Issue in Production Order when start reserved_qty_for_production cannot be null

Traceback (most recent call last):
File “/home/brillare/frappe-bench/apps/frappe/frappe/app.py”, line 57, in application
response = frappe.handler.handle()
File “/home/brillare/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/brillare/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/brillare/frappe-bench/apps/frappe/frappe/init.py”, line 923, in call
return fn(*args, **newargs)
File “/home/brillare/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 45, in cancel
doc.cancel()
File “/home/brillare/frappe-bench/apps/frappe/frappe/model/document.py”, line 746, in cancel
self._cancel()
File “/home/brillare/frappe-bench/apps/frappe/frappe/model/document.py”, line 736, in _cancel
self.save()
File “/home/brillare/frappe-bench/apps/frappe/frappe/model/document.py”, line 230, in save
return self._save(*args, **kwargs)
File “/home/brillare/frappe-bench/apps/frappe/frappe/model/document.py”, line 280, in _save
self.run_post_save_methods()
File “/home/brillare/frappe-bench/apps/frappe/frappe/model/document.py”, line 795, in run_post_save_methods
self.run_method(“on_cancel”)
File “/home/brillare/frappe-bench/apps/frappe/frappe/model/document.py”, line 666, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/brillare/frappe-bench/apps/frappe/frappe/model/document.py”, line 887, in composer
return composed(self, method, *args, **kwargs)
File “/home/brillare/frappe-bench/apps/frappe/frappe/model/document.py”, line 870, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/brillare/frappe-bench/apps/frappe/frappe/model/document.py”, line 660, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/brillare/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 192, in on_cancel
self.update_reserved_qty_for_production()
File “/home/brillare/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 417, in update_reserved_qty_for_production
stock_bin.update_reserved_qty_for_production()
File “/home/brillare/frappe-bench/apps/erpnext/erpnext/stock/doctype/bin/bin.py”, line 93, in update_reserved_qty_for_production
self.db_set(‘reserved_qty_for_production’, self.reserved_qty_for_production)
File “/home/brillare/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 390, in db_set
self.modified, self.modified_by, update_modified=update_modified)
File “/home/brillare/frappe-bench/apps/frappe/frappe/database.py”, line 664, in set_value
values, debug=debug)
File “/home/brillare/frappe-bench/apps/frappe/frappe/database.py”, line 154, in sql
self._cursor.execute(query, values)
File “/home/brillare/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 250, in execute
self.errorhandler(self, exc, value)
File “/home/brillare/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 50, in defaulterrorhandler
raise errorvalue
OperationalError: (1048, “Column ‘reserved_qty_for_production’ cannot be null”)

any one have solution?

I think you might want to describe in a bit more detail what you are trying to do and when it fails ? :slight_smile: a few photos could also help! I dont know much about production orders, but i’m sure you would get more answers like this!