complication

conv_bal
watcha.h 2014-11-30 13:30:09 +07:00
parent 9610f7c52e
commit 03a84b98a0
3 changed files with 11 additions and 2 deletions

View File

@ -15,6 +15,7 @@
<field name="visit_id" span="2"/>
<field name="fee_partner_id" span="2" domain="[['type','=','org']]"/>
<field name="patient_type" span="2"/>
<field name="cycle_item_id" span="2"/>
</group>
<tabs>
<tab string="General">
@ -106,6 +107,9 @@
<tab string="Note">
<field name="note" nolabel="1"/>
</tab>
<tab string="Complication">
<field name="complication" nolabel="1"/>
</tab>
</tabs>
<foot>
<button string="Start" type="success" icon="arrow-right" method="do_treatment" states="draft,waiting_treatment"/>

View File

@ -12,7 +12,11 @@ class CycleItem(Model):
def _get_all(self,ids,context={}):
res={}
for obj in self.browse(ids):
name="%s-%s"%(obj.cycle_id.name,obj.date)
cycle=obj.cycle_id
cycle_name=''
if cycle:
cycle_name=cycle.name
name="%s-%s"%(cycle_name,obj.date)
total_case=len(obj.hd_cases)
total_a,total_b=0,0
total=0.0

View File

@ -109,8 +109,9 @@ class HDCase(Model):
'fee_partner_id': fields.Many2One("partner","Contact Fee"),
'fee_paid': fields.Boolean("Fee Paid"),
'note': fields.Text("Note"),
'complication': fields.Text("Complication"),
"cycle_id": fields.Many2One("clinic.cycle","Cycle"),
'cycle_item_id': fields.Many2One("clinic.cycle.item","Cycle Item"), # on_delete="cascade" -> rm visit from cycle item
'cycle_item_id': fields.Many2One("clinic.cycle.item","Nurse Schedule"), # on_delete="cascade" -> will rm visit from cycle item
'pay_amount': fields.Float("Amount",function="get_pay_amount"),
'pay_date': fields.Date("Pay Date"),
'pay_account_id': fields.Many2One("account.account","Account"),