change layout clinic setting

conv_bal
watcha.h 2015-03-23 14:11:09 +07:00
parent 01be234519
commit 2f011dcaa8
2 changed files with 30 additions and 31 deletions

View File

@ -1,14 +1,12 @@
<form model="clinic.setting" title="Clinic Settings"> <form model="clinic.setting" title="Clinic Settings">
<tabs> <separator string="Visit"/>
<tab string="Visit"> <field name="find_dlz" span="4"/>
<field name="find_dlz"/> <field name="auto_gen_visit" span="6"/>
</tab> <separator string="HD Case"/>
<tab string="HD Case">
<group form_layout="stacked"> <group form_layout="stacked">
<field name="waiting_approval" span="3"/> <field name="waiting_approval" span="3"/>
<field name="real_time" span="3"/> <field name="real_time" span="3"/>
<field name="auto_gen" invisible="1" span="3"/> <field name="auto_gen" invisible="1" span="3"/>
<separator string="Expenes"/>
<field name="products" nolabel="1"> <field name="products" nolabel="1">
<list> <list>
<field name="patient_type_id" onchange="onchange_ptype"/> <field name="patient_type_id" onchange="onchange_ptype"/>
@ -23,16 +21,12 @@
</list> </list>
</field> </field>
</group> </group>
</tab> <separator string="RD Shop"/>
<tab string="RD Shop">
<field name="shop_type_id"/> <field name="shop_type_id"/>
<field name="signature"/> <field name="signature"/>
</tab> <tabs>
<tab string="Development"> <tab string="Development">
<button string="Click Me" type="default" method="run_script" perm="clinic_setting_test"/> <button string="Click Me" type="default" method="run_script" perm="clinic_setting_test"/>
<!--<button string="Remove Duplicate Visit" type="default" icon="arrow-right" method="remove_douplicate_visit" perm="clinic_setting_rm_dbl_visit"/>-->
</tab> </tab>
</tabs> </tabs>
<foot>
</foot>
</form> </form>

View File

@ -37,6 +37,7 @@ class ClinicSetting(Model):
'patient_type_id': fields.Many2One("clinic.patient.type","Default Type"), # Import payment 'patient_type_id': fields.Many2One("clinic.patient.type","Default Type"), # Import payment
'imp_patient_type_id': fields.Many2One("clinic.patient.type","Import UC Type"), # Import payment 'imp_patient_type_id': fields.Many2One("clinic.patient.type","Import UC Type"), # Import payment
'find_dlz': fields.Boolean("Find Dialyzer After Confirm Visit"), # Visit 'find_dlz': fields.Boolean("Find Dialyzer After Confirm Visit"), # Visit
'auto_gen_visit': fields.Boolean("Auto Generate Visit Before Next Month"), # Visit
'stock_journal_id': fields.Many2One("stock.journal","Default Journal"), 'stock_journal_id': fields.Many2One("stock.journal","Default Journal"),
'auto_gen': fields.Boolean("Auto Gen"), # HD Case 'auto_gen': fields.Boolean("Auto Gen"), # HD Case
'schd_from': fields.Date("From"), 'schd_from': fields.Date("From"),
@ -951,4 +952,8 @@ class ClinicSetting(Model):
res['hns'][hn]=vals res['hns'][hn]=vals
return res return res
def generate_visit(self,ids,context={}):
obj=self.browse(ids)[0]
print(">>>>")
ClinicSetting.register() ClinicSetting.register()