diff --git a/netforce_clinic/actions/clinic_branch.xml b/netforce_clinic/actions/clinic_branch.xml
new file mode 100644
index 0000000..abcaa30
--- /dev/null
+++ b/netforce_clinic/actions/clinic_branch.xml
@@ -0,0 +1,6 @@
+
+ Branch
+ multi_view
+ clinic.branch
+ clinic_menu
+
diff --git a/netforce_clinic/layouts/clinic_branch_form.xml b/netforce_clinic/layouts/clinic_branch_form.xml
new file mode 100644
index 0000000..98d4f3c
--- /dev/null
+++ b/netforce_clinic/layouts/clinic_branch_form.xml
@@ -0,0 +1,4 @@
+
diff --git a/netforce_clinic/layouts/clinic_branch_list.xml b/netforce_clinic/layouts/clinic_branch_list.xml
new file mode 100644
index 0000000..c77373f
--- /dev/null
+++ b/netforce_clinic/layouts/clinic_branch_list.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml
index ac0beb2..b610016 100644
--- a/netforce_clinic/layouts/clinic_menu.xml
+++ b/netforce_clinic/layouts/clinic_menu.xml
@@ -55,6 +55,7 @@
-
+
diff --git a/netforce_clinic/layouts/clinic_patient_form.xml b/netforce_clinic/layouts/clinic_patient_form.xml
index 7a91662..4445af6 100644
--- a/netforce_clinic/layouts/clinic_patient_form.xml
+++ b/netforce_clinic/layouts/clinic_patient_form.xml
@@ -15,6 +15,7 @@
+
diff --git a/netforce_clinic/layouts/clinic_patient_list.xml b/netforce_clinic/layouts/clinic_patient_list.xml
index 2e62a45..ad6d092 100644
--- a/netforce_clinic/layouts/clinic_patient_list.xml
+++ b/netforce_clinic/layouts/clinic_patient_list.xml
@@ -5,8 +5,9 @@
+
-
+
diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py
index 8b369ae..1ea8fa6 100644
--- a/netforce_clinic/models/__init__.py
+++ b/netforce_clinic/models/__init__.py
@@ -62,3 +62,4 @@ from . import report_recent_patient
from . import report_discontinue_patient
from . import report_nurse_fee_sum
from . import report_nurse_fee_detail
+from . import branch
diff --git a/netforce_clinic/models/branch.py b/netforce_clinic/models/branch.py
new file mode 100644
index 0000000..672d15e
--- /dev/null
+++ b/netforce_clinic/models/branch.py
@@ -0,0 +1,12 @@
+from netforce.model import Model, fields
+
+class Branch(Model):
+ _name="clinic.branch"
+ _string="Branch"
+ _key=['name']
+ _fields={
+ "name": fields.Char("Name",required=True,search=True),
+ "parent_id": fields.Many2One("clinic.branch","Parent"),
+ }
+
+Branch.register()
diff --git a/netforce_clinic/models/patient.py b/netforce_clinic/models/patient.py
index de5d8f7..79e07f3 100644
--- a/netforce_clinic/models/patient.py
+++ b/netforce_clinic/models/patient.py
@@ -14,7 +14,7 @@ class Patient(Model):
_string="Patient"
_audit_log=True
_multi_company=True
- _key=["name"]
+ _key=["number,name"]
def _get_age(self,ids,context):
res={}
@@ -82,6 +82,7 @@ class Patient(Model):
"documents": fields.One2Many("document","related_id","Documents"),
'resign_date': fields.Date("Resign Date"),
'rm_remain_visit': fields.Boolean("Auto Remove Remaining Visit"),
+ 'branch_id': fields.Many2One("clinic.branch","Branch"),
}
def _get_number(self,context={}):