Explorar el Código

fix: add new row with linked field only if table is mandatory

version-14
Shariq Ansari hace 3 años
padre
commit
d1846b6dcf
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      frappe/public/js/frappe/form/form.js

+ 1
- 1
frappe/public/js/frappe/form/form.js Ver fichero

@@ -1684,7 +1684,7 @@ frappe.ui.form.Form = class FrappeForm {
new_doc[df.fieldname] = me.doc.name;
} else if (['Link', 'Dynamic Link'].includes(df.fieldtype) && me.doc[df.fieldname]) {
new_doc[df.fieldname] = me.doc[df.fieldname];
} else if (df.fieldtype === 'Table' && df.options) {
} else if (df.fieldtype === 'Table' && df.options && df.reqd) {
let row = new_doc[df.fieldname][0];
me.set_link_field(df.options, row);
}


Cargando…
Cancelar
Guardar