diff --git a/stock_account_valuation_discrepancy_adjust/README.rst b/stock_account_valuation_discrepancy_adjust/README.rst new file mode 100644 index 0000000..e69de29 diff --git a/stock_account_valuation_discrepancy_adjust/__init__.py b/stock_account_valuation_discrepancy_adjust/__init__.py new file mode 100644 index 0000000..3e6a9f7 --- /dev/null +++ b/stock_account_valuation_discrepancy_adjust/__init__.py @@ -0,0 +1,5 @@ +# Copyright 2021 ForgeFlow S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import models +from . import wizards diff --git a/stock_account_valuation_discrepancy_adjust/__manifest__.py b/stock_account_valuation_discrepancy_adjust/__manifest__.py new file mode 100644 index 0000000..235f6da --- /dev/null +++ b/stock_account_valuation_discrepancy_adjust/__manifest__.py @@ -0,0 +1,24 @@ +# Copyright 2021 ForgeFlow S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + "name": "Account Valuation Discrepancy Adjust", + "version": "12.0.1.0.0", + "summary": "Implements Wizard for Adjust " + "Discrepancies on Account Inventory Valuation", + "category": "Warehouse Management", + "author": "ForgeFlow, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/stock-logistics-reporting", + "license": "AGPL-3", + "depends": ["stock_account_valuation_report"], + "data": [ + "security/ir.model.access.csv", + "wizards/wizard_stock_discrepancy_report_view.xml", + "wizards/wizard_stock_discrepancy_adjustment_view.xml", + "views/product_discrepancy_view.xml", + ], + "demo": [], + "installable": True, + "development_status": "Alpha", + "maintainers": ["ChrisOForgeFlow"], +} diff --git a/stock_account_valuation_discrepancy_adjust/i18n/stock_account_valuation_discrepancy_adjust.pot b/stock_account_valuation_discrepancy_adjust/i18n/stock_account_valuation_discrepancy_adjust.pot new file mode 100644 index 0000000..e69de29 diff --git a/stock_account_valuation_discrepancy_adjust/models/__init__.py b/stock_account_valuation_discrepancy_adjust/models/__init__.py new file mode 100644 index 0000000..7eeb9d7 --- /dev/null +++ b/stock_account_valuation_discrepancy_adjust/models/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2021 ForgeFlow S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import product_discrepancy diff --git a/stock_account_valuation_discrepancy_adjust/models/product_discrepancy.py b/stock_account_valuation_discrepancy_adjust/models/product_discrepancy.py new file mode 100644 index 0000000..f86a48b --- /dev/null +++ b/stock_account_valuation_discrepancy_adjust/models/product_discrepancy.py @@ -0,0 +1,38 @@ +# Copyright 2021 ForgeFlow S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import fields, models + + +class ProductDiscrepancy(models.TransientModel): + + _name = "product.discrepancy" + _description = "Product Discrepancies" + + product_id = fields.Many2one( + comodel_name="product.product", + string="Product", + required=True, + readonly=True, + ) + categ_id = fields.Many2one( + comodel_name="product.category", + string="Category", + required=True, + readonly=True, + ) + stock_value = fields.Float(string="Inventory Value", readonly=True) + account_value = fields.Float(string="Accounting Value", readonly=True) + qty_at_date = fields.Float(string="Inventory Quantity", readonly=True) + account_qty_at_date = fields.Float( + string="Accounting Quantity", readonly=True + ) + valuation_discrepancy = fields.Float( + string="Valuation discrepancy", readonly=True + ) + qty_discrepancy = fields.Float( + string="Quantity discrepancy", readonly=True + ) + + to_date_valuation = fields.Datetime( + string="To Date Valuation", readonly=True + ) diff --git a/stock_account_valuation_discrepancy_adjust/readme/CONTRIBUTORS.rst b/stock_account_valuation_discrepancy_adjust/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..b647a29 --- /dev/null +++ b/stock_account_valuation_discrepancy_adjust/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Christopher Ormaza diff --git a/stock_account_valuation_discrepancy_adjust/readme/DESCRIPTION.rst b/stock_account_valuation_discrepancy_adjust/readme/DESCRIPTION.rst new file mode 100644 index 0000000..d4245f6 --- /dev/null +++ b/stock_account_valuation_discrepancy_adjust/readme/DESCRIPTION.rst @@ -0,0 +1,5 @@ +Wizard to show discrepancies between stock and accounting valuation, and possibility to make accounting adjustment. + +You should use this module if you have products where the inventory valuation is automated (this means that your inventory is connected with accounting). The report allows you to identify the products where the inventory value has a discrepancy with the accounting value for that same product, and to make an adjustment entry in your accounting to align the two values. + +In order to use the module, go to Inventory / Reporting / Products with Account Discrepancy, select the date where you are looking to find the discrepancy and run "Show report". Once run, select the entries that you want to adjust and run the action to adjust. diff --git a/stock_account_valuation_discrepancy_adjust/security/ir.model.access.csv b/stock_account_valuation_discrepancy_adjust/security/ir.model.access.csv new file mode 100644 index 0000000..de2c88c --- /dev/null +++ b/stock_account_valuation_discrepancy_adjust/security/ir.model.access.csv @@ -0,0 +1,4 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_product_discrepancy,access_product_discrepancy,model_product_discrepancy,,1,1,1,0 +access_wizard_stock_discrepancy_adjustment,access_wizard_stock_discrepancy_adjustment,model_wizard_stock_discrepancy_adjustment,,1,1,1,1 +access_wizard_stock_discrepancy_report,access_wizard_stock_discrepancy_report,model_wizard_stock_discrepancy_adjustment,,1,1,1,1 diff --git a/stock_account_valuation_discrepancy_adjust/static/description/icon.png b/stock_account_valuation_discrepancy_adjust/static/description/icon.png new file mode 100644 index 0000000..3a0328b Binary files /dev/null and b/stock_account_valuation_discrepancy_adjust/static/description/icon.png differ diff --git a/stock_account_valuation_discrepancy_adjust/views/product_discrepancy_view.xml b/stock_account_valuation_discrepancy_adjust/views/product_discrepancy_view.xml new file mode 100644 index 0000000..2dcfad4 --- /dev/null +++ b/stock_account_valuation_discrepancy_adjust/views/product_discrepancy_view.xml @@ -0,0 +1,47 @@ + + + + + + product_discrepancy_view_tree + product.discrepancy + + + + + + + + + + + +