Guest User

Untitled

a guest
May 23rd, 2018
71
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from trytond.transaction import Transaction
  2. pat_invoice = fields.Function(fields.Char('Paait time', help="How long the patient waited",states=STATES),'get_invoice')
  3.  
  4. def get_invoice(self, name):
  5. pool = Pool()
  6. print(self.patient.name,"")
  7. cursor = Transaction().connection.cursor()
  8. cursor.execute("SELECT COUNT(id) FROM gnuhealth_health_service WHERE patient = %s",(a))
  9. res = cursor.fetchone()[0]
  10. return(str(res))
RAW Paste Data