-
-
Notifications
You must be signed in to change notification settings - Fork 695
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] stock_inventory_revaluation: Migration to 12.0
- Loading branch information
1 parent
048f6e6
commit 50f3dde
Showing
28 changed files
with
2,016 additions
and
652 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,93 +1,180 @@ | ||
.. image:: https://img.shields.io/badge/license-AGPLv3-blue.svg | ||
:target: https://www.gnu.org/licenses/agpl.html | ||
:alt: License: AGPL-3 | ||
|
||
=================================== | ||
Stock Account Inventory Revaluation | ||
=================================== | ||
=========================== | ||
Stock Inventory Revaluation | ||
=========================== | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github | ||
:target: https://github.com/OCA/stock-logistics-warehouse/tree/12.0-mig-stock_inventory_revaluation/stock_inventory_revaluation | ||
:alt: OCA/stock-logistics-warehouse | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0-mig-stock_inventory_revaluation/stock-logistics-warehouse-12-0-mig-stock_inventory_revaluation-stock_inventory_revaluation | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/153/12.0-mig-stock_inventory_revaluation | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
If your company runs a perpetual inventory system, you may need to perform | ||
inventory revaluation. | ||
inventory revaluation. A revaluation updates both the inventory | ||
account balance, and the stock value of products. | ||
|
||
This module takes three different methods of stock revaluation | ||
|
||
- Stock-Move-Specific Valuation (FIFO costing) | ||
- Simple Price Change (standard/average costing) | ||
- Inventory-Total-Value Price Change (standard/average costing) | ||
|
||
|
||
Stock-Move-Specific Valuation | ||
============================= | ||
|
||
Stock-Move-Specific valuation applies if the product is configured for FIFO | ||
costing. In this case, the user selects specific stock moves for which to | ||
change value. A journal entry is created for each stock move on which the | ||
value is changed. | ||
|
||
|
||
Simple Price Change | ||
=================== | ||
|
||
A simple price change updates the standard/average cost of the product, | ||
regardless of the available stock. The user specifies a new per-unit price, | ||
and posts the change. A journal entry is created for all stock moves having | ||
positive remaining stock value. The amount of the posted entry is the | ||
difference between the new and old price, multiplied by the quantity available. | ||
|
||
|
||
You can re-valuate inventory values by: | ||
Inventory-Total-Value Price Change | ||
================================== | ||
|
||
* Changing the inventory valuation of a specific product. The cost price | ||
is changed, and the inventory value is recalculated according to the new | ||
price. In case of real price, you can select on which quants you want to | ||
change the unit cost. | ||
This is a price change, based on total available stock value. It updates the | ||
standard/average cost of the product, based on available stock. The user | ||
specifies a new total value for available stock. The standard/average price | ||
of the product is updated to the new total value divided by the available | ||
quantity. A journal entry is created for all stock moves having positive | ||
remaining stock value. The amount of the posted entry is the difference | ||
between the new and old total value. | ||
|
||
* Changing the value of the inventory. The quantity of inventory remains | ||
unchanged, resulting in a change in the price. | ||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
* Go to *Inventory / Configuration / Products / Product Categories* and | ||
define, for each category, a Valuation Increase Account and a Valuation | ||
Decrease Account. These accounts will be used as contra-accounts to the | ||
Stock Valuation Account during the inventory re-valuation. | ||
|
||
* Users willing to access to the Inventory Revaluation menu should be | ||
* Users wanting to access to the Inventory Revaluation menu should be | ||
members of the group "Manage Inventory Valuation and Costing Methods". | ||
|
||
* The Revaluation can automatically select contra-accounts to the Stock | ||
Valuation Account. To configure this, define a Valuation Increase Account | ||
and a Valuation Decrease Account for each product category. Do that here: | ||
*Inventory / Configuration / Products / Product Categories* | ||
|
||
Usage | ||
===== | ||
|
||
* Go to *Inventory / Inventory Control / Inventory Revaluation* | ||
to create a new Inventory Revaluation. For products set with average or | ||
standard price and real-time valuation, go to the Product form and use the | ||
"Set standard price" link to change the standard price. | ||
|
||
* In order to post the inventory revaluation for multiple items at once, | ||
- Go to *Inventory / Inventory Control / Inventory Revaluation* to create a | ||
new Inventory Revaluation. | ||
- For products set with average/standard price, and automated valuation, go | ||
to the Product form and use the "Update Cost" link to change the standard | ||
price. | ||
- In order to post the inventory revaluation for multiple items at once, | ||
select the records in the tree view and go to | ||
*Action / Post Inventory Revaluations*. | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/153/10.0 | ||
- To set default valuation increase/decrease accounts by product category, go | ||
to *Inventory / Configuration / Product Categories* | ||
|
||
Known issues / Roadmap | ||
====================== | ||
|
||
* It is not possible to cancel inventory revaluations for products set with | ||
average or standard price. | ||
- Known Issue: We can't revalue individual lots/serials if there are multiple | ||
on the same stock move | ||
|
||
- Version 11 moved the cost from stock.quant to stock.move. That | ||
means there is no longer an individual cost assigned to specific | ||
lots/serials. | ||
- As a work around, you can internally transfer the lot/serial you want to | ||
revalue. This will separate it from the other lots/serials on the | ||
original inbound stock move. | ||
|
||
- Known Issue: Actual resulting stock value may differ slightly from that | ||
specified by the user. This can result when the Product Price | ||
decimal precision is low, and there is a large quantity of product to | ||
revaluate. For example: | ||
|
||
- If we have 147 units on hand, and the precision for Product Price is 2 | ||
digits | ||
- When we specify a new value of 750, the actual value applied is 749.70 | ||
- At full precision, 750 / 147 = 5.102041, but the product cost gets | ||
rounded to 5.10, and 5.10 * 147 = 749.70 | ||
- As a work around, you can change the decimal precision setting for Product | ||
Price to have a greater number of digits | ||
|
||
Changelog | ||
========= | ||
|
||
12.0.1.0.0 (2020-04-27) | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
* [MIG] Migrated to v12 | ||
* [FIX] Let the user set a posting date other than today | ||
(`#892 <https://github.com/OCA/stock-logistics-warehouse/issues/892>`_) | ||
* [IMP] Operate on stock moves, rather than stock quants | ||
* [IMP] Select stock moves by Lot and Location | ||
* [IMP] Let the user remove move lines from the revaluation, in draft state | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/stock_account_inventory_revaluation/issues>`_. In | ||
case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us smashing it by providing a detailed and | ||
welcomed feedback. | ||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-warehouse/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us smashing it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_inventory_revaluation%0Aversion:%2012.0-mig-stock_inventory_revaluation%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Images | ||
------ | ||
Authors | ||
~~~~~~~ | ||
|
||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. | ||
* Eficent Business and IT Consulting Services S.L. | ||
* Serpent Consulting Services Pvt. Ltd. | ||
* Matt Taylor | ||
|
||
Contributors | ||
------------ | ||
~~~~~~~~~~~~ | ||
|
||
* Eficent Business and IT Consulting Services S.L. <contact@eficent.com> | ||
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com> | ||
* Matt Taylor <matt454357@gmail.com> (https://github.com/matt454357) | ||
|
||
Maintainer | ||
---------- | ||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
This module is maintained by the OCA. | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
To contribute to this module, please visit https://odoo-community.org. | ||
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/12.0-mig-stock_inventory_revaluation/stock_inventory_revaluation>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
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 |
---|---|---|
@@ -1,8 +1,2 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2016-17 Eficent Business and IT Consulting Services S.L. | ||
# (http://www.eficent.com) | ||
# Copyright 2016 Serpent Consulting Services Pvt. Ltd. | ||
# (<http://www.serpentcs.com>) | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
from . import models | ||
from . import wizards |
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
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 |
---|---|---|
@@ -1,10 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2016-17 Eficent Business and IT Consulting Services S.L. | ||
# (http://www.eficent.com) | ||
# Copyright 2016 Serpent Consulting Services Pvt. Ltd. | ||
# (<http://www.serpentcs.com>) | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import product | ||
from . import account_move | ||
from . import stock_inventory_revaluation | ||
from . import stock_inventory_revaluation_template |
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
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
Oops, something went wrong.
50f3dde
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in Unit test at line 53, we should improve the search domain by adding another filter as
self.location = self.stock_location_model.search ([('location_id', '=', location.id), ('name', '=', 'Stock')])
to make it more precise.
Reason: If I have more than one Warehouse having the same parent(location_id), then unit tests will get failed.