Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions repair_security/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===============
Repair Security
===============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:3fe02b72d8ecc5810af4047e8ca9ef267f1fac979fc3f20627e4ea7829b16065
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Frepair-lightgray.png?logo=github
:target: https://github.com/OCA/repair/tree/19.0/repair_security
:alt: OCA/repair
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/repair-19-0/repair-19-0-repair_security
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/repair&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module adds security groups fro the Repair App to make it more
configurable and independent of Stock.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/repair/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/repair/issues/new?body=module:%20repair_security%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* ForgeFlow S.L.

Contributors
------------

- David Jiménez <david.jimenez@forgeflow.com>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/repair <https://github.com/OCA/repair/tree/19.0/repair_security>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions repair_security/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .hook import post_init_hook
19 changes: 19 additions & 0 deletions repair_security/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2020 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Repair Security",
"summary": "Create security groups for Repair",
"version": "19.0.1.0.0",
"category": "Manufacturing",
"website": "https://github.com/OCA/repair",
"author": "ForgeFlow S.L., Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,
"depends": ["repair"],
"data": [
"security/repair_security.xml",
"security/ir.model.access.csv",
"views/repair_views.xml",
],
"post_init_hook": "post_init_hook",
}
7 changes: 7 additions & 0 deletions repair_security/hook.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
def post_init_hook(env):
# Giving Repair Admin access to match the previous permissions.
env.ref("repair_security.group_repair_manager").write(
{
"user_ids": [(6, 0, env.ref("stock.group_stock_user").user_ids.ids)],
}
)
29 changes: 29 additions & 0 deletions repair_security/i18n/repair_security.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * repair_security
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: repair_security
#: model:res.groups,name:repair_security.group_repair_manager
msgid "Administrator"
msgstr ""

#. module: repair_security
#: model:ir.module.category,name:repair_security.module_category_repair
msgid "Repair"
msgstr ""

#. module: repair_security
#: model:res.groups,name:repair_security.group_repair_user
msgid "User"
msgstr ""
3 changes: 3 additions & 0 deletions repair_security/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions repair_security/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- David Jiménez \<david.jimenez@forgeflow.com\>
2 changes: 2 additions & 0 deletions repair_security/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module adds security groups fro the Repair App to make it more
configurable and independent of Stock.
8 changes: 8 additions & 0 deletions repair_security/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_repair_user,Repair user,repair.model_repair_order,repair_security.group_repair_user,1,1,0,0
access_repair_manager,Repair manager,repair.model_repair_order,repair_security.group_repair_manager,1,1,1,1
access_repair_tag_user,Repair Tags user,repair.model_repair_tags,repair_security.group_repair_user,1,0,0,0
access_repair_tag_manager,Repair Tags user,repair.model_repair_tags,repair_security.group_repair_manager,1,1,1,1
access_account_tax_user,account.tax,account.model_account_tax,repair_security.group_repair_user,1,0,0,0
access_account_tax_manager,account.tax,account.model_account_tax,repair_security.group_repair_manager,1,0,0,0
access_stock_warn_insufficient_qty_repair_manager,access.stock.warn.insufficient.qty.repair,repair.model_stock_warn_insufficient_qty_repair,repair_security.group_repair_manager,1,1,1,1
34 changes: 34 additions & 0 deletions repair_security/security/repair_security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<function model="ir.model.access" name="write">
<value
eval="[ref('repair.access_repair_user'), ref('repair.access_repair_tag_user'), ref('repair.access_stock_warn_insufficient_qty_repair')]"
/>
<value eval="{'active': False }" />
</function>

<record model="ir.module.category" id="module_category_repair">
<field name="name">Repair</field>
<field name="sequence">25</field>
</record>
<record model="res.groups.privilege" id="res_groups_privilege_repair">
<field name="name">Repair</field>
<field name="category_id" ref="module_category_repair" />
<field name="sequence">7</field>
</record>

<record id="group_repair_user" model="res.groups">
<field name="name">User</field>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]" />
<field name="privilege_id" ref="res_groups_privilege_repair" />
</record>
<record id="group_repair_manager" model="res.groups">
<field name="name">Administrator</field>
<field name="implied_ids" eval="[(4, ref('group_repair_user'))]" />
<field
name="user_ids"
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
/>
<field name="privilege_id" ref="res_groups_privilege_repair" />
</record>
</odoo>
Binary file added repair_security/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading