prevent to put price to zero in case SSO
parent
b9a546e4ca
commit
65e960d21c
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue