diff --git a/pos_order_remove_line/README.rst b/pos_order_remove_line/README.rst new file mode 100644 index 00000000..85d66c8c --- /dev/null +++ b/pos_order_remove_line/README.rst @@ -0,0 +1,81 @@ +===================== +POS Order Remove Line +===================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/12.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-12-0/pos-12-0-pos_order_remove_line + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/184/12.0 + :alt: Try me on Runbot + +|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 smashing 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 + +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 00000000..a11d700b --- /dev/null +++ b/pos_order_remove_line/__init__.py @@ -0,0 +1,2 @@ +# Copyright 2019 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 00000000..d98af745 --- /dev/null +++ b/pos_order_remove_line/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2019 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://www.github.com/OCA/pos", + "category": "Point of Sale", + "maintainers": ["robyf70"], + "version": "13.0.1.0.0", + "license": "LGPL-3", + "depends": ["point_of_sale"], + "data": ["views/assets.xml"], + "qweb": ["static/src/xml/order_line.xml"], +} 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 00000000..d2e396f1 --- /dev/null +++ b/pos_order_remove_line/i18n/pos_order_remove_line.pot @@ -0,0 +1,14 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.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/readme/CONTRIBUTORS.rst b/pos_order_remove_line/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..1577ff91 --- /dev/null +++ b/pos_order_remove_line/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Roberto Fichera diff --git a/pos_order_remove_line/readme/DESCRIPTION.rst b/pos_order_remove_line/readme/DESCRIPTION.rst new file mode 100644 index 00000000..450df8df --- /dev/null +++ b/pos_order_remove_line/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +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 00000000..3a0328b5 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 00000000..b703ecd2 --- /dev/null +++ b/pos_order_remove_line/static/description/index.html @@ -0,0 +1,421 @@ + + + + + + +POS Order Remove Line + + + +
+

POS Order Remove Line

+ + +

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

+

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 smashing 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/js/order_line.js b/pos_order_remove_line/static/src/js/order_line.js new file mode 100644 index 00000000..9cec4950 --- /dev/null +++ b/pos_order_remove_line/static/src/js/order_line.js @@ -0,0 +1,23 @@ +/* + * Copyright 2019 LevelPrime + * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + */ + +odoo.define("pos_order_remove_line.order_line", function(require) { + "use strict"; + + require("point_of_sale.screens").OrderWidget.include({ + render_orderline: function() { + var node = this._super.apply(this, arguments); + + $(node) + .find(".remove-line-button") + .on("click", null, this.remove_line.bind(this)); + + return node; + }, + remove_line: function(ev) { + ev.delegateTarget.parentElement.orderline.set_quantity("remove"); + }, + }); +}); diff --git a/pos_order_remove_line/static/src/less/order_line.less b/pos_order_remove_line/static/src/less/order_line.less new file mode 100644 index 00000000..3d705fbc --- /dev/null +++ b/pos_order_remove_line/static/src/less/order_line.less @@ -0,0 +1,11 @@ +/* + * Copyright 2019 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/xml/order_line.xml b/pos_order_remove_line/static/src/xml/order_line.xml new file mode 100644 index 00000000..2cf0e0c9 --- /dev/null +++ b/pos_order_remove_line/static/src/xml/order_line.xml @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/pos_order_remove_line/views/assets.xml b/pos_order_remove_line/views/assets.xml new file mode 100644 index 00000000..71401039 --- /dev/null +++ b/pos_order_remove_line/views/assets.xml @@ -0,0 +1,20 @@ + + + +