Skip to content

Commit

Permalink
[ADD] product_usability: New module that adds a new main entry menu f…
Browse files Browse the repository at this point in the history
…or models present

in 'product' module. (product.product, product.category, etc...)
  • Loading branch information
legalsylvain committed Jul 4, 2024
1 parent 0212ec6 commit 4948596
Show file tree
Hide file tree
Showing 14 changed files with 928 additions and 0 deletions.
130 changes: 130 additions & 0 deletions product_usability/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
==================================
Product - Missing Menus and Groups
==================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:67757bc076c6f7a1a44155d668c63acbceb32021eb102c1d8cf52c7a51b516fd
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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-OCA%2Fproduct--attribute-lightgray.png?logo=github
:target: https://github.com/OCA/product-attribute/tree/16.0/product_usability
:alt: OCA/product-attribute
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_usability
: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/product-attribute&target_branch=16.0
:alt: Try me on Runboat

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

This module extends the Odoo CE product module to improve usability.

New Menu items
~~~~~~~~~~~~~~
By default, when installing ``product`` module, a lot of menu items
are not created and are available only if other module are installed.
For exemple:

* Manage product categories requires to install ``stock``
module, that create the menu entry
_"Inventory / Configuration / Product / Product Categories"_.
* Manage product tags
requires to install ``sale_management`` module, that create
the menu entry _"Sale / Configuration / Products / Tags"_.

This module so create a new main menu item named 'Product' that provides
all menu entries to see and manage product, attributes, pricelist,
Unit of Measure, etc. So that all the product configuration is available
in a unique place.


New Access Rights
~~~~~~~~~~~~~~~~~

By default, to create product, attributes, pricelist, categories,
User should be member of a group that adds a lot of rights, like
'Inventory / Manager' or 'Sale / Manager'.

This module adds new Access rules to fine-tune access rights,
creating the following rules:

* _"Product Creation"_: Allow to create Products (``product.template``),
Variants (``product.product``), Product Template Attribute Lines
(``product.template.attribute.line``) and Product Template Attribute Values
(``product.template.attribute.value``)

* _"Product Attribute Creation"_: Allow to create Attributes (``product.attribute``)
and Values (``product.attribute.value``).

* _"Product Tag Creation"_: Allow to create Tags (``product.tag``)

* _"Product Category Creation"_: Allow to create Categories (``product.category``)

* _"Product Supplier Pricelist Creation"_: Allow to create Supplier Pricelists (``product.supplierinfo``)

* _"Unit of Measure Creation"_: Allow to create Unit of Measures
(``uom.uom``) and Unit of Measures Categories (``uom.category``)

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/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/product-attribute/issues/new?body=module:%20product_usability%0Aversion:%2016.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
~~~~~~~

* GRAP

Contributors
~~~~~~~~~~~~

* Sylvain LE GAL <https://twitter.com/legalsylvain>

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.

.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px
:target: https://github.com/legalsylvain
:alt: legalsylvain

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-legalsylvain|

This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/16.0/product_usability>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Empty file added product_usability/__init__.py
Empty file.
22 changes: 22 additions & 0 deletions product_usability/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (C) 2024 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Product - Missing Menus and Groups",
"version": "16.0.1.0.0",
"category": "Product",
"license": "AGPL-3",
"summary": "Adds missing menu entries for Product module and"
" adds extra groups to fine-tune access rights",
"author": "GRAP, Odoo Community Association (OCA)",
"maintainers": ["legalsylvain"],
"website": "https://github.com/OCA/product-attribute",
"depends": ["product"],
"data": [
"security/res_groups.xml",
"security/ir.model.access.csv",
"views/menu.xml",
],
"installable": True,
}
98 changes: 98 additions & 0 deletions product_usability/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_usability
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-06-16 20:40+0000\n"
"PO-Revision-Date: 2024-06-16 20:40+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: product_usability
#: model:ir.ui.menu,name:product_usability.menu_product_attribute
msgid "Attributes"
msgstr "Attributs de produits"

#. module: product_usability
#: model:ir.ui.menu,name:product_usability.menu_configuration
msgid "Configuration"
msgstr ""

#. module: product_usability
#: model:ir.ui.menu,name:product_usability.menu_product_pricelist
msgid "Pricelists"
msgstr "Listes de prix"

#. module: product_usability
#: model:res.groups,name:product_usability.group_product_attribute_creation
msgid "Product Attribute Creation"
msgstr "Création d'attribut de produit"

#. module: product_usability
#: model:ir.ui.menu,name:product_usability.menu_product_category
msgid "Product Categories"
msgstr "Catégories de produits"

#. module: product_usability
#: model:res.groups,name:product_usability.group_product_category_creation
msgid "Product Category Creation"
msgstr "Création de catégorie de produit"

#. module: product_usability
#: model:res.groups,name:product_usability.group_product_creation
msgid "Product Creation"
msgstr "Création de produit"

#. module: product_usability
#: model:ir.ui.menu,name:product_usability.menu_product_packaging
msgid "Product Packagings"
msgstr "Conditionnements de produit"

#. module: product_usability
#: model:res.groups,name:product_usability.group_product_supplierinfo_creation
msgid "Product Supplier Pricelist Creation"
msgstr "Création de tarification fournisseur de produit"

#. module: product_usability
#: model:res.groups,name:product_usability.group_product_tag_creation
msgid "Product Tag Creation"
msgstr "Création d'étiquette de produit"

#. module: product_usability
#: model:ir.ui.menu,name:product_usability.menu_product_tag
msgid "Product Tags"
msgstr "Étiquettes de produit"

