Skip to content

Commit

Permalink
[MIG] pos_order_remove_line: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
suker committed Feb 17, 2023
1 parent cc6f143 commit 4f8b39d
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 55 deletions.
10 changes: 5 additions & 5 deletions pos_order_remove_line/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/14.0/pos_order_remove_line
:target: https://github.com/OCA/pos/tree/16.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-14-0/pos-14-0-pos_order_remove_line
:target: https://translation.odoo-community.org/projects/pos-16-0/pos-16-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/14.0
:target: https://runbot.odoo-community.org/runbot/184/16.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand All @@ -38,7 +38,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/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 <https://github.com/OCA/pos/issues/new?body=module:%20pos_order_remove_line%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_order_remove_line%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Expand Down Expand Up @@ -78,6 +78,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-robyf70|

This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/14.0/pos_order_remove_line>`_ project on GitHub.
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/16.0/pos_order_remove_line>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion pos_order_remove_line/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Copyright 2019 LevelPrime
# Copyright 2023 LevelPrime
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
13 changes: 9 additions & 4 deletions pos_order_remove_line/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019 LevelPrime
# Copyright 2023 LevelPrime
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)

{
Expand All @@ -8,9 +8,14 @@
"website": "https://github.com/OCA/pos",
"category": "Point of Sale",
"maintainers": ["robyf70"],
"version": "14.0.1.0.0",
"version": "16.0.1.0.0",
"license": "LGPL-3",
"depends": ["point_of_sale"],
"data": ["views/assets.xml"],
"qweb": ["static/src/xml/orderline.xml"],
"assets": {
"point_of_sale.assets": [
"pos_order_remove_line/static/src/js/*.js",
"pos_order_remove_line/static/src/css/*.scss",
"pos_order_remove_line/static/src/xml/*xml",
]
},
}
6 changes: 3 additions & 3 deletions pos_order_remove_line/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">POS Order Remove Line</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/pos/tree/14.0/pos_order_remove_line"><img alt="OCA/pos" src="https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_order_remove_line"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/184/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/pos/tree/16.0/pos_order_remove_line"><img alt="OCA/pos" src="https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_order_remove_line"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/184/16.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>The module adds the possibility to delete a POS Order Line from the POS interface.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand All @@ -386,7 +386,7 @@ <h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/pos/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/pos/issues/new?body=module:%20pos_order_remove_line%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/pos/issues/new?body=module:%20pos_order_remove_line%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand Down Expand Up @@ -414,7 +414,7 @@ <h2><a class="toc-backref" href="#id5">Maintainers</a></h2>
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/robyf70"><img alt="robyf70" src="https://github.com/robyf70.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/pos/tree/14.0/pos_order_remove_line">OCA/pos</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/pos/tree/16.0/pos_order_remove_line">OCA/pos</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion pos_order_remove_line/static/src/css/orderline.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019 LevelPrime
* Copyright 2023 LevelPrime
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
*/

Expand Down
30 changes: 30 additions & 0 deletions pos_order_remove_line/static/src/js/orderline.esm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/** @odoo-module **/
/*
* Copyright 2023 LevelPrime
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
*/

import Orderline from "point_of_sale.Orderline";
import Registries from "point_of_sale.Registries";

const PosOrderline = (Orderline) =>
class extends Orderline {
async removeLine(ev) {
const order = this.env.pos.get_order();
if (order) {
ev.stopPropagation();
ev.preventDefault();
this.selectLine();
order.remove_orderline(order.get_selected_orderline());
this.checkRewardLines(order);
}
}

checkRewardLines(order) {
const anyRewardLine = order.orderlines.some((line) => line.is_reward_line);
if (anyRewardLine) {
order._updateRewards();
}
}
};
Registries.Component.extend(Orderline, PosOrderline);
20 changes: 0 additions & 20 deletions pos_order_remove_line/static/src/js/orderline.js

This file was deleted.

2 changes: 1 addition & 1 deletion pos_order_remove_line/static/src/xml/orderline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
~ Copyright 2019 LevelPrime
~ Copyright 2023 LevelPrime
~ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
-->
<templates id="template" xml:space="preserve">
Expand Down
20 changes: 0 additions & 20 deletions pos_order_remove_line/views/assets.xml

This file was deleted.

0 comments on commit 4f8b39d

Please sign in to comment.