diff --git a/ddmrp_report_part_flow_index/README.rst b/ddmrp_report_part_flow_index/README.rst new file mode 100644 index 000000000..1be142e91 --- /dev/null +++ b/ddmrp_report_part_flow_index/README.rst @@ -0,0 +1,114 @@ +============================ +DDMRP Report Part Flow Index +============================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:9a07769dc305cefc998a5a1c6686aafecc0a98f13c5835ef9fa0d2a6b1154d9a + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fddmrp-lightgray.png?logo=github + :target: https://github.com/OCA/ddmrp/tree/17.0/ddmrp_report_part_flow_index + :alt: OCA/ddmrp +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/ddmrp-17-0/ddmrp-17-0-ddmrp_report_part_flow_index + :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/ddmrp&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Implements the Parts Flow Index Report. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +- Go to *Inventory > Configuration > DDMRP > Flow Index Group* to + define possible groups to analyze on. +- Go to *Inventory > Master Data > Stock Buffer Planning* and assign + the Flow Index Group to Buffers. + +Usage +===== + +Go to *Inventory > Reporting > Parts Plan Flow Index* to run the report. + +Known issues / Roadmap +====================== + +- Add Parts Actual Flow Index report + +Changelog +========= + +11.0.1.0.0 (2018-08-01) +----------------------- + +- Start of the history + +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 + +Contributors +------------ + +- Jordi Ballester Alomar +- Lois Rilo Antelo + +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. + +.. |maintainer-JordiBForgeFlow| image:: https://github.com/JordiBForgeFlow.png?size=40px + :target: https://github.com/JordiBForgeFlow + :alt: JordiBForgeFlow +.. |maintainer-LoisRForgeFlow| image:: https://github.com/LoisRForgeFlow.png?size=40px + :target: https://github.com/LoisRForgeFlow + :alt: LoisRForgeFlow + +Current `maintainers `__: + +|maintainer-JordiBForgeFlow| |maintainer-LoisRForgeFlow| + +This module is part of the `OCA/ddmrp `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/ddmrp_report_part_flow_index/__init__.py b/ddmrp_report_part_flow_index/__init__.py new file mode 100644 index 000000000..55ec7fc9a --- /dev/null +++ b/ddmrp_report_part_flow_index/__init__.py @@ -0,0 +1,2 @@ +from . import models +from . import reports diff --git a/ddmrp_report_part_flow_index/__manifest__.py b/ddmrp_report_part_flow_index/__manifest__.py new file mode 100644 index 000000000..192e8281b --- /dev/null +++ b/ddmrp_report_part_flow_index/__manifest__.py @@ -0,0 +1,25 @@ +# Copyright 2017-24 ForgeFlow S.L. (https://www.forgeflow.com) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +{ + "name": "DDMRP Report Part Flow Index", + "summary": "Provides the DDMRP Parts Flow Index Report", + "version": "17.0.1.0.0", + "development_status": "Beta", + "author": "ForgeFlow, Odoo Community Association (OCA)", + "maintainers": ["JordiBForgeFlow", "LoisRForgeFlow"], + "website": "https://github.com/OCA/ddmrp", + "category": "Warehouse Management", + "depends": [ + "ddmrp", + ], + "data": [ + "security/ir.model.access.csv", + "security/report_ddmrp_part_plan_flow_index_security.xml", + "reports/report_ddmrp_part_plan_flow_index_views.xml", + "views/ddmrp_flow_index_group_views.xml", + "views/stock_buffer_view.xml", + ], + "license": "LGPL-3", + "installable": True, +} diff --git a/ddmrp_report_part_flow_index/i18n/ddmrp_report_part_flow_index.pot b/ddmrp_report_part_flow_index/i18n/ddmrp_report_part_flow_index.pot new file mode 100644 index 000000000..ca5b9d2bc --- /dev/null +++ b/ddmrp_report_part_flow_index/i18n/ddmrp_report_part_flow_index.pot @@ -0,0 +1,180 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * ddmrp_report_part_flow_index +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.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: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__active +msgid "Active" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model_terms:ir.ui.view,arch_db:ddmrp_report_part_flow_index.view_ddmrp_flow_index_group_form +#: model_terms:ir.ui.view,arch_db:ddmrp_report_part_flow_index.view_ddmrp_flow_index_group_search +msgid "Archived" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__adu +msgid "Average Daily Usage (ADU)" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__buffer_id +msgid "Buffer" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__company_id +msgid "Company" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__create_uid +msgid "Created by" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__create_date +msgid "Created on" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.actions.act_window,name:ddmrp_report_part_flow_index.action_ddmrp_flow_index_group +#: model:ir.model,name:ddmrp_report_part_flow_index.model_ddmrp_flow_index_group +msgid "DDMRP Flow Index Group" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__display_name +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__display_name +msgid "Display Name" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__flow_index_group_id +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_stock_buffer__flow_index_group_id +#: model:ir.ui.menu,name:ddmrp_report_part_flow_index.menu_ddmrp_flow_index_group +msgid "Flow Index Group" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__green_zone_qty +msgid "Green Zone Qty" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__id +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__id +msgid "ID" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group____last_update +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index____last_update +msgid "Last Modified on" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__write_date +msgid "Last Updated on" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__location_id +msgid "Location" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model_terms:ir.ui.view,arch_db:ddmrp_report_part_flow_index.view_ddmrp_flow_index_group_form +msgid "Log a description..." +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__lower_range +msgid "Lower Range" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,help:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__lower_range +msgid "Lower range used to assign in stock buffer" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__name +msgid "Name" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__order_frequency +msgid "Order Frequency" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__order_frequency_group +msgid "Order Frequency Group" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__order_frequency_group_count +msgid "Order Frequency Group Count" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.actions.act_window,name:ddmrp_report_part_flow_index.action_report_part_plan_flow_index_template +#: model:ir.ui.menu,name:ddmrp_report_part_flow_index.menu_report_part_plan_flow_index +#: model_terms:ir.ui.view,arch_db:ddmrp_report_part_flow_index.view_part_plan_flow_index_filter +#: model_terms:ir.ui.view,arch_db:ddmrp_report_part_flow_index.view_part_plan_flow_index_graph +#: model_terms:ir.ui.view,arch_db:ddmrp_report_part_flow_index.view_part_plan_flow_index_pivot +msgid "Parts Plan Flow Index" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__product_id +msgid "Product" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model,name:ddmrp_report_part_flow_index.model_report_ddmrp_part_plan_flow_index +msgid "Report DDMRP Plan Flow Index" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__sequence +msgid "Sequence" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model,name:ddmrp_report_part_flow_index.model_stock_buffer +msgid "Stock Buffer" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__summary +msgid "Summary" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__upper_range +msgid "Upper Range" +msgstr "" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,help:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__upper_range +msgid "Upper range used to assign in stock buffer" +msgstr "" diff --git a/ddmrp_report_part_flow_index/i18n/it.po b/ddmrp_report_part_flow_index/i18n/it.po new file mode 100644 index 000000000..9fbb46618 --- /dev/null +++ b/ddmrp_report_part_flow_index/i18n/it.po @@ -0,0 +1,189 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * ddmrp_report_part_flow_index +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-05-27 15:38+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 4.17\n" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__active +msgid "Active" +msgstr "Attivo" + +#. module: ddmrp_report_part_flow_index +#: model_terms:ir.ui.view,arch_db:ddmrp_report_part_flow_index.view_ddmrp_flow_index_group_form +#: model_terms:ir.ui.view,arch_db:ddmrp_report_part_flow_index.view_ddmrp_flow_index_group_search +msgid "Archived" +msgstr "In archivio" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__adu +msgid "Average Daily Usage (ADU)" +msgstr "Utilizzo medio giornaliero (UMG)" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__buffer_id +msgid "Buffer" +msgstr "Buffer" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__company_id +msgid "Company" +msgstr "Azienda" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__create_date +msgid "Created on" +msgstr "Creato il" + +#. module: ddmrp_report_part_flow_index +#: model:ir.actions.act_window,name:ddmrp_report_part_flow_index.action_ddmrp_flow_index_group +#: model:ir.model,name:ddmrp_report_part_flow_index.model_ddmrp_flow_index_group +msgid "DDMRP Flow Index Group" +msgstr "Gruppo indice flusso DDMRP" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__display_name +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__flow_index_group_id +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_stock_buffer__flow_index_group_id +#: model:ir.ui.menu,name:ddmrp_report_part_flow_index.menu_ddmrp_flow_index_group +msgid "Flow Index Group" +msgstr "Gruppo indice flusso" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__green_zone_qty +msgid "Green Zone Qty" +msgstr "Q.tà zona verde" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__id +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__id +msgid "ID" +msgstr "ID" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group____last_update +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento di" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__location_id +msgid "Location" +msgstr "Ubicazione" + +#. module: ddmrp_report_part_flow_index +#: model_terms:ir.ui.view,arch_db:ddmrp_report_part_flow_index.view_ddmrp_flow_index_group_form +msgid "Log a description..." +msgstr "Registra una descrizione..." + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__lower_range +msgid "Lower Range" +msgstr "Intervallo inferiore" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,help:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__lower_range +msgid "Lower range used to assign in stock buffer" +msgstr "Intervallo inferiore utilizzato per assegnare buffer di magazzino" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__name +msgid "Name" +msgstr "Nome" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__order_frequency +msgid "Order Frequency" +msgstr "Frequenza ordine" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__order_frequency_group +msgid "Order Frequency Group" +msgstr "Gruppo frequenza ordine" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__order_frequency_group_count +msgid "Order Frequency Group Count" +msgstr "Conteggio gruppo frequenza ordine" + +#. module: ddmrp_report_part_flow_index +#: model:ir.actions.act_window,name:ddmrp_report_part_flow_index.action_report_part_plan_flow_index_template +#: model:ir.ui.menu,name:ddmrp_report_part_flow_index.menu_report_part_plan_flow_index +#: model_terms:ir.ui.view,arch_db:ddmrp_report_part_flow_index.view_part_plan_flow_index_filter +#: model_terms:ir.ui.view,arch_db:ddmrp_report_part_flow_index.view_part_plan_flow_index_graph +#: model_terms:ir.ui.view,arch_db:ddmrp_report_part_flow_index.view_part_plan_flow_index_pivot +msgid "Parts Plan Flow Index" +msgstr "Indice flusso piano parti" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_report_ddmrp_part_plan_flow_index__product_id +msgid "Product" +msgstr "Prodotto" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model,name:ddmrp_report_part_flow_index.model_report_ddmrp_part_plan_flow_index +msgid "Report DDMRP Plan Flow Index" +msgstr "Resoconto DDMRP indice pflusso piano" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__sequence +msgid "Sequence" +msgstr "Sequenza" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model,name:ddmrp_report_part_flow_index.model_stock_buffer +msgid "Stock Buffer" +msgstr "Buffer di materiale" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__summary +msgid "Summary" +msgstr "Riepilogo" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,field_description:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__upper_range +msgid "Upper Range" +msgstr "Intervallo superiore" + +#. module: ddmrp_report_part_flow_index +#: model:ir.model.fields,help:ddmrp_report_part_flow_index.field_ddmrp_flow_index_group__upper_range +msgid "Upper range used to assign in stock buffer" +msgstr "Intervallo superiore utilizzato per assegnare buffer di magazzino" + +#~ msgid "ddmrp.flow.index.group" +#~ msgstr "ddmrp.flow.index.group" + +#~ msgid "report.ddmrp.part.plan.flow.index" +#~ msgstr "report.ddmrp.part.plan.flow.index" diff --git a/ddmrp_report_part_flow_index/models/__init__.py b/ddmrp_report_part_flow_index/models/__init__.py new file mode 100644 index 000000000..3d20cc617 --- /dev/null +++ b/ddmrp_report_part_flow_index/models/__init__.py @@ -0,0 +1,2 @@ +from . import ddmrp_flow_index_group +from . import stock_buffer diff --git a/ddmrp_report_part_flow_index/models/ddmrp_flow_index_group.py b/ddmrp_report_part_flow_index/models/ddmrp_flow_index_group.py new file mode 100644 index 000000000..5e7c55893 --- /dev/null +++ b/ddmrp_report_part_flow_index/models/ddmrp_flow_index_group.py @@ -0,0 +1,21 @@ +# Copyright 2017-24 ForgeFlow S.L. (https://www.forgeflow.com) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from odoo import fields, models + + +class DdmrpFlowIndexGroup(models.Model): + _name = "ddmrp.flow.index.group" + _order = "sequence, id" + _description = "DDMRP Flow Index Group" + + name = fields.Char(required=True) + summary = fields.Text() + active = fields.Boolean(default=True) + lower_range = fields.Float(help="Lower range used to assign in stock buffer") + upper_range = fields.Float(help="Upper range used to assign in stock buffer") + sequence = fields.Integer(required=True) + + def toggle_active(self): + for record in self: + record.active = not record.active diff --git a/ddmrp_report_part_flow_index/models/stock_buffer.py b/ddmrp_report_part_flow_index/models/stock_buffer.py new file mode 100644 index 000000000..ab6234e8c --- /dev/null +++ b/ddmrp_report_part_flow_index/models/stock_buffer.py @@ -0,0 +1,50 @@ +# Copyright 2017-24 ForgeFlow S.L. (https://www.forgeflow.com) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from odoo import fields, models + + +class StockBuffer(models.Model): + _inherit = "stock.buffer" + + flow_index_group_id = fields.Many2one( + "ddmrp.flow.index.group", string="Flow Index Group", readonly=True + ) + + def _calc_flow_index_group_id(self): + flow_index_reports = self.env["report.ddmrp.part.plan.flow.index"].read_group( + domain=[("buffer_id", "in", self.ids)], + fields=["order_frequency_group"], + groupby=["buffer_id"], + ) + flow_index_groups = self.env["ddmrp.flow.index.group"].search([]) + for rec in self: + flow_index_report = list( + filter(lambda x: x["buffer_id"][0] == rec.id, flow_index_reports) + ) + if not flow_index_report: + continue + + frequency_group = flow_index_report[0]["order_frequency_group"] + for index_group in flow_index_groups: + if index_group.upper_range and index_group.lower_range: + if ( + index_group.lower_range + <= frequency_group + <= index_group.upper_range + ): + rec.flow_index_group_id = index_group + break + elif index_group.upper_range: + if index_group.upper_range >= frequency_group: + rec.flow_index_group_id = index_group + break + elif index_group.lower_range: + if frequency_group >= index_group.lower_range: + rec.flow_index_group_id = index_group + break + + def cron_actions(self, only_nfp=False): + res = super().cron_actions(only_nfp=only_nfp) + self._calc_flow_index_group_id() + return res diff --git a/ddmrp_report_part_flow_index/pyproject.toml b/ddmrp_report_part_flow_index/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/ddmrp_report_part_flow_index/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/ddmrp_report_part_flow_index/readme/CONFIGURE.md b/ddmrp_report_part_flow_index/readme/CONFIGURE.md new file mode 100644 index 000000000..11f2fe192 --- /dev/null +++ b/ddmrp_report_part_flow_index/readme/CONFIGURE.md @@ -0,0 +1,4 @@ +- Go to *Inventory \> Configuration \> DDMRP \> Flow Index Group* to + define possible groups to analyze on. +- Go to *Inventory \> Master Data \> Stock Buffer Planning* and assign + the Flow Index Group to Buffers. diff --git a/ddmrp_report_part_flow_index/readme/CONTRIBUTORS.md b/ddmrp_report_part_flow_index/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..b73022aef --- /dev/null +++ b/ddmrp_report_part_flow_index/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- Jordi Ballester Alomar \<\> +- Lois Rilo Antelo \<\> diff --git a/ddmrp_report_part_flow_index/readme/DESCRIPTION.md b/ddmrp_report_part_flow_index/readme/DESCRIPTION.md new file mode 100644 index 000000000..963881e25 --- /dev/null +++ b/ddmrp_report_part_flow_index/readme/DESCRIPTION.md @@ -0,0 +1 @@ +Implements the Parts Flow Index Report. diff --git a/ddmrp_report_part_flow_index/readme/HISTORY.md b/ddmrp_report_part_flow_index/readme/HISTORY.md new file mode 100644 index 000000000..00f3607e5 --- /dev/null +++ b/ddmrp_report_part_flow_index/readme/HISTORY.md @@ -0,0 +1,3 @@ +## 11.0.1.0.0 (2018-08-01) + +- Start of the history diff --git a/ddmrp_report_part_flow_index/readme/ROADMAP.md b/ddmrp_report_part_flow_index/readme/ROADMAP.md new file mode 100644 index 000000000..dd8897b48 --- /dev/null +++ b/ddmrp_report_part_flow_index/readme/ROADMAP.md @@ -0,0 +1 @@ +- Add Parts Actual Flow Index report diff --git a/ddmrp_report_part_flow_index/readme/USAGE.md b/ddmrp_report_part_flow_index/readme/USAGE.md new file mode 100644 index 000000000..28852d7b6 --- /dev/null +++ b/ddmrp_report_part_flow_index/readme/USAGE.md @@ -0,0 +1,2 @@ +Go to *Inventory \> Reporting \> Parts Plan Flow Index* to run the +report. diff --git a/ddmrp_report_part_flow_index/reports/__init__.py b/ddmrp_report_part_flow_index/reports/__init__.py new file mode 100644 index 000000000..82734997c --- /dev/null +++ b/ddmrp_report_part_flow_index/reports/__init__.py @@ -0,0 +1 @@ +from . import report_ddmrp_part_plan_flow_index diff --git a/ddmrp_report_part_flow_index/reports/report_ddmrp_part_plan_flow_index.py b/ddmrp_report_part_flow_index/reports/report_ddmrp_part_plan_flow_index.py new file mode 100644 index 000000000..7b6c9d759 --- /dev/null +++ b/ddmrp_report_part_flow_index/reports/report_ddmrp_part_plan_flow_index.py @@ -0,0 +1,85 @@ +# Copyright 2017-24 ForgeFlow S.L. (https://www.forgeflow.com) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). +from odoo import api, fields, models + + +class ReportDdmrpPartsPlanFlowIndex(models.Model): + _name = "report.ddmrp.part.plan.flow.index" + _description = "Report DDMRP Plan Flow Index" + _auto = False + + buffer_id = fields.Many2one("stock.buffer", string="Buffer", readonly=True) + product_id = fields.Many2one("product.product", string="Product", readonly=True) + location_id = fields.Many2one("stock.location", string="Location", readonly=True) + company_id = fields.Many2one("res.company", string="Company", readonly=True) + adu = fields.Float( + string="Average Daily Usage (ADU)", + default=0.0, + digits="Average Daily Usage", + readonly=True, + ) + green_zone_qty = fields.Float(digits="Product Unit of Measure", readonly=True) + order_frequency = fields.Float(digits="Product Unit of Measure", readonly=True) + order_frequency_group = fields.Integer(readonly=True) + order_frequency_group_count = fields.Integer(readonly=True) + flow_index_group_id = fields.Many2one( + "ddmrp.flow.index.group", string="Flow Index Group", readonly=True + ) + + @api.model + def _sub_select(self): + select_str = """ + id, + product_id, + location_id, + company_id, + adu, + flow_index_group_id, + green_zone_qty, + green_zone_qty/NULLIF(adu, 0) as order_frequency, + round(green_zone_qty/NULLIF(adu, 0)) AS + order_frequency_group + """ + return select_str + + @api.model + def _select(self): + select_str = """ + a.id as id, + a.id as buffer_id, + a.product_id as product_id, + a.location_id as location_id, + a.company_id as company_id, + a.adu as adu, + a.flow_index_group_id as flow_index_group_id, + a.green_zone_qty as green_zone_qty, + a.order_frequency as order_frequency, + a.order_frequency_group as order_frequency_group, + b.order_frequency_group_count + """ + return select_str + + @api.model + def _join_select(self): + select_str = """ + order_frequency_group, + count(*) AS order_frequency_group_count + """ + return select_str + + @property + def _table_query(self): + return f""" + WITH a AS + (SELECT {self._sub_select()} + FROM stock_buffer) + SELECT + {self._select()} + FROM a + JOIN (SELECT + {self._join_select()} + FROM a + GROUP BY order_frequency_group + ) AS b + ON a.order_frequency_group = b.order_frequency_group + """ diff --git a/ddmrp_report_part_flow_index/reports/report_ddmrp_part_plan_flow_index_views.xml b/ddmrp_report_part_flow_index/reports/report_ddmrp_part_plan_flow_index_views.xml new file mode 100644 index 000000000..db97c538d --- /dev/null +++ b/ddmrp_report_part_flow_index/reports/report_ddmrp_part_plan_flow_index_views.xml @@ -0,0 +1,83 @@ + + + + + + view.ddmrp.part.plan.flow.index.pivot + report.ddmrp.part.plan.flow.index + + + + + + + + + + view.ddmrp.part.plan.flow.index.pivot.graph + report.ddmrp.part.plan.flow.index + + + + + + + + + view.ddmrp.part.plan.flow.index.pivot.tree + report.ddmrp.part.plan.flow.index + + + + + + + + + + + + + + + + + + view.ddmrp.part.plan.flow.index.pivot.filter + report.ddmrp.part.plan.flow.index + + + + + + + + + + + + + Parts Plan Flow Index + report.ddmrp.part.plan.flow.index + graph,tree,pivot + + + + + + + diff --git a/ddmrp_report_part_flow_index/security/ir.model.access.csv b/ddmrp_report_part_flow_index/security/ir.model.access.csv new file mode 100644 index 000000000..1fe1a3266 --- /dev/null +++ b/ddmrp_report_part_flow_index/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_ddmrp_flow_index_group,ddmrp.flow.index.group,model_ddmrp_flow_index_group,ddmrp.group_stock_buffer_maintainer,1,0,0,0 +access_ddmrp_flow_index_group_manager,ddmrp.flow.index.group,model_ddmrp_flow_index_group,ddmrp.group_ddmrp_manager,1,1,1,1 +access_report_ddmrp_part_plan_flow_index,ddmrp.part.plan.flow.index,model_report_ddmrp_part_plan_flow_index,ddmrp.group_stock_buffer_maintainer,1,0,0,0 diff --git a/ddmrp_report_part_flow_index/security/report_ddmrp_part_plan_flow_index_security.xml b/ddmrp_report_part_flow_index/security/report_ddmrp_part_plan_flow_index_security.xml new file mode 100644 index 000000000..face041c3 --- /dev/null +++ b/ddmrp_report_part_flow_index/security/report_ddmrp_part_plan_flow_index_security.xml @@ -0,0 +1,10 @@ + + + Report DDMRP Part Plan Flow Index multi-company + + + ['|',('company_id','=',False),('company_id', 'in', company_ids)] + + diff --git a/ddmrp_report_part_flow_index/static/description/icon.png b/ddmrp_report_part_flow_index/static/description/icon.png new file mode 100644 index 000000000..90c92e98d Binary files /dev/null and b/ddmrp_report_part_flow_index/static/description/icon.png differ diff --git a/ddmrp_report_part_flow_index/static/description/index.html b/ddmrp_report_part_flow_index/static/description/index.html new file mode 100644 index 000000000..48f3d9f8b --- /dev/null +++ b/ddmrp_report_part_flow_index/static/description/index.html @@ -0,0 +1,458 @@ + + + + + +DDMRP Report Part Flow Index + + + +
+