#. module: product_usability
#: model:ir.ui.menu,name:product_usability.menu_product_product
msgid "Product Variants"
msgstr "Variantes de produit"

#. module: product_usability
#: model:ir.ui.menu,name:product_usability.menu_product
#: model:ir.ui.menu,name:product_usability.menu_product_main
#: model:ir.ui.menu,name:product_usability.menu_product_template
msgid "Products"
msgstr "Produits"

#. module: product_usability
#: model:ir.ui.menu,name:product_usability.menu_uom_uom
msgid "Units of Measure"
msgstr "Unités de mesure"

#. module: product_usability
#: model:ir.ui.menu,name:product_usability.menu_uom_category
msgid "Units of Measure Categories"
msgstr "Catégories d'unité de mesure"

#. module: product_usability
#: model:res.groups,name:product_usability.group_uom_creation
msgid "Units of Measure Creation"
msgstr "Création d'unité de mesure"
1 change: 1 addition & 0 deletions product_usability/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Sylvain LE GAL <https://twitter.com/legalsylvain>
47 changes: 47 additions & 0 deletions product_usability/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
This module extends the Odoo CE product module to improve usability.

New Menu items
~~~~~~~~~~~~~~
By default, when installing ``product`` module, a lot of menu items
are not created and are available only if other module are installed.
For exemple:

* Manage product categories requires to install ``stock``
module, that create the menu entry
_"Inventory / Configuration / Product / Product Categories"_.
* Manage product tags
requires to install ``sale_management`` module, that create
the menu entry _"Sale / Configuration / Products / Tags"_.

This module so create a new main menu item named 'Product' that provides
all menu entries to see and manage product, attributes, pricelist,
Unit of Measure, etc. So that all the product configuration is available
in a unique place.


New Access Rights
~~~~~~~~~~~~~~~~~

By default, to create product, attributes, pricelist, categories,
User should be member of a group that adds a lot of rights, like
'Inventory / Manager' or 'Sale / Manager'.

This module adds new Access rules to fine-tune access rights,
creating the following rules:

* _"Product Creation"_: Allow to create Products (``product.template``),
Variants (``product.product``), Product Template Attribute Lines
(``product.template.attribute.line``) and Product Template Attribute Values
(``product.template.attribute.value``)

* _"Product Attribute Creation"_: Allow to create Attributes (``product.attribute``)
and Values (``product.attribute.value``).

* _"Product Tag Creation"_: Allow to create Tags (``product.tag``)

* _"Product Category Creation"_: Allow to create Categories (``product.category``)

* _"Product Supplier Pricelist Creation"_: Allow to create Supplier Pricelists (``product.supplierinfo``)

* _"Unit of Measure Creation"_: Allow to create Unit of Measures
(``uom.uom``) and Unit of Measures Categories (``uom.category``)
12 changes: 12 additions & 0 deletions product_usability/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_product_template_manager,product.template manager,product.model_product_template,group_product_creation,1,1,1,1
access_product_product_manager,product.product manager,product.model_product_product,group_product_creation,1,1,1,1
access_product_attribute_manager,product.attribute manager,product.model_product_attribute,group_product_attribute_creation,1,1,1,1
access_product_attribute_value_manager,product.attribute.value manager,product.model_product_attribute_value,group_product_attribute_creation,1,1,1,1
access_product_template_attribute_line_manager,product.template.attribute.line manager,product.model_product_template_attribute_line,group_product_creation,1,1,1,1
access_product_template_attribute_value_manager,product.template.attribute.value manager,product.model_product_template_attribute_value,group_product_creation,1,1,1,1
access_product_tag_manager,product.tag manager,product.model_product_tag,group_product_tag_creation,1,1,1,1
access_product_category_manager,product.category manager,product.model_product_category,group_product_category_creation,1,1,1,1
access_product_supplierinfo_manager,product.supplierinfo manager,product.model_product_supplierinfo,group_product_supplierinfo_creation,1,1,1,1
access_uom_uom_manager,uom.uom manager,uom.model_uom_uom,group_uom_creation,1,1,1,1
access_uom_category_manager,uom.category manager,uom.model_uom_category,group_uom_creation,1,1,1,1
40 changes: 40 additions & 0 deletions product_usability/security/res_groups.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright (C) 2024-Today GRAP (http://www.grap.coop)
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record id="group_product_creation" model="res.groups">
<field name="name">Product Creation</field>
<field name="category_id" ref="base.module_category_usability" />
</record>

<record id="group_product_attribute_creation" model="res.groups">
<field name="name">Product Attribute Creation</field>
<field name="category_id" ref="base.module_category_usability" />
</record>

<record id="group_product_tag_creation" model="res.groups">
<field name="name">Product Tag Creation</field>
<field name="category_id" ref="base.module_category_usability" />
</record>

<record id="group_product_category_creation" model="res.groups">
<field name="name">Product Category Creation</field>
<field name="category_id" ref="base.module_category_usability" />
</record>

<record id="group_product_supplierinfo_creation" model="res.groups">
<field name="name">Product Supplier Pricelist Creation</field>
<field name="category_id" ref="base.module_category_usability" />
</record>

<record id="group_uom_creation" model="res.groups">
<field name="name">Units of Measure Creation</field>
<field name="category_id" ref="base.module_category_usability" />
<field name="implied_ids" eval="[Command.link(ref('uom.group_uom'))]" />
</record>

</odoo>
Loading

0 comments on commit 4948596

Please sign in to comment.