Guest User

appointment.py

a guest
Sep 10th, 2013
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.71 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2.  
  3. from trytond.model import ModelView, ModelSQL, fields, Workflow
  4. from trytond.pyson import Eval, Not, Equal
  5.  
  6. __all__ = ['Appointment']
  7.  
  8. # ---------------------------------------------------------------------------------
  9.  
  10. class Appointment(Workflow, ModelSQL, ModelView):
  11.     'Add Calendar to the Appointment'
  12.     __name__ = 'gnuhealth.appointment'
  13.  
  14.     doctor = fields.Many2One('gnuhealth.physician', 'Physician',
  15.         select=True, help='Physician\'s Name')
  16.  
  17.     service = fields.Many2One('product.product', 'Service',
  18.         domain=[('id', 'in', Eval('doctor.services'))],
  19.         depends=['doctor'],
  20.         select=True,
  21.         help='Consultation Service given from doctor')
Advertisement
Add Comment
Please, Sign In to add comment