Fix crash when several quotes are linked to the opportunity
This commit is contained in:
@@ -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:
|
||||||
|
quote.message_post(_(
|
||||||
"Quotation automatically cancelled upon marking "
|
"Quotation automatically cancelled upon marking "
|
||||||
"the related opportunity as lost."))
|
"the related opportunity as lost."))
|
||||||
return super(CrmLeadLost, self).action_lost_reason_apply()
|
return super(CrmLeadLost, self).action_lost_reason_apply()
|
||||||
|
|||||||
Reference in New Issue
Block a user