How to export role permission manager of doctype?

I want to export these . Some how i managed to do this in hooks.py using fixtures

 {"dt": "Custom DocPerm", "filters": [
        [
            "parent", "in", [
                "Logi360 Branch"
            ]
        ]
    ]},

Still after migration i cannot get the permission to another site.

@Prasant_Pant did you ran the command bench export-fixtures ?

@bahaou yep

i got these

[
{
“amend”: 0,
“cancel”: 0,
“create”: 0,
“delete”: 0,
“docstatus”: 0,
“doctype”: “Custom DocPerm”,
“email”: 0,
“export”: 1,
“if_owner”: 0,
“import”: 0,
“modified”: “2024-04-23 11:52:37.137219”,
“name”: “91dd11b43c”,
“parent”: “Logi360 Branch”,
“permlevel”: 0,
“print”: 0,
“read”: 1,
“report”: 0,
“role”: “Logi360 Vendor”,
“select”: 0,
“share”: 0,
“submit”: 0,
“write”: 0
},
{
“amend”: 0,
“cancel”: 0,
“create”: 1,
“delete”: 1,
“docstatus”: 0,
“doctype”: “Custom DocPerm”,
“email”: 1,
“export”: 1,
“if_owner”: 0,
“import”: 0,
“modified”: “2024-01-11 14:09:10.406200”,
“name”: “8492802822”,
“parent”: “Logi360 Branch”,
“permlevel”: 0,
“print”: 1,
“read”: 1,
“report”: 1,
“role”: “System Manager”,
“select”: 1,
“share”: 1,
“submit”: 0,
“write”: 1
}
]

@Prasant_Pant did you also exported the role vendor ? and it should be before the docperm . for the second one it should be there . have you checked the list custom docperm ?
I am using exactly the same thing at it works perfectly after migrate .

Yep look at this code @bahaou

 {"dt": "Role", "filters": [
        [
            "name", "in", [
                "Logi360 Vendor","Logi360 Rider","Logi360 Admin","Logi360 User","Logi360 Manager"
            ]
        ]
    ]},
         {"dt": "Custom DocPerm", "filters": [
        [
            "parent", "in", [
                "Logi360 Branch"
            ]
        ]
    ]},

@Prasant_Pant idk what to tell you. this is my hooks files . they work fine on any site .
try to filter the perms using the role name in your case logi360 vendor . and delete the file before exporting it again.

  {"dt": "Role", "filters": [
        [
            "name", "in", [
                "Logi360 Vendor","Logi360 Rider","Logi360 Admin","Logi360 User","Logi360 Manager"
            ]
        ]
    ]},
         {"dt": "Custom DocPerm", "filters": [
        [
            "role", "in", [
                "Logi360 Vendor","Logi360 Rider","Logi360 Admin","Logi360 User","Logi360 Manager"
            ]
        ]
    ]},

see now @bahaou