Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][FIX]pos_order_remove_line: Action on trash delete line #1120

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pos_order_remove_line/static/src/js/orderline.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ const PosOrderline = (Orderline) =>
async removeLine(ev) {
ev.stopPropagation();
ev.preventDefault();
this.selectLine();
this.trigger("update-selected-orderline", {buffer: null, key: "Backspace"});
this.props.line.set_quantity("remove", null);
}
};
Registries.Component.extend(Orderline, PosOrderline);
15 changes: 8 additions & 7 deletions pos_order_remove_line/static/src/xml/orderline.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
~ Copyright 2023 LevelPrime
~ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
-->
~ Copyright 2023 LevelPrime
~ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
-->
<templates id="template" xml:space="preserve">
<t t-inherit="point_of_sale.Orderline" t-inherit-mode="extension">
<xpath expr="//span[hasclass('price')]" position="before">
<t t-inherit="point_of_sale.Orderline" t-inherit-mode="extension">
<xpath expr="//span[hasclass('price')]" position="before">
<button class="remove-line-button" t-on-click="removeLine">
<i class="fa fa-trash-o" />
</button>
</xpath>
</t>
</xpath>
</t>
</templates>
Loading