diff --git a/frontend/src/components/Controls/Grid.vue b/frontend/src/components/Controls/Grid.vue index 893f2573..1a0c082c 100644 --- a/frontend/src/components/Controls/Grid.vue +++ b/frontend/src/components/Controls/Grid.vue @@ -417,6 +417,8 @@ const addRow = () => { newRow.name = getRandom(10) showRowList.value.push(false) newRow['__islocal'] = true + newRow['idx'] = rows.value.length + 1 + newRow['doctype'] = props.doctype rows.value.push(newRow) } diff --git a/frontend/src/data/script.js b/frontend/src/data/script.js index 98563d92..b632b5b2 100644 --- a/frontend/src/data/script.js +++ b/frontend/src/data/script.js @@ -162,6 +162,10 @@ export function getScript(doctype, view = 'Form') { return null } + row.parent = row.parent || data.name + row.parentype = row.parenttype || data.doctype + row.parentfield = row.parentfield || parentField + return createDocProxy(row, instance) }