[minor] fix server error for new production order if sales order is invalid
Merge pull request #1964 from frappe/new-production-order-fix

[minor] fix server error for new production order if sales order is invalid