You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
637 B

  1. /*
  2. * Copyright 2019 LevelPrime
  3. * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
  4. */
  5. odoo.define('pos_order_remove_line.order_line', function (require) {
  6. "use strict";
  7. require('point_of_sale.screens').OrderWidget.include({
  8. render_orderline: function () {
  9. var node = this._super.apply(this, arguments);
  10. $(node).find('.remove-line-button').on('click', null,
  11. this.remove_line.bind(this));
  12. return node;
  13. },
  14. remove_line: function (ev) {
  15. ev.delegateTarget.parentElement.orderline.set_quantity('remove');
  16. },
  17. });
  18. });