Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.0][MIG] product_unit_manager_group + rename #117

Open
wants to merge 1 commit into
base: 12.0
Choose a base branch
from
Open
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
77 changes: 77 additions & 0 deletions uom_manager_group/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
=============================
Unit of Measure Manager Group
=============================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/licence-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-akretion%2Fodoo--usability-lightgray.png?logo=github
:target: https://github.com/akretion/odoo-usability/tree/12.0/uom_manager_group
:alt: akretion/odoo-usability

|badge1| |badge2| |badge3|

In Odoo, all a majority of modules "Managers" dealing with products (like Sales Manager,
Inventory Manager, Manufacturing Manager,...) have access rights to create/write/delete
Units of Measure whereas the Sale/Inventory/Manufacturing "Users" have only reading
rights... when part of the (misnamed) Technical group "Manage Multiple Units of Measure"
is activated.

This module helps to **clarify these UoM access rights** and groups by creating a new
group category called "Units of Measure" with two different groups :

- **User** : UoM fields are displayed but not Uom menus (Users are not allowed to create or modify UoM)
- **Manager** : display both fields and UoM menus
- and if nothing is selected, neither UoM fields nor menus are displayed


.. figure:: https://raw.githubusercontent.com/akretion/odoo-usability/12.0-mig-product-unit-manager-group/uom_manager_group/static/description/uom_manager_group-readme_1.png

By doing so, the module also remove create/write/delete rights from other module's
Managers in order to reserve these rights to the new "Units of Measure Manager" group :

.. figure:: https://raw.githubusercontent.com/akretion/odoo-usability/12.0-mig-product-unit-manager-group/uom_manager_group/static/description/uom_manager_group-readme_2.png

**Table of contents**

.. contents::
:local:

Usage
=====

Go to your User's Settings and select the desired acces right for the application
access "Units of Measure".

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

Bugs are tracked on `GitHub Issues <https://github.com/akretion/odoo-usability/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/akretion/odoo-usability/issues/new?body=module:%20uom_manager_group%0Aversion:%2012.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
~~~~~~~

* Akretion

Maintainers
~~~~~~~~~~~

This module is part of the `akretion/odoo-usability <https://github.com/akretion/odoo-usability/tree/12.0/uom_manager_group>`_ project on GitHub.

You are welcome to contribute.
2 changes: 2 additions & 0 deletions uom_manager_group/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# © 2017 Chafique DELLI @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
17 changes: 17 additions & 0 deletions uom_manager_group/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# © 2017 Chafique DELLI @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Unit of Measure Manager Group",
"version": "12.0.1.0.0",
"license": "AGPL-3",
"author": "Akretion",
"website": "http://akretion.com",
"depends": ["sale", "purchase", "mrp"],
"data": [
"data/ir_module_category_data.xml",
"security/product_security.xml",
"security/ir.model.access.csv",
"views/product_view.xml",
],
"installable": True,
}
8 changes: 8 additions & 0 deletions uom_manager_group/data/ir_module_category_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="module_category_uom" model="ir.module.category">
<field name="name">Units of Measure</field>
<field name="description">Enable using any units of measure</field>
<field name="sequence">0</field>
</record>
</odoo>
29 changes: 29 additions & 0 deletions uom_manager_group/i18n/fr.po
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:
# * uom_manager_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-13 15:35+0000\n"
"PO-Revision-Date: 2017-03-13 15:35+0000\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: uom_manager_group
#: model:res.groups,comment:uom_manager_group.group_uom_manager
#: model:res.groups,name:uom_manager_group.group_uom_manager
msgid "Manage Multiple Units of Measure"
msgstr "Gérer plusieurs unités de mesure"

#. module: uom_manager_group
#: model:res.groups,comment:product.group_uom
#: model:res.groups,name:product.group_uom
msgid "Use Multiple Units of Measure"
msgstr "Utiliser plusieurs unités de mesure"

Empty file.
Empty file.
20 changes: 20 additions & 0 deletions uom_manager_group/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
In Odoo, all a majority of modules "Managers" dealing with products (like Sales Manager,
Inventory Manager, Manufacturing Manager,...) have access rights to create/write/delete
Units of Measure whereas the Sale/Inventory/Manufacturing "Users" have only reading
rights... when part of the (misnamed) Technical group "Manage Multiple Units of Measure"
is activated.

This module helps to **clarify these UoM access rights** and groups by creating a new
group category called "Units of Measure" with two different groups :

- **User** : UoM fields are displayed but not Uom menus (Users are not allowed to create or modify UoM)
- **Manager** : display both fields and UoM menus
- and if nothing is selected, neither UoM fields nor menus are displayed


.. figure:: ../static/description/uom_manager_group-readme_1.png

By doing so, the module also remove create/write/delete rights from other module's
Managers in order to reserve these rights to the new "Units of Measure Manager" group :

.. figure:: ../static/description/uom_manager_group-readme_2.png
Empty file.
2 changes: 2 additions & 0 deletions uom_manager_group/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Go to your User's Settings and select the desired acces right for the application
access "Units of Measure".
15 changes: 15 additions & 0 deletions uom_manager_group/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_uom_uom_manager,uom.uom.manager,uom.model_uom_uom,group_uom_manager,1,1,1,1
access_uom_category_manager,uom.category.manager,uom.model_uom_category,group_uom_manager,1,1,1,1
access_uom_uom_user,uom.uom.user,uom.model_uom_uom,uom.group_uom,1,0,0,0
access_uom_uom_categ_user,uom.uom.categ.user,uom.model_uom_category,uom.group_uom,1,0,0,0
uom.access_uom_category_manager,uom.category.manager,uom.model_uom_category,base.group_system,1,0,0,0
uom.access_uom_uom_manager,uom.uom.manager,uom.model_uom_uom,base.group_system,1,0,0,0
sale.access_uom_uom_sale_manager,uom.uom salemanager,uom.model_uom_uom,sales_team.group_sale_manager,1,0,0,0
sale.access_uom_category_sale_manager,uom.category salemanager,uom.model_uom_category,sales_team.group_sale_manager,1,0,0,0
purchase.access_uom_uom_purchase_manager,uom.uom purchase_manager,uom.model_uom_uom,purchase.group_purchase_manager,1,0,0,0
purchase.access_uom_category_purchase_manager,uom.category purchase_manager,uom.model_uom_category,purchase.group_purchase_manager,1,0,0,0
mrp.access_uom_uom_mrp_manager,uom.uom mrp_manager,uom.model_uom_uom,mrp.group_mrp_manager,1,0,0,0
mrp.access_uom_category_mrp_manager,uom.category mrp_manager,uom.model_uom_category,mrp.group_mrp_manager,1,0,0,0
stock.access_uom_uom_stock_manager,uom.uom stock_manager,uom.model_uom_uom,stock.group_stock_manager,1,0,0,0
stock.access_uom_category_stock_manager,uom.category stock_manager,uom.model_uom_category,stock.group_stock_manager,1,0,0,0
18 changes: 18 additions & 0 deletions uom_manager_group/security/product_security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="0">

<record id="uom.group_uom" model="res.groups">
<field name="name">User</field>
<field name="comment">display and use UoM</field>
<field name="category_id" ref="uom_manager_group.module_category_uom"/>
</record>

<record id="group_uom_manager" model="res.groups">
<field name="name">Manager</field>
<field name="comment">display UoM menus, create UoM and modify them</field>
<field name="category_id" ref="uom_manager_group.module_category_uom"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
<field name="implied_ids" eval="[(6, 0, [ref('uom.group_uom')])]"/>
</record>

</odoo>
Loading