merge product by use mdc_name, description and name to show in any report
parent
002e4fe920
commit
11d8bda4ae
|
@ -3,6 +3,7 @@
|
|||
<tab string="Ratchawat">
|
||||
<group form_layout="stacked">
|
||||
<field name="default_qty" span="2"/>
|
||||
<field name="mdc_name" span="2"/>
|
||||
<separator string="Product View"/>
|
||||
<field name="patient_types" nolabel="1" span="12">
|
||||
<list>
|
||||
|
|
|
@ -115,7 +115,8 @@ class HDCase(Model):
|
|||
for line in obj.lines:
|
||||
amt=line.amount or 0
|
||||
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
|
||||
if categ and prod:
|
||||
sign=1
|
||||
|
|
|
@ -9,6 +9,7 @@ class Product(Model):
|
|||
'report_visible': fields.Boolean("Report Visible"),
|
||||
'account_products': fields.One2Many('clinic.setting.account.product','product_id','Account Products'),
|
||||
'default_qty': fields.Float("Default Qty"),
|
||||
'mdc_name': fields.Char("Medical Name"),
|
||||
}
|
||||
|
||||
#TODO
|
||||
|
|
Loading…
Reference in New Issue