def post_response(self,arg): arg = eval(arg) res = Document('Ticket Response Detail') res.response = arg['response'] res.response_by = arg['response_by'] res.response_date = nowdate(); res.parent = arg['parent'] res.parenttype = 'Ticket' res.parentfield = 'ticket_response_details' res.save(1) if self.doc.senders_email and self.doc.allocated_to: email = [] email.append(self.doc.senders_email) email.append(self.doc.allocated_to) sendmail(email,'*****@*****.**',subject = 'Response to Ticket:%s, %s' % (self.doc.name,self.doc.subject) or '',parts = [['text/html',self.get_response_summary(arg['response_by'],arg['response']) or '']]) if not self.doc.allocated_to: msgprint('Please enter valid assignee_email') raise Exception
def set_values(access_token,refresh_token,user_name): #webnotes.errprint("in the set_values") pr = Document('Profile',user_name) pr.response = access_token pr.refresh_token=refresh_token pr.save()