Not allowed via controller permission check

I was trying to create Opportunity for a particular Lead the below mentioned popup comes and does not allow to create an Opportunity.

notallowedviacontroller

This permission denial is coming only for one particular Lead, for the other Leads I am able to create Opportunity without any problem. User has permissions to the doctype. But still this popup comes for only one lead.

Can anybody please help me out in fixing this problem.

Hi @bnmahesh0017,

Please give a read-right to ToDo.

Please select the Role you are according to and give a read right and then check for it.

Thank You!

As you can see in the pic above Role - All has all the required permission.
But still the error comes.

Any User Permission applies or not.
Please check it.

Checked. But no User Permission is applied on it.

Any solution?

I have same issue in version-13.

I had the same issue, when allocated to is not the logged in user. I need to set the assigned by user to the logged in user for it to work

It has to do with permission setup, So I created a custom script

frappe.ui.form.on(‘ToDo’, {
refresh(frm) {
// your code here
},

before_save(frm) {
    if (!(frm.allocated_to)) {
        frm.set_value({allocated_to: frm.doc.owner});
    }
    
    if (!(frm.assigned_by)) {
        frm.set_value({assigned_by: frm.doc.owner});
    }
}

});