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: if quotes:
quotes.action_cancel() quotes.action_cancel()
quotes.message_post(_( for quote in quotes:
"Quotation automatically cancelled upon marking " quote.message_post(_(
"the related opportunity as lost.")) "Quotation automatically cancelled upon marking "
"the related opportunity as lost."))
return super(CrmLeadLost, self).action_lost_reason_apply() return super(CrmLeadLost, self).action_lost_reason_apply()