set default reimbursable related on product

conv_bal
watcha.h 2015-02-25 07:42:17 +07:00
parent dee7b80640
commit bac6fc081d
1 changed files with 4 additions and 0 deletions

View File

@ -292,6 +292,10 @@ class HDCase(Model):
line=get_data_path(data,path,parent=True) line=get_data_path(data,path,parent=True)
product_id=line.get('product_id') product_id=line.get('product_id')
prod=get_model("product").browse(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['uom_id']=prod.uom_id.id
line['description']=prod.name line['description']=prod.name
line['product_categ_id']=prod.categ_id.id line['product_categ_id']=prod.categ_id.id