diff --git a/pos_order_remove_line/README.rst b/pos_order_remove_line/README.rst new file mode 100644 index 00000000..11310cc2 --- /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/10.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-10-0/pos-10-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/10.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +The module adds a 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..48a90926 --- /dev/null +++ b/pos_order_remove_line/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +# 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..e0a0ae3f --- /dev/null +++ b/pos_order_remove_line/__manifest__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# 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': '10.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/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..34c5c5af --- /dev/null +++ b/pos_order_remove_line/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +The module adds a the possibility to delete a POS Order Line from the POS interface. 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..6a91857a --- /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 a 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..dced5d7a --- /dev/null +++ b/pos_order_remove_line/static/src/js/order_line.js @@ -0,0 +1,22 @@ +/* + * 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..970ddb29 --- /dev/null +++ b/pos_order_remove_line/static/src/xml/order_line.xml @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/pos_order_remove_line/views/assets.xml b/pos_order_remove_line/views/assets.xml new file mode 100644 index 00000000..72db88da --- /dev/null +++ b/pos_order_remove_line/views/assets.xml @@ -0,0 +1,17 @@ + + + + + + +