diff --git a/purchase_order_type_dashboard/README.rst b/purchase_order_type_dashboard/README.rst new file mode 100644 index 00000000000..814cc8f2370 --- /dev/null +++ b/purchase_order_type_dashboard/README.rst @@ -0,0 +1,96 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +============================= +Purchase Order Type Dashboard +============================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:4f418a2072e468d5f61a2c00bd6dce1aa70e28fdc1e265ef72cf44ef7133c829 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fpurchase--workflow-lightgray.png?logo=github + :target: https://github.com/OCA/purchase-workflow/tree/19.0/purchase_order_type_dashboard + :alt: OCA/purchase-workflow +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/purchase-workflow-19-0/purchase-workflow-19-0-purchase_order_type_dashboard + :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/purchase-workflow&target_branch=19.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Adds a dashboard for Purchase Orders based on Purchase Order Types. + +**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 +------- + +* Solvos + +Contributors +------------ + +- David Alonso +- Angel Rivas +- `Heliconia Solutions Pvt. Ltd. `__ + + - Bhavesh Heliconia + +- `SolusiAglis `__ + + - Hudson Amadeus Leonardy + +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-dalonsod| image:: https://github.com/dalonsod.png?size=40px + :target: https://github.com/dalonsod + :alt: dalonsod + +Current `maintainer `__: + +|maintainer-dalonsod| + +This module is part of the `OCA/purchase-workflow `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_order_type_dashboard/__init__.py b/purchase_order_type_dashboard/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/purchase_order_type_dashboard/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/purchase_order_type_dashboard/__manifest__.py b/purchase_order_type_dashboard/__manifest__.py new file mode 100644 index 00000000000..4a3b6ee6100 --- /dev/null +++ b/purchase_order_type_dashboard/__manifest__.py @@ -0,0 +1,21 @@ +# ?? 2021 Solvos Consultor??a Inform??tica () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + "name": "Purchase Order Type Dashboard", + "version": "19.0.1.0.0", + "author": "Solvos, Odoo Community Association (OCA)", + "license": "AGPL-3", + "category": "Purchase Management", + "depends": ["purchase_order_type"], + "website": "https://github.com/OCA/purchase-workflow", + "data": [ + "views/view_purchase_order.xml", + "views/view_purchase_order_type.xml", + "views/menu_purchase_order.xml", + ], + "demo": ["demo/purchase_order_type_dashboard.xml"], + "maintainers": ["dalonsod"], + "installable": True, + "auto_install": False, +} diff --git a/purchase_order_type_dashboard/demo/purchase_order_type_dashboard.xml b/purchase_order_type_dashboard/demo/purchase_order_type_dashboard.xml new file mode 100644 index 00000000000..12925c59a0f --- /dev/null +++ b/purchase_order_type_dashboard/demo/purchase_order_type_dashboard.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/purchase_order_type_dashboard/i18n/es.po b/purchase_order_type_dashboard/i18n/es.po new file mode 100644 index 00000000000..d01337a1dab --- /dev/null +++ b/purchase_order_type_dashboard/i18n/es.po @@ -0,0 +1,105 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_order_type_dashboard +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-07-20 18:09+0000\n" +"Last-Translator: Ivorra78 \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" +"X-Generator: Weblate 4.17\n" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "View" +msgstr "Ver" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "All" +msgstr "Todos" + +#. module: purchase_order_type_dashboard +#: model:ir.actions.act_window,name:purchase_order_type_dashboard.purchase_order_type_dashboard_action +#: model:ir.ui.menu,name:purchase_order_type_dashboard.purchase_order_dashboard_menu +msgid "Dashboard" +msgstr "Tablero" + +#. module: purchase_order_type_dashboard +#: model:ir.model.fields,field_description:purchase_order_type_dashboard.field_purchase_order_type__invoice_status_no_po_count +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.purchase_order_view_search +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Nothing to Bill" +msgstr "Nada para facturar" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Number of Purchase Orders that have nothing to bill yet" +msgstr "N??mero de pedidos de compra que no tienen todav??a nada que facturar" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Number of Purchase Orders waiting for bills" +msgstr "N??mero de pedidos de compra esperando por facturas" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Number of Requests for Quotations" +msgstr "N??mero de solicitudes de presupuesto" + +#. module: purchase_order_type_dashboard +#: model:ir.actions.act_window,name:purchase_order_type_dashboard.action_purchase_order_from_dashboard +msgid "Purchase Order" +msgstr "Pedido de compra" + +#. module: purchase_order_type_dashboard +#: model:ir.model.fields,field_description:purchase_order_type_dashboard.field_purchase_order_type__purchase_order_ids +msgid "Purchase Orders" +msgstr "Pedidos de compra" + +#. module: purchase_order_type_dashboard +#: model:ir.model.fields,field_description:purchase_order_type_dashboard.field_purchase_order_type__state_rfq_po_count +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "RFQs" +msgstr "Sol. ppto." + +#. module: purchase_order_type_dashboard +#: model:ir.actions.act_window,name:purchase_order_type_dashboard.action_purchase_rfq_from_dashboard +msgid "Request for Quotation" +msgstr "Solicitud de presupuesto" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_tree +msgid "Total Nothing to Bill" +msgstr "Total Nada que facturar" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_tree +msgid "Total RFQs" +msgstr "Total de peticiones de ofertas" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_tree +msgid "Total Waiting Bills" +msgstr "Total de facturas en espera" + +#. module: purchase_order_type_dashboard +#: model:ir.model,name:purchase_order_type_dashboard.model_purchase_order_type +msgid "Type of purchase order" +msgstr "Tipo de pedido de compra" + +#. module: purchase_order_type_dashboard +#: model:ir.model.fields,field_description:purchase_order_type_dashboard.field_purchase_order_type__invoice_status_ti_po_count +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Waiting Bills" +msgstr "Para facturar" + +#~ msgid "Show other options" +#~ msgstr "Mostrar otras opciones" diff --git a/purchase_order_type_dashboard/i18n/it.po b/purchase_order_type_dashboard/i18n/it.po new file mode 100644 index 00000000000..21dc5977dfd --- /dev/null +++ b/purchase_order_type_dashboard/i18n/it.po @@ -0,0 +1,105 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_order_type_dashboard +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2025-09-15 15: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: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "View" +msgstr "Vista" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "All" +msgstr "Tutti" + +#. module: purchase_order_type_dashboard +#: model:ir.actions.act_window,name:purchase_order_type_dashboard.purchase_order_type_dashboard_action +#: model:ir.ui.menu,name:purchase_order_type_dashboard.purchase_order_dashboard_menu +msgid "Dashboard" +msgstr "Bacheca" + +#. module: purchase_order_type_dashboard +#: model:ir.model.fields,field_description:purchase_order_type_dashboard.field_purchase_order_type__invoice_status_no_po_count +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.purchase_order_view_search +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Nothing to Bill" +msgstr "Niente da fatturare" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Number of Purchase Orders that have nothing to bill yet" +msgstr "Numero di ordinidi acquisto che non hanno ancora niente da pagare" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Number of Purchase Orders waiting for bills" +msgstr "Numero di ordini di acquisto in atteda di pagamenti" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Number of Requests for Quotations" +msgstr "Numero di richieste preventivi" + +#. module: purchase_order_type_dashboard +#: model:ir.actions.act_window,name:purchase_order_type_dashboard.action_purchase_order_from_dashboard +msgid "Purchase Order" +msgstr "Ordine di acquisto" + +#. module: purchase_order_type_dashboard +#: model:ir.model.fields,field_description:purchase_order_type_dashboard.field_purchase_order_type__purchase_order_ids +msgid "Purchase Orders" +msgstr "Ordini di acquisto" + +#. module: purchase_order_type_dashboard +#: model:ir.model.fields,field_description:purchase_order_type_dashboard.field_purchase_order_type__state_rfq_po_count +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "RFQs" +msgstr "RdP" + +#. module: purchase_order_type_dashboard +#: model:ir.actions.act_window,name:purchase_order_type_dashboard.action_purchase_rfq_from_dashboard +msgid "Request for Quotation" +msgstr "Richiesta di preventivo" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_tree +msgid "Total Nothing to Bill" +msgstr "Nulla da fatturare" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_tree +msgid "Total RFQs" +msgstr "Totale RdP" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_tree +msgid "Total Waiting Bills" +msgstr "Totale conti in attesa" + +#. module: purchase_order_type_dashboard +#: model:ir.model,name:purchase_order_type_dashboard.model_purchase_order_type +msgid "Type of purchase order" +msgstr "Tipo ordine di acquisto" + +#. module: purchase_order_type_dashboard +#: model:ir.model.fields,field_description:purchase_order_type_dashboard.field_purchase_order_type__invoice_status_ti_po_count +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Waiting Bills" +msgstr "Fatture in attesa" + +#~ msgid "Show other options" +#~ msgstr "Visualizza altre opzioni" diff --git a/purchase_order_type_dashboard/i18n/pt_BR.po b/purchase_order_type_dashboard/i18n/pt_BR.po new file mode 100644 index 00000000000..ae5b8c863e5 --- /dev/null +++ b/purchase_order_type_dashboard/i18n/pt_BR.po @@ -0,0 +1,100 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_order_type_dashboard +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: pt_BR\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: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "View" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "All" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model:ir.actions.act_window,name:purchase_order_type_dashboard.purchase_order_type_dashboard_action +#: model:ir.ui.menu,name:purchase_order_type_dashboard.purchase_order_dashboard_menu +msgid "Dashboard" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model:ir.model.fields,field_description:purchase_order_type_dashboard.field_purchase_order_type__invoice_status_no_po_count +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.purchase_order_view_search +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Nothing to Bill" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Number of Purchase Orders that have nothing to bill yet" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Number of Purchase Orders waiting for bills" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Number of Requests for Quotations" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model:ir.actions.act_window,name:purchase_order_type_dashboard.action_purchase_order_from_dashboard +msgid "Purchase Order" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model:ir.model.fields,field_description:purchase_order_type_dashboard.field_purchase_order_type__purchase_order_ids +msgid "Purchase Orders" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model:ir.model.fields,field_description:purchase_order_type_dashboard.field_purchase_order_type__state_rfq_po_count +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "RFQs" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model:ir.actions.act_window,name:purchase_order_type_dashboard.action_purchase_rfq_from_dashboard +msgid "Request for Quotation" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_tree +msgid "Total Nothing to Bill" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_tree +msgid "Total RFQs" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_tree +msgid "Total Waiting Bills" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model:ir.model,name:purchase_order_type_dashboard.model_purchase_order_type +msgid "Type of purchase order" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model:ir.model.fields,field_description:purchase_order_type_dashboard.field_purchase_order_type__invoice_status_ti_po_count +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Waiting Bills" +msgstr "" diff --git a/purchase_order_type_dashboard/i18n/purchase_order_type_dashboard.pot b/purchase_order_type_dashboard/i18n/purchase_order_type_dashboard.pot new file mode 100644 index 00000000000..269dd73fea7 --- /dev/null +++ b/purchase_order_type_dashboard/i18n/purchase_order_type_dashboard.pot @@ -0,0 +1,99 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_order_type_dashboard +# +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: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "View" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "All" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model:ir.actions.act_window,name:purchase_order_type_dashboard.purchase_order_type_dashboard_action +#: model:ir.ui.menu,name:purchase_order_type_dashboard.purchase_order_dashboard_menu +msgid "Dashboard" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model:ir.model.fields,field_description:purchase_order_type_dashboard.field_purchase_order_type__invoice_status_no_po_count +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.purchase_order_view_search +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Nothing to Bill" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Number of Purchase Orders that have nothing to bill yet" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Number of Purchase Orders waiting for bills" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Number of Requests for Quotations" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model:ir.actions.act_window,name:purchase_order_type_dashboard.action_purchase_order_from_dashboard +msgid "Purchase Order" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model:ir.model.fields,field_description:purchase_order_type_dashboard.field_purchase_order_type__purchase_order_ids +msgid "Purchase Orders" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model:ir.model.fields,field_description:purchase_order_type_dashboard.field_purchase_order_type__state_rfq_po_count +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "RFQs" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model:ir.actions.act_window,name:purchase_order_type_dashboard.action_purchase_rfq_from_dashboard +msgid "Request for Quotation" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_tree +msgid "Total Nothing to Bill" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_tree +msgid "Total RFQs" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_tree +msgid "Total Waiting Bills" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model:ir.model,name:purchase_order_type_dashboard.model_purchase_order_type +msgid "Type of purchase order" +msgstr "" + +#. module: purchase_order_type_dashboard +#: model:ir.model.fields,field_description:purchase_order_type_dashboard.field_purchase_order_type__invoice_status_ti_po_count +#: model_terms:ir.ui.view,arch_db:purchase_order_type_dashboard.view_purchase_order_type_kanban +msgid "Waiting Bills" +msgstr "" diff --git a/purchase_order_type_dashboard/models/__init__.py b/purchase_order_type_dashboard/models/__init__.py new file mode 100644 index 00000000000..d7570a0e252 --- /dev/null +++ b/purchase_order_type_dashboard/models/__init__.py @@ -0,0 +1 @@ +from . import purchase_order_type diff --git a/purchase_order_type_dashboard/models/purchase_order_type.py b/purchase_order_type_dashboard/models/purchase_order_type.py new file mode 100644 index 00000000000..2ecf0f2b9cd --- /dev/null +++ b/purchase_order_type_dashboard/models/purchase_order_type.py @@ -0,0 +1,58 @@ +# ?? 2021 Solvos Consultor??a Inform??tica () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import api, fields, models + + +class PurchaseOrderType(models.Model): + _inherit = "purchase.order.type" + + purchase_order_ids = fields.One2many( + comodel_name="purchase.order", + inverse_name="order_type", + string="Purchase Orders", + ) + state_rfq_po_count = fields.Integer(string="RFQs", compute="_compute_po_counts") + invoice_status_no_po_count = fields.Integer( + string="Nothing to Bill", compute="_compute_po_counts" + ) + invoice_status_ti_po_count = fields.Integer( + string="Waiting Bills", compute="_compute_po_counts" + ) + + @api.depends( + "purchase_order_ids", + "purchase_order_ids.state", + "purchase_order_ids.invoice_status", + ) + def _compute_po_counts(self): + rfq_states = ("draft", "sent", "to approve") + po_states = ("purchase", "done") + PurchaseOrder = self.env["purchase.order"] + fetch_data = PurchaseOrder.read_group( + [("order_type", "in", self.ids)], + ["order_type", "state", "invoice_status"], + ["order_type", "state", "invoice_status"], + lazy=False, + ) + result = [ + [ + data["order_type"][0], + data["state"], + data["invoice_status"], + data["__count"], + ] + for data in fetch_data + ] + for order in self: + order.state_rfq_po_count = sum( + r[3] for r in result if r[0] == order.id and r[1] in rfq_states + ) + order.invoice_status_no_po_count = sum( + r[3] + for r in result + if r[0] == order.id and r[1] in po_states and r[2] == "no" + ) + order.invoice_status_ti_po_count = sum( + r[3] for r in result if r[0] == order.id and r[2] == "to invoice" + ) diff --git a/purchase_order_type_dashboard/pyproject.toml b/purchase_order_type_dashboard/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/purchase_order_type_dashboard/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/purchase_order_type_dashboard/readme/CONTRIBUTORS.md b/purchase_order_type_dashboard/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..98512e39d9f --- /dev/null +++ b/purchase_order_type_dashboard/readme/CONTRIBUTORS.md @@ -0,0 +1,6 @@ +- David Alonso \<\> +- Angel Rivas \<\> +- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io) + - Bhavesh Heliconia +- [SolusiAglis](https://solusiaglis.co.id) + - Hudson Amadeus Leonardy \ No newline at end of file diff --git a/purchase_order_type_dashboard/readme/DESCRIPTION.md b/purchase_order_type_dashboard/readme/DESCRIPTION.md new file mode 100644 index 00000000000..8a311249466 --- /dev/null +++ b/purchase_order_type_dashboard/readme/DESCRIPTION.md @@ -0,0 +1 @@ +Adds a dashboard for Purchase Orders based on Purchase Order Types. diff --git a/purchase_order_type_dashboard/static/description/icon.png b/purchase_order_type_dashboard/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/purchase_order_type_dashboard/static/description/icon.png differ diff --git a/purchase_order_type_dashboard/static/description/index.html b/purchase_order_type_dashboard/static/description/index.html new file mode 100644 index 00000000000..b9b73b27d19 --- /dev/null +++ b/purchase_order_type_dashboard/static/description/index.html @@ -0,0 +1,440 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Purchase Order Type Dashboard

