can not print report cycle item

conv_bal
watcha.h 2015-08-02 19:57:24 +07:00
parent 275771ee5c
commit cbe4923252
2 changed files with 7 additions and 3 deletions

View File

@ -28,7 +28,7 @@ class HDCaseExpense(Model):
return res return res
_fields={ _fields={
'name': fields.Char("Name", function="_get_store",store=True), 'name': fields.Char("Name", size=256, function="_get_store",store=True),
'date': fields.Date("Date",required=True,search=True), 'date': fields.Date("Date",required=True,search=True),
'patient_id': fields.Many2One("clinic.patient","Patient",domain=[['state','=','admit']], required=True,search=True), 'patient_id': fields.Many2One("clinic.patient","Patient",domain=[['state','=','admit']], required=True,search=True),
'hd_case_id': fields.Many2One("clinic.hd.case","HD Case",required=True,search=True), 'hd_case_id': fields.Many2One("clinic.hd.case","HD Case",required=True,search=True),

View File

@ -143,8 +143,12 @@ class ReportCycleItem(Model):
total_epo=0 total_epo=0
for line in hdcase.lines: for line in hdcase.lines:
prod=line.product_id prod=line.product_id
if prod.categ_id:
if prod.categ_id.code=='EPO': if prod.categ_id.code=='EPO':
total_epo+=line.qty or 0 total_epo+=line.qty or 0
else:
pass
#print('>>> ', hdcase.number, prod.id, prod.name)
lines.append({ lines.append({
'dlz_drop': dlz_drop, 'dlz_drop': dlz_drop,