cycle item

conv_bal
watcha.h 2014-11-02 01:17:40 +07:00
parent 62f2c584aa
commit b91f11c93a
6 changed files with 55 additions and 1 deletions

View File

@ -4,8 +4,22 @@
<button string="Options" dropdown="1">
</button>
</head>
<field name="cycle_id" required="1"/>
<field name="date"/>
<field name="doctors" nolabel="1" span="6">
<list>
<field name="doctor_id"/>
<field name="categ_id"/>
</list>
</field>
<newline/>
<field name="nurses" nolabel="1" span="6">
<list>
<field name="nurse_id"/>
<field name="categ_id"/>
</list>
</field>
<foot>
</foot>
<related>

View File

@ -6,9 +6,9 @@
<field name="cycle_id" onchange="onchange_time" span="3"/>
<field name="patient_categ_id" span="3"/>
<field name="doctor_id" span="3"/>
<field name="nurse_categ_id" span="3"/>
<field name="department_id" span="3"/>
<field name="patient_type" span="3"/>
<field name="nurse_categ_id" span="3"/>
</group>
<separator string="Select Days"/>
<group form_layout="stacked">

View File

@ -29,6 +29,8 @@ from . import dialyzer_line
from . import import_payment
from . import cycle
from . import cycle_item
from . import cycle_item_nurse
from . import cycle_item_doctor
from . import cycle_item_line
from . import gen_visit
from . import gen_visit_line

View File

@ -25,6 +25,8 @@ class CycleItem(Model):
"state": fields.Selection([("draft","Draft"),("done","Done")],"Status",required=True),
'hd_cases': fields.One2Many("clinic.hd.case","cycle_item_id", "HD Cases"),
'visits': fields.One2Many("clinic.visit","cycle_item_id", "Visits"),
'nurses': fields.One2Many("clinic.cycle.item.nurse",'cycle_item_id','Nurses'),
'doctors': fields.One2Many("clinic.cycle.item.doctor",'cycle_item_id','Doctors'),
}
_defaults={

View File

@ -0,0 +1,18 @@
from netforce.model import Model, fields, get_model
from netforce.access import get_active_company
class CycleItemDoctor(Model):
_name="clinic.cycle.item.doctor"
_string="Cycle Item Doctor"
_fields={
'cycle_item_id': fields.Many2One("clinic.cycle.item", "Cycle Item"),
'categ_id': fields.Many2One("clinic.personal.categ", "Category",),
'doctor_id': fields.Many2One("clinic.personal",'Doctor',domain=[['type','=','doctor']]),
}
_defaults={
"company_id": lambda *a: get_active_company(),
}
CycleItemDoctor.register()

View File

@ -0,0 +1,18 @@
from netforce.model import Model, fields, get_model
from netforce.access import get_active_company
class CycleItemNurse(Model):
_name="clinic.cycle.item.nurse"
_string="Cycle Item Nurse"
_fields={
'cycle_item_id': fields.Many2One("clinic.cycle.item", "Cycle Item"),
'categ_id': fields.Many2One("clinic.personal.categ", "Category",),
'nurse_id': fields.Many2One("clinic.personal",'Nurse',domain=[['type','=','nurse']]),
}
_defaults={
"company_id": lambda *a: get_active_company(),
}
CycleItemNurse.register()