Merge PR #1191 into 14.0

Signed-off-by dreispt
This commit is contained in:
OCA-git-bot
2021-11-27 11:37:37 +00:00
8 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1 @@
../../../../stock_inventory_line_product_cost

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

View File

@@ -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 <contact@opensourceintegrators.com>

View File

@@ -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

View File

@@ -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,
}

View File

@@ -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

View File

@@ -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"
)

View File

@@ -0,0 +1,16 @@
<odoo>
<record id="stock_inventory_line_cost_tree" model="ir.ui.view">
<field name="name">stock.inventory.line.cost.tree</field>
<field name="model">stock.inventory.line</field>
<field name="inherit_id" ref="stock.stock_inventory_line_tree" />
<field name="arch" type="xml">
<xpath expr="//field[@name='difference_qty']" position="after">
<field
name="product_cost"
optional="show"
groups="stock.group_stock_manager"
/>
</xpath>
</field>
</record>
</odoo>