filter product by code "MDC"
parent
dd2a844d14
commit
9d9072dbf0
|
@ -29,7 +29,7 @@ class ReportMedicalSummary(Model):
|
|||
date_to=defaults.get('date_to',"%s-%s-%s"%(year,month,total_day))
|
||||
categ_id=defaults.get('categ_id',None)
|
||||
if not categ_id:
|
||||
categ_ids=get_model("product.categ").search([['code','=','EPO']])
|
||||
categ_ids=get_model("product.categ").search([['parent_id.code','=','MDC']])
|
||||
if categ_ids:
|
||||
categ_id=categ_ids[0]
|
||||
branch_id=defaults.get('branch_id',None)
|
||||
|
|
|
@ -161,10 +161,14 @@ class ClinicSetting(Model):
|
|||
if user_id !=1:
|
||||
print("Only admin!!")
|
||||
return
|
||||
for cost_line in get_model("clinic.labor.cost.line").search_browse([]):
|
||||
cost_line.write({
|
||||
'note': ' ',
|
||||
})
|
||||
res={}
|
||||
for l in get_model("clinic.hd.case.line").search_browse([]):
|
||||
prod=l.product_id
|
||||
categ=l.product_categ_id
|
||||
res.setdefault(categ.name,[]).append(1)
|
||||
for k,v in res.items():
|
||||
print(k, len(v))
|
||||
|
||||
#obj=self.browse(ids)[0]
|
||||
#obj.del_duplicate_staff()
|
||||
print("Done!")
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue