diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index 11d1fc5..d4532e9 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -1149,6 +1149,11 @@ class HDCase(Model): def done(self,ids,context={}): obj=self.browse(ids)[0] + if obj.patient_type_id.code=='SSO': + for line in obj.lines: + prod=line.product_id + if not line.price and prod: + raise Exception("Can not complete HDCase because price of product %s is missing!"%(prod.name)) count=0 for sline in obj.staffs: if sline.staff_id: