From bac6fc081d0917c58f381ae41229676707c8bc1c Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Wed, 25 Feb 2015 07:42:17 +0700 Subject: [PATCH] set default reimbursable related on product --- netforce_clinic/models/hd_case.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index fda3f40..b7c3e5c 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -292,6 +292,10 @@ class HDCase(Model): line=get_data_path(data,path,parent=True) product_id=line.get('product_id') prod=get_model("product").browse(product_id) + if prod.can_sell: + line['reimbursable']='no' + else: + line['reimbursable']='yes' line['uom_id']=prod.uom_id.id line['description']=prod.name line['product_categ_id']=prod.categ_id.id