Merge pull request #9851 from fumin/patch-1

fix: web form not submitting data in grid views
This commit is contained in:
mergify[bot] 2020-04-13 11:23:54 +00:00 committed by GitHub
commit 82a6715cb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,13 +105,14 @@ export default class WebForm extends frappe.ui.FieldGroup {
this.validate && this.validate();
// validation hack: get_values will check for missing data
let isvalid = super.get_values(this.allow_incomplete);
let doc_values = super.get_values(this.allow_incomplete);
if (!isvalid) return;
if (!doc_values) return;
if (window.saving) return;
let for_payment = Boolean(this.accept_payment && !this.doc.paid);
Object.assign(this.doc, doc_values);
this.doc.doctype = this.doc_type;
this.doc.web_form_name = this.name;