diff --git a/inventory_stock_dashboard_odoo/README.rst b/inventory_stock_dashboard_odoo/README.rst index fbac2c70c..8f9ad5142 100755 --- a/inventory_stock_dashboard_odoo/README.rst +++ b/inventory_stock_dashboard_odoo/README.rst @@ -1,28 +1,33 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-green.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + Inventory Dashboard =================== * Inventory Dashboard module for Odoo 16. Installation ============ - - www.odoo.com/documentation/16.0/setup/install.html - - Install our custom addon + - www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon -License +Company ------- -General Public License, Version 3 (LGPL v3). -(https://www.odoo.com/documentation/user/15.0/legal/licenses/licenses.html) +* `Cybrosys Techno Solutions `__ -Company +License ------- -* 'Cybrosys Techno Solutions '__ +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) Credits ------- -* 'Cybrosys Techno Solutions '__ +* `Cybrosys Techno Solutions `__ Contacts -------- * Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com Bug Tracker ----------- @@ -30,6 +35,9 @@ Bugs are tracked on GitHub Issues. In case of trouble, please check there if you Maintainer ========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + This module is maintained by Cybrosys Technologies. For support and more information, please visit https://www.cybrosys.com @@ -37,4 +45,3 @@ For support and more information, please visit https://www.cybrosys.com Further information =================== HTML Description: ``__ - diff --git a/inventory_stock_dashboard_odoo/__init__.py b/inventory_stock_dashboard_odoo/__init__.py index 3367fdfdb..69f10b833 100644 --- a/inventory_stock_dashboard_odoo/__init__.py +++ b/inventory_stock_dashboard_odoo/__init__.py @@ -19,5 +19,4 @@ # If not, see . # ############################################################################# - from . import models diff --git a/inventory_stock_dashboard_odoo/__manifest__.py b/inventory_stock_dashboard_odoo/__manifest__.py index 100dada9c..a8c6dcb67 100644 --- a/inventory_stock_dashboard_odoo/__manifest__.py +++ b/inventory_stock_dashboard_odoo/__manifest__.py @@ -21,18 +21,18 @@ ############################################################################# { 'name': 'Inventory Dashboard Odoo 16', - 'version': '16.0.1.0.0', - 'summary': 'Inventory Dashboard', - 'description': """ Detailed Dashboard View For Inventory""", + 'version': '16.0.1.0.1', 'category': 'Inventory', + 'summary': 'Inventory Dashboard', + 'description': "Detailed Dashboard View For Inventory", 'author': 'Cybrosys Techno Solutions', 'company': 'Cybrosys Techno Solutions', 'maintainer': 'Cybrosys Techno Solutions', 'website': "https://www.cybrosys.com", 'depends': ['stock', 'base'], 'data': ['views/style.xml', - 'views/dashboard_menu.xml', - 'views/res_config_settings_inherit.xml', + 'views/dashboard_menus.xml', + 'views/res_config_settings_views.xml', ], 'assets': { 'web.assets_backend': [ @@ -45,6 +45,6 @@ 'license': 'LGPL-3', 'images': ['static/description/banner.png'], 'installable': True, - 'application': True, 'auto_install': False, + 'application': True, } diff --git a/inventory_stock_dashboard_odoo/doc/RELEASE_NOTES.md b/inventory_stock_dashboard_odoo/doc/RELEASE_NOTES.md index 156a4bf13..4f7c69cc5 100644 --- a/inventory_stock_dashboard_odoo/doc/RELEASE_NOTES.md +++ b/inventory_stock_dashboard_odoo/doc/RELEASE_NOTES.md @@ -2,5 +2,10 @@ #### 24.05.2022 #### Version 16.0.1.0.0 -#### ADD -- Initial commit for Inventory Dashboard Module \ No newline at end of file +##### ADD +- Initial commit for Inventory Dashboard Module + +#### 24.07.2023 +#### Version 16.0.1.0.1 +##### FIX +- The font size reduction problem when installing this module has been fixed. diff --git a/inventory_stock_dashboard_odoo/models/__init__.py b/inventory_stock_dashboard_odoo/models/__init__.py index e0c6efcc5..ebd516959 100644 --- a/inventory_stock_dashboard_odoo/models/__init__.py +++ b/inventory_stock_dashboard_odoo/models/__init__.py @@ -20,9 +20,8 @@ # ############################################################################# -from . import stock_move_inherit -from . import stock_picking_inherit -from . import res_config_settings_inherit -from . import stock_quant_inherit -from . import stock_move_line_inherit - +from . import res_config_settings +from . import stock_move +from . import stock_move_line +from . import stock_picking +from . import stock_quant diff --git a/inventory_stock_dashboard_odoo/models/res_config_settings.py b/inventory_stock_dashboard_odoo/models/res_config_settings.py new file mode 100644 index 000000000..fbe68392b --- /dev/null +++ b/inventory_stock_dashboard_odoo/models/res_config_settings.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + out_of_stock = fields.Boolean(string="Out of stock", + config_parameter='inventory_stock_dashboard_odoo.out_of_stock', + help="Enable if out of stock") + out_of_stock_quantity = fields.Integer(string="Quantity", + config_parameter='inventory_stock_dashboard_odoo.out_of_stock_quantity', + required=True, + help="Set the minimum quantity for " + "considering a product as out " + "of stock.") + dead_stock_bol = fields.Boolean(string="Enable dead stock", + config_parameter='inventory_stock_dashboard_odoo.dead_stock_bol', + help="Enable if you want to consider dead " + "stock.") + dead_stock = fields.Integer(string="Dead stock", + config_parameter='inventory_stock_dashboard_odoo.dead_stock', + required=True, + help="Set the threshold quantity for " + "considering a product as dead stock.") + dead_stock_type = fields.Selection( + [('day', 'Day'), ('week', 'Week'), ('month', 'Month')], + string="Type", default='day', + config_parameter='inventory_stock_dashboard_odoo.dead_stock_type', + required=True, + help="Select the time period to determine dead stock based on product " + "sales.") diff --git a/inventory_stock_dashboard_odoo/models/res_config_settings_inherit.py b/inventory_stock_dashboard_odoo/models/res_config_settings_inherit.py deleted file mode 100644 index d76bc4c42..000000000 --- a/inventory_stock_dashboard_odoo/models/res_config_settings_inherit.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################# -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2022-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions() -# -# You can modify it under the terms of the GNU LESSER -# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. -# -# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE -# (LGPL v3) along with this program. -# If not, see . -# -############################################################################# - -from odoo import fields, models - - -class ResConfiqSettingInherit(models.TransientModel): - _inherit = "res.config.settings" - out_of_stock = fields.Boolean(config_parameter='inventory_stock_dashboard_odoo.out_of_stock') - out_of_stock_quantity = fields.Integer(string="Quantity", - config_parameter='inventory_stock_dashboard_odoo.out_of_stock_quantity', - required=True) - dead_stock_bol = fields.Boolean(string="Dead Stock", - config_parameter='inventory_stock_dashboard_odoo.dead_stock_bol') - dead_stock = fields.Integer(config_parameter='inventory_stock_dashboard_odoo.dead_stock', required=True) - dead_stock_type = fields.Selection([('day', 'Day'), ('week', 'Week'), ('month', 'Month')], - string="Type", default='day', - config_parameter='inventory_stock_dashboard_odoo.dead_stock_type', required=True) diff --git a/inventory_stock_dashboard_odoo/models/stock_move_inherit.py b/inventory_stock_dashboard_odoo/models/stock_move.py similarity index 99% rename from inventory_stock_dashboard_odoo/models/stock_move_inherit.py rename to inventory_stock_dashboard_odoo/models/stock_move.py index dcc8e8071..aa4f515ea 100644 --- a/inventory_stock_dashboard_odoo/models/stock_move_inherit.py +++ b/inventory_stock_dashboard_odoo/models/stock_move.py @@ -23,7 +23,7 @@ from odoo import api, models -class StockMoveInherit(models.Model): +class StockMove(models.Model): _inherit = "stock.move" @api.model @@ -287,4 +287,4 @@ class StockMoveInherit(models.Model): 'product_name': product_name, 'total_quantity': total_quantity } - return value \ No newline at end of file + return value diff --git a/inventory_stock_dashboard_odoo/models/stock_move_line_inherit.py b/inventory_stock_dashboard_odoo/models/stock_move_line.py similarity index 98% rename from inventory_stock_dashboard_odoo/models/stock_move_line_inherit.py rename to inventory_stock_dashboard_odoo/models/stock_move_line.py index 3523e427b..0eef3985b 100644 --- a/inventory_stock_dashboard_odoo/models/stock_move_line_inherit.py +++ b/inventory_stock_dashboard_odoo/models/stock_move_line.py @@ -23,7 +23,7 @@ from odoo import api, models -class StockMoveLineInherit(models.Model): +class StockMoveLine(models.Model): _inherit = "stock.move.line" @api.model @@ -82,4 +82,4 @@ class StockMoveLineInherit(models.Model): 'name': name, 'count': quantity_done, } - return value \ No newline at end of file + return value diff --git a/inventory_stock_dashboard_odoo/models/stock_picking_inherit.py b/inventory_stock_dashboard_odoo/models/stock_picking.py similarity index 98% rename from inventory_stock_dashboard_odoo/models/stock_picking_inherit.py rename to inventory_stock_dashboard_odoo/models/stock_picking.py index bdb3b1d04..402f3f544 100644 --- a/inventory_stock_dashboard_odoo/models/stock_picking_inherit.py +++ b/inventory_stock_dashboard_odoo/models/stock_picking.py @@ -23,7 +23,7 @@ from odoo import api, models -class StockPickingInherit(models.Model): +class StockPicking(models.Model): _inherit = "stock.picking" @api.model @@ -98,4 +98,4 @@ class StockPickingInherit(models.Model): loc_stock_quant = stock_quant_ids.filtered(lambda x: x.location_id == rec) on_hand_quantity = sum(loc_stock_quant.mapped('inventory_quantity_auto_apply')) value[rec.name] = on_hand_quantity - return value \ No newline at end of file + return value diff --git a/inventory_stock_dashboard_odoo/models/stock_quant_inherit.py b/inventory_stock_dashboard_odoo/models/stock_quant.py similarity index 97% rename from inventory_stock_dashboard_odoo/models/stock_quant_inherit.py rename to inventory_stock_dashboard_odoo/models/stock_quant.py index a596e0fd9..b40948403 100644 --- a/inventory_stock_dashboard_odoo/models/stock_quant_inherit.py +++ b/inventory_stock_dashboard_odoo/models/stock_quant.py @@ -23,7 +23,7 @@ from odoo import api, models -class StockQuantInherit(models.Model): +class StockQuant(models.Model): _inherit = "stock.quant" @api.model @@ -56,4 +56,4 @@ class StockQuantInherit(models.Model): 'product_name': product_name, 'total_quantity': total_quantity } - return value \ No newline at end of file + return value diff --git a/inventory_stock_dashboard_odoo/static/src/css/dashboard.css b/inventory_stock_dashboard_odoo/static/src/css/dashboard.css index 5b4f60c44..38705457b 100644 --- a/inventory_stock_dashboard_odoo/static/src/css/dashboard.css +++ b/inventory_stock_dashboard_odoo/static/src/css/dashboard.css @@ -1,14 +1,10 @@ - .item-container { background-image: -webkit-linear-gradient(white, white); - } - .item-header { padding-left: 30px; background-image: -webkit-linear-gradient(white, #c3c9d4); } - .col-sm, .col-sm-1, .col-sm-10, @@ -19,11 +15,9 @@ .col-sm-4, .col-xl-auto { position: relative; - padding-right: 7.5px; padding-left: 7.5px; } - #location_table thead th { border-bottom: none; background-color: #67b7dc; @@ -31,7 +25,6 @@ width: 250px; height: 30px; } - .accounts-dashboard-wrap .card-header { background-color: transparent; @@ -41,8 +34,6 @@ border-top-left-radius: .25rem; border-top-right-radius: .25rem; } - - .accounts-dashboard-wrap .fa:hover { -ms-transform: scale(1.5); /* IE 9 */ @@ -50,36 +41,28 @@ /* Safari 3-8 */ transform: scale(1.5); } - .accounts-dashboard-wrap .card-header>.card-tools { float: right; margin-right: -.625rem; } - .right { float: left; } - .accounts-dashboard-wrap .tooltip:hover .tooltiptext { visibility: visible; } - - .accounts-dashboard-wrap .col-6 { -ms-flex: 0 0 50%; flex: 0 0 50%; max-width: 50%; } - .accounts-dashboard-wrap .fa-cog { content: "\f013" } - .accounts-dashboard-wrap .fa, -.fas { +.accounts-dashboard-wrap .fas { font-weight: 900; } - .accounts-dashboard-wrap .fa, .accounts-dashboard-wrap .fab, .accounts-dashboard-wrap .fad, @@ -94,7 +77,6 @@ text-rendering: auto; line-height: 1; } - .accounts-dashboard-wrap .info-box .info-box-icon { border-radius: .25rem; @@ -108,10 +90,7 @@ text-align: center; width: 70px; } - .accounts-dashboard-wrap .info-box { - - box-shadow: 0 0 1px rgba(0, 0, 0, .125), 0 1px 3px rgba(0, 0, 0, .2); border-radius: .25rem; background: #fff; @@ -122,64 +101,50 @@ padding: .5rem; position: relative; } - .accounts-dashboard-wrap .o_datepicker .o_datepicker_input { width: 100%; cursor: pointer; } - .accounts-dashboard-wrap #overdue { width: 100%; cursor: pointer; } - .accounts-dashboard-wrap .o_input { border: 1px solid #cfcfcf; border-top-style: none; border-right-style: none; border-left-style: none; } - - .accounts-dashboard-wrap .in_graph { padding-left: 90px; height: auto; padding-bottom: 65px; text-align: center !important; } - - .accounts-dashboard-wrap .oh_dashboards { padding-top: 15px; background-color: #f8faff !important; } - .accounts-dashboard-wrap .container-fluid.o_in_dashboard { padding: 0px !important; } - .accounts-dashboard-wrap .o_action_manager { overflow-y: scroll !important; max-width: 100%; } - // new tile -body { +.oh_dashboards { background-color: #ececec; } - .accounts-dashboard-wrap .container { margin: 50px 0 0 100px; } - .accounts-dashboard-wrap .o_dashboards { color: #2a2a2a; background-color: #f2f2f2 !important; } - .accounts-dashboard-wrap .dash-header { - margin: 15px 0px 12px 0 !important; display: block; padding: 7px 25px 7px 0; @@ -195,24 +160,17 @@ body { display: flex; justify-content: space-between; align-items: center; - } - .accounts-dashboard-wrap .dashboard-h1 { - display: block; padding: 7px 25px 7px 0; color: #0e1319; font-size: 2rem; font-weight: 400; - color: - - #212529; + color: #212529; float: left; margin-bottom: 0; - } - .accounts-dashboard-wrap .card { position: relative !important; border-top: 0 !important; @@ -230,19 +188,16 @@ body { box-shadow: 0 0px 10px 0px rgba(0, 0, 0, 0.05) !important; border-radius: 0.25rem; } - .accounts-dashboard-wrap .card-header { border: 0; padding: 0; } - .accounts-dashboard-wrap .card-header>.card-tools { float: right; margin-right: 0.375rem; margin-top: 5px; margin-bottom: 10px; } - .accounts-dashboard-wrap .card-header i.fa { font-size: 1.3rem; display: inline-block; @@ -253,7 +208,6 @@ body { -webkit-transition: 0.3s linear; transition: 0.3s linear; } - .accounts-dashboard-wrap .dropdown-toggle::after { display: inline-block; margin-left: 0.255em; @@ -265,12 +219,9 @@ body { border-left: 0.3em solid transparent; color: #7891af; } - .accounts-dashboard-wrap .account-details { display: flex; - } - .main-title { color: #a3a3a3; display: block; @@ -278,7 +229,6 @@ body { font-size: 20px; font-weight: 400; } - .accounts-dashboard-wrap .main-title { display: block; margin-bottom: 5px; @@ -291,13 +241,11 @@ body { border-bottom-left-radius: 0; border-bottom-right-radius: 0; } - .accounts-dashboard-wrap .card-body { background-color: rgba(255, 255, 255, 0.9) !important; color: #212529; padding-top: 0; } - .accounts-dashboard-wrap .tile.wide.invoice { margin-bottom: 27px; -webkit-box-shadow: 1px 5px 24px 0 rgba(68, 102, 242, 0.05); @@ -310,33 +258,25 @@ body { border: 1px solid rgba(0, 0, 0, 0.07); height: 140px; } - .accounts-dashboard-wrap .box-1 .main-title { background: #67b7dc; color: #fff; } - .accounts-dashboard-wrap .box-2 .main-title { background: #6794dc !important; color: #fff; } - .accounts-dashboard-wrap .box-3 .main-title { background: #8067dc; color: #fff; } - .accounts-dashboard-wrap .box-4 .main-title { background: #c767dc; color: #fff; } - .accounts-dashboard-wrap .count { margin-bottom: 1rem; } - - - .accounts-dashboard-wrap .main-title~div { display: flex; justify-content: space-between; @@ -344,14 +284,10 @@ body { padding: 1rem; background: #fff; } - #location_table { background-color: #fff; color: (--mauve); - - } - #tile_main_div:hover { border-top-left-radius: 10px; border-bottom-left-radius: 10px; @@ -360,7 +296,6 @@ body { border-left: 8px solid var(--mauve); box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); } - #tiles:hover { border-top-left-radius: 10px; border-bottom-left-radius: 10px; @@ -368,45 +303,34 @@ body { animation-duration: 0.25s; box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); } - .details_table{ align-content: left; } - .graph_details_table{ -position: absolute; - top: 45px; - right: 15px; - + position: absolute; + top: 45px; + right: 15px; background-color: white; border-collapse: collapse; border: 1px solid #ddd; - } - .graph_details_table th{ -background-color:#67b7dc; -color: white; + background-color:#67b7dc; + color: white; width: 250px; height: 30px; } - .graph_details_table td{ border: 1px solid #ddd; height: 20px; } - .graph_details_table tr:nth-child(even){background-color: #f2f2f2;} - .graph_details_table tr:hover {background-color: #ddd;} - - #product_moves_selection{ position: relative; right: 10px; top: 5px; } - :root { /* Primary */ --mauve: #7D7EAF; @@ -431,67 +355,51 @@ height: 20px; --grey-lighter: #fafafa; --grey-dark-lighter: #f3f3f3; } - /* Background */ .bg-mauve-light { background-color: var(--mauve-light); } - .bg-pink-dark-light { background-color: var(--pink-dark-light); } - .bg-pink-light { background-color: var(--pink-light); } - .bg-peach-light { background-color: var(--peach-light); } - .bg-orange-light { background-color: var(--orange-light); } - .bg-gold-light { background-color: var(--gold-light); } - .bg-green-light { background-color: var(--green-light); } - /* Text */ .text-mauve { color: var(--mauve); } - .text-pink-dark { color: var(--pink-dark); } - .text-pink { color: var(--pink); } - .text-peach { color: var(--peach); } - .text-orange { color: var(--orange); } - .text-gold { color: var(--gold); } - .text-green { color: var(--green); } - /* Cards */ - /*.dashboard-card { border-radius: 0.3rem; display: flex; @@ -500,71 +408,58 @@ height: 20px; margin: 1rem auto; height: 90px; }*/ - .dashboard-card__icon-container { height: 50px; width: 50px; border-radius: 50%; } - .dashboard-card__icon-container i { font-size: 20px; } - .dashboard-card__details { margin-left: 0rem !important; max-width: 120px; } - .dashboard-card__details h3 { font-weight: 700; font-size: 1.5rem; } - .dashboard-card__details h4 { font-weight: 700; font-size: 0.7rem; color: var(--grey); margin-top: -5px; } - h2.section-header { font-weight: 700; font-size: 1.5rem; } - .chart-container { border-radius: 0.3rem; padding: 1rem; margin: 1rem auto; } - .chart-container.card-shadow { height: 100%; } - .half_chart.chart-container.card-shadow { height: 49%; } - .chart-container h2 { font-weight: 700; font-size: 1.125rem; } - .item-container { background-color: var(--grey-lighter); border-radius: 0.3rem; padding: 1.2rem 1rem; margin: 1rem auto; } - .item-container:hover { background-color: var(--grey-dark-lighter); transition: all 0.3s ease-in-out; cursor: pointer; } - .count-container { font-weight: 700; font-size: 2rem; @@ -579,40 +474,33 @@ h2.section-header { justify-content: center; align-items: center; } - .item-header { display: flex; align-items: flex-start; } - .item-title h3 { font-size: 1.3rem; font-weight: 700; } - .item-content ul { list-style: none; padding-left: 0px; } - .item-content ul>li { font-size: 0.9rem; color: var(--grey); font-weight: 700; } - /* Misc */ .card-shadow { -webkit-box-shadow: 1px 3px 5px 0px rgba(222, 222, 222, 1); -moz-box-shadow: 1px 3px 5px 0px rgba(222, 222, 222, 1); box-shadow: 1px 3px 5px 0px rgba(222, 222, 222, 1); } - .table td, .table th { border-top: 1px solid #eceff2; } - .crm_scroll_table { max-height: 395px; overflow-y: auto; @@ -620,12 +508,10 @@ h2.section-header { .recent_activity_div .crm_scroll_table { max-height: 435px; } - .crm_scroll_table thead { position: sticky; top: 0; } - .dashboard-card__stat_late:hover { border-bottom-color: darkgray; } @@ -656,7 +542,6 @@ h2.section-header { border: 1px solid #d2d4dd; transition: all 0.3s ease-in-out; } - .btn_info { position: absolute; top: 18px; @@ -669,44 +554,33 @@ h2.section-header { #top_product_selection { position: absolute; top: 18px; - } #top_product_button { position: absolute; top: 1px; right: 63px; - } #product_move_select { position: absolute; top: 1px; right: 63px; - } - #product_move_selection { position: absolute; top: 18px; - } - - #stock_move_select { position: absolute; top: 1px; right: 63px; - } #stock_moves_selection { position: absolute; top: 18px; - } - .location_table_value{ text-align: center; } - /* X-Small devices (portrait phones, less than 576px)*/ @media (max-width: 575.98px) { #top_product_selection{ @@ -722,7 +596,6 @@ text-align: center; margin-left: -100%; } } - .tile-container { padding: 1rem; display: flex; @@ -735,108 +608,83 @@ text-align: center; background-size: cover; background-position-x: right; } - .tile-container:hover { opacity: 0.9; cursor: pointer; transition: all 0.4s ease-in-out; } - .title-container__icon-container { padding: 1.3rem 1rem; border-radius: 0.5rem; } - .title-container__icon { font-size: 1.5rem; } - .title-container__count { font-size: 1.6rem; font-weight: 600; } - .title-container__title { font-size: 1rem; font-weight: 600; } - /* Colors */ .red-bkg { background-color: #FFE1E2; } - .red-font { color: #E8565E; } - .blue-bkg { background-color: #C2D5FF; } - .blue-font { color: #225AE3; } - .green-bkg { background-color: #BDE4E0; } - .green-font { color: #2CA79A; } - .pink-bkg { background-color: #FFE4EF; } - .pink-font { color: #CE3372; } - .yellow-bkg { background-color: #F9ECC6; } - .yellow-font { color: #CBA846; } - .white-bkg { background-color: #FFFFFF; } - .white-font { color: #FFFFFF; } - /*Second Section CSS */ .card-contianer__header { background-color: #37274B; padding: 0.4rem; border-top: 3px solid #D84315; } - .card-container__content { padding: 1rem; } - .card-container__normal-header { font-size: 1.2rem; color: #000000; font-weight: 600; } - .card-container__header-text { font-size: 1.2rem; color: #FFFFFF; font-weight: 400; text-align: center; } - - - - .dashboard-card { box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px; padding: 1.5rem; @@ -846,19 +694,15 @@ text-align: center; justify-content: space-between !important; align-items: flex-start !important; } - .dashboard-card--border-top { border-top: 5px solid #000; } - .dashboard-card--border-top-red { border-color: #D32F2F; } - .dashboard-card--border-top-blue { border-color: #2962FF; } - .dashboard-card--border-top-green { border-color: #00FF00; } @@ -877,34 +721,28 @@ text-align: center; .dashboard-card--border-top-black { border-color: black; } - .dashboard-card--border-top-rebecca { border-color: #663399; } - .dashboard-card--border-top-steel { border-color: #607D8B; } .dashboard-card--border-top-orange { border-color: #FFA500; } - .dashboard-card__title { font-weight: bold; display: block; margin-top: 0.5rem; } - .dashboard-card__count { font-size: 3rem; } - .dashboard-card__stats { list-style: none; padding-left: 0; width: 50% } - .dashboard-card__stat_late { padding: 0.5rem 0rem; border-bottom: 1px solid rgba(0, 0, 0, 0.1); @@ -917,9 +755,6 @@ text-align: center; padding: 0.5rem 0rem; border-bottom: 1px solid rgba(0, 0, 0, 0.1); } - - - .dashboard-card__stat-count_late { min-width: 25px; min-height: 20px; @@ -956,10 +791,7 @@ text-align: center; align-items: center; border-radius: 50%; } - - - body{ -background:#eee; +.oh_dashboards { font-family: 'Raleway', sans-serif; } .main-part{ @@ -1036,11 +868,10 @@ background-color:#803D9B; background-color: #16A085; min-height: 120px; } - .col-lg-3:hover { -ms-transform: scale(1); /* IE 9 */ -webkit-transform: scale(1); /* Safari 3-8 */ transform: scale(1.05); -} \ No newline at end of file +} diff --git a/inventory_stock_dashboard_odoo/static/src/js/dashboard.js b/inventory_stock_dashboard_odoo/static/src/js/dashboard.js index e76a7b2d6..b365336fa 100644 --- a/inventory_stock_dashboard_odoo/static/src/js/dashboard.js +++ b/inventory_stock_dashboard_odoo/static/src/js/dashboard.js @@ -1,6 +1,5 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "use strict"; - var AbstractAction = require('web.AbstractAction'); var core = require('web.core'); var rpc = require('web.rpc'); @@ -32,19 +31,16 @@ odoo.define("inventory_dashboard.dashboard", function (require) { 'click #product_move_info': 'onclick_product_move_info', 'click #stock_move_info': 'onclick_stock_move_info', }, - init: function(parent, context) { this._super(parent, context); this.dashboards_templates = ['InventoryTiles', 'ProductSaleBarGraph']; }, - willStart: function() { var self = this; return $.when(this._super()).then(function() { return; }); }, - start: function() { var self = this; this.set("title", 'Dashboard'); @@ -54,7 +50,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { self.$el.parent().addClass('oe_background_grey'); }); }, - render_dashboards: function() { var self = this; _.each(this.dashboards_templates, function(template) { @@ -72,7 +67,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { self.render_out_of_stock_graph(); self.render_dead_of_stock_graph(); }, - // fetch data function-operation type tiles and graph include this function render_operation_tile: function() { var self = this; @@ -92,13 +86,11 @@ odoo.define("inventory_dashboard.dashboard", function (require) { var result_1 = key; result_2 = value; const colors = ["red", "blue","green","orange","purple","steel","rebecca","brown","pink","grey","black"]; - $('#set').append('
' + result[3][result_1] + ' ' + result_2 + '
    '); g++; - if (key in late) { $('#' + key + ' .dashboard-card__stats').append('
  • @@ -120,7 +112,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { var name = Object.values(result[3]) // Add data values to array var count = Object.values(result[0]) var j = 0; - for (var c in count) { $('#operation_type_table').append(''+name[j]+''+count[c]+'') j++; @@ -144,7 +135,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "#a05195", "#6d5c16", "#CCCCFF" - ], borderColor: [ "#003f5c", @@ -179,7 +169,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { }); }); }, - // top ten bar graph render_top_product_bar_graph:function(){ var self = this @@ -214,7 +203,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "#a05195", "#6d5c16", "#CCCCFF" - ], borderColor: [ "#003f5c", @@ -228,7 +216,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "#6d5c16", "#CCCCFF" ], - barPercentage: 0.5, barThickness: 6, maxBarThickness: 8, @@ -250,7 +237,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { }); }); }, - // product categories doughnut graph render_product_category:function(){ var self = this @@ -286,11 +272,9 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "#a05195", "#6d5c16", "#CCCCFF" - ], borderColor: [ "#003f5c", - ], barPercentage: 0.5, barThickness: 6, @@ -313,7 +297,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { }); }); }, - // product move line graph render_product_move_graph_this_month:function(){ var self = this @@ -336,7 +319,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { $('#product_move_selection').append('') k++; } - }); var opti = $(self.target).val(); var option = $( "#product_move_selection" ).val(); @@ -383,12 +365,9 @@ odoo.define("inventory_dashboard.dashboard", function (require) { maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height } }); - }); }); - }, - // stock moves pie graph render_stock_moves:function(){ rpc.query({ @@ -422,7 +401,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "#a05195", "#6d5c16", "#CCCCFF" - ], borderColor: [ "#003f5c", @@ -457,7 +435,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { }); }); }, - // location-on hand table render_storage_location:function(){ var self = this @@ -471,7 +448,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { }); }); }, - //out of stock graph render_out_of_stock_graph:function(){ var self = this @@ -525,10 +501,8 @@ odoo.define("inventory_dashboard.dashboard", function (require) { } }); } - }); }, - //dead stock graph render_dead_of_stock_graph:function(){ var self = this @@ -536,7 +510,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { model: "stock.move", method: "get_dead_of_stock", }).then(function (result) { - if (result) { $('#graphs').append('

    Dead Stock

    @@ -583,10 +556,8 @@ odoo.define("inventory_dashboard.dashboard", function (require) { } }); } - }); }, - // event functions //top product selection onclick_top_product_selection:function(events){ @@ -626,7 +597,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "#a05195", "#6d5c16", "#CCCCFF" - ], borderColor: [ "#003f5c", @@ -640,7 +610,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "#6d5c16", "#CCCCFF" ], - barPercentage: 0.5, barThickness: 6, maxBarThickness: 8, @@ -661,7 +630,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { } }); }); - } if (option == 'top_last_30_days'){ var self = this; @@ -698,7 +666,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "#a05195", "#6d5c16", "#CCCCFF" - ], borderColor: [ "#003f5c", @@ -712,7 +679,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "#6d5c16", "#CCCCFF" ], - barPercentage: 0.5, barThickness: 6, maxBarThickness: 8, @@ -768,7 +734,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "#a05195", "#6d5c16", "#CCCCFF" - ], borderColor: [ "#003f5c", @@ -838,7 +803,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "#a05195", "#6d5c16", "#CCCCFF" - ], borderColor: [ "#003f5c", @@ -852,7 +816,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "#6d5c16", "#CCCCFF" ], - barPercentage: 0.5, barThickness: 6, maxBarThickness: 8, @@ -875,7 +838,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { }); } }, - // stock moves this_mont,last_year change onclick_stock_moves_selection:function(events){ var option = $(events.target).val(); @@ -913,7 +875,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "#a05195", "#6d5c16", "#CCCCFF" - ], borderColor: [ "#003f5c", @@ -946,9 +907,7 @@ odoo.define("inventory_dashboard.dashboard", function (require) { maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height } }); - }); - } if (option == 'this_month'){ rpc.query({ @@ -984,7 +943,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "#a05195", "#6d5c16", "#CCCCFF" - ], borderColor: [ "#003f5c", @@ -1017,9 +975,7 @@ odoo.define("inventory_dashboard.dashboard", function (require) { maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height } }); - }); - } if (option == 'last_3_month'){ rpc.query({ @@ -1055,7 +1011,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "#a05195", "#6d5c16", "#CCCCFF" - ], borderColor: [ "#003f5c", @@ -1088,9 +1043,7 @@ odoo.define("inventory_dashboard.dashboard", function (require) { maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height } }); - }); - } else if (option == 'last_year'){ rpc.query({ @@ -1126,7 +1079,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { "#a05195", "#6d5c16", "#CCCCFF" - ], borderColor: [ "#003f5c", @@ -1159,11 +1111,9 @@ odoo.define("inventory_dashboard.dashboard", function (require) { maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height } }); - }); } }, - // product move selection onclick_product_moves_selection:function(events){ var option = $(events.target).val(); @@ -1211,10 +1161,8 @@ odoo.define("inventory_dashboard.dashboard", function (require) { maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height } }); - }); }, - // tile click onclick_tiles: function(f) { var id = parseInt(this.$(f.currentTarget).attr('id')); @@ -1231,8 +1179,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { target: 'current', }, options); }, - - // tile late status onclick onclick_late_status: function(f) { f.stopPropagation(); @@ -1251,7 +1197,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { target: 'current', }, options) }, - // tile waiting status onclick onclick_waiting_status: function(f) { f.stopPropagation(); @@ -1269,7 +1214,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { target: 'current', }, options) }, - // tile backorder status onclick onclick_backorders_status: function(f) { f.stopPropagation(); @@ -1287,7 +1231,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { target: 'current', }, options) }, - // top ten product show details button click onclick_top_product_info: function(f) { var x = document.getElementById("pro_info"); @@ -1297,7 +1240,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { x.style.display = "none"; } }, - // product category graph show details button click onclick_pro_cate_info: function(f) { var x = document.getElementById("category_table"); @@ -1307,7 +1249,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { x.style.display = "none"; } }, - // stock moves show details button click onclick_location_info: function(f) { var x = document.getElementById("location_table"); @@ -1317,7 +1258,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { x.style.display = "none"; } }, - // operation types table show details button click onclick_operation_type_info: function(f) { var x = document.getElementById("operation_type_table"); @@ -1327,7 +1267,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { x.style.display = "none"; } }, - // dead stock table show details button click onclick_dead_stock_info: function(f) { var x = document.getElementById("dead_stock_table"); @@ -1337,7 +1276,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) { x.style.display = "none"; } }, - // out of stock table show details button click onclick_out_of_stock_info: function(f) { var x = document.getElementById("out_of_stock_table"); diff --git a/inventory_stock_dashboard_odoo/static/src/xml/dashboard.xml b/inventory_stock_dashboard_odoo/static/src/xml/dashboard.xml index 00003a4bc..2eb5ae785 100644 --- a/inventory_stock_dashboard_odoo/static/src/xml/dashboard.xml +++ b/inventory_stock_dashboard_odoo/static/src/xml/dashboard.xml @@ -1,175 +1,191 @@ - - - -
    -
    -

    -

    -
    - - - -
    -
    -
    -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -

    Top Moving Products

    -
    - -
    - - - - - - -
    ProductsQuantity Transfered
    -
    -
    -
    - -
    -
    -
    - -
    -
    -
    -

    Product Categories

    - - - - - - - -
    CategoriesOnhand Quantity
    -
    -
    -
    - -
    -
    -
    - -
    -
    -
    +
    +
    +

    +
    + + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +

    Top Moving Products

    +
    + +
    + + + + + + +
    ProductsQuantity Transfered
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +

    Product Categories

    + + + + + + +
    CategoriesOnhand Quantity
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    -

    Product Moves By Category

    -
    - -
    - - - - - - -
    ProductsQuantity Done
    -
    -
    -
    - -
    -
    -
    - -
    -
    -
    Product Moves By Category +
    + +
    + + + + + + +
    ProductsQuantity Done
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    -

    Stock Moves By Location

    - -
    - -
    - - - - - - -
    LocationStock Moves Count
    -
    -
    -
    - -
    -
    -
    - -
    -
    -
    -

    Operation Types

    - - - - - - - -
    Operation TypesTransfer Count
    -
    -
    -
    - -
    -
    -
    +

    Stock Moves By Location

    +
    + +
    + + + + + + +
    LocationStock Moves Count
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +

    Operation Types

    + + + + + + +
    Operation TypesTransfer Count
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +

    Locations

    +
    +
    + + + + + + + + +
    +

    Location

    +
    +

    On Hand Quantity

    +
    +
    +
    +
    + + -
    -
    -
    -

    Locations

    -
    -
    - - - - -
    -

    Location

    -
    -

    On Hand Quantity

    -
    -
    -
    -
    - - \ No newline at end of file diff --git a/inventory_stock_dashboard_odoo/views/dashboard_menu.xml b/inventory_stock_dashboard_odoo/views/dashboard_menus.xml similarity index 58% rename from inventory_stock_dashboard_odoo/views/dashboard_menu.xml rename to inventory_stock_dashboard_odoo/views/dashboard_menus.xml index 9090fedb1..4889f9436 100644 --- a/inventory_stock_dashboard_odoo/views/dashboard_menu.xml +++ b/inventory_stock_dashboard_odoo/views/dashboard_menus.xml @@ -1,11 +1,10 @@ - Dashboard - inventory_dashboard_tag - - Dashboard + inventory_dashboard_tag + + - - - - res.config.settings.view.form.inherit - res.config.settings - - - -
    -
    -

    Dashboard

    - -
    -
    -
    - -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/inventory_stock_dashboard_odoo/views/res_config_settings_views.xml b/inventory_stock_dashboard_odoo/views/res_config_settings_views.xml new file mode 100644 index 000000000..7027117ed --- /dev/null +++ b/inventory_stock_dashboard_odoo/views/res_config_settings_views.xml @@ -0,0 +1,53 @@ + + + + res.config.settings.view.form.inherit.inventory.dashboard + res.config.settings + + + +
    +
    +

    Dashboard

    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file