in a custom report filters i have two fields, one of type Link and other of type Dynamic Field.
{
"fieldname":"voucher_type",
"label": __("Voucher Type"),
"fieldtype": "Link",
"options": "DocType",
"width": "100px" ,
// "reqd": 1,
get_query : () => {
const docs = options.map((doc) => doc.voucher_type);
// docs = ['Delivery Note', 'Purchase Receipt', 'Journal Entry']
return {
filters : {
name : ["in" , docs]
}
}
},
on_change : () => {
frappe.query_report.set_filter_value("voucher_no", "");
}
},
{
"fieldname": "voucher_no",
"label": __("Voucher No"),
"fieldtype": "Dynamic Link",
"options": "voucher_type",
"width": "100px",
"get_query": () => {
return {
filters: {
docstatus: 2
}
}
}
}
the problem happens when switch languages , that voucher_no field of dynamic link gets the translated values from the voucher_type whic is a Link to doctype, so it tries to find a doctype with the wrong name.
i need non-translated values passed to the dynamic link type for the voucher_no name.