mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[ADD] rma: new module
[UPD] Update rma.pot Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: rma-12.0/rma-12.0-rma Translate-URL: https://translation.odoo-community.org/projects/rma-12-0/rma-12-0-rma/
This commit is contained in:
committed by
Pedro M. Baeza
parent
8d3e3c364a
commit
0122a02458
8
rma/security/ir.model.access.csv
Normal file
8
rma/security/ir.model.access.csv
Normal file
@@ -0,0 +1,8 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_rma_team_user_own,rma.team.user.own,model_rma_team,rma_group_user_own,1,0,0,0
|
||||
access_rma_team_manager,rma.team.manager,model_rma_team,rma_group_manager,1,1,1,1
|
||||
access_rma_portal,rma.portal,model_rma,base.group_portal,1,0,0,0
|
||||
access_rma_user_own,rma.user.own,model_rma,rma_group_user_own,1,1,1,0
|
||||
access_rma_manager,rma.manager,model_rma,rma_group_manager,1,1,1,1
|
||||
access_rma_operation_user_own,rma.operation.user.own,model_rma_operation,rma_group_user_own,1,0,0,0
|
||||
access_rma_operation_manager,rma.operation.manager,model_rma_operation,rma_group_manager,1,1,1,1
|
||||
|
60
rma/security/rma_security.xml
Normal file
60
rma/security/rma_security.xml
Normal file
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2020 Tecnativa - Ernesto Tejeda
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<!-- Application -->
|
||||
<record id="rma_module_category" model="ir.module.category">
|
||||
<field name="name">RMA</field>
|
||||
<field name="description">Manage Return Merchandise Authorizations (RMAs).</field>
|
||||
</record>
|
||||
<!-- Access Groups -->
|
||||
<record id="rma_group_user_own" model="res.groups">
|
||||
<field name="name">User: Own Documents Only</field>
|
||||
<field name="category_id" ref="rma_module_category"/>
|
||||
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
|
||||
<field name="comment">the user will have access to his own data in the RMA application.</field>
|
||||
</record>
|
||||
<record id="rma_group_user_all" model="res.groups">
|
||||
<field name="name">User: All Documents</field>
|
||||
<field name="category_id" ref="rma_module_category"/>
|
||||
<field name="implied_ids" eval="[(4, ref('rma_group_user_own'))]"/>
|
||||
<field name="comment">the user will have access to all records of everyone in the RMA application.</field>
|
||||
</record>
|
||||
<record id="rma_group_manager" model="res.groups">
|
||||
<field name="name">Manager</field>
|
||||
<field name="comment">the user will have an access to the RMA configuration as well as statistic reports.</field>
|
||||
<field name="category_id" ref="rma_module_category"/>
|
||||
<field name="implied_ids" eval="[(4, ref('rma_group_user_all'))]"/>
|
||||
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
|
||||
</record>
|
||||
<!-- Record Rules -->
|
||||
<record id="rma_rule_user_own" model="ir.rule">
|
||||
<field name="name">Personal RMAs</field>
|
||||
<field ref="model_rma" name="model_id"/>
|
||||
<field name="domain_force">['|',('user_id','=',user.id),('user_id','=',False)]</field>
|
||||
<field name="groups" eval="[(4, ref('rma_group_user_own'))]"/>
|
||||
</record>
|
||||
<record id="rma_rule_user_all" model="ir.rule">
|
||||
<field name="name">All RMAs</field>
|
||||
<field ref="model_rma" name="model_id"/>
|
||||
<field name="domain_force">[(1,'=',1)]</field>
|
||||
<field name="groups" eval="[(4, ref('rma_group_user_all'))]"/>
|
||||
</record>
|
||||
<!-- Multi-Company Rules -->
|
||||
<record id="rma_rule_multi_company" model="ir.rule">
|
||||
<field name="name">RMA multi-company</field>
|
||||
<field name="model_id" ref="model_rma"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
<record id="rma_team_rule_multi_company" model="ir.rule">
|
||||
<field name="name">RMA team multi-company</field>
|
||||
<field name="model_id" ref="model_rma_team"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
<!-- New users will belong to rma_group_user_own -->
|
||||
<record id="base.default_user" model="res.users">
|
||||
<field name="groups_id" eval="[(4, ref('rma_group_user_own'))]"/>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user