Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  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))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement