diff --git a/progress_bar_widget/README.rst b/progress_bar_widget/README.rst new file mode 100644 index 000000000..d6962a217 --- /dev/null +++ b/progress_bar_widget/README.rst @@ -0,0 +1,59 @@ +.. 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 + +PROGRESS BAR WIDGET +==================== +New Progress Bar Widget for Odoo 16. + +Credits +------- +* Cybrosys Techno Solutions + +Usage +===== +You need to declare a float field. + progress = fields.Float(string='Progress', default=0.0) + +In the view declaration, + ... + +
+ ... + + ... + +
+ ... + +Installation +============ + - https://www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Company +------- +* Cybrosys Techno Solutions + +Contacts +-------- +* Mail Contact : odoo@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 +========== +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ \ No newline at end of file diff --git a/progress_bar_widget/__init__.py b/progress_bar_widget/__init__.py new file mode 100644 index 000000000..821573445 --- /dev/null +++ b/progress_bar_widget/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# +# This program is free software: you can modify +# it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE (LGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### diff --git a/progress_bar_widget/__manifest__.py b/progress_bar_widget/__manifest__.py new file mode 100644 index 000000000..cc5d7dd68 --- /dev/null +++ b/progress_bar_widget/__manifest__.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# +# This program is free software: you can modify +# it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE (LGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### +{ + 'name': "Progress Bar Widget", + 'description': """Progress Bar Widget For Odoo 16""", + 'summary': "Progress Bar Widget helps to add progress bar view fo float fields", + 'category': 'Extra Tools', + 'version': '16.0.1.0.0', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['web'], + 'assets': { + 'web.assets_backend': [ + '/progress_bar_widget/static/src/css/progress_bar_widget.css', + '/progress_bar_widget/static/src/js/progress_bar_widget.js', + ] + }, + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/progress_bar_widget/doc/RELEASE_NOTES.md b/progress_bar_widget/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..d06d7fd9c --- /dev/null +++ b/progress_bar_widget/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 23.05.2024 +#### Version 16.0.1.0.0 +##### ADD + +- Initial commit for Progress Bar Widget. diff --git a/progress_bar_widget/static/description/assets/icons/check.png b/progress_bar_widget/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/check.png differ diff --git a/progress_bar_widget/static/description/assets/icons/chevron.png b/progress_bar_widget/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/chevron.png differ diff --git a/progress_bar_widget/static/description/assets/icons/cogs.png b/progress_bar_widget/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/cogs.png differ diff --git a/progress_bar_widget/static/description/assets/icons/consultation.png b/progress_bar_widget/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/consultation.png differ diff --git a/progress_bar_widget/static/description/assets/icons/ecom-black.png b/progress_bar_widget/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/ecom-black.png differ diff --git a/progress_bar_widget/static/description/assets/icons/education-black.png b/progress_bar_widget/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/education-black.png differ diff --git a/progress_bar_widget/static/description/assets/icons/hotel-black.png b/progress_bar_widget/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/hotel-black.png differ diff --git a/progress_bar_widget/static/description/assets/icons/license.png b/progress_bar_widget/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/license.png differ diff --git a/progress_bar_widget/static/description/assets/icons/lifebuoy.png b/progress_bar_widget/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/lifebuoy.png differ diff --git a/progress_bar_widget/static/description/assets/icons/manufacturing-black.png b/progress_bar_widget/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/manufacturing-black.png differ diff --git a/progress_bar_widget/static/description/assets/icons/pos-black.png b/progress_bar_widget/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/pos-black.png differ diff --git a/progress_bar_widget/static/description/assets/icons/puzzle.png b/progress_bar_widget/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/puzzle.png differ diff --git a/progress_bar_widget/static/description/assets/icons/restaurant-black.png b/progress_bar_widget/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/restaurant-black.png differ diff --git a/progress_bar_widget/static/description/assets/icons/service-black.png b/progress_bar_widget/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/service-black.png differ diff --git a/progress_bar_widget/static/description/assets/icons/trading-black.png b/progress_bar_widget/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/trading-black.png differ diff --git a/progress_bar_widget/static/description/assets/icons/training.png b/progress_bar_widget/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/training.png differ diff --git a/progress_bar_widget/static/description/assets/icons/update.png b/progress_bar_widget/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/update.png differ diff --git a/progress_bar_widget/static/description/assets/icons/user.png b/progress_bar_widget/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/user.png differ diff --git a/progress_bar_widget/static/description/assets/icons/wrench.png b/progress_bar_widget/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/progress_bar_widget/static/description/assets/icons/wrench.png differ diff --git a/progress_bar_widget/static/description/assets/misc/categories.png b/progress_bar_widget/static/description/assets/misc/categories.png new file mode 100755 index 000000000..bedf1e0b1 Binary files /dev/null and b/progress_bar_widget/static/description/assets/misc/categories.png differ diff --git a/progress_bar_widget/static/description/assets/misc/check-box.png b/progress_bar_widget/static/description/assets/misc/check-box.png new file mode 100755 index 000000000..42caf24b9 Binary files /dev/null and b/progress_bar_widget/static/description/assets/misc/check-box.png differ diff --git a/progress_bar_widget/static/description/assets/misc/compass.png b/progress_bar_widget/static/description/assets/misc/compass.png new file mode 100755 index 000000000..d5fed8faa Binary files /dev/null and b/progress_bar_widget/static/description/assets/misc/compass.png differ diff --git a/progress_bar_widget/static/description/assets/misc/corporate.png b/progress_bar_widget/static/description/assets/misc/corporate.png new file mode 100755 index 000000000..2eb13edbf Binary files /dev/null and b/progress_bar_widget/static/description/assets/misc/corporate.png differ diff --git a/progress_bar_widget/static/description/assets/misc/customer-support.png b/progress_bar_widget/static/description/assets/misc/customer-support.png new file mode 100755 index 000000000..79efc72ed Binary files /dev/null and b/progress_bar_widget/static/description/assets/misc/customer-support.png differ diff --git a/progress_bar_widget/static/description/assets/misc/cybrosys-logo.png b/progress_bar_widget/static/description/assets/misc/cybrosys-logo.png new file mode 100755 index 000000000..cc3cc0ccf Binary files /dev/null and b/progress_bar_widget/static/description/assets/misc/cybrosys-logo.png differ diff --git a/progress_bar_widget/static/description/assets/misc/features.png b/progress_bar_widget/static/description/assets/misc/features.png new file mode 100755 index 000000000..b41769f77 Binary files /dev/null and b/progress_bar_widget/static/description/assets/misc/features.png differ diff --git a/progress_bar_widget/static/description/assets/misc/logo.png b/progress_bar_widget/static/description/assets/misc/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/progress_bar_widget/static/description/assets/misc/logo.png differ diff --git a/progress_bar_widget/static/description/assets/misc/pictures.png b/progress_bar_widget/static/description/assets/misc/pictures.png new file mode 100755 index 000000000..56d255fe9 Binary files /dev/null and b/progress_bar_widget/static/description/assets/misc/pictures.png differ diff --git a/progress_bar_widget/static/description/assets/misc/pie-chart.png b/progress_bar_widget/static/description/assets/misc/pie-chart.png new file mode 100755 index 000000000..426e05244 Binary files /dev/null and b/progress_bar_widget/static/description/assets/misc/pie-chart.png differ diff --git a/progress_bar_widget/static/description/assets/misc/right-arrow.png b/progress_bar_widget/static/description/assets/misc/right-arrow.png new file mode 100755 index 000000000..730984a06 Binary files /dev/null and b/progress_bar_widget/static/description/assets/misc/right-arrow.png differ diff --git a/progress_bar_widget/static/description/assets/misc/star.png b/progress_bar_widget/static/description/assets/misc/star.png new file mode 100755 index 000000000..2eb9ab29f Binary files /dev/null and b/progress_bar_widget/static/description/assets/misc/star.png differ diff --git a/progress_bar_widget/static/description/assets/misc/support.png b/progress_bar_widget/static/description/assets/misc/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/progress_bar_widget/static/description/assets/misc/support.png differ diff --git a/progress_bar_widget/static/description/assets/misc/whatsapp.png b/progress_bar_widget/static/description/assets/misc/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/progress_bar_widget/static/description/assets/misc/whatsapp.png differ diff --git a/progress_bar_widget/static/description/assets/modules/1.png b/progress_bar_widget/static/description/assets/modules/1.png new file mode 100644 index 000000000..bce945d1e Binary files /dev/null and b/progress_bar_widget/static/description/assets/modules/1.png differ diff --git a/progress_bar_widget/static/description/assets/modules/2.png b/progress_bar_widget/static/description/assets/modules/2.png new file mode 100755 index 000000000..cbcc848e2 Binary files /dev/null and b/progress_bar_widget/static/description/assets/modules/2.png differ diff --git a/progress_bar_widget/static/description/assets/modules/3.png b/progress_bar_widget/static/description/assets/modules/3.png new file mode 100644 index 000000000..e894393ef Binary files /dev/null and b/progress_bar_widget/static/description/assets/modules/3.png differ diff --git a/progress_bar_widget/static/description/assets/modules/4.png b/progress_bar_widget/static/description/assets/modules/4.png new file mode 100755 index 000000000..83e33258b Binary files /dev/null and b/progress_bar_widget/static/description/assets/modules/4.png differ diff --git a/progress_bar_widget/static/description/assets/modules/5.gif b/progress_bar_widget/static/description/assets/modules/5.gif new file mode 100755 index 000000000..beb106101 Binary files /dev/null and b/progress_bar_widget/static/description/assets/modules/5.gif differ diff --git a/progress_bar_widget/static/description/assets/modules/6.png b/progress_bar_widget/static/description/assets/modules/6.png new file mode 100644 index 000000000..eb3f8652f Binary files /dev/null and b/progress_bar_widget/static/description/assets/modules/6.png differ diff --git a/progress_bar_widget/static/description/assets/screenshots/hero.gif b/progress_bar_widget/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..9dde94bb0 Binary files /dev/null and b/progress_bar_widget/static/description/assets/screenshots/hero.gif differ diff --git a/progress_bar_widget/static/description/assets/screenshots/progress2.png b/progress_bar_widget/static/description/assets/screenshots/progress2.png new file mode 100644 index 000000000..7ca2a838b Binary files /dev/null and b/progress_bar_widget/static/description/assets/screenshots/progress2.png differ diff --git a/progress_bar_widget/static/description/assets/screenshots/widget defenition.png b/progress_bar_widget/static/description/assets/screenshots/widget defenition.png new file mode 100644 index 000000000..bc0ca83be Binary files /dev/null and b/progress_bar_widget/static/description/assets/screenshots/widget defenition.png differ diff --git a/progress_bar_widget/static/description/banner.png b/progress_bar_widget/static/description/banner.png new file mode 100644 index 000000000..49c05475f Binary files /dev/null and b/progress_bar_widget/static/description/banner.png differ diff --git a/progress_bar_widget/static/description/icon.png b/progress_bar_widget/static/description/icon.png new file mode 100644 index 000000000..5d95ab357 Binary files /dev/null and b/progress_bar_widget/static/description/icon.png differ diff --git a/progress_bar_widget/static/description/index.html b/progress_bar_widget/static/description/index.html new file mode 100755 index 000000000..4c0e1fc59 --- /dev/null +++ b/progress_bar_widget/static/description/index.html @@ -0,0 +1,527 @@ +
+ +
+ +
+
+ Enterprise +
+
+ Community +
+
+ Odoo sh +
+
+
+ +
+
+
+ +

