Fix crash when several quotes are linked to the opportunity

This commit is contained in:
Alexis de Lattre
2018-09-18 23:03:21 +02:00
parent 4995403bf5
commit ab1144850b

View File

@@ -23,7 +23,8 @@ class CrmLeadLost(models.TransientModel):
])
if quotes:
quotes.action_cancel()
quotes.message_post(_(
"Quotation automatically cancelled upon marking "
"the related opportunity as lost."))
for quote in quotes:
quote.message_post(_(
"Quotation automatically cancelled upon marking "
"the related opportunity as lost."))
return super(CrmLeadLost, self).action_lost_reason_apply()