get_field replaced with Meta.get_field

This commit is contained in:
Nabin Hait 2012-10-02 14:22:53 +05:30
parent 32128e82f3
commit 47d8947012
3 changed files with 3 additions and 2 deletions

View File

@ -30,7 +30,7 @@ wn.require('erpnext/setup/doctype/notification_control/notification_control.js')
// On Load
// -------
cur_frm.cscript.onload = function(doc,dt,dn) {
if(!doc.customer && doc.debit_to) get_field(dt, 'debit_to', dn).print_hide = 0;
if(!doc.customer && doc.debit_to) Meta.get_field(dt, 'debit_to', dn).print_hide = 0;
if (doc.__islocal) {
//if(!doc.voucher_date) set_multiple(dt,dn,{voucher_date:get_today()});
if(!doc.due_date) set_multiple(dt,dn,{due_date:get_today()});

View File

@ -53,7 +53,7 @@ cur_frm.cscript.employee = function(doc,cdt,cdn){
$c_obj(make_doclist(doc.doctype, doc.name),'set_approver','', function(r,rt){
if(r.message){
doc.employee_name = r.message['emp_nm'];
get_field(doc.doctype, 'kra_approver' , doc.name).options = r.message['app_lst'];
Meta.get_field(doc.doctype, 'kra_approver' , doc.name).options = r.message['app_lst'];
refresh_many(['kra_approver','employee_name']);
}
});

View File

@ -89,6 +89,7 @@ class DocType:
self.validate_fiscal_year()
def set_approver(self):
errprint('here')
ret={}
approver_lst =[]
emp_nm = self.get_employee_name()