[FIX] rma + rma_sale: Allow to create an RMA to a user with access_to…ken to sale order (no user created).

[FIX] rma + rma_sale: Show RMA's list (with share url) to a user with access_token to sale order (no user created).
This commit is contained in:
Víctor Martínez
2022-05-16 18:14:50 +02:00
parent 017884d1b6
commit c983c807b6
2 changed files with 6 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
{
"name": "Return Merchandise Authorization Management",
"summary": "Return Merchandise Authorization (RMA)",
"version": "14.0.3.0.0",
"version": "14.0.3.1.0",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",

View File

@@ -623,6 +623,10 @@ class Rma(models.Model):
"context": ctx,
}
def _add_message_subscribe_partner(self):
if self.partner_id and self.partner_id not in self.message_partner_ids:
self.message_subscribe([self.partner_id.id])
def action_confirm(self):
"""Invoked when 'Confirm' button in rma form view is clicked."""
self.ensure_one()
@@ -633,8 +637,7 @@ class Rma(models.Model):
else:
reception_move = self._create_receptions_from_product()
self.write({"reception_move_id": reception_move.id, "state": "confirmed"})
if self.partner_id not in self.message_partner_ids:
self.message_subscribe([self.partner_id.id])
self._add_message_subscribe_partner()
self._send_confirmation_email()
def action_refund(self):