Skip to content

All fields are empty after paste doctype json content due to copy_doc not set doctype for child doc #15686

Description

@szufisher

Description of the issue

Context information (for bug reports)

Output of bench version

(paste here)

Steps to reproduce the issue

  1. drap select any existing doctype json file content and copy (ctrl + c)
  2. in any erpnext screen, paste (ctrl + v)
  3. system auto switch to doctype form view,

Observed result

only empty fields records pasted

Expected result

fields correctly copied

Stacktrace / full error message

(paste here)

Additional information

in the doctype json files, only child table field name is mentioned, in each child record there is no DocType, the copy_doc function relies on the doctype info to correctly copy the child doc.

{

 "doctype": "DocType",
  'name':'dummy'
 "fields": [
  {
   "fieldname": "holiday_date",
   "label": "Date",
  }]
}

the following highlighted line to be added.
image

OS version / distribution, Frappe install method, etc.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions