18 lines
420 B
Python
18 lines
420 B
Python
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()
|