Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from trytond.transaction import Transaction
- pat_invoice = fields.Function(fields.Char('Paait time', help="How long the patient waited",states=STATES),'get_invoice')
- def get_invoice(self, name):
- pool = Pool()
- print(self.patient.name,"")
- cursor = Transaction().connection.cursor()
- cursor.execute("SELECT COUNT(id) FROM gnuhealth_health_service WHERE patient = %s",(a))
- res = cursor.fetchone()[0]
- return(str(res))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement