From 2cc4aff3a2ec0fa6c51f769e6567ff2b1b375cf0 Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Sun, 3 May 2015 16:48:18 +0700 Subject: [PATCH] fix bug : can not pay --- netforce_clinic/models/report_staff_line.py | 5 +++-- netforce_clinic/models/shop_payment.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/netforce_clinic/models/report_staff_line.py b/netforce_clinic/models/report_staff_line.py index 98eb12c..fcfbc4c 100644 --- a/netforce_clinic/models/report_staff_line.py +++ b/netforce_clinic/models/report_staff_line.py @@ -7,9 +7,10 @@ class ReportStaffLine(Model): def _get_all(self,ids,context={}): res={} for obj in self.browse(ids): + hdcase=obj.hd_case_id res[obj.id]={ - 'date': obj.hd_case_id.date, - 'patient_id': obj.hd_case_id.patient_id.id, + 'date': hdcase.date, + 'patient_id': hdcase.patient_id.id, } return res diff --git a/netforce_clinic/models/shop_payment.py b/netforce_clinic/models/shop_payment.py index d22a2e3..f6984c5 100644 --- a/netforce_clinic/models/shop_payment.py +++ b/netforce_clinic/models/shop_payment.py @@ -5,7 +5,7 @@ class ShopPayment(Model): _transient=True _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"), 'account_id': fields.Many2One("account.account","Account"), 'amount': fields.Float("Amount"),