mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
@@ -0,0 +1 @@
|
||||
../../../../stock_inventory_line_product_cost
|
||||
6
setup/stock_inventory_line_product_cost/setup.py
Normal file
6
setup/stock_inventory_line_product_cost/setup.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
||||
21
stock_inventory_line_product_cost/README.rst
Normal file
21
stock_inventory_line_product_cost/README.rst
Normal 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>
|
||||
4
stock_inventory_line_product_cost/__init__.py
Normal file
4
stock_inventory_line_product_cost/__init__.py
Normal 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
|
||||
17
stock_inventory_line_product_cost/__manifest__.py
Normal file
17
stock_inventory_line_product_cost/__manifest__.py
Normal 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,
|
||||
}
|
||||
4
stock_inventory_line_product_cost/models/__init__.py
Normal file
4
stock_inventory_line_product_cost/models/__init__.py
Normal 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
|
||||
@@ -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"
|
||||
)
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user