diff --git a/setup/stock_inventory_line_product_cost/odoo/addons/stock_inventory_line_product_cost b/setup/stock_inventory_line_product_cost/odoo/addons/stock_inventory_line_product_cost new file mode 120000 index 000000000000..113ff235c1a3 --- /dev/null +++ b/setup/stock_inventory_line_product_cost/odoo/addons/stock_inventory_line_product_cost @@ -0,0 +1 @@ +../../../../stock_inventory_line_product_cost \ No newline at end of file diff --git a/setup/stock_inventory_line_product_cost/setup.py b/setup/stock_inventory_line_product_cost/setup.py new file mode 100644 index 000000000000..28c57bb64031 --- /dev/null +++ b/setup/stock_inventory_line_product_cost/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_inventory_line_product_cost/README.rst b/stock_inventory_line_product_cost/README.rst new file mode 100644 index 000000000000..cb64e48a3da0 --- /dev/null +++ b/stock_inventory_line_product_cost/README.rst @@ -0,0 +1,21 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +===================== +Stock Adjustment Cost +===================== + +Adds product cost field to inventory adjustment line view. + +Usage +===== + +* Go to Inventory > Operations > Inventory Adjustments +* Create or open an existing inventory adjustment +* On the list view you should see the Product Cost field and it should show the cost of the product. + +Contributors +------------ + +* Open Source Integrators diff --git a/stock_inventory_line_product_cost/__init__.py b/stock_inventory_line_product_cost/__init__.py new file mode 100644 index 000000000000..bb83730e9562 --- /dev/null +++ b/stock_inventory_line_product_cost/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2021 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models diff --git a/stock_inventory_line_product_cost/__manifest__.py b/stock_inventory_line_product_cost/__manifest__.py new file mode 100644 index 000000000000..43cd36059551 --- /dev/null +++ b/stock_inventory_line_product_cost/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright (C) 2021 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Stock Adjustment Cost", + "version": "14.0.1.0.0", + "license": "AGPL-3", + "author": "Open Source Integrators,Odoo Community Association (OCA)", + "maintainer": "Open Source Integrators", + "website": "https://github.com/OCA/stock-logistics-warehouse", + "category": "Stock", + "depends": ["stock"], + "data": [ + "views/stock_inventory_line_view.xml", + ], + "installable": True, +} diff --git a/stock_inventory_line_product_cost/models/__init__.py b/stock_inventory_line_product_cost/models/__init__.py new file mode 100644 index 000000000000..ce79b45eea52 --- /dev/null +++ b/stock_inventory_line_product_cost/models/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2021 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import stock_inventory_line diff --git a/stock_inventory_line_product_cost/models/stock_inventory_line.py b/stock_inventory_line_product_cost/models/stock_inventory_line.py new file mode 100644 index 000000000000..67222a549c1c --- /dev/null +++ b/stock_inventory_line_product_cost/models/stock_inventory_line.py @@ -0,0 +1,13 @@ +# Copyright (C) 2021 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class StockInventoryLine(models.Model): + + _inherit = "stock.inventory.line" + + product_cost = fields.Float( + related="product_id.standard_price", string="Product Cost" + ) diff --git a/stock_inventory_line_product_cost/views/stock_inventory_line_view.xml b/stock_inventory_line_product_cost/views/stock_inventory_line_view.xml new file mode 100644 index 000000000000..1769b2fb2f3d --- /dev/null +++ b/stock_inventory_line_product_cost/views/stock_inventory_line_view.xml @@ -0,0 +1,16 @@ + + + stock.inventory.line.cost.tree + stock.inventory.line + + + + + + + +