+ +

Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runboat

+

Adds a dashboard for Purchase Orders based on Purchase Order Types.

+

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

+
    +
  • Solvos
  • +
+
+
+

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 maintainer:

+

dalonsod

+

This module is part of the OCA/purchase-workflow project on GitHub.

+

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

+
+
+
+
+ + diff --git a/purchase_order_type_dashboard/tests/__init__.py b/purchase_order_type_dashboard/tests/__init__.py new file mode 100644 index 00000000000..eeaebcd6d21 --- /dev/null +++ b/purchase_order_type_dashboard/tests/__init__.py @@ -0,0 +1 @@ +from . import test_purchase_order_type_dashboard diff --git a/purchase_order_type_dashboard/tests/test_purchase_order_type_dashboard.py b/purchase_order_type_dashboard/tests/test_purchase_order_type_dashboard.py new file mode 100644 index 00000000000..35f43a1fa69 --- /dev/null +++ b/purchase_order_type_dashboard/tests/test_purchase_order_type_dashboard.py @@ -0,0 +1,124 @@ +# ?? 2021 Solvos Consultor??a Inform??tica () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import fields +from odoo.tests import tagged + +from odoo.addons.base.tests.common import BaseCommon + + +@tagged("post_install", "-at_install") +class TestPurchaseOrderTypeDashboard(BaseCommon): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.po_obj = cls.env["purchase.order"] + + # Partner + cls.partner1 = cls.env["res.partner"].create( + { + "name": "Wood Corner", + "is_company": True, + "street": "1839 Arbor Way", + "city": "Turlock", + "email": "wood.corner26@example.com", + "phone": "(623)-853-7197", + } + ) + + cls.category_office = cls.env["product.category"].create( + { + "name": "Office Furniture", + } + ) + + cls.uom_unit = cls.env.ref("uom.product_uom_unit") + + # Products + cls.product_storage_box = cls.env["product.product"].create( + { + "name": "Storage Box", + "categ_id": cls.category_office.id, + "standard_price": 14.0, + "list_price": 15.8, + "type": "consu", + "default_code": "E-COM08", + } + ) + + cls.product_pedal_bin = cls.env["product.product"].create( + { + "name": "Pedal Bin", + "categ_id": cls.category_office.id, + "standard_price": 10.0, + "list_price": 47.0, + "type": "consu", + "uom_id": cls.uom_unit.id, + "default_code": "E-COM10", + } + ) + + cls.product_conference_chair = cls.env["product.product"].create( + { + "name": "Conference Chair", + "categ_id": cls.category_office.id, + "standard_price": 28.0, + "list_price": 33.0, + "type": "consu", + "uom_id": cls.uom_unit.id, + "default_code": "E-COM12", + } + ) + + # Purchase Type + cls.type1 = cls.env["purchase.order.type"].create( + { + "name": "Regular", + } + ) + + def test_purchase_order_type_dashboard(self): + po_type1_rfq_count = self.type1.state_rfq_po_count + purchase = self._create_purchase( + [ + (self.product_storage_box, 1), + (self.product_pedal_bin, 5), + (self.product_conference_chair, 8), + ] + ) + self.assertEqual(self.type1.state_rfq_po_count, po_type1_rfq_count + 1) + + purchase.button_confirm() + po_type1_is_no_count = self.type1.invoice_status_no_po_count + po_type1_is_ti_count = self.type1.invoice_status_ti_po_count + purchase.order_line[0].qty_received = 1.0 + self.assertEqual( + self.type1.invoice_status_no_po_count, po_type1_is_no_count - 1 + ) + self.assertEqual( + self.type1.invoice_status_ti_po_count, po_type1_is_ti_count + 1 + ) + + def _create_purchase(self, line_products): + """Create a purchase order. + ``line_products`` is a list of tuple [(product, qty)] + """ + lines = [] + for product, qty in line_products: + line_values = { + "name": product.name, + "product_id": product.id, + "product_qty": qty, + "product_uom_id": product.uom_id.id, + "price_unit": 100, + "date_planned": fields.Datetime.now(), + } + lines.append((0, 0, line_values)) + purchase = self.po_obj.create( + { + "partner_id": self.partner1.id, + "order_type": self.type1.id, + "order_line": lines, + } + ) + return purchase diff --git a/purchase_order_type_dashboard/views/menu_purchase_order.xml b/purchase_order_type_dashboard/views/menu_purchase_order.xml new file mode 100644 index 00000000000..d7c21c0a3b8 --- /dev/null +++ b/purchase_order_type_dashboard/views/menu_purchase_order.xml @@ -0,0 +1,17 @@ + + + + Dashboard + purchase-dashboard + purchase.order.type + kanban,list,form,pivot + + + + diff --git a/purchase_order_type_dashboard/views/view_purchase_order.xml b/purchase_order_type_dashboard/views/view_purchase_order.xml new file mode 100644 index 00000000000..ff310d3929a --- /dev/null +++ b/purchase_order_type_dashboard/views/view_purchase_order.xml @@ -0,0 +1,45 @@ + + + + Request for Quotation + purchase.order + list,kanban,form,pivot,graph,calendar,activity + + + + {'default_order_type': active_id} + + [('order_type', '=', active_id)] + + + + Purchase Order + purchase.order + list,kanban,form,pivot,graph,calendar,activity + + + + {'default_order_type': active_id} + + [('order_type', '=', active_id), ('state','in',('purchase', 'done'))] + + + + purchase.order.select (in purchase_order_type_dashboard) + purchase.order + + + + + + + + diff --git a/purchase_order_type_dashboard/views/view_purchase_order_type.xml b/purchase_order_type_dashboard/views/view_purchase_order_type.xml new file mode 100644 index 00000000000..15df2ab4630 --- /dev/null +++ b/purchase_order_type_dashboard/views/view_purchase_order_type.xml @@ -0,0 +1,180 @@ + + + + purchase.order.type.tree (in purchase_order_type_dashboard) + purchase.order.type + + + + + + + + + + + + purchase.order.type.form (in purchase_order_type_dashboard) + purchase.order.type + + +
+ + + +
+
+
+ + + purchase.order.type.kanban (in purchase_order_type_dashboard) + purchase.order.type + + + + + + + + +
+
+
+
+
+ + +
+
+
+
+
+
+ +
+
+
+ + + +
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+