diff --git a/sale_margin_product_cost_security/README.rst b/sale_margin_product_cost_security/README.rst new file mode 100644 index 0000000..ac42308 --- /dev/null +++ b/sale_margin_product_cost_security/README.rst @@ -0,0 +1,35 @@ +========================== +Sale Product Cost Security +========================== + +KMEE + +Purpose +======= + +This module extends the functionality of the product_cost_security module to the purchase_price field of the sale_margin module. + +When the user does not belong to the group product_cost_group, he cannot see the "Cost" field in the Sale Order Line view. + +Configuration +============= + +To configure this module, you need to: + +#. Go to ... + +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. + +#. Go to sale order line form view logged with this user and you will see the + purchase_price field. + +How to test +=========== + +... diff --git a/sale_margin_product_cost_security/__init__.py b/sale_margin_product_cost_security/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sale_margin_product_cost_security/__manifest__.py b/sale_margin_product_cost_security/__manifest__.py new file mode 100644 index 0000000..48ebbb9 --- /dev/null +++ b/sale_margin_product_cost_security/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2024 KMEE +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Sale Product Cost Security", + "summary": """KMEE""", + "version": "14.0.1.0.0", + "license": "AGPL-3", + "author": "KMEE", + "website": "https://github.com/KMEE/kmee-odoo-addons", + "depends": ["sale_margin", "product_cost_security"], + "data": [ + "views/sale_order_line_views.xml", + ], + "demo": [], +} diff --git a/sale_margin_product_cost_security/views/sale_order_line_views.xml b/sale_margin_product_cost_security/views/sale_order_line_views.xml new file mode 100644 index 0000000..e508d6f --- /dev/null +++ b/sale_margin_product_cost_security/views/sale_order_line_views.xml @@ -0,0 +1,16 @@ + + + + + sale.order + + + + product_cost_security.group_product_cost + + + + diff --git a/setup/sale_margin_product_cost_security/odoo/addons/sale_margin_product_cost_security b/setup/sale_margin_product_cost_security/odoo/addons/sale_margin_product_cost_security new file mode 120000 index 0000000..65ad881 --- /dev/null +++ b/setup/sale_margin_product_cost_security/odoo/addons/sale_margin_product_cost_security @@ -0,0 +1 @@ +../../../../sale_margin_product_cost_security \ No newline at end of file diff --git a/setup/sale_margin_product_cost_security/setup.py b/setup/sale_margin_product_cost_security/setup.py new file mode 100644 index 0000000..28c57bb --- /dev/null +++ b/setup/sale_margin_product_cost_security/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)