diff --git a/stock_account_valuation_report/README.rst b/stock_account_valuation_report/README.rst new file mode 100644 index 000000000..a95b8a341 --- /dev/null +++ b/stock_account_valuation_report/README.rst @@ -0,0 +1,88 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +============================== +Stock Account Valuation Report +============================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:041a6b1fa1a77e3aa67251f97ce06e6afd4d9c2284d37c27f9d37dd9db25da8b + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/license-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--reporting-lightgray.png?logo=github + :target: https://github.com/OCA/stock-logistics-reporting/tree/19.0/stock_account_valuation_report + :alt: OCA/stock-logistics-reporting +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/stock-logistics-reporting-19-0/stock-logistics-reporting-19-0-stock_account_valuation_report + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-reporting&target_branch=19.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +When you trigger a report of inventory valuation, and you use perpetual +inventory, you should be able to reconcile the valuation from an +inventory perspective with the valuation from an accounting perspective. + +This module changes the report in *Inventory / Reporting / Dual +Inventory Valuation* to display separately the Quantity and Value of +each product for the Inventory and the Accounting systems . + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* ForgeFlow S.L. + +Contributors +------------ + +- Jordi Ballester Alomar +- Aaron Henriquez +- Stefan Rijnhart + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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. + +This module is part of the `OCA/stock-logistics-reporting `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_account_valuation_report/__init__.py b/stock_account_valuation_report/__init__.py new file mode 100644 index 000000000..aee8895e7 --- /dev/null +++ b/stock_account_valuation_report/__init__.py @@ -0,0 +1,2 @@ +from . import models +from . import wizards diff --git a/stock_account_valuation_report/__manifest__.py b/stock_account_valuation_report/__manifest__.py new file mode 100644 index 000000000..725c348e4 --- /dev/null +++ b/stock_account_valuation_report/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2020 ForgeFlow S.L. +# Copyright 2019 Aleph Objects, Inc. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + "name": "Stock Account Valuation Report", + "version": "19.0.1.0.0", + "summary": "Improves logic of the Inventory Valuation Report", + "author": "ForgeFlow S.L., Odoo Community Association (OCA)", + "website": "https://github.com/OCA/stock-logistics-reporting", + "category": "Warehouse Management", + "depends": ["stock_account"], + "license": "AGPL-3", + "data": [ + "security/ir.model.access.csv", + "views/product_product_views.xml", + "wizards/stock_valuation_history.xml", + ], + "installable": True, +} diff --git a/stock_account_valuation_report/i18n/de.po b/stock_account_valuation_report/i18n/de.po new file mode 100644 index 000000000..03db593b1 --- /dev/null +++ b/stock_account_valuation_report/i18n/de.po @@ -0,0 +1,218 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_account_valuation_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2022-05-30 01:05+0000\n" +"Last-Translator: Iryna Vyshnevska \n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Accounting Qty" +msgstr "Buchhaltungsmenge" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__account_qty_at_date +msgid "Accounting Quantity" +msgstr "Buchhaltungsmenge" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Accounting Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#. odoo-python +#: code:addons/stock_account_valuation_report/models/product_product.py:0 +#, python-format +msgid "Accounting Valuation at date" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__account_value +msgid "Accounting Value" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Cancel" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,help:stock_account_valuation_report.field_stock_valuation_history__inventory_datetime +msgid "Choose a date to get the valuation at that date" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Choose your date" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Confirm" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.actions.act_window,help:stock_account_valuation_report.product_valuation_action +msgid "Create a product to see its name and valuation." +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__create_uid +msgid "Created by" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__create_date +msgid "Created on" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__display_name +msgid "Display Name" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.actions.act_window,name:stock_account_valuation_report.history_valuation_action +#: model:ir.actions.act_window,name:stock_account_valuation_report.product_valuation_action +#: model:ir.ui.menu,name:stock_account_valuation_report.menu_dual_valuation +msgid "Dual Inventory Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__inventory_datetime +msgid "Dual Valuation at Date" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__id +msgid "ID" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__qty_at_date +msgid "Inventory Quantity" +msgstr "" + +#. module: stock_account_valuation_report +#. odoo-python +#: code:addons/stock_account_valuation_report/models/product_product.py:0 +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__valuation +#, python-format +msgid "Inventory Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_value +msgid "Inventory Value" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history____last_update +msgid "Last Modified on" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__write_date +msgid "Last Updated on" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Manual" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,help:stock_account_valuation_report.field_product_product__valuation +msgid "" +"Manual: The accounting entries to value the inventory are not posted " +"automatically.\n" +" Automated: An accounting entry is automatically created to value the " +"inventory when a product enters or leaves the company.\n" +" " +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_account_move_line__product_id +msgid "Product" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_product_product +msgid "Product Variant" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__qty_discrepancy +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Qty Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Real time" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_fifo_real_time_aml_ids +msgid "Stock Fifo Real Time Aml" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Stock Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_stock_valuation_history +msgid "Stock Valuation History" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_valuation_layer_ids +msgid "Stock Valuation Layer" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__valuation_discrepancy +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Valuation Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Valuation Or Qty Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "View Journal Items" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "View Valuation Layers" +msgstr "" diff --git a/stock_account_valuation_report/i18n/es.po b/stock_account_valuation_report/i18n/es.po new file mode 100644 index 000000000..6a82f67de --- /dev/null +++ b/stock_account_valuation_report/i18n/es.po @@ -0,0 +1,216 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_account_valuation_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Accounting Qty" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__account_qty_at_date +msgid "Accounting Quantity" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Accounting Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#. odoo-python +#: code:addons/stock_account_valuation_report/models/product_product.py:0 +#, python-format +msgid "Accounting Valuation at date" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__account_value +msgid "Accounting Value" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Cancel" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,help:stock_account_valuation_report.field_stock_valuation_history__inventory_datetime +msgid "Choose a date to get the valuation at that date" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Choose your date" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Confirm" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.actions.act_window,help:stock_account_valuation_report.product_valuation_action +msgid "Create a product to see its name and valuation." +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__create_uid +msgid "Created by" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__create_date +msgid "Created on" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__display_name +msgid "Display Name" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.actions.act_window,name:stock_account_valuation_report.history_valuation_action +#: model:ir.actions.act_window,name:stock_account_valuation_report.product_valuation_action +#: model:ir.ui.menu,name:stock_account_valuation_report.menu_dual_valuation +msgid "Dual Inventory Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__inventory_datetime +msgid "Dual Valuation at Date" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__id +msgid "ID" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__qty_at_date +msgid "Inventory Quantity" +msgstr "" + +#. module: stock_account_valuation_report +#. odoo-python +#: code:addons/stock_account_valuation_report/models/product_product.py:0 +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__valuation +#, python-format +msgid "Inventory Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_value +msgid "Inventory Value" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history____last_update +msgid "Last Modified on" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__write_date +msgid "Last Updated on" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Manual" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,help:stock_account_valuation_report.field_product_product__valuation +msgid "" +"Manual: The accounting entries to value the inventory are not posted " +"automatically.\n" +" Automated: An accounting entry is automatically created to value the " +"inventory when a product enters or leaves the company.\n" +" " +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_account_move_line__product_id +msgid "Product" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_product_product +msgid "Product Variant" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__qty_discrepancy +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Qty Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Real time" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_fifo_real_time_aml_ids +msgid "Stock Fifo Real Time Aml" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Stock Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_stock_valuation_history +msgid "Stock Valuation History" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_valuation_layer_ids +msgid "Stock Valuation Layer" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__valuation_discrepancy +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Valuation Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Valuation Or Qty Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "View Journal Items" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "View Valuation Layers" +msgstr "" diff --git a/stock_account_valuation_report/i18n/es_MX.po b/stock_account_valuation_report/i18n/es_MX.po new file mode 100644 index 000000000..9f637563d --- /dev/null +++ b/stock_account_valuation_report/i18n/es_MX.po @@ -0,0 +1,224 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_account_valuation_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-02-26 15:13+0000\n" +"Last-Translator: Jesús Alan Ramos Rodríguez \n" +"Language-Team: none\n" +"Language: es_MX\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Accounting Qty" +msgstr "Cant Contable" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__account_qty_at_date +msgid "Accounting Quantity" +msgstr "Cantidad Contable" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Accounting Valuation" +msgstr "Valoración Contable" + +#. module: stock_account_valuation_report +#. odoo-python +#: code:addons/stock_account_valuation_report/models/product_product.py:0 +#, python-format +msgid "Accounting Valuation at date" +msgstr "Valoración contable a la fecha" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__account_value +msgid "Accounting Value" +msgstr "Valor Contable" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Cancel" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,help:stock_account_valuation_report.field_stock_valuation_history__inventory_datetime +msgid "Choose a date to get the valuation at that date" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Choose your date" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Confirm" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.actions.act_window,help:stock_account_valuation_report.product_valuation_action +msgid "Create a product to see its name and valuation." +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__create_uid +msgid "Created by" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__create_date +msgid "Created on" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__display_name +msgid "Display Name" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.actions.act_window,name:stock_account_valuation_report.history_valuation_action +#: model:ir.actions.act_window,name:stock_account_valuation_report.product_valuation_action +#: model:ir.ui.menu,name:stock_account_valuation_report.menu_dual_valuation +msgid "Dual Inventory Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__inventory_datetime +msgid "Dual Valuation at Date" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__id +msgid "ID" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__qty_at_date +msgid "Inventory Quantity" +msgstr "Cantidad en Inventario" + +#. module: stock_account_valuation_report +#. odoo-python +#: code:addons/stock_account_valuation_report/models/product_product.py:0 +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__valuation +#, python-format +msgid "Inventory Valuation" +msgstr "Valoración de Inventario" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_value +msgid "Inventory Value" +msgstr "Valor de Inventario" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_account_move_line +msgid "Journal Item" +msgstr "Elemento de Diario" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history____last_update +msgid "Last Modified on" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__write_date +msgid "Last Updated on" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Manual" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,help:stock_account_valuation_report.field_product_product__valuation +msgid "" +"Manual: The accounting entries to value the inventory are not posted " +"automatically.\n" +" Automated: An accounting entry is automatically created to value the " +"inventory when a product enters or leaves the company.\n" +" " +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_account_move_line__product_id +msgid "Product" +msgstr "Producto" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_product_product +msgid "Product Variant" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__qty_discrepancy +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Qty Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Real time" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_fifo_real_time_aml_ids +msgid "Stock Fifo Real Time Aml" +msgstr "Movimientos contables PEPS en Tiempo Real" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Stock Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_stock_valuation_history +msgid "Stock Valuation History" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_valuation_layer_ids +msgid "Stock Valuation Layer" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__valuation_discrepancy +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Valuation Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Valuation Or Qty Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "View Journal Items" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "View Valuation Layers" +msgstr "" + +#~ msgid "Stock Fifo Manual Move" +#~ msgstr "Movimiento manual de stock PEPS" + +#~ msgid "Stock Quantity History" +#~ msgstr "Historial de cantidad de inventario" diff --git a/stock_account_valuation_report/i18n/fr.po b/stock_account_valuation_report/i18n/fr.po new file mode 100644 index 000000000..1efaca82e --- /dev/null +++ b/stock_account_valuation_report/i18n/fr.po @@ -0,0 +1,224 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_account_valuation_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-01-22 15:46+0000\n" +"Last-Translator: Yann Papouin \n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Accounting Qty" +msgstr "Qté comptable" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__account_qty_at_date +msgid "Accounting Quantity" +msgstr "Quantité comptable" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Accounting Valuation" +msgstr "Valorisation comptable" + +#. module: stock_account_valuation_report +#. odoo-python +#: code:addons/stock_account_valuation_report/models/product_product.py:0 +#, python-format +msgid "Accounting Valuation at date" +msgstr "Valorisation comptable à ce jour" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__account_value +msgid "Accounting Value" +msgstr "Valeur comptable" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Cancel" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,help:stock_account_valuation_report.field_stock_valuation_history__inventory_datetime +msgid "Choose a date to get the valuation at that date" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Choose your date" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Confirm" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.actions.act_window,help:stock_account_valuation_report.product_valuation_action +msgid "Create a product to see its name and valuation." +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__create_uid +msgid "Created by" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__create_date +msgid "Created on" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__display_name +msgid "Display Name" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.actions.act_window,name:stock_account_valuation_report.history_valuation_action +#: model:ir.actions.act_window,name:stock_account_valuation_report.product_valuation_action +#: model:ir.ui.menu,name:stock_account_valuation_report.menu_dual_valuation +msgid "Dual Inventory Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__inventory_datetime +msgid "Dual Valuation at Date" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__id +msgid "ID" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__qty_at_date +msgid "Inventory Quantity" +msgstr "Quantité d'inventaire" + +#. module: stock_account_valuation_report +#. odoo-python +#: code:addons/stock_account_valuation_report/models/product_product.py:0 +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__valuation +#, python-format +msgid "Inventory Valuation" +msgstr "Valorisation de l'inventaire" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_value +msgid "Inventory Value" +msgstr "Valeur d'inventaire" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_account_move_line +msgid "Journal Item" +msgstr "Écriture comptable" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history____last_update +msgid "Last Modified on" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__write_date +msgid "Last Updated on" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Manual" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,help:stock_account_valuation_report.field_product_product__valuation +msgid "" +"Manual: The accounting entries to value the inventory are not posted " +"automatically.\n" +" Automated: An accounting entry is automatically created to value the " +"inventory when a product enters or leaves the company.\n" +" " +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_account_move_line__product_id +msgid "Product" +msgstr "Article" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_product_product +msgid "Product Variant" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__qty_discrepancy +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Qty Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Real time" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_fifo_real_time_aml_ids +msgid "Stock Fifo Real Time Aml" +msgstr "Stock FIFO en temps réel" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Stock Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_stock_valuation_history +msgid "Stock Valuation History" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_valuation_layer_ids +msgid "Stock Valuation Layer" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__valuation_discrepancy +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Valuation Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Valuation Or Qty Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "View Journal Items" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "View Valuation Layers" +msgstr "" + +#~ msgid "Stock Fifo Manual Move" +#~ msgstr "Mouvement manuel de stock FIFO" + +#~ msgid "Stock Quantity History" +#~ msgstr "Historique des quantités en stock" diff --git a/stock_account_valuation_report/i18n/it.po b/stock_account_valuation_report/i18n/it.po new file mode 100644 index 000000000..807f2c797 --- /dev/null +++ b/stock_account_valuation_report/i18n/it.po @@ -0,0 +1,223 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_account_valuation_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2025-10-21 14:42+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.10.4\n" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Accounting Qty" +msgstr "Q.tà contabilità" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__account_qty_at_date +msgid "Accounting Quantity" +msgstr "Quantità contabilità" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Accounting Valuation" +msgstr "Valutazione contabilità" + +#. module: stock_account_valuation_report +#. odoo-python +#: code:addons/stock_account_valuation_report/models/product_product.py:0 +#, python-format +msgid "Accounting Valuation at date" +msgstr "Valutazione contabilità alla data" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__account_value +msgid "Accounting Value" +msgstr "Valore contabilità" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Cancel" +msgstr "Annulla" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,help:stock_account_valuation_report.field_stock_valuation_history__inventory_datetime +msgid "Choose a date to get the valuation at that date" +msgstr "Scegliere una data per ottenere la valutazione a quella data" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Choose your date" +msgstr "Scegliere la propria data" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Confirm" +msgstr "Conferma" + +#. module: stock_account_valuation_report +#: model_terms:ir.actions.act_window,help:stock_account_valuation_report.product_valuation_action +msgid "Create a product to see its name and valuation." +msgstr "Creare un prodotto per vedere il suo nome e valutazione." + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__create_date +msgid "Created on" +msgstr "Creato il" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: stock_account_valuation_report +#: model:ir.actions.act_window,name:stock_account_valuation_report.history_valuation_action +#: model:ir.actions.act_window,name:stock_account_valuation_report.product_valuation_action +#: model:ir.ui.menu,name:stock_account_valuation_report.menu_dual_valuation +msgid "Dual Inventory Valuation" +msgstr "Valutazione inventario duale" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__inventory_datetime +msgid "Dual Valuation at Date" +msgstr "Valutazione duale alla data" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__id +msgid "ID" +msgstr "ID" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__qty_at_date +msgid "Inventory Quantity" +msgstr "Quantità intentario" + +#. module: stock_account_valuation_report +#. odoo-python +#: code:addons/stock_account_valuation_report/models/product_product.py:0 +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__valuation +#, python-format +msgid "Inventory Valuation" +msgstr "Valutazione intentario" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_value +msgid "Inventory Value" +msgstr "Valore inventario" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_account_move_line +msgid "Journal Item" +msgstr "Movimento contabile" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento di" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Manual" +msgstr "Manuale" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,help:stock_account_valuation_report.field_product_product__valuation +msgid "" +"Manual: The accounting entries to value the inventory are not posted " +"automatically.\n" +" Automated: An accounting entry is automatically created to value the " +"inventory when a product enters or leaves the company.\n" +" " +msgstr "" +"Manuale: le registrazioni contabili per la valorizzazione del magazzino non " +"sono inserite automaticamente.\n" +" Automatico: una registrazione contabile è creata automaticamente per " +"valorizzare il magazzino quando un prodotto entra o esce dall'azienda.\n" +" " + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_account_move_line__product_id +msgid "Product" +msgstr "Prodotto" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_product_product +msgid "Product Variant" +msgstr "Variante prodotto" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__qty_discrepancy +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Qty Discrepancy" +msgstr "Differenza q.tà" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Real time" +msgstr "Tempo reale" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_fifo_real_time_aml_ids +msgid "Stock Fifo Real Time Aml" +msgstr "Aml tempo reale FIFO giacenza" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Stock Valuation" +msgstr "Valutazione giacenza" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_stock_valuation_history +msgid "Stock Valuation History" +msgstr "Cronologia valutazione giacenza" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_valuation_layer_ids +msgid "Stock Valuation Layer" +msgstr "Livello valutazione magazzino" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__valuation_discrepancy +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Valuation Discrepancy" +msgstr "Differenza valutazione" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Valuation Or Qty Discrepancy" +msgstr "Valutazione o differenza q.tà" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "View Journal Items" +msgstr "Visualizza registrazioni contabili" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "View Valuation Layers" +msgstr "Visualizza livelli valutazione" diff --git a/stock_account_valuation_report/i18n/sl.po b/stock_account_valuation_report/i18n/sl.po new file mode 100644 index 000000000..de113378e --- /dev/null +++ b/stock_account_valuation_report/i18n/sl.po @@ -0,0 +1,225 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_account_valuation_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-04-11 10:25+0000\n" +"Last-Translator: Matjaz Mozetic \n" +"Language-Team: none\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || " +"n%100==4 ? 2 : 3;\n" +"X-Generator: Weblate 4.14.1\n" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Accounting Qty" +msgstr "Knjigovodska kol" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__account_qty_at_date +msgid "Accounting Quantity" +msgstr "Knjigovodska količina" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Accounting Valuation" +msgstr "Knjig. vrednotenje" + +#. module: stock_account_valuation_report +#. odoo-python +#: code:addons/stock_account_valuation_report/models/product_product.py:0 +#, python-format +msgid "Accounting Valuation at date" +msgstr "Knjigovodsko vrednotenje na datum" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__account_value +msgid "Accounting Value" +msgstr "Knjigovodska vrednost" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Cancel" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,help:stock_account_valuation_report.field_stock_valuation_history__inventory_datetime +msgid "Choose a date to get the valuation at that date" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Choose your date" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Confirm" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.actions.act_window,help:stock_account_valuation_report.product_valuation_action +msgid "Create a product to see its name and valuation." +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__create_uid +msgid "Created by" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__create_date +msgid "Created on" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__display_name +msgid "Display Name" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.actions.act_window,name:stock_account_valuation_report.history_valuation_action +#: model:ir.actions.act_window,name:stock_account_valuation_report.product_valuation_action +#: model:ir.ui.menu,name:stock_account_valuation_report.menu_dual_valuation +msgid "Dual Inventory Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__inventory_datetime +msgid "Dual Valuation at Date" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__id +msgid "ID" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__qty_at_date +msgid "Inventory Quantity" +msgstr "Količina inventarja" + +#. module: stock_account_valuation_report +#. odoo-python +#: code:addons/stock_account_valuation_report/models/product_product.py:0 +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__valuation +#, python-format +msgid "Inventory Valuation" +msgstr "Vrednotenje inventarja" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_value +msgid "Inventory Value" +msgstr "Vrednost inventarja" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_account_move_line +msgid "Journal Item" +msgstr "Dnevniška postavka" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history____last_update +msgid "Last Modified on" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__write_date +msgid "Last Updated on" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Manual" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,help:stock_account_valuation_report.field_product_product__valuation +msgid "" +"Manual: The accounting entries to value the inventory are not posted " +"automatically.\n" +" Automated: An accounting entry is automatically created to value the " +"inventory when a product enters or leaves the company.\n" +" " +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_account_move_line__product_id +msgid "Product" +msgstr "Proizvod" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_product_product +msgid "Product Variant" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__qty_discrepancy +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Qty Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Real time" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_fifo_real_time_aml_ids +msgid "Stock Fifo Real Time Aml" +msgstr "FIFO premik v realnem času" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Stock Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_stock_valuation_history +msgid "Stock Valuation History" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_valuation_layer_ids +msgid "Stock Valuation Layer" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__valuation_discrepancy +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Valuation Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Valuation Or Qty Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "View Journal Items" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "View Valuation Layers" +msgstr "" + +#~ msgid "Stock Fifo Manual Move" +#~ msgstr "FIFO ročni premik zalog" + +#~ msgid "Stock Quantity History" +#~ msgstr "Zgodovina količin zalog" diff --git a/stock_account_valuation_report/i18n/stock_account_valuation_report.pot b/stock_account_valuation_report/i18n/stock_account_valuation_report.pot new file mode 100644 index 000000000..c1727055a --- /dev/null +++ b/stock_account_valuation_report/i18n/stock_account_valuation_report.pot @@ -0,0 +1,191 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_account_valuation_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Accounting Qty" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__account_qty_at_date +msgid "Accounting Quantity" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Accounting Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#. odoo-python +#: code:addons/stock_account_valuation_report/models/product_product.py:0 +msgid "Accounting Valuation at date" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__account_value +msgid "Accounting Value" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Cancel" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,help:stock_account_valuation_report.field_stock_valuation_history__inventory_datetime +msgid "Choose a date to get the valuation at that date" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Choose your date" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_valuation_history +msgid "Confirm" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.actions.act_window,help:stock_account_valuation_report.product_valuation_action +msgid "Create a product to see its name and valuation." +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__create_uid +msgid "Created by" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__create_date +msgid "Created on" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__display_name +msgid "Display Name" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.actions.act_window,name:stock_account_valuation_report.history_valuation_action +#: model:ir.actions.act_window,name:stock_account_valuation_report.product_valuation_action +#: model:ir.ui.menu,name:stock_account_valuation_report.menu_dual_valuation +msgid "Dual Inventory Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__inventory_datetime +msgid "Dual Valuation at Date" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__id +msgid "ID" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__qty_at_date +msgid "Inventory Quantity" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_value +msgid "Inventory Value" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_stock_valuation_history__write_date +msgid "Last Updated on" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Manual" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_account_move_line__product_id +msgid "Product" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_product_product +msgid "Product Variant" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__qty_discrepancy +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Qty Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Real time" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_fifo_real_time_aml_ids +msgid "Stock Fifo Real Time Aml" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Stock Valuation" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model,name:stock_account_valuation_report.model_stock_valuation_history +msgid "Stock Valuation History" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__stock_valuation_layer_ids +msgid "Stock Valuation Layer" +msgstr "" + +#. module: stock_account_valuation_report +#: model:ir.model.fields,field_description:stock_account_valuation_report.field_product_product__valuation_discrepancy +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "Valuation Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.product_search_form_view +msgid "Valuation Or Qty Discrepancy" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "View Journal Items" +msgstr "" + +#. module: stock_account_valuation_report +#: model_terms:ir.ui.view,arch_db:stock_account_valuation_report.view_stock_product_tree2 +msgid "View Valuation Layers" +msgstr "" diff --git a/stock_account_valuation_report/models/__init__.py b/stock_account_valuation_report/models/__init__.py new file mode 100644 index 000000000..4f7160950 --- /dev/null +++ b/stock_account_valuation_report/models/__init__.py @@ -0,0 +1,2 @@ +from . import product_product +from . import account_move_line diff --git a/stock_account_valuation_report/models/account_move_line.py b/stock_account_valuation_report/models/account_move_line.py new file mode 100644 index 000000000..0e182df14 --- /dev/null +++ b/stock_account_valuation_report/models/account_move_line.py @@ -0,0 +1,11 @@ +# Copyright 2020 ForgeFlow S.L. +# Copyright 2019 Aleph Objects, Inc. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class AccountMoveLine(models.Model): + _inherit = "account.move.line" + + product_id = fields.Many2one(index=True) diff --git a/stock_account_valuation_report/models/product_product.py b/stock_account_valuation_report/models/product_product.py new file mode 100644 index 000000000..af937ca85 --- /dev/null +++ b/stock_account_valuation_report/models/product_product.py @@ -0,0 +1,302 @@ +# Copyright 2020 ForgeFlow S.L. +# Copyright 2019 Aleph Objects, Inc. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + + +from odoo import api, fields, models +from odoo.fields import Domain +from odoo.tools import float_compare + + +class ProductProduct(models.Model): + _inherit = "product.product" + + stock_value = fields.Monetary( + "Inventory Value", + compute="_compute_inventory_value", + currency_field="cost_currency_id", + ) + account_value = fields.Monetary( + "Accounting Value", + compute="_compute_inventory_value", + currency_field="cost_currency_id", + ) + qty_at_date = fields.Float( + "Inventory Quantity", + compute="_compute_inventory_value", + digits="Product Unit of Measure", + ) + account_qty_at_date = fields.Float( + "Accounting Quantity", + compute="_compute_inventory_value", + digits="Product Unit of Measure", + ) + valuation_discrepancy = fields.Monetary( + compute="_compute_inventory_value", + search="_search_valuation_discrepancy", + currency_field="cost_currency_id", + ) + qty_discrepancy = fields.Float( + compute="_compute_inventory_value", + search="_search_qty_discrepancy", + digits="Product Unit of Measure", + ) + + @api.model + def _search_qty_discrepancy(self, operator, value): + return Domain("id", "in", self._get_discrepancy_product_ids("qty")) + + @api.model + def _search_valuation_discrepancy(self, operator, value): + return Domain("id", "in", self._get_discrepancy_product_ids("value")) + + @api.model + def _get_discrepancy_product_ids(self, kind): + """Return product IDs where stock and accounting values/qtys diverge.""" + to_date = self.env.context.get("at_date", False) + company_id = self.env.company.id + categories = self.env["product.category"].search( + Domain("property_valuation", "=", "real_time") + ) + company_default = self.env.company.account_stock_valuation_id + categ_field = self.env["product.category"]._fields[ + "property_stock_valuation_account_id" + ] + categ_accounts = {} + for c in categories: + acc = ( + c.property_stock_valuation_account_id + or categ_field.get_company_dependent_fallback(c) + or company_default + ) + if acc: + categ_accounts[c.id] = acc.id + if not categ_accounts: + return [] + account_ids = list(set(categ_accounts.values())) + # pylint: disable=E8103 + self.env.cr.execute( + """ + SELECT pp.id, pt.categ_id + FROM product_product pp + JOIN product_template pt ON pt.id = pp.product_tmpl_id + WHERE pt.categ_id = ANY(%s) + """, + (list(categ_accounts.keys()),), + ) + rows = self.env.cr.fetchall() + if not rows: + return [] + product_to_account = {row[0]: categ_accounts[row[1]] for row in rows} + product_ids = list(product_to_account.keys()) + date_param = (to_date,) if to_date else () + aml_date_clause = "AND aml.date <= %s" if to_date else "" + _signed_qty = ( + "SUM(CASE WHEN aml.balance < 0 THEN -aml.quantity ELSE aml.quantity END)" + ) + if kind == "value": + aml_qty_expr = "SUM(aml.balance)" + precision_kwargs = { + "precision_rounding": self.env.company.currency_id.rounding + } + else: + aml_qty_expr = _signed_qty + precision_kwargs = { + "precision_digits": self.env["decimal.precision"].precision_get( + "Product Unit of Measure" + ) + } + move_domain = ( + Domain("product_id", "in", product_ids) + & Domain("company_id", "=", company_id) + & Domain("state", "=", "done") + ) + if to_date: + move_domain &= Domain("date", "<=", to_date) + stock_vals = {} + for move in self.env["stock.move"].search(move_domain): + pid = move.product_id.id + val = move.remaining_value if kind == "value" else move.remaining_qty + stock_vals[pid] = stock_vals.get(pid, 0.0) + val + self.env["account.move.line"].flush_model() + # pylint: disable=E8103 + self.env.cr.execute( + f""" + SELECT aml.product_id, {aml_qty_expr} + FROM account_move_line aml + WHERE aml.parent_state = 'posted' + AND aml.company_id = %s + AND aml.product_id = ANY(%s) + AND aml.account_id = ANY(%s) + {aml_date_clause} + GROUP BY aml.product_id + """, + (company_id, product_ids, account_ids) + date_param, + ) + acct_vals = dict(self.env.cr.fetchall()) + return [ + pid + for pid in product_ids + if float_compare( + stock_vals.get(pid, 0.0), + acct_vals.get(pid, 0.0), + **precision_kwargs, + ) + != 0 + ] + + def _get_valuation_aml_ids(self, product, to_date): + valuation_account_id = product._get_product_accounts()["stock_valuation"].id + if not valuation_account_id: + return [] + self.env["account.move.line"].flush_model() + # pylint: disable=E8103 + query = """ + SELECT array_agg(aml.id) + FROM account_move_line AS aml + WHERE aml.product_id = %s + AND aml.parent_state = 'posted' + AND aml.company_id = %s + AND aml.account_id = %s + {where_date_clause} + """ + params = (product.id, self.env.company.id, valuation_account_id) + where_date_clause = "AND aml.date <= %s" if to_date else "" + query = query.format(where_date_clause=where_date_clause) + if to_date: + params = params + (to_date,) + self.env.cr.execute(query, params=params) + row = self.env.cr.fetchone() + return list(row[0]) if row and row[0] else [] + + def _compute_inventory_value(self): + self.env["account.move.line"].check_access("read") + to_date = self.env.context.get("at_date", False) + # 1) ACCOUNTING VALUES — restrict to valuation accounts only + # Use _get_product_accounts() for the full 3-level fallback on account lookup + product_valuation_account = {} + for product in self: + if product.valuation == "real_time": + acc_id = product._get_product_accounts()["stock_valuation"].id + if acc_id: + product_valuation_account[product.id] = acc_id + valuation_account_ids = set(product_valuation_account.values()) + + accounting_values = {} + if valuation_account_ids: + self.env["account.move.line"].flush_model() + # pylint: disable=E8103 + query = """ + SELECT aml.product_id, aml.account_id, + sum(aml.balance), + sum(CASE WHEN aml.balance < 0 + THEN -aml.quantity ELSE aml.quantity END) + FROM account_move_line AS aml + WHERE aml.product_id IN %s + AND aml.parent_state = 'posted' + AND aml.company_id = %s + AND aml.account_id IN %s + {where_date_clause} + GROUP BY aml.product_id, aml.account_id + """ + params = ( + tuple(self.ids), + self.env.company.id, + tuple(valuation_account_ids), + ) + where_date_clause = "AND aml.date <= %s" if to_date else "" + query = query.format(where_date_clause=where_date_clause) + if to_date: + params = params + (to_date,) + self.env.cr.execute(query, params=params) + for row in self.env.cr.fetchall(): + accounting_values[(row[0], row[1])] = (row[2], row[3]) + # 2) INVENTORY VALUES + move_domain = ( + Domain("product_id", "in", self.ids) + & Domain("company_id", "=", self.env.company.id) + & Domain("state", "=", "done") + ) + if to_date: + move_domain &= Domain("date", "<=", to_date) + moves = self.env["stock.move"].search(move_domain) + move_values = {} + for move in moves: + if move.product_id.id not in move_values: + move_values[move.product_id.id] = {"qty": 0, "value": 0} + move_values[move.product_id.id]["qty"] += move.remaining_qty + move_values[move.product_id.id]["value"] += move.remaining_value + for product in self: + if product.valuation == "real_time": + valuation_account_id = product_valuation_account.get(product.id) + value, qty = accounting_values.get( + (product.id, valuation_account_id) + ) or (0, 0) + product.account_value = value + product.account_qty_at_date = qty + else: + product.account_value = 0 + product.account_qty_at_date = 0 + move_data = move_values.get(product.id, {}) + product.qty_at_date = move_data.get("qty", 0) + product.stock_value = move_data.get("value", 0) + if product.valuation == "real_time": + product.valuation_discrepancy = ( + product.stock_value - product.account_value + ) + product.qty_discrepancy = ( + product.qty_at_date - product.account_qty_at_date + ) + else: + product.valuation_discrepancy = 0 + product.qty_discrepancy = 0 + + def action_view_amls(self): + self.ensure_one() + to_date = self.env.context.get("at_date", False) + aml_ids = self._get_valuation_aml_ids(self, to_date) + list_view_ref = self.env.ref("account.view_move_line_tree") + form_view_ref = self.env.ref("account.view_move_line_form") + return { + "name": self.env._("Accounting Valuation at date"), + "type": "ir.actions.act_window", + "view_type": "form", + "view_mode": "list,form", + "context": self.env.context, + "res_model": "account.move.line", + "domain": Domain("id", "in", aml_ids), + "views": [(list_view_ref.id, "list"), (form_view_ref.id, "form")], + } + + def _get_move_ids(self, product_ids, to_date): + # pylint: disable=E8103 + query = """ + SELECT id FROM stock_move + WHERE state = 'done' AND company_id = %s AND product_id = ANY(%s) + {where_date_clause} + """ + params = (self.env.company.id, product_ids) + date_clause = "AND date <= %s" if to_date else "" + query = query.format(where_date_clause=date_clause) + if to_date: + params = params + (to_date,) + self.env.cr.execute(query, params=params) + return [row[0] for row in self.env.cr.fetchall()] + + def action_view_valuation_layers(self): + to_date = self.env.context.get("at_date", False) + move_ids = self._get_move_ids(self.ids, to_date) + action = self.env["ir.actions.actions"]._for_xml_id( + "stock_account.stock_valuation_layer_report_action" + ) + action["domain"] = Domain("id", "in", move_ids) + action["context"] = {} + return action + + def action_view_valuation_moves(self): + self.ensure_one() + to_date = self.env.context.get("at_date", False) + move_ids = self._get_move_ids(self.ids, to_date) + action = self.env["ir.actions.actions"]._for_xml_id("stock.stock_move_action") + action["domain"] = Domain("id", "in", move_ids) + return action diff --git a/stock_account_valuation_report/pyproject.toml b/stock_account_valuation_report/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/stock_account_valuation_report/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/stock_account_valuation_report/readme/CONTRIBUTORS.md b/stock_account_valuation_report/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..9fe6878d8 --- /dev/null +++ b/stock_account_valuation_report/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- Jordi Ballester Alomar \<\> +- Aaron Henriquez \<\> +- Stefan Rijnhart \<\> diff --git a/stock_account_valuation_report/readme/DESCRIPTION.md b/stock_account_valuation_report/readme/DESCRIPTION.md new file mode 100644 index 000000000..0f453ef2d --- /dev/null +++ b/stock_account_valuation_report/readme/DESCRIPTION.md @@ -0,0 +1,7 @@ +When you trigger a report of inventory valuation, and you use perpetual +inventory, you should be able to reconcile the valuation from an +inventory perspective with the valuation from an accounting perspective. + +This module changes the report in *Inventory / Reporting / Dual +Inventory Valuation* to display separately the Quantity and Value of +each product for the Inventory and the Accounting systems . diff --git a/stock_account_valuation_report/security/ir.model.access.csv b/stock_account_valuation_report/security/ir.model.access.csv new file mode 100644 index 000000000..31dca360d --- /dev/null +++ b/stock_account_valuation_report/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_stock_valuation_history,access.stock.valuation.history,model_stock_valuation_history,stock.group_stock_user,1,1,1,1 diff --git a/stock_account_valuation_report/static/description/icon.png b/stock_account_valuation_report/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/stock_account_valuation_report/static/description/icon.png differ diff --git a/stock_account_valuation_report/static/description/index.html b/stock_account_valuation_report/static/description/index.html new file mode 100644 index 000000000..ee50211ec --- /dev/null +++ b/stock_account_valuation_report/static/description/index.html @@ -0,0 +1,436 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Stock Account Valuation Report

