Production Plans shown only with status not started and material request (not all)

Hy Experts
I have created a link field Production Plan in custom doctype-Resource Planning. While clicking at this all production plans show, I want only production plans with status: Not Started and Material Request.

Your quick support is appreciable.

To some extent solution is found.

frappe.ui.form.on('Resource Planning', {
    onload: function(frm) {
        console.log('Resource Planning form loaded.');
        frm.fields_dict['production_plan'].get_query = function() {
            return {
                filters: [
                    ['status', '!=', 'Completed']
                ]
            };
        };
    }
});