MandatoryError: project_name while creating production order from production planning tool

Hi All,

I made Project Name mandatory in production order form. And while creating production order from production planning tool its is giving above mentioned error. I think may be it is bug because even i mentioned project name in sales order and it is not fetching project name from that. Here is the error message

Traceback (innermost last):
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/app.py”, line 51, in application
response = frappe.handler.handle()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/handler.py”, line 69, in handle
execute_cmd(cmd)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/handler.py”, line 92, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 751, in call
return fn(*args, **newargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/handler.py”, line 23, in runserverobj
frappe.desk.form.run_method.runserverobj(method, docs=docs, dt=dt, dn=dn, arg=arg, args=args)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/desk/form/run_method.py”, line 35, in runserverobj
r = doc.run_method(method)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 509, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 625, in composer
return composed(self, method, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 608, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 503, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py”, line 172, in raise_production_order
pro = self.create_production_order(items)
File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py”, line 218, in create_production_order
pro.insert()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 179, in insert
self._validate()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 300, in _validate
self._validate_mandatory()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 462, in _validate_mandatory
raise frappe.MandatoryError(", ".join((each[0] for each in missing)))
MandatoryError: project_name