merge product by use mdc_name, description and name to show in any report

report_acc_hdcase_summary
watcha.h 2016-08-19 22:07:34 +07:00
parent 002e4fe920
commit 11d8bda4ae
3 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,7 @@
<tab string="Ratchawat"> <tab string="Ratchawat">
<group form_layout="stacked"> <group form_layout="stacked">
<field name="default_qty" span="2"/> <field name="default_qty" span="2"/>
<field name="mdc_name" span="2"/>
<separator string="Product View"/> <separator string="Product View"/>
<field name="patient_types" nolabel="1" span="12"> <field name="patient_types" nolabel="1" span="12">
<list> <list>

View File

@ -115,7 +115,8 @@ class HDCase(Model):
for line in obj.lines: for line in obj.lines:
amt=line.amount or 0 amt=line.amount or 0
prod=line.product_id prod=line.product_id
prod_name=prod.description or prod.name or "" # use mdc_name and description and name to merge product
prod_name=prod.mdc_name or prod.description or prod.name or ""
categ=line.product_categ_id categ=line.product_categ_id
if categ and prod: if categ and prod:
sign=1 sign=1

View File

@ -9,6 +9,7 @@ class Product(Model):
'report_visible': fields.Boolean("Report Visible"), 'report_visible': fields.Boolean("Report Visible"),
'account_products': fields.One2Many('clinic.setting.account.product','product_id','Account Products'), 'account_products': fields.One2Many('clinic.setting.account.product','product_id','Account Products'),
'default_qty': fields.Float("Default Qty"), 'default_qty': fields.Float("Default Qty"),
'mdc_name': fields.Char("Medical Name"),
} }
#TODO #TODO