+ +

Beta License: AGPL-3 OCA/stock-logistics-reporting Translate me on Weblate Try me on Runboat

+

When you trigger a report of inventory valuation, and you use perpetual +inventory, you should be able to reconcile the valuation from an +inventory perspective with the valuation from an accounting perspective.

+

This module changes the report in Inventory / Reporting / Dual +Inventory Valuation to display separately the Quantity and Value of +each product for the Inventory and the Accounting systems .

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • ForgeFlow S.L.
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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.

+

This module is part of the OCA/stock-logistics-reporting project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+
+ + diff --git a/stock_account_valuation_report/tests/__init__.py b/stock_account_valuation_report/tests/__init__.py new file mode 100644 index 000000000..f16fdd869 --- /dev/null +++ b/stock_account_valuation_report/tests/__init__.py @@ -0,0 +1 @@ +from . import test_stock_account_valuation_report diff --git a/stock_account_valuation_report/tests/test_stock_account_valuation_report.py b/stock_account_valuation_report/tests/test_stock_account_valuation_report.py new file mode 100644 index 000000000..d5e1d3305 --- /dev/null +++ b/stock_account_valuation_report/tests/test_stock_account_valuation_report.py @@ -0,0 +1,121 @@ +# 2020 Copyright ForgeFlow, S.L. (https://www.forgeflow.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + + +from odoo.fields import Domain + +from odoo.addons.stock_account.tests.common import TestStockValuationCommon + + +class TestStockAccountValuationReport(TestStockValuationCommon): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.aml_model = cls.env["account.move.line"] + + def test_01_stock_receipt(self): + """Receive into stock and ship to the customer""" + self._use_inventory_location_accounting() + move = self._make_in_move(self.product_fifo_auto, quantity=1, unit_cost=10.0) + inv_aml = self.aml_model.search( + Domain("product_id", "=", self.product_fifo_auto.id) + ) + balance_inv = sum(inv_aml.mapped("balance")) + self.assertEqual(balance_inv, 0.0) + self.assertEqual(move.remaining_value, 10.0) + # The accounting value and the stock value do not match + self.assertEqual(self.product_fifo_auto.stock_value, 10.0) + self.assertEqual(self.product_fifo_auto.account_value, 0.0) + self.assertEqual(self.product_fifo_auto.qty_at_date, 1.0) + self.assertEqual(self.product_fifo_auto.account_qty_at_date, 0.0) + # Stock Move can be opened from the product + action = self.product_fifo_auto.action_view_valuation_moves() + self.assertEqual( + self.env[action["res_model"]].search(action["domain"]), + move, + ) + # Create an out move + move_out = self._make_out_move(self.product_fifo_auto, 1.0) + self.assertEqual(move.remaining_qty, 0.0) + self.assertEqual(move.remaining_value, 0.0) + self.assertEqual(move_out.value, 10.0) + # The report shows the material is gone + self.product_fifo_auto._compute_inventory_value() + self.assertEqual(self.product_fifo_auto.stock_value, 0.0) + self.assertEqual(self.product_fifo_auto.account_value, 0.0) + self.assertEqual(self.product_fifo_auto.qty_at_date, 0.0) + self.assertEqual(self.product_fifo_auto.account_qty_at_date, 0.0) + + def test_02_stock_receipt_several_costs_several_dates(self): + """Receive into stock at different cost""" + self._use_inventory_location_accounting() + move = self._make_in_move(self.product_fifo_auto, quantity=1.0, unit_cost=10.0) + # This will not create any journal entry + inv_aml = self.aml_model.search( + Domain("product_id", "=", self.product_fifo_auto.id) + ) + balance_inv = sum(inv_aml.mapped("balance")) + self.assertEqual(balance_inv, 0.0) + self.assertEqual(move.remaining_value, 10.0) + # Receive more + move2 = self._make_in_move(self.product_fifo_auto, quantity=2.0, unit_cost=20.0) + # This will not create any journal entry + inv_aml = self.aml_model.search( + Domain("product_id", "=", self.product_fifo_auto.id) + ) + balance_inv = sum(inv_aml.mapped("balance")) + self.assertEqual(balance_inv, 0.0) + self.assertEqual(move2.remaining_value, 40.0) + # Now we check the report reflects the same + self.assertEqual(self.product_fifo_auto.stock_value, 50.0) + self.assertEqual(self.product_fifo_auto.account_value, 0.0) + self.assertEqual(self.product_fifo_auto.qty_at_date, 3.0) + self.assertEqual(self.product_fifo_auto.account_qty_at_date, 0.0) + + def test_03_stock_receipt_with_invoice(self): + """Receive into stock, create bill, ship to customer with invoice""" + self._use_inventory_location_accounting() + self._make_in_move(self.product_fifo_auto, 1, unit_cost=10.0) + self.product_fifo_auto._compute_inventory_value() + self.assertEqual(self.product_fifo_auto.stock_value, 10.0) + self.assertEqual(self.product_fifo_auto.account_value, 0.0) + self.assertEqual(self.product_fifo_auto.qty_at_date, 1.0) + self.assertEqual(self.product_fifo_auto.account_qty_at_date, 0.0) + self.assertEqual(self.product_fifo_auto.valuation_discrepancy, 10.0) + self._create_bill(self.product_fifo_auto, 1.0, price_unit=10.0) + self.product_fifo_auto._compute_inventory_value() + self.assertEqual(self.product_fifo_auto.stock_value, 10.0) + self.assertEqual(self.product_fifo_auto.account_value, 10.0) + self.assertEqual(self.product_fifo_auto.qty_at_date, 1.0) + self.assertEqual(self.product_fifo_auto.account_qty_at_date, 1.0) + self.assertEqual(self.product_fifo_auto.valuation_discrepancy, 0.0) + self.assertEqual(self.product_fifo_auto.qty_discrepancy, 0.0) + # check accounting entries + inv_aml = self.aml_model.search( + Domain("product_id", "=", self.product_fifo_auto.id) + ) + self.assertEqual(sum(inv_aml.mapped("balance")), 10.0) + self.assertEqual(sum(inv_aml.mapped("quantity")), 1.0) + self._make_out_move(self.product_fifo_auto, 1.0) + # Before customer invoice: stock is empty but accounting still shows value + self.product_fifo_auto._compute_inventory_value() + self.assertEqual(self.product_fifo_auto.stock_value, 0.0) + self.assertEqual(self.product_fifo_auto.account_value, 10.0) + self.assertEqual(self.product_fifo_auto.qty_at_date, 0.0) + self.assertEqual(self.product_fifo_auto.account_qty_at_date, 1.0) + self.assertEqual(self.product_fifo_auto.valuation_discrepancy, -10.0) + + self._create_invoice(self.product_fifo_auto, 1.0, price_unit=10.0) + # After customer invoice: everything should be zero + self.product_fifo_auto._compute_inventory_value() + self.assertEqual(self.product_fifo_auto.stock_value, 0.0) + self.assertEqual(self.product_fifo_auto.account_value, 0.0) + self.assertEqual(self.product_fifo_auto.qty_at_date, 0.0) + self.assertEqual(self.product_fifo_auto.account_qty_at_date, 0.0) + self.assertEqual(self.product_fifo_auto.valuation_discrepancy, 0.0) + + # Verify final accounting balance is zero + inv_aml = self.aml_model.search( + Domain("product_id", "=", self.product_fifo_auto.id) + ) + self.assertEqual(sum(inv_aml.mapped("balance")), 0.0) diff --git a/stock_account_valuation_report/views/product_product_views.xml b/stock_account_valuation_report/views/product_product_views.xml new file mode 100644 index 000000000..f2c9504cf --- /dev/null +++ b/stock_account_valuation_report/views/product_product_views.xml @@ -0,0 +1,108 @@ + + + + product.stock.list.2 + product.product + + + + + + +