forked from OCA/stock-logistics-warehouse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[14.0][ADD]stock_inventory_line_product_cost: Added modue
- Loading branch information
1 parent
776d0cc
commit 899ae3b
Showing
8 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
setup/stock_inventory_line_product_cost/odoo/addons/stock_inventory_line_product_cost
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../stock_inventory_line_product_cost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
13 changes: 13 additions & 0 deletions
13
stock_inventory_line_product_cost/models/stock_inventory_line.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) |
16 changes: 16 additions & 0 deletions
16
stock_inventory_line_product_cost/views/stock_inventory_line_view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |