search nurse

conv_bal
watcha.h 2014-12-09 08:12:46 +07:00
parent e79317fa95
commit 66bbddaa40
4 changed files with 17 additions and 8 deletions

View File

@ -15,7 +15,7 @@
<tab string="Nurses">
<field name="nurses" nolabel="1">
<list>
<field name="nurse_id" onchange="onchange_nurse"/>
<field name="nurse_id" domain="[['type','=','nurse']]" onchange="onchange_nurse"/>
<field name="level_id"/>
</list>
</field>

View File

@ -7,7 +7,7 @@
<item string="HD Case Expense" action="clinic_hd_case_expense"/>
<divider/>
<header string="REPORTS"/>
<item string="Cost By Period" action="clinic_labor_cost"/>
<item string="Payment Matching" action="clinic_payment_matching"/>
<item string="Staff Fee Summary" action="clinic_report_staff_fee_sum"/>
<item string="Staff Fee Detail" action="clinic_report_staff_fee_detail"/>
</item>

View File

@ -175,7 +175,10 @@ class Staff(Model):
vals=[]
for obj in self.browse(ids):
level=obj.level_id
name="%s (%s)"%(obj.name,level.name)
lname=""
if level:
lname=level.name
name="%s (%s)"%(obj.name,lname)
vals.append((obj.id,name))
return vals
@ -184,11 +187,11 @@ class Staff(Model):
if domain:
dom=[dom,domain]
ids1=self.search(dom)
# XXX need to store db
dom=[["level_id.name","ilike","%"+name+"%"]]
if domain:
dom=[dom,domain]
ids2=self.search_read(dom)
dom=[["name","ilike","%"+name+"%"]]
level_ids=get_model('clinic.staff.level').search(dom)
ids2=[x['id'] for x in self.search_read([domain],['level_id']) if x['level_id'][0] in level_ids]
ids=list(set(ids1+ids2))
return self.name_get(ids,context=context)

View File

@ -1,3 +1,9 @@
============
urgent
- report Matching Payment
- special cost
-
============
-- tonight -
- matching
- report expense