DDMRP Report Part Flow Index

+ + +

Beta License: LGPL-3 OCA/ddmrp Translate me on Weblate Try me on Runboat

+

Implements the Parts Flow Index Report.

+

Table of contents

+ +
+

Configuration

+
    +
  • Go to Inventory > Configuration > DDMRP > Flow Index Group to +define possible groups to analyze on.
  • +
  • Go to Inventory > Master Data > Stock Buffer Planning and assign +the Flow Index Group to Buffers.
  • +
+
+
+

Usage

+

Go to Inventory > Reporting > Parts Plan Flow Index to run the report.

+
+
+

Known issues / Roadmap

+
    +
  • Add Parts Actual Flow Index report
  • +
+
+
+

Changelog

+
+

11.0.1.0.0 (2018-08-01)

+
    +
  • Start of the history
  • +
+
+
+
+

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
  • +
+
+
+

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.

+

Current maintainers:

+

JordiBForgeFlow LoisRForgeFlow

+

This module is part of the OCA/ddmrp project on GitHub.

+

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

+
+
+
+ + diff --git a/ddmrp_report_part_flow_index/views/ddmrp_flow_index_group_views.xml b/ddmrp_report_part_flow_index/views/ddmrp_flow_index_group_views.xml new file mode 100644 index 000000000..8749b2b8b --- /dev/null +++ b/ddmrp_report_part_flow_index/views/ddmrp_flow_index_group_views.xml @@ -0,0 +1,75 @@ + + + + + + ddmrp.flow.index.group.tree + ddmrp.flow.index.group + + + + + + + + + + + + ddmrp.flow.index.group.form + ddmrp.flow.index.group + +
+ + + + + + + + + + + + + +
+
+
+ + + ddmrp.flow.index.group.search + ddmrp.flow.index.group + + + + + + + + + + + DDMRP Flow Index Group + ddmrp.flow.index.group + tree,form + + + + +
diff --git a/ddmrp_report_part_flow_index/views/stock_buffer_view.xml b/ddmrp_report_part_flow_index/views/stock_buffer_view.xml new file mode 100644 index 000000000..b50fb13ac --- /dev/null +++ b/ddmrp_report_part_flow_index/views/stock_buffer_view.xml @@ -0,0 +1,17 @@ + + + + + + stock.buffer.form - Part Flow Index + stock.buffer + + + + + + + + +