From 1d0db2b925811d5188a8890da179cf97556f1c38 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Mon, 25 Mar 2024 09:45:23 +0000 Subject: [PATCH 1/4] [IMP] product_cost_security: clarify product cost edit required permissions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As seen in https://github.com/OCA/margin-analysis/pull/198#pullrequestreview-1951828542, a user needs some other group that grants them permissions for editing products, apart from this one that allows them to edit product cost. This might not seem obvious to the user, so it's better to document it. Btw, I renamed the groups to be shorter. Still easy to understand, now that groups are grouped (🥁). @moduon MT-5158 --- product_cost_security/README.rst | 9 +++++- product_cost_security/readme/ROADMAP.rst | 3 ++ .../security/product_cost_security.xml | 4 +-- .../static/description/index.html | 32 ++++++++++++------- 4 files changed, 34 insertions(+), 14 deletions(-) create mode 100644 product_cost_security/readme/ROADMAP.rst diff --git a/product_cost_security/README.rst b/product_cost_security/README.rst index 0ea592a5fb5f..e8c4d71d7d7f 100644 --- a/product_cost_security/README.rst +++ b/product_cost_security/README.rst @@ -7,7 +7,7 @@ Product Cost Security !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:e0a447c05b96eb98d1209480f72fd5aaa45313571321d852e1d0d0d561d4c775 + !! source digest: sha256:2b214f8d134b9d430e7c9d5714c959c99bfb70cfad7d1a138fad9f3baab5a285 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png @@ -54,6 +54,13 @@ To use this module you need to: #. You will not see the *Cost* field unless you follow the *Configuration* steps and get read permissions. #. You will not be able to edit it unless you are granted write permissions. +Known issues / Roadmap +====================== + +* To edit product costs, apart from having *Product costs / Edit* permission, + you need to have some other permission that lets you edit products, such as + *Sales / Administrator* or *Inventory / Administrator*. + Bug Tracker =========== diff --git a/product_cost_security/readme/ROADMAP.rst b/product_cost_security/readme/ROADMAP.rst new file mode 100644 index 000000000000..2b20ba2b55b5 --- /dev/null +++ b/product_cost_security/readme/ROADMAP.rst @@ -0,0 +1,3 @@ +* To edit product costs, apart from having *Product costs / Edit* permission, + you need to have some other permission that lets you edit products, such as + *Sales / Administrator* or *Inventory / Administrator*. diff --git a/product_cost_security/security/product_cost_security.xml b/product_cost_security/security/product_cost_security.xml index bbdbc579daba..48d5130de235 100644 --- a/product_cost_security/security/product_cost_security.xml +++ b/product_cost_security/security/product_cost_security.xml @@ -10,7 +10,7 @@ add fields to views with this group defined as field attribute. --> - Access to product costs + Read @@ -18,7 +18,7 @@ Only users within this group can edit costs. --> - Modify product costs + Edit @@ -366,7 +367,7 @@

Product Cost Security

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:e0a447c05b96eb98d1209480f72fd5aaa45313571321d852e1d0d0d561d4c775 +!! source digest: sha256:2b214f8d134b9d430e7c9d5714c959c99bfb70cfad7d1a138fad9f3baab5a285 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Production/Stable License: AGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

It adds two security groups, one for viewing the product cost price, and the other for @@ -376,11 +377,12 @@

