From ebdf058642033c23ee02acef3f08a90927da9ac8 Mon Sep 17 00:00:00 2001 From: fshah Date: Wed, 21 Jul 2021 15:21:23 +0530 Subject: [PATCH] [MIG] Migrate module pos_order_remove_line to v14. --- pos_order_remove_line/README.rst | 11 +++++---- pos_order_remove_line/__manifest__.py | 4 ++-- .../i18n/pos_order_remove_line.pot | 2 +- pos_order_remove_line/readme/CONTRIBUTORS.rst | 1 + .../static/description/index.html | 7 +++--- .../css/{order_line.scss => orderline.scss} | 0 .../static/src/js/order_line.js | 23 ------------------- .../static/src/js/orderline.js | 20 ++++++++++++++++ .../src/xml/{order_line.xml => orderline.xml} | 10 ++++---- pos_order_remove_line/views/assets.xml | 4 ++-- 10 files changed, 41 insertions(+), 41 deletions(-) rename pos_order_remove_line/static/src/css/{order_line.scss => orderline.scss} (100%) delete mode 100644 pos_order_remove_line/static/src/js/order_line.js create mode 100644 pos_order_remove_line/static/src/js/orderline.js rename pos_order_remove_line/static/src/xml/{order_line.xml => orderline.xml} (50%) diff --git a/pos_order_remove_line/README.rst b/pos_order_remove_line/README.rst index 418d6075db..3c08e35b4d 100644 --- a/pos_order_remove_line/README.rst +++ b/pos_order_remove_line/README.rst @@ -14,13 +14,13 @@ POS Order Remove Line :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/13.0/pos_order_remove_line + :target: https://github.com/OCA/pos/tree/14.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-13-0/pos-13-0-pos_order_remove_line + :target: https://translation.odoo-community.org/projects/pos-14-0/pos-14-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/13.0 + :target: https://runbot.odoo-community.org/runbot/184/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -38,7 +38,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -55,6 +55,7 @@ Contributors * Roberto Fichera * Iván Todorovich +* Foram Shah Maintainers ~~~~~~~~~~~ @@ -77,6 +78,6 @@ Current `maintainer `__: |maintainer-robyf70| -This module is part of the `OCA/pos `_ project on GitHub. +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/__manifest__.py b/pos_order_remove_line/__manifest__.py index b6b631cdfa..bf70b7581e 100644 --- a/pos_order_remove_line/__manifest__.py +++ b/pos_order_remove_line/__manifest__.py @@ -8,9 +8,9 @@ "website": "https://github.com/OCA/pos", "category": "Point of Sale", "maintainers": ["robyf70"], - "version": "13.0.1.1.0", + "version": "14.0.1.0.0", "license": "LGPL-3", "depends": ["point_of_sale"], "data": ["views/assets.xml"], - "qweb": ["static/src/xml/order_line.xml"], + "qweb": ["static/src/xml/orderline.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 index cc93d01ee5..4d8b20f912 100644 --- a/pos_order_remove_line/i18n/pos_order_remove_line.pot +++ b/pos_order_remove_line/i18n/pos_order_remove_line.pot @@ -3,7 +3,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" +"Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" diff --git a/pos_order_remove_line/readme/CONTRIBUTORS.rst b/pos_order_remove_line/readme/CONTRIBUTORS.rst index a0b783797b..16fa2608ce 100644 --- a/pos_order_remove_line/readme/CONTRIBUTORS.rst +++ b/pos_order_remove_line/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ * Roberto Fichera * Iván Todorovich +* Foram Shah diff --git a/pos_order_remove_line/static/description/index.html b/pos_order_remove_line/static/description/index.html index cd93fc6986..ead3c44a24 100644 --- a/pos_order_remove_line/static/description/index.html +++ b/pos_order_remove_line/static/description/index.html @@ -367,7 +367,7 @@

POS Order Remove Line

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

@@ -386,7 +386,7 @@

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.

+feedback.

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

@@ -402,6 +402,7 @@

Contributors

@@ -413,7 +414,7 @@

Maintainers

promote its widespread use.

Current maintainer:

robyf70

-

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

+

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/order_line.scss b/pos_order_remove_line/static/src/css/orderline.scss similarity index 100% rename from pos_order_remove_line/static/src/css/order_line.scss rename to pos_order_remove_line/static/src/css/orderline.scss diff --git a/pos_order_remove_line/static/src/js/order_line.js b/pos_order_remove_line/static/src/js/order_line.js deleted file mode 100644 index 1ef5eb09e3..0000000000 --- a/pos_order_remove_line/static/src/js/order_line.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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/js/orderline.js b/pos_order_remove_line/static/src/js/orderline.js new file mode 100644 index 0000000000..05d4e1dbf1 --- /dev/null +++ b/pos_order_remove_line/static/src/js/orderline.js @@ -0,0 +1,20 @@ +/* + * Copyright 2019 LevelPrime + * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + */ + +odoo.define("pos_order_remove_line.Orderline", function (require) { + "use strict"; + + const Orderline = require("point_of_sale.Orderline"); + const Registries = require("point_of_sale.Registries"); + + const PosOrderline = (Orderline) => + class extends Orderline { + removeLine() { + this.props.line.set_quantity("remove"); + } + }; + Registries.Component.extend(Orderline, PosOrderline); + return Orderline; +}); diff --git a/pos_order_remove_line/static/src/xml/order_line.xml b/pos_order_remove_line/static/src/xml/orderline.xml similarity index 50% rename from pos_order_remove_line/static/src/xml/order_line.xml rename to pos_order_remove_line/static/src/xml/orderline.xml index 2cf0e0c99c..ab4d780291 100644 --- a/pos_order_remove_line/static/src/xml/order_line.xml +++ b/pos_order_remove_line/static/src/xml/orderline.xml @@ -3,11 +3,11 @@ ~ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) --> - - - - - + + diff --git a/pos_order_remove_line/views/assets.xml b/pos_order_remove_line/views/assets.xml index 609f5a6029..c3afb4a971 100644 --- a/pos_order_remove_line/views/assets.xml +++ b/pos_order_remove_line/views/assets.xml @@ -9,11 +9,11 @@