[FIX] rma: error on contact us form submit

This commit is contained in:
Ernesto Tejeda
2021-01-18 10:56:25 -05:00
parent 64b5616f4e
commit 7ea219c3ef

View File

@@ -13,7 +13,8 @@ class WebsiteForm(WebsiteForm):
res = super().insert_record(request, model, values, custom, meta) res = super().insert_record(request, model, values, custom, meta)
# Add the customer to the followers, the same as when creating # Add the customer to the followers, the same as when creating
# an RMA from a sales order in the portal. # an RMA from a sales order in the portal.
rma = request.env["rma"].browse(res).sudo() if model.model == "rma":
rma = request.env["rma"].sudo().browse(res)
rma.message_subscribe([rma.partner_id.id]) rma.message_subscribe([rma.partner_id.id])
return res return res