Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.0] stock_valuation_account_manual_adjustment #228

Merged

Conversation

JordiBForgeFlow
Copy link
Sponsor Member

@JordiBForgeFlow JordiBForgeFlow commented Dec 14, 2016

Stock Inventory Account Manual Adjustment

This module shows in the product inventory stock value and the accounting
value, and allows to create accounting adjustment entries to align the
accounting value to match with the inventory stock value.

Configuration

Assign the group 'Stock Valuation Account Manual Adjustments' to the users
that should be allowed to list the valuation discrepancies and to reconcile
them.

Usage

  • Go to 'Warehouse / Inventory Control / Real Time Inventory Valuation'

  • Filter on 'Valuation Discrepancy != 0.0' using the advanced filter.

  • Select the products that you wish to reconcile and press 'More /
    Adjust Stock Valuation Account Discrepancies'.

Known issues / Roadmap

  • In order to properly manage the inventory valuation from an accounting
    perspective all journal items created for inventory accounts should
    include the product.

  • The price change function of Odoo creates journal entries to the inventory
    account without specifying the product. This is bad because you loose the
    ability to control the inventory valuation from accounting at the level of
    the product. In order to fix this, use the module
    'stock_inventory_revaluation', to be found in the same OCA repository.

@JordiBForgeFlow
Copy link
Sponsor Member Author

cc @eficent

@JordiBForgeFlow JordiBForgeFlow changed the title [8.0] product_inventory_account_reconcile [8.0] stock_valuation_account_manual_adjustment Dec 15, 2016
…ove and account move line - to avoid forcing the computation
 - Create a specific menu to display real time inventory valuation
 - Change the method to compute inventory value
 - ability to search for discrepancies by product.
  - Search for queant associated to stockable products
@andhit-r
Copy link
Member

@jbeficent i have a case study that you might want to consider

  • YourCompany has an Finished Good Account to hold inventory accounting value
  • A manual journal entry created to open balance for Finished Good Account. Let say:
        Finished Good Account Dr. 700
            Opening Balance Cr. 700
    This journal entry obviously still create discrepancies because manually created journal entry (and move) could not fill product_id field on account.move.line
  • Manual Valuation then should be performed to adjust. Here is the catch, (1) YourCompany does not want to create additional account as contra-valuation-account, (2) Finished Good Account balance after manual valuation perform should not change.
  • So manual valuation performed with wizard value: (1) Valuation Increase Contra-Account == Finished Good Account, and (2) Valuation Decrease Contra-Account == Finished Good Account. This to make sure that final balance will not change. Journal entry will be:
        Finished Good Account Dr. 700
            Finished Good Account Cr. 700
  • Now both journal items above will have product_id filled
  • The discrepancies will still != 0

Screenshot for manual valuation:
manual_valuation_1

Screenshot for created journal entry:
manual_valuation_2

Screenshot discrepency after valuation:
manual_valuation_3

IMO you should only assign product_id to one journal item only.

</group>
<newline/>
<group colspan="2">
<button name="process"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to put the buttons on

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean?

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andhit-r Regarding your long comment, if a company runs perpetual inventory the inventory account should be detailed at a product level. I recently performed an initial balance for a company, and I asked the quantity on stock and the valuation of each product, in order to create the opening entry, detailed at product level.

In order to load what I did was:
1-. Enter the correct standard cost in the product
2.- Set the product valuation to real_time
3.- Change the virtual inventory location to use as debit and credit account "Opening Balance Equity"
4.- Perform an inventory adjustment, to add the on hand quantities as they reported

As a result journal entries were created for each product as:
Dr. Finished Goods
Cr. Opening Balance Equity

That's the correct way to do IMHO. No need to use the manual adjustments tool at all.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, but not all implementation project start that way. What is a company use accounting only module first?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should put all buttons inside footer tag.
Without footer tag:
manual_valuation_wizard1

With footer tag:
manual_valuation_wizard2

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a company starts using accounting only, when they switch to stock accounting they should open a new GL account to manage inventory valuation, of course! Then they will need to credit the balance from the old and debit into the new. Same procedure as above, but replace "opening balance equity" with "old inventory account". :)