Product Cost Security

  • Configuration
  • Usage
  • -
  • Bug Tracker
  • -
  • Credits @@ -403,8 +405,16 @@

    Usage

  • You will not be able to edit it unless you are granted write permissions.
  • +
    +

    Known issues / Roadmap

    +
      +
    • To edit product costs, apart from having Product costs / Edit permission, +you need to have some other permission that lets you edit products, such as +Sales / Administrator or Inventory / Administrator.
    • +
    +
    -

    Bug Tracker

    +

    Bug Tracker

    Bugs are tracked on GitHub 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 @@ -412,15 +422,15 @@

    Bug Tracker

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

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • Tecnativa
    -

    Contributors

    +

    Contributors

    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association

    OCA, or the Odoo Community Association, is a nonprofit organization whose From f458615aa22178208d5ac96dad5da4f95d3d8ceb Mon Sep 17 00:00:00 2001 From: oca-ci Date: Fri, 12 Apr 2024 09:20:21 +0000 Subject: [PATCH 2/4] [UPD] Update product_cost_security.pot --- .../i18n/product_cost_security.pot | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/product_cost_security/i18n/product_cost_security.pot b/product_cost_security/i18n/product_cost_security.pot index 4a609898beac..073627a62b72 100644 --- a/product_cost_security/i18n/product_cost_security.pot +++ b/product_cost_security/i18n/product_cost_security.pot @@ -13,17 +13,17 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: product_cost_security -#: model:res.groups,name:product_cost_security.group_product_cost -msgid "Access to product costs" -msgstr "" - #. module: product_cost_security #: model:ir.model.fields,field_description:product_cost_security.field_product_product__standard_price #: model:ir.model.fields,field_description:product_cost_security.field_product_template__standard_price msgid "Cost" msgstr "" +#. module: product_cost_security +#: model:res.groups,name:product_cost_security.group_product_edit_cost +msgid "Edit" +msgstr "" + #. module: product_cost_security #: model:ir.model.fields,help:product_cost_security.field_product_product__standard_price #: model:ir.model.fields,help:product_cost_security.field_product_template__standard_price @@ -34,11 +34,6 @@ msgid "" " Used to compute margins on sale orders." msgstr "" -#. module: product_cost_security -#: model:res.groups,name:product_cost_security.group_product_edit_cost -msgid "Modify product costs" -msgstr "" - #. module: product_cost_security #: model:ir.model,name:product_cost_security.model_product_template msgid "Product" @@ -59,6 +54,11 @@ msgstr "" msgid "Product costs" msgstr "" +#. module: product_cost_security +#: model:res.groups,name:product_cost_security.group_product_cost +msgid "Read" +msgstr "" + #. module: product_cost_security #: model:ir.model.fields,field_description:product_cost_security.field_product_cost_security_mixin__user_can_update_cost #: model:ir.model.fields,field_description:product_cost_security.field_product_product__user_can_update_cost From a887c5740fb66908baf498256b293e604b244189 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Fri, 12 Apr 2024 09:25:55 +0000 Subject: [PATCH 3/4] [BOT] post-merge updates --- README.md | 2 +- product_cost_security/README.rst | 2 +- product_cost_security/__manifest__.py | 2 +- product_cost_security/static/description/index.html | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0f645f071d7f..da34457a6578 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ addon | version | maintainers | summary [product_category_type](product_category_type/) | 16.0.1.0.0 | [![legalsylvain](https://github.com/legalsylvain.png?size=30px)](https://github.com/legalsylvain) | Add Type field on Product Categories to distinguish between parent and final categories [product_code_unique](product_code_unique/) | 16.0.1.0.1 | | Set Product Internal Reference as Unique [product_company_default](product_company_default/) | 16.0.1.0.0 | | Product Company Default -[product_cost_security](product_cost_security/) | 16.0.1.1.0 | [![sergio-teruel](https://github.com/sergio-teruel.png?size=30px)](https://github.com/sergio-teruel) [![rafaelbn](https://github.com/rafaelbn.png?size=30px)](https://github.com/rafaelbn) [![yajo](https://github.com/yajo.png?size=30px)](https://github.com/yajo) | Product cost security restriction view +[product_cost_security](product_cost_security/) | 16.0.1.2.0 | [![sergio-teruel](https://github.com/sergio-teruel.png?size=30px)](https://github.com/sergio-teruel) [![rafaelbn](https://github.com/rafaelbn.png?size=30px)](https://github.com/rafaelbn) [![yajo](https://github.com/yajo.png?size=30px)](https://github.com/yajo) | Product cost security restriction view [product_country_restriction](product_country_restriction/) | 16.0.1.0.0 | [![rousseldenis](https://github.com/rousseldenis.png?size=30px)](https://github.com/rousseldenis) | Allows to define product restrictions country based [product_dimension](product_dimension/) | 16.0.1.2.0 | | Product Dimension [product_expiry_configurable](product_expiry_configurable/) | 16.0.1.0.0 | | This model allows setting expiry times on category and to use the 'end_of_life' date for the computation of lot dates diff --git a/product_cost_security/README.rst b/product_cost_security/README.rst index e8c4d71d7d7f..b1ec91ec53f9 100644 --- a/product_cost_security/README.rst +++ b/product_cost_security/README.rst @@ -7,7 +7,7 @@ Product Cost Security !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:2b214f8d134b9d430e7c9d5714c959c99bfb70cfad7d1a138fad9f3baab5a285 + !! source digest: sha256:b742bd17e19a4443630ab59ac73cd70854d0edd253fc71d1b9fd0027b8509be0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png diff --git a/product_cost_security/__manifest__.py b/product_cost_security/__manifest__.py index 203d8ea9b9d2..cc070d2c1e73 100644 --- a/product_cost_security/__manifest__.py +++ b/product_cost_security/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Product Cost Security", "summary": "Product cost security restriction view", - "version": "16.0.1.1.0", + "version": "16.0.1.2.0", "development_status": "Production/Stable", "maintainers": ["sergio-teruel", "rafaelbn", "yajo"], "category": "Product", diff --git a/product_cost_security/static/description/index.html b/product_cost_security/static/description/index.html index 9025a71007f2..1eacf3076060 100644 --- a/product_cost_security/static/description/index.html +++ b/product_cost_security/static/description/index.html @@ -1,4 +1,3 @@ - @@ -367,7 +366,7 @@

    Product Cost Security

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:2b214f8d134b9d430e7c9d5714c959c99bfb70cfad7d1a138fad9f3baab5a285 +!! source digest: sha256:b742bd17e19a4443630ab59ac73cd70854d0edd253fc71d1b9fd0027b8509be0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

    Production/Stable License: AGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

    It adds two security groups, one for viewing the product cost price, and the other for From ccadf78b0a3a6a8b85158cbd1ec795bbf7401d0b Mon Sep 17 00:00:00 2001 From: Weblate Date: Fri, 12 Apr 2024 09:26:20 +0000 Subject: [PATCH 4/4] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: product-attribute-16.0/product-attribute-16.0-product_cost_security Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_cost_security/ --- product_cost_security/i18n/ar.po | 23 +++++++++++++---------- product_cost_security/i18n/ca.po | 23 +++++++++++++---------- product_cost_security/i18n/es.po | 26 ++++++++++++++++---------- product_cost_security/i18n/it.po | 26 ++++++++++++++++---------- 4 files changed, 58 insertions(+), 40 deletions(-) diff --git a/product_cost_security/i18n/ar.po b/product_cost_security/i18n/ar.po index 66499a74b7f4..22d17f6bfcb3 100644 --- a/product_cost_security/i18n/ar.po +++ b/product_cost_security/i18n/ar.po @@ -17,17 +17,17 @@ msgstr "" "&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n" "X-Generator: Weblate 4.3.2\n" -#. module: product_cost_security -#: model:res.groups,name:product_cost_security.group_product_cost -msgid "Access to product costs" -msgstr "الاطلاع على تكلفة المنتجات" - #. module: product_cost_security #: model:ir.model.fields,field_description:product_cost_security.field_product_product__standard_price #: model:ir.model.fields,field_description:product_cost_security.field_product_template__standard_price msgid "Cost" msgstr "التكلفة" +#. module: product_cost_security +#: model:res.groups,name:product_cost_security.group_product_edit_cost +msgid "Edit" +msgstr "" + #. module: product_cost_security #: model:ir.model.fields,help:product_cost_security.field_product_product__standard_price #: model:ir.model.fields,help:product_cost_security.field_product_template__standard_price @@ -41,11 +41,6 @@ msgid "" " Used to compute margins on sale orders." msgstr "" -#. module: product_cost_security -#: model:res.groups,name:product_cost_security.group_product_edit_cost -msgid "Modify product costs" -msgstr "" - #. module: product_cost_security #: model:ir.model,name:product_cost_security.model_product_template msgid "Product" @@ -66,6 +61,11 @@ msgstr "" msgid "Product costs" msgstr "" +#. module: product_cost_security +#: model:res.groups,name:product_cost_security.group_product_cost +msgid "Read" +msgstr "" + #. module: product_cost_security #: model:ir.model.fields,field_description:product_cost_security.field_product_cost_security_mixin__user_can_update_cost #: model:ir.model.fields,field_description:product_cost_security.field_product_product__user_can_update_cost @@ -85,6 +85,9 @@ msgid "" "(Operation: %(operation)s)" msgstr "" +#~ msgid "Access to product costs" +#~ msgstr "الاطلاع على تكلفة المنتجات" + #~ msgid "Product Template" #~ msgstr "قالب المنتج" diff --git a/product_cost_security/i18n/ca.po b/product_cost_security/i18n/ca.po index 95d5f10ca162..c64df78ae317 100644 --- a/product_cost_security/i18n/ca.po +++ b/product_cost_security/i18n/ca.po @@ -16,17 +16,17 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 4.3.2\n" -#. module: product_cost_security -#: model:res.groups,name:product_cost_security.group_product_cost -msgid "Access to product costs" -msgstr "Accés als costos del producte" - #. module: product_cost_security #: model:ir.model.fields,field_description:product_cost_security.field_product_product__standard_price #: model:ir.model.fields,field_description:product_cost_security.field_product_template__standard_price msgid "Cost" msgstr "Cost" +#. module: product_cost_security +#: model:res.groups,name:product_cost_security.group_product_edit_cost +msgid "Edit" +msgstr "" + #. module: product_cost_security #: model:ir.model.fields,help:product_cost_security.field_product_product__standard_price #: model:ir.model.fields,help:product_cost_security.field_product_template__standard_price @@ -48,11 +48,6 @@ msgstr "" "compra (p. ex., ajust d'inventari).\n" " S'utilitza per calcular els marges de les comandes de venda." -#. module: product_cost_security -#: model:res.groups,name:product_cost_security.group_product_edit_cost -msgid "Modify product costs" -msgstr "" - #. module: product_cost_security #: model:ir.model,name:product_cost_security.model_product_template msgid "Product" @@ -73,6 +68,11 @@ msgstr "" msgid "Product costs" msgstr "" +#. module: product_cost_security +#: model:res.groups,name:product_cost_security.group_product_cost +msgid "Read" +msgstr "" + #. module: product_cost_security #: model:ir.model.fields,field_description:product_cost_security.field_product_cost_security_mixin__user_can_update_cost #: model:ir.model.fields,field_description:product_cost_security.field_product_product__user_can_update_cost @@ -92,5 +92,8 @@ msgid "" "(Operation: %(operation)s)" msgstr "" +#~ msgid "Access to product costs" +#~ msgstr "Accés als costos del producte" + #~ msgid "Product Template" #~ msgstr "Plantilla de producte" diff --git a/product_cost_security/i18n/es.po b/product_cost_security/i18n/es.po index 3d5269793b76..436a64044114 100644 --- a/product_cost_security/i18n/es.po +++ b/product_cost_security/i18n/es.po @@ -17,17 +17,17 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 4.17\n" -#. module: product_cost_security -#: model:res.groups,name:product_cost_security.group_product_cost -msgid "Access to product costs" -msgstr "Acceso a ver el coste de productos" - #. module: product_cost_security #: model:ir.model.fields,field_description:product_cost_security.field_product_product__standard_price #: model:ir.model.fields,field_description:product_cost_security.field_product_template__standard_price msgid "Cost" msgstr "Coste" +#. module: product_cost_security +#: model:res.groups,name:product_cost_security.group_product_edit_cost +msgid "Edit" +msgstr "" + #. module: product_cost_security #: model:ir.model.fields,help:product_cost_security.field_product_product__standard_price #: model:ir.model.fields,help:product_cost_security.field_product_template__standard_price @@ -48,11 +48,6 @@ msgstr "" "compra (por ejemplo, ajuste de inventario).\n" " Se utiliza para calcular los márgenes de los pedidos de venta." -#. module: product_cost_security -#: model:res.groups,name:product_cost_security.group_product_edit_cost -msgid "Modify product costs" -msgstr "Modificar los costes de los productos" - #. module: product_cost_security #: model:ir.model,name:product_cost_security.model_product_template msgid "Product" @@ -73,6 +68,11 @@ msgstr "Mixin de control de acceso al coste del producto" msgid "Product costs" msgstr "Costes del Producto" +#. module: product_cost_security +#: model:res.groups,name:product_cost_security.group_product_cost +msgid "Read" +msgstr "" + #. module: product_cost_security #: model:ir.model.fields,field_description:product_cost_security.field_product_cost_security_mixin__user_can_update_cost #: model:ir.model.fields,field_description:product_cost_security.field_product_product__user_can_update_cost @@ -97,5 +97,11 @@ msgstr "" "\n" "(Operación: %(operation)s)" +#~ msgid "Access to product costs" +#~ msgstr "Acceso a ver el coste de productos" + +#~ msgid "Modify product costs" +#~ msgstr "Modificar los costes de los productos" + #~ msgid "Product Template" #~ msgstr "Plantilla de producto" diff --git a/product_cost_security/i18n/it.po b/product_cost_security/i18n/it.po index 29486bd3b1a8..d591501b0eb3 100644 --- a/product_cost_security/i18n/it.po +++ b/product_cost_security/i18n/it.po @@ -16,17 +16,17 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 4.17\n" -#. module: product_cost_security -#: model:res.groups,name:product_cost_security.group_product_cost -msgid "Access to product costs" -msgstr "Accesso ai costi prodotto" - #. module: product_cost_security #: model:ir.model.fields,field_description:product_cost_security.field_product_product__standard_price #: model:ir.model.fields,field_description:product_cost_security.field_product_template__standard_price msgid "Cost" msgstr "Costo" +#. module: product_cost_security +#: model:res.groups,name:product_cost_security.group_product_edit_cost +msgid "Edit" +msgstr "" + #. module: product_cost_security #: model:ir.model.fields,help:product_cost_security.field_product_product__standard_price #: model:ir.model.fields,help:product_cost_security.field_product_template__standard_price @@ -47,11 +47,6 @@ msgstr "" "è noto (es. rettifiche di inventario).\n" " Utilizzato per calcolare i margini negli ordini di vendita." -#. module: product_cost_security -#: model:res.groups,name:product_cost_security.group_product_edit_cost -msgid "Modify product costs" -msgstr "Modifica costi prodotto" - #. module: product_cost_security #: model:ir.model,name:product_cost_security.model_product_template msgid "Product" @@ -72,6 +67,11 @@ msgstr "Mixin controllo accesso costo prodotto" msgid "Product costs" msgstr "Costi prodotto" +#. module: product_cost_security +#: model:res.groups,name:product_cost_security.group_product_cost +msgid "Read" +msgstr "" + #. module: product_cost_security #: model:ir.model.fields,field_description:product_cost_security.field_product_cost_security_mixin__user_can_update_cost #: model:ir.model.fields,field_description:product_cost_security.field_product_product__user_can_update_cost @@ -95,3 +95,9 @@ msgstr "" "sistema.\n" "\n" "(Operazione: %(operation)s)" + +#~ msgid "Access to product costs" +#~ msgstr "Accesso ai costi prodotto" + +#~ msgid "Modify product costs" +#~ msgstr "Modifica costi prodotto"