diff --git a/rma/__manifest__.py b/rma/__manifest__.py
index e3b5f098..b2835f20 100644
--- a/rma/__manifest__.py
+++ b/rma/__manifest__.py
@@ -15,6 +15,7 @@
'data': [
'data/ir_sequence_data.xml',
'security/ir.model.access.csv',
+ 'security/rma_security.xml',
'views/rma_views.xml',
'views/stock_picking_views.xml',
'wizard/rma_lines_views.xml',
diff --git a/rma/models/rma.py b/rma/models/rma.py
index bb401a7b..043a5101 100644
--- a/rma/models/rma.py
+++ b/rma/models/rma.py
@@ -41,6 +41,7 @@ class RMATemplate(models.Model):
('make_to_order', 'Apply Procurements')
], string="Outbound Procurement Method", default='make_to_stock')
out_to_refund = fields.Boolean(string='Outbound Mark Refund')
+ company_id = fields.Many2one('res.company', 'Company')
def _values_for_in_picking(self, rma):
return {
diff --git a/rma/security/rma_security.xml b/rma/security/rma_security.xml
new file mode 100644
index 00000000..d5df4a4d
--- /dev/null
+++ b/rma/security/rma_security.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+ RMA: RMA
+
+
+ ['|',
+ ('company_id', '=', False),
+ ('company_id', 'child_of', [user.company_id.id]),
+ ]
+
+
+
+ RMA: RMA Template
+
+
+ ['|',
+ ('company_id', '=', False),
+ ('company_id', 'child_of', [user.company_id.id]),
+ ]
+
+
+
+
diff --git a/rma/views/rma_views.xml b/rma/views/rma_views.xml
index 31b31b7f..36b3f9f4 100644
--- a/rma/views/rma_views.xml
+++ b/rma/views/rma_views.xml
@@ -37,7 +37,7 @@
-
+
@@ -161,6 +161,7 @@
+