diff --git a/invoice_mini_dashboard/README.rst b/invoice_mini_dashboard/README.rst new file mode 100755 index 000000000..a8d3a475f --- /dev/null +++ b/invoice_mini_dashboard/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Invoice Mini Dashboard +====================== +This module provide an mini dashboard in both invoices and vendor bills. + +Configuration +============= +No additional configurations needed + +License +------- +General Public License, Version 3 (AGPL-3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V14) Ammu Raj, Contact : odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +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 `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/invoice_mini_dashboard/__init__.py b/invoice_mini_dashboard/__init__.py new file mode 100755 index 000000000..d9e93b8e8 --- /dev/null +++ b/invoice_mini_dashboard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import models diff --git a/invoice_mini_dashboard/__manifest__.py b/invoice_mini_dashboard/__manifest__.py new file mode 100755 index 000000000..37a487ee9 --- /dev/null +++ b/invoice_mini_dashboard/__manifest__.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +{ + 'name': 'Invoice Mini Dashboard', + 'version': '14.0.1.0.0', + 'category': 'Accounting', + 'summary': 'Mini dashboard for invoicing module', + 'description': "Module provide a mini dashboard for invoicing modules" + " with some use full details such as paid, unpaid, expected" + "revenue and state wise count of invoice", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['account'], + 'data': [ + 'views/account_move_views.xml', + 'views/assets.xml', + ], + 'qweb': [ + 'static/src/xml/invoice_bill_dashboard_templates.xml', + 'static/src/xml/invoice_dashboard_templates.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/invoice_mini_dashboard/doc/RELEASE_NOTES.md b/invoice_mini_dashboard/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..62488dc27 --- /dev/null +++ b/invoice_mini_dashboard/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 07.11.2023 +#### Version 14.0.1.0.0 +#### ADD + +- Initial commit for Invoice Mini Dashboard diff --git a/invoice_mini_dashboard/models/__init__.py b/invoice_mini_dashboard/models/__init__.py new file mode 100755 index 000000000..6100a4a93 --- /dev/null +++ b/invoice_mini_dashboard/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import account_move diff --git a/invoice_mini_dashboard/models/account_move.py b/invoice_mini_dashboard/models/account_move.py new file mode 100755 index 000000000..22a63d50b --- /dev/null +++ b/invoice_mini_dashboard/models/account_move.py @@ -0,0 +1,141 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import api, models + + +class AccountMove(models.Model): + """Class for defining function to fetch data from account move""" + _inherit = 'account.move' + + @api.model + def retrieve_out_invoice_dashboard(self): + """ This function returns the values to populate the custom dashboard in + the invoice order views. + :return: dictionary with the required values""" + result = { + 'draft': 0, + 'posted': 0, + 'cancelled': 0, + 'paid': 0, + 'not_paid_amount': 0, + 'paid_amount': 0, + 'lost_amount': 0, + 'expected_amount': 0, + 'company_currency_symbol': self.env.company.currency_id.symbol + } + account_move = self.env['account.move'] + sum_amount = 0 + sum_invoices = account_move.search([('payment_state', '=', 'paid'), + ('move_type', '=', 'out_invoice')]) + for line in sum_invoices: + sum_amount = sum_amount + line.amount_total + amount = 0 + amount_invoices = account_move.search( + [('payment_state', '=', 'not_paid'), + ('move_type', '=', 'out_invoice')]) + for line in amount_invoices: + amount = amount + line.amount_total + lost = 0 + lost_invoices = account_move.search( + [('state', '=', 'cancel'), + ('move_type', '=', 'out_invoice')]) + for line in lost_invoices: + lost = lost + line.amount_total + expected = 0 + expected_invoices = account_move.search( + [('state', '=', 'posted'), ('payment_state', '=', 'not_paid'), + ('move_type', '=', 'out_invoice')]) + for line in expected_invoices: + expected = expected + line.amount_total + result['paid_amount'] = sum_amount + result['lost_amount'] = lost + result['not_paid_amount'] = amount + result['expected_amount'] = expected + result['draft'] = account_move.search_count( + [('state', '=', 'draft'), ('move_type', '=', 'out_invoice')]) + result['posted'] = account_move.search_count( + [('state', '=', 'posted'), ('move_type', '=', 'out_invoice')]) + result['cancelled'] = account_move.search_count( + [('state', '=', 'cancel'), ('move_type', '=', 'out_invoice')]) + result['paid'] = account_move.search_count( + [('payment_state', '=', 'paid'), ('move_type', '=', 'out_invoice')]) + result['not_paid'] = account_move.search_count( + [('payment_state', '=', 'not_paid'), + ('move_type', '=', 'out_invoice')]) + return result + + @api.model + def retrieve_in_invoice_dashboard(self): + """ This function returns the values to populate the custom dashboard in + the invoice Bill views. + :return: dictionary with the required values""" + result = { + 'draft': 0, + 'posted': 0, + 'cancelled': 0, + 'paid': 0, + 'not_paid_amount': 0, + 'paid_amount': 0, + 'lost_amount': 0, + 'expected_amount': 0, + 'company_currency_symbol': self.env.company.currency_id.symbol + } + account_move = self.env['account.move'] + sum_amount = 0 + sum_invoices = account_move.search( + [('payment_state', '=', 'paid'), ('move_type', '=', 'in_invoice')]) + for line in sum_invoices: + sum_amount = sum_amount + line.amount_total + amount = 0 + amount_invoices = account_move.search( + [('payment_state', '=', 'not_paid'), + ('move_type', '=', 'in_invoice')]) + for line in amount_invoices: + amount = amount + line.amount_total + lost = 0 + lost_invoices = account_move.search( + [('state', '=', 'cancel'), ('move_type', '=', 'in_invoice')]) + for line in lost_invoices: + lost = lost + line.amount_total + expected = 0 + expected_invoices = account_move.search( + [('state', '=', 'posted'), ('payment_state', '=', 'not_paid'), + ('move_type', '=', 'in_invoice')]) + for line in expected_invoices: + expected = expected + line.amount_total + result['paid_amount'] = sum_amount + result['lost_amount'] = lost + result['not_paid_amount'] = amount + result['expected_amount'] = expected + result['draft'] = account_move.search_count( + [('state', '=', 'draft'), ('move_type', '=', 'in_invoice')]) + result['posted'] = account_move.search_count( + [('state', '=', 'posted'), ('move_type', '=', 'in_invoice')]) + result['cancelled'] = account_move.search_count( + [('state', '=', 'cancel'), ('move_type', '=', 'in_invoice')]) + result['paid'] = account_move.search_count( + [('state', '=', 'posted'),('payment_state', '=', 'paid'), + ('move_type', '=', 'in_invoice')]) + result['not_paid'] = account_move.search_count( + [('payment_state', '=', 'not_paid'), ('state', '=', 'posted'), + ('move_type', '=', 'in_invoice')]) + return result diff --git a/invoice_mini_dashboard/static/description/assets/icons/check.png b/invoice_mini_dashboard/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/check.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/chevron.png b/invoice_mini_dashboard/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/chevron.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/cogs.png b/invoice_mini_dashboard/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/cogs.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/consultation.png b/invoice_mini_dashboard/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/consultation.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/ecom-black.png b/invoice_mini_dashboard/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/ecom-black.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/education-black.png b/invoice_mini_dashboard/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/education-black.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/hotel-black.png b/invoice_mini_dashboard/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/hotel-black.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/license.png b/invoice_mini_dashboard/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/license.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/lifebuoy.png b/invoice_mini_dashboard/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/lifebuoy.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/manufacturing-black.png b/invoice_mini_dashboard/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/manufacturing-black.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/pos-black.png b/invoice_mini_dashboard/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/pos-black.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/puzzle.png b/invoice_mini_dashboard/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/puzzle.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/restaurant-black.png b/invoice_mini_dashboard/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/restaurant-black.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/service-black.png b/invoice_mini_dashboard/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/service-black.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/trading-black.png b/invoice_mini_dashboard/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/trading-black.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/training.png b/invoice_mini_dashboard/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/training.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/update.png b/invoice_mini_dashboard/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/update.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/user.png b/invoice_mini_dashboard/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/user.png differ diff --git a/invoice_mini_dashboard/static/description/assets/icons/wrench.png b/invoice_mini_dashboard/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/icons/wrench.png differ diff --git a/invoice_mini_dashboard/static/description/assets/misc/categories.png b/invoice_mini_dashboard/static/description/assets/misc/categories.png new file mode 100755 index 000000000..bedf1e0b1 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/misc/categories.png differ diff --git a/invoice_mini_dashboard/static/description/assets/misc/check-box.png b/invoice_mini_dashboard/static/description/assets/misc/check-box.png new file mode 100755 index 000000000..42caf24b9 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/misc/check-box.png differ diff --git a/invoice_mini_dashboard/static/description/assets/misc/compass.png b/invoice_mini_dashboard/static/description/assets/misc/compass.png new file mode 100755 index 000000000..d5fed8faa Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/misc/compass.png differ diff --git a/invoice_mini_dashboard/static/description/assets/misc/corporate.png b/invoice_mini_dashboard/static/description/assets/misc/corporate.png new file mode 100755 index 000000000..2eb13edbf Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/misc/corporate.png differ diff --git a/invoice_mini_dashboard/static/description/assets/misc/customer-support.png b/invoice_mini_dashboard/static/description/assets/misc/customer-support.png new file mode 100755 index 000000000..79efc72ed Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/misc/customer-support.png differ diff --git a/invoice_mini_dashboard/static/description/assets/misc/cybrosys-logo.png b/invoice_mini_dashboard/static/description/assets/misc/cybrosys-logo.png new file mode 100755 index 000000000..cc3cc0ccf Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/misc/cybrosys-logo.png differ diff --git a/invoice_mini_dashboard/static/description/assets/misc/features.png b/invoice_mini_dashboard/static/description/assets/misc/features.png new file mode 100755 index 000000000..b41769f77 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/misc/features.png differ diff --git a/invoice_mini_dashboard/static/description/assets/misc/logo.png b/invoice_mini_dashboard/static/description/assets/misc/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/misc/logo.png differ diff --git a/invoice_mini_dashboard/static/description/assets/misc/pictures.png b/invoice_mini_dashboard/static/description/assets/misc/pictures.png new file mode 100755 index 000000000..56d255fe9 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/misc/pictures.png differ diff --git a/invoice_mini_dashboard/static/description/assets/misc/pie-chart.png b/invoice_mini_dashboard/static/description/assets/misc/pie-chart.png new file mode 100755 index 000000000..426e05244 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/misc/pie-chart.png differ diff --git a/invoice_mini_dashboard/static/description/assets/misc/right-arrow.png b/invoice_mini_dashboard/static/description/assets/misc/right-arrow.png new file mode 100755 index 000000000..730984a06 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/misc/right-arrow.png differ diff --git a/invoice_mini_dashboard/static/description/assets/misc/star.png b/invoice_mini_dashboard/static/description/assets/misc/star.png new file mode 100755 index 000000000..2eb9ab29f Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/misc/star.png differ diff --git a/invoice_mini_dashboard/static/description/assets/misc/support.png b/invoice_mini_dashboard/static/description/assets/misc/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/misc/support.png differ diff --git a/invoice_mini_dashboard/static/description/assets/misc/whatsapp.png b/invoice_mini_dashboard/static/description/assets/misc/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/misc/whatsapp.png differ diff --git a/invoice_mini_dashboard/static/description/assets/modules/1.png b/invoice_mini_dashboard/static/description/assets/modules/1.png new file mode 100644 index 000000000..713d6dee5 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/modules/1.png differ diff --git a/invoice_mini_dashboard/static/description/assets/modules/2.png b/invoice_mini_dashboard/static/description/assets/modules/2.png new file mode 100644 index 000000000..e29d7e316 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/modules/2.png differ diff --git a/invoice_mini_dashboard/static/description/assets/modules/3.png b/invoice_mini_dashboard/static/description/assets/modules/3.png new file mode 100644 index 000000000..a5435d94b Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/modules/3.png differ diff --git a/invoice_mini_dashboard/static/description/assets/modules/4.png b/invoice_mini_dashboard/static/description/assets/modules/4.png new file mode 100644 index 000000000..6f28da108 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/modules/4.png differ diff --git a/invoice_mini_dashboard/static/description/assets/modules/5.png b/invoice_mini_dashboard/static/description/assets/modules/5.png new file mode 100644 index 000000000..cbf8e2131 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/modules/5.png differ diff --git a/invoice_mini_dashboard/static/description/assets/modules/6.png b/invoice_mini_dashboard/static/description/assets/modules/6.png new file mode 100644 index 000000000..644d4fdf4 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/modules/6.png differ diff --git a/invoice_mini_dashboard/static/description/assets/screenshots/11.png b/invoice_mini_dashboard/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..4b17a7ef2 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/screenshots/11.png differ diff --git a/invoice_mini_dashboard/static/description/assets/screenshots/12.png b/invoice_mini_dashboard/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..879857b6d Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/screenshots/12.png differ diff --git a/invoice_mini_dashboard/static/description/assets/screenshots/13.png b/invoice_mini_dashboard/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..0a9aec442 Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/screenshots/13.png differ diff --git a/invoice_mini_dashboard/static/description/assets/screenshots/hero.gif b/invoice_mini_dashboard/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..fefbb751b Binary files /dev/null and b/invoice_mini_dashboard/static/description/assets/screenshots/hero.gif differ diff --git a/invoice_mini_dashboard/static/description/banner.png b/invoice_mini_dashboard/static/description/banner.png new file mode 100644 index 000000000..22b55e3a3 Binary files /dev/null and b/invoice_mini_dashboard/static/description/banner.png differ diff --git a/invoice_mini_dashboard/static/description/icon.png b/invoice_mini_dashboard/static/description/icon.png new file mode 100644 index 000000000..7ef5e596f Binary files /dev/null and b/invoice_mini_dashboard/static/description/icon.png differ diff --git a/invoice_mini_dashboard/static/description/index.html b/invoice_mini_dashboard/static/description/index.html new file mode 100755 index 000000000..f2d8ba159 --- /dev/null +++ b/invoice_mini_dashboard/static/description/index.html @@ -0,0 +1,569 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Invoice Mini Dashboard

+

Mini Dashboard for + Invoice Module

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This module gives a mini dashboard view for invoicing +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Community & + Enterprise Support. +
+
+ + Dashboard in customer invoices +
+
+ + Dashboard in vendor bills +
+
+ + Automated filtering +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

Dashboard in customer invoices +

+

Dashboard containing number of invoices in different state and payment status.

+ +
+
+

Dashboard in vendor bills +

+

Dashboard containing number of bills in different state and payment status.

+ +
+
+

Filtering +

+

filter list view through button press in dashboard.

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

+ Related + Products +

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

Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + + + + +
+
+ +
+

Our + Industries +

+
+
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

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

Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/invoice_mini_dashboard/static/src/js/invoice_bill_dashboard.js b/invoice_mini_dashboard/static/src/js/invoice_bill_dashboard.js new file mode 100644 index 000000000..3184bdad4 --- /dev/null +++ b/invoice_mini_dashboard/static/src/js/invoice_bill_dashboard.js @@ -0,0 +1,137 @@ +odoo.define('invoice_mini_dashboard.bill', function(require) { + "use strict"; + /** + * This file defines the Invoice Dashboard view (alongside its renderer, + * model and controller). This Dashboard is added to the top of Bill list + */ + var core = require('web.core'); + var ListController = require('web.ListController'); + var ListModel = require('web.ListModel'); + var ListRenderer = require('web.ListRenderer'); + var ListView = require('web.ListView'); + var SampleServer = require('web.SampleServer'); + var view_registry = require('web.view_registry'); + const session = require('web.session'); + var QWeb = core.qweb; + // Add mock of method 'retrieve_in_invoice_dashboard' in SampleServer, so + // that we can have the sample data in empty bill list view + let dashboardValues; + SampleServer.mockRegistry.add('account.move/retrieve_in_invoice_dashboard', () => { + return Object.assign({}, dashboardValues); + }); + // Extended the ListRenderer + var InvoiceBillListDashboardRenderer = ListRenderer.extend({ + events: _.extend({}, ListRenderer.prototype.events, { + 'click .o_dashboard_action': '_onDashboardActionClicked', + }), + /** + * @override _renderView for rendering the template + */ + _renderView: function() { + var self = this; + return this._super.apply(this, arguments).then(function() { + var values = self.state.dashboardValues; + var invoice_dashboard = QWeb.render('account.AccountBillDashboardBill', { + values: values, + }); + self.$el.prepend(invoice_dashboard); + }); + }, + /** + * Action while clicking the dashboard + */ + _onDashboardActionClicked: function(e) { + e.preventDefault(); + var $action = $(e.currentTarget); + this.trigger_up('dashboard_open_action', { + action_name: "account.action_move_in_invoice_type", + action_context: $action.attr('context'), + }); + }, + }); + + var InvoiceBillListDashboardModel = ListModel.extend({ + /** + * @override init function + */ + init: function() { + this.dashboardValues = {}; + this._super.apply(this, arguments); + }, + + /** + * @override get function + */ + __get: function(localID) { + var result = this._super.apply(this, arguments); + if (_.isObject(result)) { + result.dashboardValues = this.dashboardValues[localID]; + } + return result; + }, + /** + * @override load function + * @returns _loadDashboard() + */ + __load: function() { + return this._loadDashboard(this._super.apply(this, arguments)); + }, + /** + * @override __reload function + * @returns _loadDashboard() + */ + __reload: function() { + return this._loadDashboard(this._super.apply(this, arguments)); + }, + + /** + * @param {Promise} super_def a promise that resolves with a dataPoint id + * @returns {Promise -> string} resolves to the dataPoint id + */ + _loadDashboard: function(super_def) { + var self = this; + var dashboard_def = this._rpc({ + model: 'account.move', + method: 'retrieve_in_invoice_dashboard', + context: session.user_context, + }); + return Promise.all([super_def, dashboard_def]).then(function(results) { + var id = results[0]; + dashboardValues = results[1]; + self.dashboardValues[id] = dashboardValues; + return id; + }); + }, + }); + + // Extended the ListController + var InvoiceBillListDashboardController = ListController.extend({ + custom_events: _.extend({}, ListController.prototype.custom_events, { + dashboard_open_action: '_onDashboardOpenAction', + }), + /** + * Function for opening the dashboard + */ + _onDashboardOpenAction: function(e) { + return this.do_action(e.data.action_name, { + additional_context: JSON.parse(e.data.action_context), + clear_breadcrumbs: true, + }); + }, + }); + + // Extended ListView + var InvoiceBillListDashboardView = ListView.extend({ + config: _.extend({}, ListView.prototype.config, { + Model: InvoiceBillListDashboardModel, + Renderer: InvoiceBillListDashboardRenderer, + Controller: InvoiceBillListDashboardController, + }), + }); + view_registry.add('bill_dashboard_list', InvoiceBillListDashboardView); + return { + InvoiceBillListDashboardModel: InvoiceBillListDashboardModel, + InvoiceBillListDashboardRenderer: InvoiceBillListDashboardRenderer, + InvoiceBillListDashboardController: InvoiceBillListDashboardController, + }; +}); diff --git a/invoice_mini_dashboard/static/src/js/invoice_dashboard.js b/invoice_mini_dashboard/static/src/js/invoice_dashboard.js new file mode 100644 index 000000000..90e439f8c --- /dev/null +++ b/invoice_mini_dashboard/static/src/js/invoice_dashboard.js @@ -0,0 +1,137 @@ +odoo.define('invoice_mini_dashboard.invoice', function(require) { + "use strict"; + /** + * This file defines the Invoice Dashboard view (alongside its renderer, model + * and controller). This Dashboard is added to the top of Invoice list + */ + var core = require('web.core'); + var ListController = require('web.ListController'); + var ListModel = require('web.ListModel'); + var ListRenderer = require('web.ListRenderer'); + var ListView = require('web.ListView'); + var SampleServer = require('web.SampleServer'); + var view_registry = require('web.view_registry'); + const session = require('web.session'); + var QWeb = core.qweb; + // Add mock of method 'retrieve_out_invoice_dashboard' in SampleServer,so + // that we can have the sample data in empty invoice list view + let dashboardValues; + SampleServer.mockRegistry.add('account.move/retrieve_out_invoice_dashboard', () => { + return Object.assign({}, dashboardValues); + }); + // Extended the ListRenderer + var InvoiceListDashboardRenderer = ListRenderer.extend({ + events: _.extend({}, ListRenderer.prototype.events, { + 'click .o_dashboard_action': '_onDashboardActionClicked', + }), + /** + * @override _renderView() for rendering the template + */ + _renderView: function() { + var self = this; + return this._super.apply(this, arguments).then(function() { + var values = self.state.dashboardValues; + var invoice_dashboard = QWeb.render('account.AccountDashboardBill', { + values: values, + }); + self.$el.prepend(invoice_dashboard); + }); + }, + /** + * Action when clicking the dashboard + */ + _onDashboardActionClicked: function(e) { + e.preventDefault(); + var $action = $(e.currentTarget); + this.trigger_up('dashboard_open_action', { + action_name: "account.action_move_out_invoice_type", + action_context: $action.attr('context'), + }); + }, + }); + + // Extended the ListModel + var InvoiceListDashboardModel = ListModel.extend({ + /** + * @override init function + */ + init: function() { + this.dashboardValues = {}; + this._super.apply(this, arguments); + }, + /** + * @override __get function + */ + __get: function(localID) { + var result = this._super.apply(this, arguments); + if (_.isObject(result)) { + result.dashboardValues = this.dashboardValues[localID]; + } + return result; + }, + /** + * @override load function + * @returns _loadDashboard() + */ + __load: function() { + return this._loadDashboard(this._super.apply(this, arguments)); + }, + /** + * @override __reload function + * @returns _loadDashboard() + */ + __reload: function() { + return this._loadDashboard(this._super.apply(this, arguments)); + }, + + /** + * @param {Promise} super_def a promise that resolves with a dataPoint id + * @returns {Promise -> string} resolves to the dataPoint id + */ + _loadDashboard: function(super_def) { + var self = this; + var dashboard_def = this._rpc({ + model: 'account.move', + method: 'retrieve_out_invoice_dashboard', + context: session.user_context, + }); + return Promise.all([super_def, dashboard_def]).then(function(results) { + var id = results[0]; + dashboardValues = results[1]; + self.dashboardValues[id] = dashboardValues; + return id; + }); + }, + }); + + // Extended the ListController + var InvoiceListDashboardController = ListController.extend({ + custom_events: _.extend({}, ListController.prototype.custom_events, { + dashboard_open_action: '_onDashboardOpenAction', + }), + /** + * Function for opening the dashboard + */ + _onDashboardOpenAction: function(e) { + return this.do_action(e.data.action_name, { + additional_context: JSON.parse(e.data.action_context), + clear_breadcrumbs: true, + }); + }, + }); + + //Extended the ListView + var InvoiceListDashboardView = ListView.extend({ + config: _.extend({}, ListView.prototype.config, { + Model: InvoiceListDashboardModel, + Renderer: InvoiceListDashboardRenderer, + Controller: InvoiceListDashboardController, + }), + }); + view_registry.add('invoice_dashboard_list', InvoiceListDashboardView); + return { + InvoiceListDashboardModel: InvoiceListDashboardModel, + InvoiceListDashboardRenderer: InvoiceListDashboardRenderer, + InvoiceListDashboardController: InvoiceListDashboardController, + }; +}); diff --git a/invoice_mini_dashboard/static/src/scss/invoice.scss b/invoice_mini_dashboard/static/src/scss/invoice.scss new file mode 100644 index 000000000..f825039ce --- /dev/null +++ b/invoice_mini_dashboard/static/src/scss/invoice.scss @@ -0,0 +1,54 @@ +.o_invoice_dashboard { + flex: 1 0 100%; + padding: 30px 30px 48px 30px; + + background-color: $o-view-background-color; + position: relative; + max-width:100%; + + .row { + margin-right: 0; + margin-left: 0; + } + + .o_dashboard_action { + cursor: pointer; + } + + .table { + margin-bottom: 0; + table-layout: fixed; + border-spacing: 10px 0px; + border-collapse: separate; + font-size: 13px; + + > thead, tbody { + & > tr > td { + text-align: center; + width: 80%; + height: 60px; + vertical-align: middle; + border-top: 1px solid $o-view-background-color; + background-color: $o-brand-lightsecondary; + + &.o_text{ + background-color: $o-view-background-color; + } + + > a:hover { + text-decoration: none; + } + + &.o_main { + background-color: $o-brand-primary; + &:hover { + background-color: darken($o-brand-primary, 10%); + } + > a { + color: white; + } + } + } + } + } +} diff --git a/invoice_mini_dashboard/static/src/xml/invoice_bill_dashboard_templates.xml b/invoice_mini_dashboard/static/src/xml/invoice_bill_dashboard_templates.xml new file mode 100644 index 000000000..f1cf20839 --- /dev/null +++ b/invoice_mini_dashboard/static/src/xml/invoice_bill_dashboard_templates.xml @@ -0,0 +1,128 @@ + + + + +
+
+
+ + + + + + + + + + + + + + + + + +
+
All Bills
+
+ + +
Draft +
+
+ + +
Posted +
+
+ + +
Cancelled +
+
+
+
+ + +
Paid +
+
+ + +
Not Paid +
+
+
+
+ + + + + + + + + + + + + + + + + + + +
Paid Amount ( + + ) + + + + + Unpaid Amount ( + + ) + + + + +
Lost Amount ( + + ) + + + + + Expected Amount ( + + ) + + + + +
+
+
+
+
+
diff --git a/invoice_mini_dashboard/static/src/xml/invoice_dashboard_templates.xml b/invoice_mini_dashboard/static/src/xml/invoice_dashboard_templates.xml new file mode 100644 index 000000000..507ea3672 --- /dev/null +++ b/invoice_mini_dashboard/static/src/xml/invoice_dashboard_templates.xml @@ -0,0 +1,122 @@ + + + + +
+
+
+ + + + + + + + + + + + + + + + +
+
All Invoices
+
+ + +
Draft +
+
+ + +
Posted +
+
+ + +
Cancelled +
+
+
+
+ + +
Paid +
+
+ + +
Not Paid +
+
+
+
+ + + + + + + + + + + + + + + + + +
Paid Amount ( + + ) + + + + + Unpaid Amount ( + + ) + + + + +
Lost Amount ( + + ) + + + + + Expected Amount ( + + ) + + + + +
+
+
+
+
+
diff --git a/invoice_mini_dashboard/views/account_move_views.xml b/invoice_mini_dashboard/views/account_move_views.xml new file mode 100755 index 000000000..f12a57b25 --- /dev/null +++ b/invoice_mini_dashboard/views/account_move_views.xml @@ -0,0 +1,29 @@ + + + + + + account.move.out.invoice.view.tree.inherit.invoice.mini.dashboard + + account.move + + + + invoice_dashboard_list + + + + + + + account.move.in.invoice.view.tree.inherit.invoice.mini.dashboard + + account.move + + + + bill_dashboard_list + + + + diff --git a/invoice_mini_dashboard/views/assets.xml b/invoice_mini_dashboard/views/assets.xml new file mode 100644 index 000000000..5c6b005b1 --- /dev/null +++ b/invoice_mini_dashboard/views/assets.xml @@ -0,0 +1,15 @@ + + + +