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

[MIG][12.0] product_cost_security: Migration to v12.0 #533

Merged
merged 6 commits into from
Dec 3, 2019
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
98 changes: 98 additions & 0 deletions product_cost_security/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
=====================
Product Cost Security
=====================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |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/12.0/product_cost_security
: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-12-0/product-attribute-12-0-product_cost_security
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/135/12.0
:alt: Try me on Runbot

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

Adds a security group for product cost price field.
Only users with this group can view this field.

**Table of contents**

.. contents::
:local:

Configuration
=============

To use this module you need to:

#. Go to a *Setting > Users and Companies > Users*.
#. Select a user and add "Access to product costs" group.

Usage
=====

To use this module you need to:

#. Go to product form view logged with this user and you will see the
standard_price field.

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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_cost_security%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
~~~~~~~

* Tecnativa

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

* Sergio Teruel <sergio.teruel@tecnativa.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.

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

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

|maintainer-sergio-teruel|

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions product_cost_security/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import models
21 changes: 21 additions & 0 deletions product_cost_security/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
'name': 'Product Cost Security',
'summary': 'Product cost security restriction view',
'version': '12.0.1.0.0',
'development_status': 'Production/Stable',
pedrobaeza marked this conversation as resolved.
Show resolved Hide resolved
'maintainers': ['sergio-teruel'],
'category': 'Product',
'website': 'https://github.com/OCA/product-attribute',
'author': 'Tecnativa, Odoo Community Association (OCA)',
'license': 'AGPL-3',
'application': False,
'installable': True,
'depends': [
'product',
],
'data': [
'security/product_cost_security.xml',
],
}
33 changes: 33 additions & 0 deletions product_cost_security/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_cost_security
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-16 15:34+0000\n"
"PO-Revision-Date: 2018-11-16 16:35+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.0.6\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,name:product_cost_security.model_product_product
msgid "Product"
msgstr "Producto"

#. module: product_cost_security
#: model:ir.model,name:product_cost_security.model_product_template
msgid "Product Template"
msgstr "Plantilla de producto"
30 changes: 30 additions & 0 deletions product_cost_security/i18n/product_cost_security.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_cost_security
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.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: 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,name:product_cost_security.model_product_product
msgid "Product"
msgstr ""

#. module: product_cost_security
#: model:ir.model,name:product_cost_security.model_product_template
msgid "Product Template"
msgstr ""

2 changes: 2 additions & 0 deletions product_cost_security/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import product
19 changes: 19 additions & 0 deletions product_cost_security/models/product.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2018 Sergio Teruel - Tecnativa <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models


class ProductTemplate(models.Model):
_inherit = 'product.template'

standard_price = fields.Float(
groups='product_cost_security.group_product_cost',
)


class ProductProduct(models.Model):
_inherit = 'product.product'

standard_price = fields.Float(
groups='product_cost_security.group_product_cost',
)
4 changes: 4 additions & 0 deletions product_cost_security/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
To use this module you need to:

#. Go to a *Setting > Users and Companies > Users*.
#. Select a user and add "Access to product costs" group.
1 change: 1 addition & 0 deletions product_cost_security/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Sergio Teruel <sergio.teruel@tecnativa.com>
2 changes: 2 additions & 0 deletions product_cost_security/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Adds a security group for product cost price field.
Only users with this group can view this field.
4 changes: 4 additions & 0 deletions product_cost_security/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
To use this module you need to:

#. Go to product form view logged with this user and you will see the
standard_price field.
11 changes: 11 additions & 0 deletions product_cost_security/security/product_cost_security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<odoo>
<!--
Only users with this group can view the fields with this security group
-->
<record model="res.groups" id="group_product_cost">
<field name="name">Access to product costs</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>

</odoo>
Binary file added product_cost_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