improve hide new dialyzer
parent
d8c8c27fd2
commit
7bd6c040ad
|
@ -3,7 +3,7 @@
|
||||||
<field name="view_cls">multi_view</field>
|
<field name="view_cls">multi_view</field>
|
||||||
<field name="model">clinic.visit</field>
|
<field name="model">clinic.visit</field>
|
||||||
<field name="tabs">[["All",[]],["Draft",[["state","=","draft"]]],["Pending",[["state","=","pending"]]],["Confirmed",[["state","=","confirmed"]]],["Cancelled",[["state","=","cancelled"]]]]</field>
|
<field name="tabs">[["All",[]],["Draft",[["state","=","draft"]]],["Pending",[["state","=","pending"]]],["Confirmed",[["state","=","confirmed"]]],["Cancelled",[["state","=","cancelled"]]]]</field>
|
||||||
<field name="modes">list,form,calendar</field>
|
<field name="modes">list,form</field>
|
||||||
<field name="menu">clinic_menu</field>
|
<field name="menu">clinic_menu</field>
|
||||||
<field name="limit">25</field>
|
<field name="limit">25</field>
|
||||||
</action>
|
</action>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<list model="clinic.dialyzer">
|
<list model="clinic.dialyzer">
|
||||||
|
<top replace="1"></top>
|
||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</item>
|
</item>
|
||||||
<item string="Patients" perm="clinic_patient">
|
<item string="Patients" perm="clinic_patient">
|
||||||
<item string="Patients" action="clinic_patient"/>
|
<item string="Patients" action="clinic_patient"/>
|
||||||
<item string="Dialyzers" action="clinic_dialyzer" perm="clinic_dialyzer"/>
|
<item string="Dialyzers" action="clinic_dialyzer"/>
|
||||||
<divider/>
|
<divider/>
|
||||||
<header string="SETTINGS"/>
|
<header string="SETTINGS"/>
|
||||||
<item string="Cause Chronics" action="clinic_cause_chronic"/>
|
<item string="Cause Chronics" action="clinic_cause_chronic"/>
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
<list model="clinic.visit" colors='{"#cfc":[["state","=","confirmed"]],"#dbdbdb":[["state","=","cancelled"]]}'>
|
<list model="clinic.visit" colors='{"#cfc":[["state","=","confirmed"]],"#dbdbdb":[["state","=","cancelled"]]}'>
|
||||||
|
<head>
|
||||||
|
<button string="To Draft" method="to_draft" icon="repeat"/>
|
||||||
|
</head>
|
||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
<field name="visit_date"/>
|
<field name="visit_date"/>
|
||||||
<field name="cycle_id"/>
|
<field name="cycle_id"/>
|
||||||
|
|
|
@ -35,4 +35,8 @@ class HDCasePopupDlz(Model):
|
||||||
context['pop_id']=obj.id
|
context['pop_id']=obj.id
|
||||||
return hd_case.new_dialyzer(context=context)
|
return hd_case.new_dialyzer(context=context)
|
||||||
|
|
||||||
|
def onchnage_product(self,context={}):
|
||||||
|
data=context['data']
|
||||||
|
return data
|
||||||
|
|
||||||
HDCasePopupDlz.register()
|
HDCasePopupDlz.register()
|
||||||
|
|
|
@ -43,7 +43,10 @@ class Patient(Model):
|
||||||
# remove all space for make sure
|
# remove all space for make sure
|
||||||
res={}
|
res={}
|
||||||
for obj in self.browse(ids):
|
for obj in self.browse(ids):
|
||||||
res[obj.id]=(obj.name or "").replace(" ","")
|
name=(obj.name or "").replace(" ","")
|
||||||
|
if not obj.active:
|
||||||
|
name+='not_use'
|
||||||
|
res[obj.id]=name
|
||||||
return res
|
return res
|
||||||
|
|
||||||
_fields={
|
_fields={
|
||||||
|
|
|
@ -430,16 +430,16 @@ class Visit(Model):
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def to_draft(self,ids,context={}):
|
def to_draft(self,ids,context={}):
|
||||||
obj=self.browse(ids)[0]
|
for obj in self.browse(ids):
|
||||||
for hd_case in obj.hd_cases:
|
for hd_case in obj.hd_cases:
|
||||||
hd_case.to_draft()
|
hd_case.to_draft()
|
||||||
for line in hd_case.lines:
|
for line in hd_case.lines:
|
||||||
line.delete()
|
line.delete()
|
||||||
for ps in hd_case.staffs:
|
for ps in hd_case.staffs:
|
||||||
ps.delete()
|
ps.delete()
|
||||||
obj.write({
|
obj.write({
|
||||||
'state': 'draft',
|
'state': 'draft',
|
||||||
})
|
})
|
||||||
|
|
||||||
def gen_no(self,ids,context={}):
|
def gen_no(self,ids,context={}):
|
||||||
obj=self.browse(ids)[0]
|
obj=self.browse(ids)[0]
|
||||||
|
|
|
@ -182,6 +182,9 @@ class VisitBoard(Model):
|
||||||
number='*Waiting'
|
number='*Waiting'
|
||||||
cycle=visit.cycle_id
|
cycle=visit.cycle_id
|
||||||
patient=visit.patient_id
|
patient=visit.patient_id
|
||||||
|
if not patient.active:
|
||||||
|
print('skip not active ', patient.name)
|
||||||
|
continue
|
||||||
branch=visit.branch_id
|
branch=visit.branch_id
|
||||||
department=visit.department_id
|
department=visit.department_id
|
||||||
if not branch:
|
if not branch:
|
||||||
|
|
Loading…
Reference in New Issue