diff --git a/rma/README.rst b/rma/README.rst index 041219ca..dfe6657a 100644 --- a/rma/README.rst +++ b/rma/README.rst @@ -115,6 +115,7 @@ Contributors * Lois Rilo * Bhavesh Odedra * Akim Juillerat +* Alexandre Fayolle Maintainer ---------- diff --git a/rma/__manifest__.py b/rma/__manifest__.py index 9d232f43..5ef9c992 100644 --- a/rma/__manifest__.py +++ b/rma/__manifest__.py @@ -3,7 +3,7 @@ { 'name': 'RMA (Return Merchandise Authorization)', - 'version': '12.0.2.0.0', + 'version': '12.0.2.1.0', 'license': 'LGPL-3', 'category': 'RMA', 'summary': 'Introduces the return merchandise authorization (RMA) process ' diff --git a/rma/models/rma_operation.py b/rma/models/rma_operation.py index cee0ecc8..65312a23 100644 --- a/rma/models/rma_operation.py +++ b/rma/models/rma_operation.py @@ -75,3 +75,7 @@ class RmaOperation(models.Model): comodel_name='rma.order.line', inverse_name='operation_id', string='RMA lines', ) + company_id = fields.Many2one( + comodel_name='res.company', string='Company', required=True, + default=lambda self: self.env.user.company_id + ) diff --git a/rma/security/rma.xml b/rma/security/rma.xml index ecefd303..7be4c599 100755 --- a/rma/security/rma.xml +++ b/rma/security/rma.xml @@ -49,6 +49,25 @@ eval="[(4, ref('group_rma_customer_user')), (4, ref('group_rma_supplier_user'))]"/> + + + rma order multi-company + + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + + + rma order line multi-company + + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + + + rma operation multi-company + + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + diff --git a/rma/views/rma_operation_view.xml b/rma/views/rma_operation_view.xml index ba8f9be7..3bd4ef94 100755 --- a/rma/views/rma_operation_view.xml +++ b/rma/views/rma_operation_view.xml @@ -26,6 +26,7 @@ +