removed make_feed() function

This commit is contained in:
Nabin Hait 2011-09-16 11:24:54 +05:30
parent 7545b54a9e
commit 73c4a4a154
3 changed files with 1 additions and 27 deletions

View File

@ -28,18 +28,9 @@ class DocType:
cmt.comment_time = time.strftime('%H:%M') cmt.comment_time = time.strftime('%H:%M')
cmt.save(1) cmt.save(1)
try:
get_obj('Feed Control').upate_comment_in_feed(args['comment_doctype'], args['comment_docname'])
except:
pass
else: else:
raise Exception raise Exception
def remove_comment(self, args): def remove_comment(self, args):
args = json.loads(args) args = json.loads(args)
sql("delete from `tabComment Widget Record` where name=%s",args['id']) sql("delete from `tabComment Widget Record` where name=%s",args['id'])
try:
get_obj('Feed Control').upate_comment_in_feed(args['dt'], args['dn'])
except: pass

View File

@ -411,9 +411,3 @@ class DocType:
new_tot_income = cint(self.doc.tax_tot_income) + cint(self.doc.edu_cess) - (cint(ret_income_tax[0][0]) or 0) new_tot_income = cint(self.doc.tax_tot_income) + cint(self.doc.edu_cess) - (cint(ret_income_tax[0][0]) or 0)
self.doc.tax_per_month = new_tot_income/cint(self.doc.rem_months) self.doc.tax_per_month = new_tot_income/cint(self.doc.rem_months)
# on update
def on_update(self):
obj = get_obj('Feed Control', 'Feed Control')
obj.make_feed(self.doc)

View File

@ -116,25 +116,16 @@ class DocType(TransactionBase):
ch.person = d ch.person = d
ch.save(1) ch.save(1)
#user_list = ['Sales Manager', 'Sales User']
#for d in user_list:
# ch = addchild(ev, 'event_individuals', 'Event User', 0)
# ch.person = d
# ch.save()
#--------------Validation For Last Contact Date----------------- #--------------Validation For Last Contact Date-----------------
# ==================================================================================================================== # ====================================================================================================================
def set_last_contact_date(self): def set_last_contact_date(self):
#if not self.doc.contact_date_ref:
#self.doc.contact_date_ref=self.doc.contact_date
#self.doc.last_contact_date=self.doc.contact_date_ref
if self.doc.contact_date_ref and self.doc.contact_date_ref != self.doc.contact_date: if self.doc.contact_date_ref and self.doc.contact_date_ref != self.doc.contact_date:
if getdate(self.doc.contact_date_ref) < getdate(self.doc.contact_date): if getdate(self.doc.contact_date_ref) < getdate(self.doc.contact_date):
self.doc.last_contact_date=self.doc.contact_date_ref self.doc.last_contact_date=self.doc.contact_date_ref
else: else:
msgprint("Contact Date Cannot be before Last Contact Date") msgprint("Contact Date Cannot be before Last Contact Date")
raise Exception raise Exception
#set(self.doc, 'contact_date_ref',self.doc.contact_date)
# check if item present in item table # check if item present in item table
# ==================================================================================================================== # ====================================================================================================================
@ -172,8 +163,6 @@ class DocType(TransactionBase):
else: else:
set(self.doc, 'status', 'Cancelled') set(self.doc, 'status', 'Cancelled')
get_obj('Feed Control').make_feed(self.doc, 'cancelled')
# declare as enquiry lost # declare as enquiry lost
#--------------------------- #---------------------------
def declare_enquiry_lost(self,arg): def declare_enquiry_lost(self,arg):