sickbed
parent
39ff9d56a0
commit
225e980bd7
|
@ -3,4 +3,5 @@
|
|||
<field name="view_cls">multi_view</field>
|
||||
<field name="model">clinic.sickbed</field>
|
||||
<field name="menu">clinic_menu</field>
|
||||
<field name="tabs">[["All",[]],["Archived",[["active","=",false]]],["Available",[["state","=","available"]]],["Not Available",[["state","=","not_available"]]]]</field>
|
||||
</action>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<group form_layout="stacked" attrs='{"readonly":[["state","=","completed"]]}'>
|
||||
<field name="number" span="2"/>
|
||||
<field name="sickbed_id" string="Sickbed (Available)" attrs='{"readonly":[["state","in",["completed","waiting_payment","paid","cancelled"]]]}' domain="[['state','=','available']]" required="1" span="2"/>
|
||||
<field name="sickbed_id" string="Sickbed (Available)" attrs='{"readonly":[["state","in",["completed","waiting_payment","paid","cancelled"]]]}' domain="[['state','=','available'],['department_id','=',department_id]]" required="3" span="2"/>
|
||||
<field name="patient_id" span="2" onchange="onchange_patient"/>
|
||||
<field name="patient_type_id" span="2"/>
|
||||
<field name="cycle_id" span="2" required="1" onchange="onchange_cycle"/>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<list model="clinic.sickbed" colors='{"#70db93":[["state","=","available"]],"#ee3322":[["state","=","not_available"]]}'>
|
||||
<!--<list model="clinic.sickbed" colors='{"#70db93":[["state","=","available"]],"#ee3322":[["state","=","not_available"]]}'>-->
|
||||
<list model="clinic.sickbed">
|
||||
<field name="name"/>
|
||||
<field name="date"/>
|
||||
<field name="patient_id"/>
|
||||
|
|
|
@ -4,7 +4,7 @@ from netforce.access import get_active_company, get_active_user
|
|||
class SickBed(Model):
|
||||
_name="clinic.sickbed"
|
||||
_string="Sickbed"
|
||||
_key=['name','branch_id']
|
||||
_key=['name','department_id','branch_id']
|
||||
|
||||
def _get_all(self,ids,context={}):
|
||||
res={}
|
||||
|
@ -58,7 +58,7 @@ class SickBed(Model):
|
|||
'branch_id': _get_branch,
|
||||
}
|
||||
|
||||
_order="sequence,name"
|
||||
_order="branch_id,department_id,sequence,name"
|
||||
|
||||
def copy(self,ids,context={}):
|
||||
obj=self.browse(ids)[0]
|
||||
|
|
|
@ -79,7 +79,7 @@ class Staff(Model):
|
|||
"expiry_card" : fields.Date("Expired Card"),
|
||||
"birthday": fields.Date("Birthday",search=True),
|
||||
"age": fields.Integer("Age", function="_get_age"),
|
||||
"state": fields.Selection([["part_time","Part Time"],["full_time","Full Time"]],"Status",search=True),
|
||||
"state": fields.Selection([["part_time","Part Time"],["full_time","Full Time"]],"Working Status",search=True),
|
||||
"type": fields.Selection([['staff','Staff'],["doctor","Doctor"],["nurse","Nurse"]],"Type"),
|
||||
"gender": fields.Selection([["male","Male"],["female","Female"]],"Gender"),
|
||||
"nation_id": fields.Many2One("clinic.nation","Nationality"),
|
||||
|
|
Loading…
Reference in New Issue