diff --git a/netforce_clinic/actions/clinic_department.xml b/netforce_clinic/actions/clinic_department.xml
new file mode 100644
index 0000000..caf1105
--- /dev/null
+++ b/netforce_clinic/actions/clinic_department.xml
@@ -0,0 +1,6 @@
+
+ Deparments
+ multi_view
+ clinic.department
+ clinic_menu
+
diff --git a/netforce_clinic/actions/clinic_doctor.xml b/netforce_clinic/actions/clinic_doctor.xml
index 696afce..9090912 100644
--- a/netforce_clinic/actions/clinic_doctor.xml
+++ b/netforce_clinic/actions/clinic_doctor.xml
@@ -1,5 +1,5 @@
- Doctor
+ Doctors
multi_view
clinic.doctor
[["All",[]],["Draft",[["state","=","draft"]]],["Active",[["state","=","active"]]],["Deactive",[["state","=","deactive"]]]]
diff --git a/netforce_clinic/actions/clinic_nurse.xml b/netforce_clinic/actions/clinic_nurse.xml
index 8dd47cf..1f49d69 100644
--- a/netforce_clinic/actions/clinic_nurse.xml
+++ b/netforce_clinic/actions/clinic_nurse.xml
@@ -1,5 +1,5 @@
- Nurse
+ Nurses
multi_view
clinic.nurse
[["All",[]],["Draft",[["state","=","draft"]]],["Active",[["state","=","active"]]],["Deactive",[["state","=","deactive"]]]]
diff --git a/netforce_clinic/actions/clinic_patient.xml b/netforce_clinic/actions/clinic_patient.xml
index af9dd00..af61e9e 100644
--- a/netforce_clinic/actions/clinic_patient.xml
+++ b/netforce_clinic/actions/clinic_patient.xml
@@ -1,5 +1,5 @@
- Patient
+ Patients
multi_view
clinic.patient
[["All",[]],["Draft",[["state","=","draft"]]],["Active",[["state","=","active"]]],["Deactive",[["state","=","deactive"]]]]
diff --git a/netforce_clinic/layouts/clinic_department_form.xml b/netforce_clinic/layouts/clinic_department_form.xml
new file mode 100644
index 0000000..d6385b3
--- /dev/null
+++ b/netforce_clinic/layouts/clinic_department_form.xml
@@ -0,0 +1,5 @@
+
diff --git a/netforce_clinic/layouts/clinic_department_list.xml b/netforce_clinic/layouts/clinic_department_list.xml
new file mode 100644
index 0000000..d32d65c
--- /dev/null
+++ b/netforce_clinic/layouts/clinic_department_list.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/netforce_clinic/layouts/clinic_doctor_form.xml b/netforce_clinic/layouts/clinic_doctor_form.xml
index 3a026ba..c8f6f52 100644
--- a/netforce_clinic/layouts/clinic_doctor_form.xml
+++ b/netforce_clinic/layouts/clinic_doctor_form.xml
@@ -7,14 +7,13 @@
-
-
+
diff --git a/netforce_clinic/layouts/clinic_hd_case_form.xml b/netforce_clinic/layouts/clinic_hd_case_form.xml
index 7be8c49..a1c2f23 100644
--- a/netforce_clinic/layouts/clinic_hd_case_form.xml
+++ b/netforce_clinic/layouts/clinic_hd_case_form.xml
@@ -43,10 +43,10 @@
-
+
-
+
diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml
index 41377c6..e5bf288 100644
--- a/netforce_clinic/layouts/clinic_menu.xml
+++ b/netforce_clinic/layouts/clinic_menu.xml
@@ -1,12 +1,15 @@
diff --git a/netforce_clinic/layouts/clinic_nurse_form.xml b/netforce_clinic/layouts/clinic_nurse_form.xml
index 89ce74b..74f22c1 100644
--- a/netforce_clinic/layouts/clinic_nurse_form.xml
+++ b/netforce_clinic/layouts/clinic_nurse_form.xml
@@ -7,12 +7,11 @@
-
-
+
diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py
index 7253074..67d599b 100644
--- a/netforce_clinic/models/__init__.py
+++ b/netforce_clinic/models/__init__.py
@@ -6,4 +6,5 @@ from . import clinic_hd_case
from . import clinic_hd_case_line
from . import clinic_hd_case_line_detail
from . import clinic_dialyzer
+from . import clinic_department
from . import clinic_setting
diff --git a/netforce_clinic/models/clinic_department.py b/netforce_clinic/models/clinic_department.py
new file mode 100644
index 0000000..874816c
--- /dev/null
+++ b/netforce_clinic/models/clinic_department.py
@@ -0,0 +1,14 @@
+from netforce.model import Model, fields
+
+class Department(Model):
+ _name="clinic.department"
+ _string="Department"
+ #_name_field="name"
+
+ _fields={
+ "name": fields.Char("Name",required=True,search=True),
+ "code": fields.Char("Code",search=True),
+ "parent_id": fields.Many2One("clinic.department", "Parent"),
+ }
+
+Department.register()
diff --git a/netforce_clinic/models/clinic_doctor.py b/netforce_clinic/models/clinic_doctor.py
index 8206cc1..e687150 100644
--- a/netforce_clinic/models/clinic_doctor.py
+++ b/netforce_clinic/models/clinic_doctor.py
@@ -1,7 +1,6 @@
-from netforce.model import Model, fields, get_model
-from netforce.utils import get_data_path
import time
-from netforce.access import get_active_user
+
+from netforce.model import Model, fields, get_model
from netforce.access import get_active_company
class Doctor(Model):
@@ -16,7 +15,7 @@ class Doctor(Model):
"date": fields.Date("Create Date",required=True,search=True),
"birthday": fields.Date("BirthDay",required=True,search=True),
"telephone": fields.Char("Telephone",required=True,search=True),
- "department": fields.Char("Department",required=True,search=True),
+ "department_id": fields.Many2One("clinic.department", "Department",required=True,search=True),
"mobile": fields.Char("Mobile",required=True,search=True),
"state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status",required=True),
"addresses": fields.One2Many("address","related_id","Addresses"),
@@ -52,5 +51,4 @@ class Doctor(Model):
obj=self.browse(ids)[0]
obj.write({"state":"voided"})
-
Doctor.register()
diff --git a/netforce_clinic/models/clinic_nurse.py b/netforce_clinic/models/clinic_nurse.py
index 40950b7..f80085f 100644
--- a/netforce_clinic/models/clinic_nurse.py
+++ b/netforce_clinic/models/clinic_nurse.py
@@ -16,7 +16,7 @@ class Nurse(Model):
"date": fields.Date("Create Date",required=True,search=True),
"birthday": fields.Date("BirthDay",required=True,search=True),
"telephone": fields.Char("Telephone",required=True,search=True),
- "department": fields.Char("Department",required=True,search=True),
+ "department_id": fields.Many2One("clinic.department", "Department",required=True,search=True),
"mobile": fields.Char("Mobile",required=True,search=True),
"state": fields.Selection([("draft","Draft"),("active","Active"),("deactive","Deactive")],"Status",required=True),
"addresses": fields.One2Many("address","related_id","Addresses"),