diff --git a/pos_delete_orderline/README.rst b/pos_delete_orderline/README.rst new file mode 100644 index 000000000..34f953196 --- /dev/null +++ b/pos_delete_orderline/README.rst @@ -0,0 +1,42 @@ +Remove Orders in POS +==================== +Remove each lines from selected order by simply clicking X button or clear all order with a single click. + +Configuration +============= +* No additional configurations needed + +License +------- +Odoo Proprietary License v1.0 (OPL-1) +(https://www.odoo.com/documentation/user/12.0/legal/licenses/licenses.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: + Muhammed Nishad T K @cybrosys + Version 13: Nimisha Murali@cybrosys + Version 14: Sonu Soman K P @cybrosys + +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: ``__ + diff --git a/pos_delete_orderline/__init__.py b/pos_delete_orderline/__init__.py new file mode 100644 index 000000000..c4f3b9375 --- /dev/null +++ b/pos_delete_orderline/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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 . +# +############################################################################# + + diff --git a/pos_delete_orderline/__manifest__.py b/pos_delete_orderline/__manifest__.py new file mode 100644 index 000000000..bcb5b0cd8 --- /dev/null +++ b/pos_delete_orderline/__manifest__.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-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 . +# +############################################################################# +{ + 'name': "Remove Order Line In POS ", + 'summary': """ + Remove Individual Orderlines In Point Of Sale. """, + 'description': """ + Remove each lines from selected order by simply clicking X button or clear all order with a single click. + """, + 'author': "Cybrosys Techno Solutions", + 'website': "https://www.cybrosys.com", + 'maintainer': "Cybrosys Techno Solutions", + 'category': 'Point of Sale', + 'version': '14.0.1.0.0', + 'depends': ['base', 'point_of_sale'], + 'data': [ + 'views/views.xml', + ], + 'qweb': ['static/src/xml/clear_button.xml', + 'static/src/xml/clear_order_line.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, + +} diff --git a/pos_delete_orderline/static/description/banner.png b/pos_delete_orderline/static/description/banner.png new file mode 100644 index 000000000..970f1f686 Binary files /dev/null and b/pos_delete_orderline/static/description/banner.png differ diff --git a/pos_delete_orderline/static/description/icon.png b/pos_delete_orderline/static/description/icon.png new file mode 100644 index 000000000..10c39455c Binary files /dev/null and b/pos_delete_orderline/static/description/icon.png differ diff --git a/pos_delete_orderline/static/description/images/Pos_remove_orderline v12.png b/pos_delete_orderline/static/description/images/Pos_remove_orderline v12.png new file mode 100644 index 000000000..47cb2ab7e Binary files /dev/null and b/pos_delete_orderline/static/description/images/Pos_remove_orderline v12.png differ diff --git a/pos_delete_orderline/static/description/images/checked.png b/pos_delete_orderline/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/pos_delete_orderline/static/description/images/checked.png differ diff --git a/pos_delete_orderline/static/description/images/coupon_pos.png b/pos_delete_orderline/static/description/images/coupon_pos.png new file mode 100644 index 000000000..cf274c0bb Binary files /dev/null and b/pos_delete_orderline/static/description/images/coupon_pos.png differ diff --git a/pos_delete_orderline/static/description/images/cybrosys.png b/pos_delete_orderline/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/pos_delete_orderline/static/description/images/cybrosys.png differ diff --git a/pos_delete_orderline/static/description/images/orderline_remove.png b/pos_delete_orderline/static/description/images/orderline_remove.png new file mode 100644 index 000000000..263953483 Binary files /dev/null and b/pos_delete_orderline/static/description/images/orderline_remove.png differ diff --git a/pos_delete_orderline/static/description/images/pos_6.png b/pos_delete_orderline/static/description/images/pos_6.png new file mode 100644 index 000000000..98673039e Binary files /dev/null and b/pos_delete_orderline/static/description/images/pos_6.png differ diff --git a/pos_delete_orderline/static/description/images/pos_image.png b/pos_delete_orderline/static/description/images/pos_image.png new file mode 100644 index 000000000..84ebada90 Binary files /dev/null and b/pos_delete_orderline/static/description/images/pos_image.png differ diff --git a/pos_delete_orderline/static/description/images/pos_logo.png b/pos_delete_orderline/static/description/images/pos_logo.png new file mode 100644 index 000000000..97d6c5041 Binary files /dev/null and b/pos_delete_orderline/static/description/images/pos_logo.png differ diff --git a/pos_delete_orderline/static/description/images/pos_reprint.png b/pos_delete_orderline/static/description/images/pos_reprint.png new file mode 100644 index 000000000..65a113e60 Binary files /dev/null and b/pos_delete_orderline/static/description/images/pos_reprint.png differ diff --git a/pos_delete_orderline/static/description/images/pos_waiter.png b/pos_delete_orderline/static/description/images/pos_waiter.png new file mode 100644 index 000000000..6055ffc67 Binary files /dev/null and b/pos_delete_orderline/static/description/images/pos_waiter.png differ diff --git a/pos_delete_orderline/static/description/images/remove_order_line.gif b/pos_delete_orderline/static/description/images/remove_order_line.gif new file mode 100644 index 000000000..91533cf29 Binary files /dev/null and b/pos_delete_orderline/static/description/images/remove_order_line.gif differ diff --git a/pos_delete_orderline/static/description/images/remove_per_product.png b/pos_delete_orderline/static/description/images/remove_per_product.png new file mode 100644 index 000000000..c5eb8d013 Binary files /dev/null and b/pos_delete_orderline/static/description/images/remove_per_product.png differ diff --git a/pos_delete_orderline/static/description/index.html b/pos_delete_orderline/static/description/index.html new file mode 100644 index 000000000..7516c8ef7 --- /dev/null +++ b/pos_delete_orderline/static/description/index.html @@ -0,0 +1,315 @@ +
cybrosys-logo
+
+
+
+

Remove Order Line In POS

+

Remove each lines from selected order by simply clicking X button or clear all order with a single click.

+
+

Key Highlights

+
    +
  • You can remove each order with just a one click.
  • +
  • Shows a clear button in each order line .
  • +
  • A 'Clear All' button is available to clear all the selected orders in one click:
  • + +
+
+
+
+
+
+
+
+ +
+
+ +

Overview

+
+

+ This module helps you to remove each orders from POS order line by simply clicking the X button which appears on the right side of each order. It also provides an option to clear all the selected orders in one click.

+ +
+ + + + +
+ +

Remove Order Line In POS

+
+
    +
  • + + You can remove each order with just a one click +
  • +
  • + + Shows a clear button in each order line +
  • +
  • + + A 'Clear All' button is available to clear all the selected orders in one click +
  • + + + +
+
+ +
+
+

Screenshots

+
+
+
+ +
+
+
+
+
+ +

Video

+
+
+

Remove Order Line In POS

+ +
+ Cybrosys Cover Video +
+
+
+ +
+
    +
+
+
+
+
+
+
+

Suggested Products

+
+ +
+
+

Our Service

+
+ +
+
+
+

Our Industries

+
+ +
+
+
+ +
+
+

Trading

+

Easily procure and sell your products.

+
+
+
+
+ +
+
+

Manufacturing

+

Plan, track and schedule your operations.

+
+
+
+
+ +
+
+

Restaurant

+

Run your bar or restaurant methodical.

+
+
+
+
+ +
+
+

POS

+

Easy configuring and convivial selling.

+
+
+
+
+ +
+
+

E-commerce & Website

+

Mobile friendly, awe-inspiring product pages.

+
+
+
+
+ +
+
+

Hotel Management

+

An all-inclusive hotel management application.

+
+
+
+
+ +
+
+

Education

+

A Collaborative platform for educational management.

+
+
+
+
+ +
+
+

Service Management

+

Keep track of services and invoice accordingly.

+
+
+
+
+
+ +
+
+
+

Need Any Help?

+
+

If you have anything to share with us based on your use of this module, please let us know. We are ready to offer our support.

+
+

Email us

+

odoo@cybrosys.com / info@cybrosys.com

+
+
+

Contact Us

+ www.cybrosys.com +
+
+
+
+
+
+
+
+
+ +
+ + + + + + + +
+
+
+ \ No newline at end of file diff --git a/pos_delete_orderline/static/src/js/clear_button.js b/pos_delete_orderline/static/src/js/clear_button.js new file mode 100644 index 000000000..e8ca4b51c --- /dev/null +++ b/pos_delete_orderline/static/src/js/clear_button.js @@ -0,0 +1,38 @@ +odoo.define('pos_delete_orderline.DeleteOrderLinesAll', function(require) { +'use strict'; + const { Gui } = require('point_of_sale.Gui'); + const PosComponent = require('point_of_sale.PosComponent'); + const { posbus } = require('point_of_sale.utils'); + const ProductScreen = require('point_of_sale.ProductScreen'); + const { useListener } = require('web.custom_hooks'); + const Registries = require('point_of_sale.Registries'); + const PaymentScreen = require('point_of_sale.PaymentScreen'); + class OrderLineClearALL extends PosComponent { + constructor() { + super(...arguments); + useListener('click', this.onClick); + } + async onClick() { + const { confirmed} = await this.showPopup("ConfirmPopup", { + title: this.env._t('Clear Orders?'), + body: this.env._t('Are you sure you want to delete all orders from the cart?'), + }); + if(confirmed){ + + const order = this.env.pos.get_order(); + order.remove_orderline(order.get_orderlines()); + } + } + + } + + OrderLineClearALL.template = 'OrderLineClearALL'; + ProductScreen.addControlButton({ + component: OrderLineClearALL, + condition: function() { + return this.env.pos; + }, + }); + Registries.Component.add(OrderLineClearALL); + return OrderLineClearALL; +}); \ No newline at end of file diff --git a/pos_delete_orderline/static/src/js/clear_order_line.js b/pos_delete_orderline/static/src/js/clear_order_line.js new file mode 100644 index 000000000..4c3907a46 --- /dev/null +++ b/pos_delete_orderline/static/src/js/clear_order_line.js @@ -0,0 +1,26 @@ +odoo.define('pos_delete_orderline.DeleteOrderLines', function(require) { +'use strict'; + + const { useState, useRef, onPatched } = owl.hooks; + const { useListener } = require('web.custom_hooks'); + const { onChangeOrder } = require('point_of_sale.custom_hooks'); + const PosComponent = require('point_of_sale.PosComponent'); + const Registries = require('point_of_sale.Registries'); + const Orderline = require('point_of_sale.Orderline'); + const ProductScreen = require('point_of_sale.ProductScreen'); + const OrderWidget = require('point_of_sale.OrderWidget'); + + const OrderLineDelete = (Orderline) => + class extends Orderline { + async clear_button_fun() { + this.trigger('numpad-click-input', { key: 'Backspace' }); + this.trigger('numpad-click-input', { key: 'Backspace' }); + + } + + }; + Registries.Component.extend(Orderline, OrderLineDelete); + return OrderWidget; + +}); + diff --git a/pos_delete_orderline/static/src/xml/clear_button.xml b/pos_delete_orderline/static/src/xml/clear_button.xml new file mode 100644 index 000000000..8b712d8f3 --- /dev/null +++ b/pos_delete_orderline/static/src/xml/clear_button.xml @@ -0,0 +1,10 @@ + + + + + + + Clear All + + + \ No newline at end of file diff --git a/pos_delete_orderline/static/src/xml/clear_order_line.xml b/pos_delete_orderline/static/src/xml/clear_order_line.xml new file mode 100644 index 000000000..b641a7b69 --- /dev/null +++ b/pos_delete_orderline/static/src/xml/clear_order_line.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/pos_delete_orderline/views/views.xml b/pos_delete_orderline/views/views.xml new file mode 100644 index 000000000..292402419 --- /dev/null +++ b/pos_delete_orderline/views/views.xml @@ -0,0 +1,11 @@ + + + +