[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:
Ernesto Tejeda
2020-05-13 00:27:46 -04:00
committed by Pedro M. Baeza
parent 8d3e3c364a
commit 0122a02458
48 changed files with 7643 additions and 0 deletions

View 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
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_rma_team_user_own rma.team.user.own model_rma_team rma_group_user_own 1 0 0 0
3 access_rma_team_manager rma.team.manager model_rma_team rma_group_manager 1 1 1 1
4 access_rma_portal rma.portal model_rma base.group_portal 1 0 0 0
5 access_rma_user_own rma.user.own model_rma rma_group_user_own 1 1 1 0
6 access_rma_manager rma.manager model_rma rma_group_manager 1 1 1 1
7 access_rma_operation_user_own rma.operation.user.own model_rma_operation rma_group_user_own 1 0 0 0
8 access_rma_operation_manager rma.operation.manager model_rma_operation rma_group_manager 1 1 1 1

View 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>