diff --git a/pos_weight_manual/README.rst b/pos_weight_manual/README.rst new file mode 100644 index 000000000..e08089a55 --- /dev/null +++ b/pos_weight_manual/README.rst @@ -0,0 +1,38 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +POS Manual Weight +================= +This module will help you to add product weight manually using weigh scale screen without a weigh machine. + +Configuration +============= +* No additional configurations needed. + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: (V17) Vishnu Kp, +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 +========== +.. 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/pos_weight_manual/__init__.py b/pos_weight_manual/__init__.py new file mode 100644 index 000000000..c7d7edd74 --- /dev/null +++ b/pos_weight_manual/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu KP (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/pos_weight_manual/__manifest__.py b/pos_weight_manual/__manifest__.py new file mode 100644 index 000000000..37b0aa60f --- /dev/null +++ b/pos_weight_manual/__manifest__.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu KP (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': 'POS Manual Weight', + 'version': '17.0.1.0.0', + 'category': 'Point of Sale', + 'summary': 'Add Manual Weight for products in POS.', + 'description': """This module will help you to add product weight manually + using weigh scale screen without a weigh machine.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['point_of_sale'], + 'data': [ + 'views/res_config_settings_views.xml', + ], + 'assets': { + 'point_of_sale._assets_pos': [ + 'pos_weight_manual/static/src/js/Screens/ProductScreen/ProductScreen.js', + 'pos_weight_manual/static/src/js/Screens/ScaleScreen/ScaleScreeen.js', + 'pos_weight_manual/static/src/xml/**/*', + 'pos_weight_manual/static/src/css/**/*', + ] + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/pos_weight_manual/doc/RELEASE_NOTES.md b/pos_weight_manual/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..9e4d9bc76 --- /dev/null +++ b/pos_weight_manual/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 06.03.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial Commit for POS Manual Weight diff --git a/pos_weight_manual/models/__init__.py b/pos_weight_manual/models/__init__.py new file mode 100644 index 000000000..433022d8c --- /dev/null +++ b/pos_weight_manual/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu KP (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 res_config_settings +from . import pos_session diff --git a/pos_weight_manual/models/pos_session.py b/pos_weight_manual/models/pos_session.py new file mode 100644 index 000000000..79c6a3c9d --- /dev/null +++ b/pos_weight_manual/models/pos_session.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu KP (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 fields, models + + +class PosConf(models.Model): + """Class for POS Configuration""" + _inherit = 'pos.config' + + is_allow_manual_weight = fields.Boolean(string='Allow Manual Weight', + help='If enabled, it will allow you' + 'to add weight manually on POS' + ' Screen if a product has a ' + 'price per weight set.' + ) diff --git a/pos_weight_manual/models/res_config_settings.py b/pos_weight_manual/models/res_config_settings.py new file mode 100644 index 000000000..8f6445faa --- /dev/null +++ b/pos_weight_manual/models/res_config_settings.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu KP (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 fields, models + + +class ResConfigSettings(models.TransientModel): + """Inherits the ConfigSettings class for Adding the fields""" + _inherit = 'res.config.settings' + + pos_is_allow_manual_weight = fields.Boolean( + string='Allow Manual Weight', readonly=False, + related='pos_config_id.is_allow_manual_weight') + diff --git a/pos_weight_manual/static/description/assets/icons/capture (1).png b/pos_weight_manual/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/capture (1).png differ diff --git a/pos_weight_manual/static/description/assets/icons/check.png b/pos_weight_manual/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/check.png differ diff --git a/pos_weight_manual/static/description/assets/icons/chevron.png b/pos_weight_manual/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/chevron.png differ diff --git a/pos_weight_manual/static/description/assets/icons/cogs.png b/pos_weight_manual/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/cogs.png differ diff --git a/pos_weight_manual/static/description/assets/icons/consultation.png b/pos_weight_manual/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/consultation.png differ diff --git a/pos_weight_manual/static/description/assets/icons/ecom-black.png b/pos_weight_manual/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/ecom-black.png differ diff --git a/pos_weight_manual/static/description/assets/icons/education-black.png b/pos_weight_manual/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/education-black.png differ diff --git a/pos_weight_manual/static/description/assets/icons/hotel-black.png b/pos_weight_manual/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/hotel-black.png differ diff --git a/pos_weight_manual/static/description/assets/icons/img.png b/pos_weight_manual/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/img.png differ diff --git a/pos_weight_manual/static/description/assets/icons/license.png b/pos_weight_manual/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/license.png differ diff --git a/pos_weight_manual/static/description/assets/icons/lifebuoy.png b/pos_weight_manual/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_weight_manual/static/description/assets/icons/manufacturing-black.png b/pos_weight_manual/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_weight_manual/static/description/assets/icons/photo-capture.png b/pos_weight_manual/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/photo-capture.png differ diff --git a/pos_weight_manual/static/description/assets/icons/pos-black.png b/pos_weight_manual/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/pos-black.png differ diff --git a/pos_weight_manual/static/description/assets/icons/puzzle.png b/pos_weight_manual/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/puzzle.png differ diff --git a/pos_weight_manual/static/description/assets/icons/restaurant-black.png b/pos_weight_manual/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_weight_manual/static/description/assets/icons/service-black.png b/pos_weight_manual/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/service-black.png differ diff --git a/pos_weight_manual/static/description/assets/icons/trading-black.png b/pos_weight_manual/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/trading-black.png differ diff --git a/pos_weight_manual/static/description/assets/icons/training.png b/pos_weight_manual/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/training.png differ diff --git a/pos_weight_manual/static/description/assets/icons/update.png b/pos_weight_manual/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/update.png differ diff --git a/pos_weight_manual/static/description/assets/icons/user.png b/pos_weight_manual/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/user.png differ diff --git a/pos_weight_manual/static/description/assets/icons/wrench.png b/pos_weight_manual/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_weight_manual/static/description/assets/icons/wrench.png differ diff --git a/pos_weight_manual/static/description/assets/misc/Cybrosys R.png b/pos_weight_manual/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/pos_weight_manual/static/description/assets/misc/Cybrosys R.png differ diff --git a/pos_weight_manual/static/description/assets/misc/email.svg b/pos_weight_manual/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/pos_weight_manual/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pos_weight_manual/static/description/assets/misc/phone.svg b/pos_weight_manual/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/pos_weight_manual/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/pos_weight_manual/static/description/assets/misc/star (1) 2.svg b/pos_weight_manual/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/pos_weight_manual/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_weight_manual/static/description/assets/misc/support (1) 1.svg b/pos_weight_manual/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/pos_weight_manual/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_weight_manual/static/description/assets/misc/support-email.svg b/pos_weight_manual/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/pos_weight_manual/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/pos_weight_manual/static/description/assets/misc/tick-mark.svg b/pos_weight_manual/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/pos_weight_manual/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/pos_weight_manual/static/description/assets/misc/whatsapp 1.svg b/pos_weight_manual/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/pos_weight_manual/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_weight_manual/static/description/assets/misc/whatsapp.svg b/pos_weight_manual/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/pos_weight_manual/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pos_weight_manual/static/description/assets/modules/1.png b/pos_weight_manual/static/description/assets/modules/1.png new file mode 100644 index 000000000..ba1058c42 Binary files /dev/null and b/pos_weight_manual/static/description/assets/modules/1.png differ diff --git a/pos_weight_manual/static/description/assets/modules/2.png b/pos_weight_manual/static/description/assets/modules/2.png new file mode 100644 index 000000000..6949185dd Binary files /dev/null and b/pos_weight_manual/static/description/assets/modules/2.png differ diff --git a/pos_weight_manual/static/description/assets/modules/3.png b/pos_weight_manual/static/description/assets/modules/3.png new file mode 100644 index 000000000..4e506f79b Binary files /dev/null and b/pos_weight_manual/static/description/assets/modules/3.png differ diff --git a/pos_weight_manual/static/description/assets/modules/4.png b/pos_weight_manual/static/description/assets/modules/4.png new file mode 100644 index 000000000..e78427938 Binary files /dev/null and b/pos_weight_manual/static/description/assets/modules/4.png differ diff --git a/pos_weight_manual/static/description/assets/modules/5.png b/pos_weight_manual/static/description/assets/modules/5.png new file mode 100755 index 000000000..272ec20f9 Binary files /dev/null and b/pos_weight_manual/static/description/assets/modules/5.png differ diff --git a/pos_weight_manual/static/description/assets/modules/6.png b/pos_weight_manual/static/description/assets/modules/6.png new file mode 100644 index 000000000..7d5c3154f Binary files /dev/null and b/pos_weight_manual/static/description/assets/modules/6.png differ diff --git a/pos_weight_manual/static/description/assets/screenshots/1.png b/pos_weight_manual/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..98a5d0cdb Binary files /dev/null and b/pos_weight_manual/static/description/assets/screenshots/1.png differ diff --git a/pos_weight_manual/static/description/assets/screenshots/3.png b/pos_weight_manual/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..047a6b8cc Binary files /dev/null and b/pos_weight_manual/static/description/assets/screenshots/3.png differ diff --git a/pos_weight_manual/static/description/assets/screenshots/4.png b/pos_weight_manual/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..c5edc50d6 Binary files /dev/null and b/pos_weight_manual/static/description/assets/screenshots/4.png differ diff --git a/pos_weight_manual/static/description/assets/screenshots/hero.gif b/pos_weight_manual/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..0041cd2d2 Binary files /dev/null and b/pos_weight_manual/static/description/assets/screenshots/hero.gif differ diff --git a/pos_weight_manual/static/description/banner.jpg b/pos_weight_manual/static/description/banner.jpg new file mode 100644 index 000000000..11dfb4ceb Binary files /dev/null and b/pos_weight_manual/static/description/banner.jpg differ diff --git a/pos_weight_manual/static/description/icon.png b/pos_weight_manual/static/description/icon.png new file mode 100644 index 000000000..d4b4e3f1e Binary files /dev/null and b/pos_weight_manual/static/description/icon.png differ diff --git a/pos_weight_manual/static/description/index.html b/pos_weight_manual/static/description/index.html new file mode 100644 index 000000000..a65ced757 --- /dev/null +++ b/pos_weight_manual/static/description/index.html @@ -0,0 +1,560 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo SH +
+
+
+
+
+
+

+ POS Manual Weight

+

+ Add Product Weight Manually. +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

+ Odoo 17 Community & Enterprise Edition + Support.

+

Watermark + feature in PDF report in Odoo 17 Community & + Enterprise Edition. +

+
+
+
+
+
+
+ +
+
+

+ Add Product Weight Manually.

+

Can Add product weight without weighing machine. +

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

+ Configuration Settings

+
+ There will be a field in configuration settings to enable the feature. +
+
+
+
+
+
+
+ +
+
+

+ Weight Scale Screen

+
+ When you click on the merchandise, a screen displaying the weight scale will appear.
+
+
+
+
+
+
+ +
+
+

+ Order line

+
+ Now the quantity and price will be added to the order line.
+
+
+
+ +
+
+
+
    +
  • + Can Add product weight without weighing machine. +
  • + + +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:06th Mar 2024 +
+

+ Odoo 17 POS Manual Weight

+
+
+
+
+
+
+
+

Related Products

+
+
+ +
+
+

Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/pos_weight_manual/static/src/css/pos_weight_manual.css b/pos_weight_manual/static/src/css/pos_weight_manual.css new file mode 100644 index 000000000..b4ff73687 --- /dev/null +++ b/pos_weight_manual/static/src/css/pos_weight_manual.css @@ -0,0 +1,3 @@ +.centered-content{ +width:500px !important; +height:300px !important;} diff --git a/pos_weight_manual/static/src/js/Screens/ProductScreen/ProductScreen.js b/pos_weight_manual/static/src/js/Screens/ProductScreen/ProductScreen.js new file mode 100644 index 000000000..af8e3b687 --- /dev/null +++ b/pos_weight_manual/static/src/js/Screens/ProductScreen/ProductScreen.js @@ -0,0 +1,32 @@ +/** @odoo-module */ + +import { patch } from "@web/core/utils/patch"; +import { Order } from "@point_of_sale/app/store/models"; +import { PosStore } from "@point_of_sale/app/store/pos_store"; + +patch(PosStore.prototype, { + async addProductToCurrentOrder(product, options = {}) { + var product = product + var options = options + if(this.env.services.pos.config.is_allow_manual_weight){ + // Show the ScaleScreen to weigh the product. + const { confirmed, payload } = await this.showTempScreen('ScaleScreen', { + product, + }); + if (confirmed) { + options['quantity'] = payload.weight + this.addProductFromUi(product, options); + } else { + // do not add the product; + return; + } + } + else{ + // add product if allow manual button is not enabled in the settings. + await this.addProductFromUi(product, options); + } + // Do not add product if options is undefined. + if (!options) return; + // Add the product after having the extra information. + } + }) diff --git a/pos_weight_manual/static/src/js/Screens/ScaleScreen/ScaleScreeen.js b/pos_weight_manual/static/src/js/Screens/ScaleScreen/ScaleScreeen.js new file mode 100644 index 000000000..492d6977c --- /dev/null +++ b/pos_weight_manual/static/src/js/Screens/ScaleScreen/ScaleScreeen.js @@ -0,0 +1,16 @@ +/** @odoo-module **/ + + import { ScaleScreen } from "@point_of_sale/app/screens/scale_screen/scale_screen"; + import { registry } from "@web/core/registry"; + import { patch } from "@web/core/utils/patch"; + + patch(ScaleScreen.prototype, { + async _setWeight() { + if (!this.shouldRead) { + return; + } + this.state.weight = await Number(document.getElementById("qty_to_add").value) + setTimeout(() => this._setWeight(), 500); + } + +}); \ No newline at end of file diff --git a/pos_weight_manual/static/src/xml/Screens/ScaleScreen/ScaleScreen.xml b/pos_weight_manual/static/src/xml/Screens/ScaleScreen/ScaleScreen.xml new file mode 100644 index 000000000..280cdad30 --- /dev/null +++ b/pos_weight_manual/static/src/xml/Screens/ScaleScreen/ScaleScreen.xml @@ -0,0 +1,15 @@ + + + + + +
+ +
+
+
+
diff --git a/pos_weight_manual/views/res_config_settings_views.xml b/pos_weight_manual/views/res_config_settings_views.xml new file mode 100644 index 000000000..fc6f2a07f --- /dev/null +++ b/pos_weight_manual/views/res_config_settings_views.xml @@ -0,0 +1,28 @@ + + + + + + res.config.settings.view.form.inherit.pos.weight.manual + + res.config.settings + + + +
+
+ +
+
+
+
+
+
+
+