Tuesday, 1 May 2018

Add new row in child table using Java script i. e. add_child

frappe.ui.form.on("Salary Slip", "validate", function(frm) {
deduction_amount = cur_frm.doc.deduction_amount;
frappe.msgprint(deduction_amount);
var row = frappe.model.add_child(cur_frm.doc, "Salary Slip", "deductions");
    row.salary_component = "Attendance Violation";
    row.amount = Math.round(deduction_amount);
refresh_field("deductions");
});

No comments:

Post a Comment

Django rest api - filter

views.py from django_filters.rest_framework import DjangoFilterBackend class PollList(viewsets.ModelViewSet):     queryset = X.objects...