Thanks for the feedback!

=====

* Go to the list of products or product variants. You can see in the tree
view the inventory value and the accounting value.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inventory Value, Accounting Value, and Discrepancy can only be seen on Real Time Inventory Valuation

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Done!


@api.multi
def post(self):
timenow = time.strftime('%Y-%m-%d')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andhit-r
Copy link
Member

@jbeficent i'm still sure that you only need to assign product_in on one move line. Strange things always happen on implementation hahaha. But for now it's fine. I will create PR if my use case happen in the future. Waiting to pass all test before tumbs. Thank you for this PR. Can't wait to use it on production.

 - rename move_id to account_move_id
 - fix incorrect tests
@JordiBForgeFlow
Copy link
Sponsor Member Author

@eficent can you please review?

cr.execute(
"""
ALTER TABLE account_move_line
ADD COLUMN stock_valuation_account_manual_adjustment_id
Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pedrobaeza Can you help me with this? I am adding field 'stock_valuation_account_manual_adjustment_id' in account.move.line as a related with move_id, and in order to speed-up the install I am pre-creating the field. However at the time of install the field is being still computed. Why?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that computed with store=True are always computed when the module is installed.

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact the pre-init code is running correctly.

Copy link
Contributor

@LoisRForgeFlow LoisRForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@JordiBForgeFlow
Copy link
Sponsor Member Author

@andhit-r Runbot is green. However there's still one issue related to the pre-init hook. I'm not sure if it's being effective.

Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

I think also that it would be a good idea to have the filter 'Valuation Discrepancy != 0.0' in the "Real-Time Inventory valuation" tree view.

@andhit-r
Copy link
Member

👍 . It's better if all status checks pass though.

@JordiBForgeFlow JordiBForgeFlow merged commit d592b4a into OCA:8.0 Dec 21, 2016
@JordiBForgeFlow
Copy link
Sponsor Member Author

Thanks @andhit-r. Now merged

serpentcs-dev1 pushed a commit to serpentcs-dev1/stock-logistics-warehouse that referenced this pull request Feb 22, 2017
[ADD] stock_valuation_account_manual_adjustment
JordiBForgeFlow added a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Feb 22, 2017
[ADD] stock_valuation_account_manual_adjustment
JordiBForgeFlow added a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Mar 14, 2017
[ADD] stock_valuation_account_manual_adjustment
JordiBForgeFlow added a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Mar 15, 2017
[ADD] stock_valuation_account_manual_adjustment
yk2kus pushed a commit to thinkopensolutions/oca-stock-logistics-warehouse that referenced this pull request Mar 16, 2017
stock_split_picking : open action instead of create wizard
JordiBForgeFlow added a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Mar 23, 2017
[ADD] stock_valuation_account_manual_adjustment
JordiBForgeFlow added a commit that referenced this pull request Apr 25, 2017
[ADD] stock_valuation_account_manual_adjustment
gfcapalbo pushed a commit to gfcapalbo/stock-logistics-warehouse that referenced this pull request Jun 29, 2017
[ADD] stock_valuation_account_manual_adjustment
LoisRForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Jan 26, 2018
[ADD] stock_valuation_account_manual_adjustment
LoisRForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Nov 14, 2018
[ADD] stock_valuation_account_manual_adjustment
LoisRForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Jan 2, 2019
[ADD] stock_valuation_account_manual_adjustment
@LoisRForgeFlow LoisRForgeFlow deleted the 8.0-product_inventory_account_reconcile branch December 17, 2019 09:10
AaronHForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Apr 8, 2020
[ADD] stock_valuation_account_manual_adjustment
AaronHForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Jun 5, 2020
[ADD] stock_valuation_account_manual_adjustment
AaronHForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Jun 8, 2020
[ADD] stock_valuation_account_manual_adjustment
MiquelRForgeFlow pushed a commit to ForgeFlow/stock-logistics-warehouse that referenced this pull request Dec 17, 2020
[ADD] stock_valuation_account_manual_adjustment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants