diff --git a/pos_order_remove_line/README.rst b/pos_order_remove_line/README.rst new file mode 100644 index 0000000000..6851862d77 --- /dev/null +++ b/pos_order_remove_line/README.rst @@ -0,0 +1,91 @@ +===================== +POS Order Remove Line +===================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:877dbe744572885ae70ce004281410c65567220f2691e586d7116f9410926893 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github + :target: https://github.com/OCA/pos/tree/17.0/pos_order_remove_line + :alt: OCA/pos +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/pos-17-0/pos-17-0-pos_order_remove_line + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +The module adds the possibility to delete a POS Order Line from the POS +interface. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Roberto Fichera + +Contributors +------------ + +- Roberto Fichera +- Iván Todorovich +- Foram Shah +- Juan Bonilla +- `Heliconia Solutions Pvt. Ltd. `__ + + - Bhavesh Heliconia + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-robyf70| image:: https://github.com/robyf70.png?size=40px + :target: https://github.com/robyf70 + :alt: robyf70 + +Current `maintainer `__: + +|maintainer-robyf70| + +This module is part of the `OCA/pos `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/pos_order_remove_line/__init__.py b/pos_order_remove_line/__init__.py new file mode 100644 index 0000000000..bd06eb177f --- /dev/null +++ b/pos_order_remove_line/__init__.py @@ -0,0 +1,2 @@ +# Copyright 2023 LevelPrime +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) diff --git a/pos_order_remove_line/__manifest__.py b/pos_order_remove_line/__manifest__.py new file mode 100644 index 0000000000..cd998f408b --- /dev/null +++ b/pos_order_remove_line/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2023 LevelPrime +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +{ + "name": "POS Order Remove Line", + "summary": "Add button to remove POS order line.", + "author": "Roberto Fichera, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/pos", + "category": "Point of Sale", + "maintainers": ["robyf70"], + "version": "17.0.1.0.0", + "license": "LGPL-3", + "depends": ["point_of_sale"], + "assets": { + "point_of_sale._assets_pos": [ + "pos_order_remove_line/static/src/js/*.js", + "pos_order_remove_line/static/src/css/*.scss", + "pos_order_remove_line/static/src/xml/*xml", + ] + }, +} diff --git a/pos_order_remove_line/i18n/it.po b/pos_order_remove_line/i18n/it.po new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pos_order_remove_line/i18n/pos_order_remove_line.pot b/pos_order_remove_line/i18n/pos_order_remove_line.pot new file mode 100644 index 0000000000..78d58d53fe --- /dev/null +++ b/pos_order_remove_line/i18n/pos_order_remove_line.pot @@ -0,0 +1,13 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" diff --git a/pos_order_remove_line/pos_18.zip b/pos_order_remove_line/pos_18.zip new file mode 100644 index 0000000000..8b1db7fac5 Binary files /dev/null and b/pos_order_remove_line/pos_18.zip differ diff --git a/pos_order_remove_line/pyproject.toml b/pos_order_remove_line/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/pos_order_remove_line/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/pos_order_remove_line/readme/CONTRIBUTORS.md b/pos_order_remove_line/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..e8ee9fb6bf --- /dev/null +++ b/pos_order_remove_line/readme/CONTRIBUTORS.md @@ -0,0 +1,6 @@ +- Roberto Fichera \<\> +- Iván Todorovich \<\> +- Foram Shah \<\> +- Juan Bonilla \<\> +- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io) + - Bhavesh Heliconia diff --git a/pos_order_remove_line/readme/DESCRIPTION.md b/pos_order_remove_line/readme/DESCRIPTION.md new file mode 100644 index 0000000000..501f7d6974 --- /dev/null +++ b/pos_order_remove_line/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +The module adds the possibility to delete a POS Order Line from the POS +interface. diff --git a/pos_order_remove_line/static/description/icon.png b/pos_order_remove_line/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/pos_order_remove_line/static/description/icon.png differ diff --git a/pos_order_remove_line/static/description/index.html b/pos_order_remove_line/static/description/index.html new file mode 100644 index 0000000000..f126abc76c --- /dev/null +++ b/pos_order_remove_line/static/description/index.html @@ -0,0 +1,433 @@ + + + + + +POS Order Remove Line + + + +
+

POS Order Remove Line

+ + +

Beta License: LGPL-3 OCA/pos Translate me on Weblate Try me on Runboat

+

The module adds the possibility to delete a POS Order Line from the POS +interface.

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Roberto Fichera
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainer:

+

robyf70

+

This module is part of the OCA/pos project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/pos_order_remove_line/static/src/css/orderline.scss b/pos_order_remove_line/static/src/css/orderline.scss new file mode 100644 index 0000000000..3c441b46ae --- /dev/null +++ b/pos_order_remove_line/static/src/css/orderline.scss @@ -0,0 +1,11 @@ +/* + * Copyright 2023 LevelPrime + * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + */ + +.remove-line-button { + float: right; + padding: 0 5px 0 10px; + cursor: pointer; + margin-left: 6px; +} diff --git a/pos_order_remove_line/static/src/js/orderline.esm.js b/pos_order_remove_line/static/src/js/orderline.esm.js new file mode 100644 index 0000000000..1dea6a167e --- /dev/null +++ b/pos_order_remove_line/static/src/js/orderline.esm.js @@ -0,0 +1,19 @@ +/** @odoo-module **/ +/* + * Copyright 2023 LevelPrime + * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + */ +import {useService} from "@web/core/utils/hooks"; +import {Orderline} from "@point_of_sale/app/generic_components/orderline/orderline"; +import {patch} from "@web/core/utils/patch"; + +patch(Orderline.prototype, { + setup() { + super.setup(); + this.numberBuffer = useService("number_buffer"); + }, + async removeLine() { + this.numberBuffer.sendKey("Backspace"); + this.numberBuffer.sendKey("Backspace"); + }, +}); diff --git a/pos_order_remove_line/static/src/xml/orderline.xml b/pos_order_remove_line/static/src/xml/orderline.xml new file mode 100644 index 0000000000..c6d87c01cc --- /dev/null +++ b/pos_order_remove_line/static/src/xml/orderline.xml @@ -0,0 +1,13 @@ + + + + + + + +