Export fixtures for Custom Doctype, parent field is not exported

Hi there, i’m trying to export fixtures for Custom DocPerm DocType for a specific Role.

On hooks, i’ve added:

fixtures = [{
        "doctype": "Custom DocPerm",
        "filters": {
        "role": ["in", "Role1"]
}]  

the result of the export is:

[{
  "amend": 0, 
  "apply_user_permissions": 1, 
  "cancel": 0, 
  "create": 0, 
  "delete": 0, 
  "docstatus": 0, 
  "doctype": "Custom DocPerm", 
  "email": 0, 
  "export": 0, 
  "if_owner": 0, 
  "import": 0, 
  "modified": "2017-02-23 17:12:08.760915", 
  "name": "a1bccd5233", 
  "permlevel": 0, 
  "print": 0, 
  "read": 1, 
  "report": 0, 
  "role": "Role1", 
  "set_user_permissions": 0, 
  "share": 0, 
  "submit": 0, 
  "user_permission_doctypes": null, 
  "write": 0
 }, 
 {
  "amend": 0, 
  "apply_user_permissions": 1, 
  "cancel": 0, 
  "create": 0, 
  "delete": 0, 
  "docstatus": 0, 
  "doctype": "Custom DocPerm", 
  "email": 0, 
  "export": 0, 
  "if_owner": 0, 
  "import": 0, 
  "modified": "2017-02-23 17:12:37.930664", 
  "name": "8606b3cc36", 
  "permlevel": 0, 
  "print": 1, 
  "read": 1, 
  "report": 1, 
  "role": "Role1", 
  "set_user_permissions": 0, 
  "share": 0, 
  "submit": 0, 
  "user_permission_doctypes": "[\"Warehouse\"]", 
  "write": 1
 }] 

Problem is that the parent field, actually the DocType name to which role is applied, is not exported so it’s not possible to link DocType to Role.

Could you please have a look?

Thx

Thanks for reporting the issue. Can you please create a github issue for this?

@nabinhait, done …

@nabinhait I found out that exporting Custom DocPerm as fixtures, every run of bench update, it will create a new row in Custom DocPerm duplicating the existing one.

Any hint on how to fix?

Thx

I had same issue !
any solution yet !