improve hide new dialyzer

conv_bal
watcha.h 2015-02-20 12:16:51 +07:00
parent d8c8c27fd2
commit 7bd6c040ad
8 changed files with 28 additions and 14 deletions

View File

@ -3,7 +3,7 @@
<field name="view_cls">multi_view</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="modes">list,form,calendar</field>
<field name="modes">list,form</field>
<field name="menu">clinic_menu</field>
<field name="limit">25</field>
</action>

View File

@ -1,4 +1,5 @@
<list model="clinic.dialyzer">
<top replace="1"></top>
<field name="date"/>
<field name="number"/>
<field name="name"/>

View File

@ -14,7 +14,7 @@
</item>
<item string="Patients" perm="clinic_patient">
<item string="Patients" action="clinic_patient"/>
<item string="Dialyzers" action="clinic_dialyzer" perm="clinic_dialyzer"/>
<item string="Dialyzers" action="clinic_dialyzer"/>
<divider/>
<header string="SETTINGS"/>
<item string="Cause Chronics" action="clinic_cause_chronic"/>

View File

@ -1,4 +1,7 @@
<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="visit_date"/>
<field name="cycle_id"/>

View File

@ -35,4 +35,8 @@ class HDCasePopupDlz(Model):
context['pop_id']=obj.id
return hd_case.new_dialyzer(context=context)
def onchnage_product(self,context={}):
data=context['data']
return data
HDCasePopupDlz.register()

View File

@ -43,7 +43,10 @@ class Patient(Model):
# remove all space for make sure
res={}
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
_fields={

View File

@ -430,7 +430,7 @@ class Visit(Model):
return data
def to_draft(self,ids,context={}):
obj=self.browse(ids)[0]
for obj in self.browse(ids):
for hd_case in obj.hd_cases:
hd_case.to_draft()
for line in hd_case.lines:

View File

@ -182,6 +182,9 @@ class VisitBoard(Model):
number='*Waiting'
cycle=visit.cycle_id
patient=visit.patient_id
if not patient.active:
print('skip not active ', patient.name)
continue
branch=visit.branch_id
department=visit.department_id
if not branch: