mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 22:49:19 +00:00
fixes related to --> clear locals and then sync locals when whole doclist is passed
This commit is contained in:
@@ -48,7 +48,7 @@ class DocType:
|
||||
if not self.doc.kra_template:
|
||||
msgprint("Please select Appraisal Template to be be fetched")
|
||||
raise Exception
|
||||
self.doc.clear_table(self.doclist,'appraisal_details')
|
||||
self.doclist = self.doc.clear_table(self.doclist,'appraisal_details')
|
||||
get_obj('DocType Mapper', 'Appraisal Template-Appraisal').dt_map('Appraisal Template', 'Appraisal', self.doc.kra_template, self.doc, self.doclist, "[['Appraisal Template','Appraisal'],['Appraisal Template Goal', 'Appraisal Goal']]")
|
||||
|
||||
def validate_dates(self):
|
||||
|
||||
@@ -113,7 +113,7 @@ class DocType:
|
||||
# clear table
|
||||
# ------------
|
||||
def clear_table(self):
|
||||
self.doc.clear_table(self.doclist,'holiday_list_details')
|
||||
self.doclist = self.doc.clear_table(self.doclist,'holiday_list_details')
|
||||
|
||||
|
||||
# ***************************************** validate *************************************************
|
||||
|
||||
@@ -24,7 +24,7 @@ cur_frm.cscript.onload = function(doc,dt,dn){
|
||||
// Validation For To Date
|
||||
// ================================================================================================
|
||||
cur_frm.cscript.to_date = function(doc, cdt, cdn) {
|
||||
$c('runserverobj', args={'method':'to_date_validation','docs':compress_doclist([doc])},
|
||||
$c('runserverobj', args={'method':'to_date_validation','docs':compress_doclist(make_doclist(doc.doctype, doc.name))},
|
||||
function(r, rt) {
|
||||
var doc = locals[cdt][cdn];
|
||||
if (r.message) {
|
||||
|
||||
@@ -70,8 +70,8 @@ class DocType(TransactionBase):
|
||||
# Pull struct details
|
||||
#=======================================================
|
||||
def pull_sal_struct(self, struct):
|
||||
self.doc.clear_table(self.doclist, 'earning_details')
|
||||
self.doc.clear_table(self.doclist, 'deduction_details')
|
||||
self.doclist = self.doc.clear_table(self.doclist, 'earning_details')
|
||||
self.doclist = self.doc.clear_table(self.doclist, 'deduction_details')
|
||||
|
||||
get_obj('DocType Mapper', 'Salary Structure-Salary Slip').dt_map('Salary Structure', 'Salary Slip', struct, self.doc, self.doclist, "[['Salary Structure', 'Salary Slip'],['Salary Structure Earning', 'Salary Slip Earning'],['Salary Structure Deduction','Salary Slip Deduction']]")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user