cycle item
parent
62f2c584aa
commit
b91f11c93a
|
@ -4,8 +4,22 @@
|
||||||
<button string="Options" dropdown="1">
|
<button string="Options" dropdown="1">
|
||||||
</button>
|
</button>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<field name="cycle_id" required="1"/>
|
<field name="cycle_id" required="1"/>
|
||||||
<field name="date"/>
|
<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>
|
||||||
</foot>
|
</foot>
|
||||||
<related>
|
<related>
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
<field name="cycle_id" onchange="onchange_time" span="3"/>
|
<field name="cycle_id" onchange="onchange_time" span="3"/>
|
||||||
<field name="patient_categ_id" span="3"/>
|
<field name="patient_categ_id" span="3"/>
|
||||||
<field name="doctor_id" span="3"/>
|
<field name="doctor_id" span="3"/>
|
||||||
|
<field name="nurse_categ_id" span="3"/>
|
||||||
<field name="department_id" span="3"/>
|
<field name="department_id" span="3"/>
|
||||||
<field name="patient_type" span="3"/>
|
<field name="patient_type" span="3"/>
|
||||||
<field name="nurse_categ_id" span="3"/>
|
|
||||||
</group>
|
</group>
|
||||||
<separator string="Select Days"/>
|
<separator string="Select Days"/>
|
||||||
<group form_layout="stacked">
|
<group form_layout="stacked">
|
||||||
|
|
|
@ -29,6 +29,8 @@ from . import dialyzer_line
|
||||||
from . import import_payment
|
from . import import_payment
|
||||||
from . import cycle
|
from . import cycle
|
||||||
from . import cycle_item
|
from . import cycle_item
|
||||||
|
from . import cycle_item_nurse
|
||||||
|
from . import cycle_item_doctor
|
||||||
from . import cycle_item_line
|
from . import cycle_item_line
|
||||||
from . import gen_visit
|
from . import gen_visit
|
||||||
from . import gen_visit_line
|
from . import gen_visit_line
|
||||||
|
|
|
@ -25,6 +25,8 @@ class CycleItem(Model):
|
||||||
"state": fields.Selection([("draft","Draft"),("done","Done")],"Status",required=True),
|
"state": fields.Selection([("draft","Draft"),("done","Done")],"Status",required=True),
|
||||||
'hd_cases': fields.One2Many("clinic.hd.case","cycle_item_id", "HD Cases"),
|
'hd_cases': fields.One2Many("clinic.hd.case","cycle_item_id", "HD Cases"),
|
||||||
'visits': fields.One2Many("clinic.visit","cycle_item_id", "Visits"),
|
'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={
|
_defaults={
|
||||||
|
|
|
@ -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()
|
|
@ -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()
|
Loading…
Reference in New Issue