+ Progress Bar Widget +

+

New progress bar + widget for Odoo 16

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This module creates a new widget for the progressbar. + Users can use widget="progress_bar_widget" for applying this widget. Also, able to adjust the value in + progress bar.It works with the float fields. +
+ +
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Widget for the progressbar. +
+
+ + Use + widget="progress_bar_widget" for applying widget for float field +
+
+
+
+ + Adjustable progress bar. +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+
+

Add widget="progress_bar_widget" code into a field.

+ +
+ +
+

New Progressbar view.

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

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

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/progress_bar_widget/static/src/css/progress_bar_widget.css b/progress_bar_widget/static/src/css/progress_bar_widget.css new file mode 100644 index 000000000..fd75bee59 --- /dev/null +++ b/progress_bar_widget/static/src/css/progress_bar_widget.css @@ -0,0 +1,14 @@ +.progress_bar .pro-bar { + background: hsl(0, 0%, 97%); + box-shadow: 0 1px 2px hsla(0, 0%, 0%, 0.1) inset; + height: 4px; + width: 200px; + margin-bottom: 15px; + margin-top: 10px; + position: relative; +} +.progress_bar .progress_number { + float: right; + margin-top: 2px; + margin-right: 74px; +} \ No newline at end of file diff --git a/progress_bar_widget/static/src/js/progress_bar_widget.js b/progress_bar_widget/static/src/js/progress_bar_widget.js new file mode 100644 index 000000000..a37925921 --- /dev/null +++ b/progress_bar_widget/static/src/js/progress_bar_widget.js @@ -0,0 +1,62 @@ +/** @odoo-module **/ +import { FloatField } from '@web/views/fields/float/float_field'; +import { registry } from "@web/core/registry"; +const { onRendered, useRef, onMounted } = owl; +import { useService } from "@web/core/utils/hooks"; +import { _lt } from "@web/core/l10n/translation"; +import { xml, Component, useState } from "@odoo/owl"; +import AbstractField from 'web.AbstractField'; +import fieldRegistry from 'web.field_registry'; +/** Extends FloatField to create ProgressBarWidget to create a widget for float fields **/ +export class ProgressBarWidget extends FloatField { + setup() { + super.setup(); + this.state = useState({ + range: this.props.value || '', + }); + this.orm = useService("orm"); + const Pro_Ref = useRef("Progress-Ref"); + onMounted(() => { + this.ref = Pro_Ref.el + this.UpdateBar() + }); + } + /** Updates the percentage based on value in bar **/ + UpdateBar() { + var value = this.state.range; + var max_value = 100; + value = value || 0; + var widthComplete; + if (value <= max_value) { + widthComplete = parseInt(value/max_value * 100); + }else{ + widthComplete = 100; + } + $(this.ref.querySelector('.progress_number')).text(widthComplete.toString() + '%'); + } + /** Change function of progress **/ + async _onChangeRange(value){ + var field = this.props.name + console.log("this.props.name", this.props.name) + this.props.value = value + this.state.range = value + this.UpdateBar() + await this.orm.write(this.env.model.root.resModel, [this.env.model.root.data.id], { + [field]: this.state.range, + }) + } +} +ProgressBarWidget.supportedTypes = ["float"]; +ProgressBarWidget.template = xml +`
+
+
+ +
+
+ +
+
+
` +registry.category("fields").add("progress_bar_widget", ProgressBarWidget);