[FIX] rma_sale: issue opening rma view from wizard + action permission issues

This commit is contained in:
Giovanni
2022-04-21 14:13:48 +02:00
committed by Pedro M. Baeza
parent 5f82d77329
commit 71dec5c1d8
6 changed files with 6 additions and 3 deletions

View File

@@ -101,6 +101,7 @@ Contributors
* David Vidal
* Chafique Delli <chafique.delli@akretion.com>
* Giovanni Serra - Ooops <giovanni@ooops404.com>
Maintainers
~~~~~~~~~~~

View File

@@ -3,7 +3,7 @@
{
"name": "Return Merchandise Authorization Management - Link with Sales",
"summary": "Sale Order - Return Merchandise Authorization (RMA)",
"version": "14.0.1.0.1",
"version": "14.0.1.2.0",
"development_status": "Production/Stable",
"category": "RMA",
"website": "https://github.com/OCA/rma",

View File

@@ -60,7 +60,7 @@ class SaleOrder(models.Model):
def action_view_rma(self):
self.ensure_one()
action = self.env.ref("rma.rma_action").read()[0]
action = self.sudo().env.ref("rma.rma_action").read()[0]
rma = self.rma_ids
if len(rma) == 1:
action.update(

View File

@@ -5,3 +5,4 @@
* David Vidal
* Chafique Delli <chafique.delli@akretion.com>
* Giovanni Serra - Ooops <giovanni@ooops404.com>

View File

@@ -451,6 +451,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
</ul>
</li>
<li>Chafique Delli &lt;<a class="reference external" href="mailto:chafique.delli&#64;akretion.com">chafique.delli&#64;akretion.com</a>&gt;</li>
<li>Giovanni Serra - Ooops &lt;<a class="reference external" href="mailto:giovanni&#64;ooops404.com">giovanni&#64;ooops404.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">

View File

@@ -75,7 +75,7 @@ class SaleOrderRmaWizard(models.TransientModel):
return
for rec in rma:
rec.action_confirm()
action = self.env.ref("rma.rma_action").read()[0]
action = self.sudo().env.ref("rma.rma_action").read()[0]
if len(rma) > 1:
action["domain"] = [("id", "in", rma.ids)]
elif rma: