default qty on product profile

report_acc_hdcase_summary
watcha.h 2016-08-19 21:18:48 +07:00
parent 01eaa85335
commit 002e4fe920
3 changed files with 3 additions and 1 deletions

View File

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

View File

@ -458,7 +458,7 @@ class HDCase(Model):
line['uom_id']=prod.uom_id.id
line['description']=prod.name
line['product_categ_id']=prod.categ_id.id
qty=1
qty=prod.default_qty or 1
price=prod.sale_price or 0.0
amt=qty*price
line['qty']=qty

View File

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