'Copy params from list view to new view'

def update_params_from_form_dict(self, context):

    context.params_from_form_dict = u''
    params = {}
    for (key, value) in iteritems(frappe.form_dict):
        if frappe.get_meta(self.doc_type).get_field(key):
            params[key] = value
    if params:
        context.params_from_form_dict = (u'&' + urlencode(params))
