fix bug : can not pay

conv_bal
watcha.h@almacom.co.th 2015-05-03 16:48:18 +07:00
parent 217047f577
commit 2cc4aff3a2
2 changed files with 4 additions and 3 deletions

View File

@ -7,9 +7,10 @@ class ReportStaffLine(Model):
def _get_all(self,ids,context={}): def _get_all(self,ids,context={}):
res={} res={}
for obj in self.browse(ids): for obj in self.browse(ids):
hdcase=obj.hd_case_id
res[obj.id]={ res[obj.id]={
'date': obj.hd_case_id.date, 'date': hdcase.date,
'patient_id': obj.hd_case_id.patient_id.id, 'patient_id': hdcase.patient_id.id,
} }
return res return res

View File

@ -5,7 +5,7 @@ class ShopPayment(Model):
_transient=True _transient=True
_fields={ _fields={
'shop_id': fields.Many2One("clinic.hd.case","HD Case",on_delete="cascade"), 'shop_id': fields.Many2One("clinic.shop","Shop",on_delete="cascade"),
'payment_id': fields.Many2One("account.payment","Payment",on_delete="cascade"), 'payment_id': fields.Many2One("account.payment","Payment",on_delete="cascade"),
'account_id': fields.Many2One("account.account","Account"), 'account_id': fields.Many2One("account.account","Account"),
'amount': fields.Float("Amount"), 'amount': fields.Float("Amount"),