mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[IMP] website_rma: Add customer as follower
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
{
|
||||
"name": "Return Merchandise Authorization Management - Website Form",
|
||||
"summary": "Return Merchandise Authorization (RMA)",
|
||||
"version": "12.0.1.0.0",
|
||||
"version": "12.0.1.0.1",
|
||||
"development_status": "Production/Stable",
|
||||
"category": "RMA",
|
||||
"website": "https://github.com/OCA/rma",
|
||||
|
||||
@@ -11,8 +11,13 @@ class WebsiteForm(WebsiteForm):
|
||||
def insert_record(self, request, model, values, custom, meta=None):
|
||||
if model.model == 'rma':
|
||||
values['partner_id'] = request.env.user.partner_id.id
|
||||
return super(WebsiteForm, self).insert_record(
|
||||
request, model, values, custom, meta=meta)
|
||||
res = super(WebsiteForm, self).insert_record(
|
||||
request, model, values, custom, meta)
|
||||
# Add the customer to the followers, the same as when creating
|
||||
# an RMA from a sales order in the portal.
|
||||
rma = request.env['rma'].browse(res).sudo()
|
||||
rma.message_subscribe([rma.partner_id.id])
|
||||
return res
|
||||
|
||||
|
||||
class WebsiteRMA(http.Controller):
|
||||
|
||||
Reference in New Issue
Block a user