diff --git a/rma_account/models/rma_order_line.py b/rma_account/models/rma_order_line.py
index 01535fe82..b6c152d66 100644
--- a/rma_account/models/rma_order_line.py
+++ b/rma_account/models/rma_order_line.py
@@ -124,6 +124,20 @@ def _compute_refund_count(self):
store=True,
)
+ commercial_partner_id = fields.Many2one(
+ "res.partner",
+ string="Commercial Entity",
+ store=True,
+ readonly=True,
+ compute="_compute_commercial_partner_id",
+ ondelete="restrict",
+ )
+
+ @api.depends("partner_id")
+ def _compute_commercial_partner_id(self):
+ for rma_line in self:
+ rma_line.commercial_partner_id = rma_line.partner_id.commercial_partner_id
+
@api.onchange("product_id", "partner_id")
def _onchange_product_id(self):
"""Domain for sale_line_id is computed here to make it dynamic."""
diff --git a/rma_account/views/rma_order_line_view.xml b/rma_account/views/rma_order_line_view.xml
index cb38a14b7..b2198885f 100644
--- a/rma_account/views/rma_order_line_view.xml
+++ b/rma_account/views/rma_order_line_view.xml
@@ -6,13 +6,13 @@
+
@@ -46,13 +46,13 @@
+