diff --git a/rma/__manifest__.py b/rma/__manifest__.py index 2d195ec5..1805ac98 100644 --- a/rma/__manifest__.py +++ b/rma/__manifest__.py @@ -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", diff --git a/rma/models/rma.py b/rma/models/rma.py index 29d59104..bc82a99f 100644 --- a/rma/models/rma.py +++ b/rma/models/rma.py @@ -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):