clinic/netforce_clinic/models/patient_move.py

18 lines
420 B
Python
Raw Normal View History

2015-07-28 11:58:54 +00:00
import time
from netforce.model import Model, fields
class PatientMove(Model):
_name="clinic.patient.move"
_fields={
'patient_id': fields.Many2One('clinic.patient','Patient'),
'date': fields.DateTime("Date"),
'location_id': fields.Many2One("clinic.department","Department"),
}
_defaults={
'date': lambda *a: time.strftime("%Y-%m-%d %H:%M:%S"),
}
PatientMove()