Hi guys, I need help.
I try to create a dialog with msgprint, but in its structure I am passing a call to a server-side function and then I assign the parameters of that function, but it returns me as if I had not passed them.
frappe.msgprint(
msg='NO SEQUENTIAL',
title='CAUTION-SEQUENTIAL',
raise_exception=1,
primary_action={
"label": _('OK, Validate'),
"server_action":"electronic_billing.electronic_billing.doctype.api_server.api_server.submit_docs",
"args":{"voucher_name":self.name,"voucher_type":"Sales Invoice"}
},
)
The following code is part of the definition of the function to be called.
@frappe.whitelist()
def submit_docs(voucher_name, voucher_type):
respuesta = frappe.db.get_value(voucher_type, {'name': voucher_name}, ['status_voucher'])
print("STATUS:",status)
return respuesta
finally, this is the response from the server when the function is executed and I press the OK button
any advice is very helpful, thanks in advance