hunk.code_window:                                     <h4><field name="name"/></h4>
                                       <div>
                                           <t t-if="duration"><field name="duration" widget="float_time"/> hours</t>
                                       </div>
                                       <div class="oe_kanban_bottom_left">
                                           <field name="priority" widget="priority"/>
                                       </div>
                                       <div class="oe_kanban_bottom_right">
                                           <img t-att-src="kanban_image('res.partner', 'image_small', record.partner_id.raw_value)"
  
hunk.labels: keep keep keep add keep keep keep keep keep
hunk.after_edit:                                     <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
  
hunk.file_path: addons/website_event_track/views/event_track_views.xml
hunk.type: add
file: odoo.define('pos_discount.pos_discount', function (require) {
  "use strict";
  
  var screens = require('point_of_sale.screens');
  
  var DiscountButton = screens.ActionButtonWidget.extend({
      template: 'DiscountButton',
      button_click: function(){
          var self = this;
          this.gui.show_popup('number',{
              'title': 'Discount Percentage',
              'value': this.pos.config.discount_pc,
              'confirm': function(val) {
                  val = Math.round(Math.max(0,Math.min(100,val)));
                  self.apply_discount(val);
              },
          });
      },
      apply_discount: function(pc) {
          var order    = this.pos.get_order();
          var lines    = order.get_orderlines();
          var product  = this.pos.db.get_product_by_id(this.pos.config.discount_product_id[0]);
  
          // Remove existing discounts
          var i = 0;
          while ( i < lines.length ) {
              if (lines[i].get_product() === product) {
                  order.remove_orderline(lines[i]);
              } else {
                  i++;
              }
          }
  
          // Add discount
          var discount = - pc / 100.0 * order.get_total_with_tax();
  
          if( discount < 0 ){
              order.add_product(product, { price: discount });
          }
      },
  });
  
  screens.define_action_button({
      'name': 'discount',
      'widget': DiscountButton,
      'condition': function(){
          return this.pos.config.module_pos_discount && this.pos.config.discount_product_id;
      },
  });
  
  
  });
  