hunk.code_window:     purchase_ids = [proc.purchase_line_id.order_id for proc in self.browse(cr, uid, procu_ids) if proc.purchase_line_id]
       assert len(purchase_ids) == 1, 'No purchase order found !'
       # Check the total quantity on the purchase order which should be in Unit(s)
       purchase_line = purchase_ids[0].order_line[0]
  
hunk.labels: keep keep keep replace keep
hunk.after_edit:     # Check the two purchase order lines
  
hunk.file_path: addons/stock_dropshipping/test/cancellation_propagated.yml
hunk.type: replace
file: define('summernote/module/Dialog', function () {
    /**
     * Dialog 
     *
     * @class
     */
    var Dialog = function () {
  
      /**
       * toggle button status
       *
       * @param {jQuery} $btn
       * @param {Boolean} isEnable
       */
      var toggleBtn = function ($btn, isEnable) {
        $btn.toggleClass('disabled', !isEnable);
        $btn.attr('disabled', !isEnable);
      };
  
      /**
       * show image dialog
       *
       * @param {jQuery} $editable
       * @param {jQuery} $dialog
       * @return {Promise}
       */
      this.showImageDialog = function ($editable, $dialog) {
        return $.Deferred(function (deferred) {
          var $imageDialog = $dialog.find('.note-image-dialog');
  
          var $imageInput = $dialog.find('.note-image-input'),
              $imageUrl = $dialog.find('.note-image-url'),
              $imageBtn = $dialog.find('.note-image-btn');
  
          $imageDialog.one('shown.bs.modal', function () {
            // Cloning imageInput to clear element.
            $imageInput.replaceWith($imageInput.clone()
              .on('change', function () {
                deferred.resolve(this.files || this.value);
                $imageDialog.modal('hide');
              })
              .val('')
            );
  
            $imageBtn.click(function (event) {
              event.preventDefault();
  
              deferred.resolve($imageUrl.val());
              $imageDialog.modal('hide');
            });
  
            $imageUrl.on('keyup paste', function (event) {
              var url;
              
              if (event.type === 'paste') {
                url = event.originalEvent.clipboardData.getData('text');
              } else {
                url = $imageUrl.val();
              }
              
              toggleBtn($imageBtn, url);
            }).val('').trigger('focus');
          }).one('hidden.bs.modal', function () {
            $imageInput.off('change');
            $imageUrl.off('keyup paste');
            $imageBtn.off('click');
  
            if (deferred.state() === 'pending') {
              deferred.reject();
            }
          }).modal('show');
        });
      };
  
      /**
       * Show link dialog and set event handlers on dialog controls.
       *
       * @param {jQuery} $dialog
       * @param {Object} linkInfo
       * @return {Promise}
       */
      this.showLinkDialog = function ($editable, $dialog, linkInfo) {
        return $.Deferred(function (deferred) {
          var $linkDialog = $dialog.find('.note-link-dialog');
  
          var $linkText = $linkDialog.find('.note-link-text'),
          $linkUrl = $linkDialog.find('.note-link-url'),
          $linkBtn = $linkDialog.find('.note-link-btn'),
          $openInNewWindow = $linkDialog.find('input[type=checkbox]');
  
          $linkDialog.one('shown.bs.modal', function () {
            $linkText.val(linkInfo.text);
  
            $linkText.on('input', function () {
              // if linktext was modified by keyup,
              // stop cloning text from linkUrl
              linkInfo.text = $linkText.val();
            });
  
            // if no url was given, copy text to url
            if (!linkInfo.url) {
              linkInfo.url = linkInfo.text;
              toggleBtn($linkBtn, linkInfo.text);
            }
  
            $linkUrl.on('input', function () {
              toggleBtn($linkBtn, $linkUrl.val());
              // display same link on `Text to display` input
              // when create a new link
              if (!linkInfo.text) {
                $linkText.val($linkUrl.val());
              }
            }).val(linkInfo.url).trigger('focus').trigger('select');
  
            $openInNewWindow.prop('checked', linkInfo.newWindow);
  
            $linkBtn.one('click', function (event) {
              event.preventDefault();
  
              deferred.resolve({
                range: linkInfo.range,
                url: $linkUrl.val(),
                text: $linkText.val(),
                newWindow: $openInNewWindow.is(':checked')
              });
              $linkDialog.modal('hide');
            });
          }).one('hidden.bs.modal', function () {
            // detach events
            $linkText.off('input');
            $linkUrl.off('input');
            $linkBtn.off('click');
  
            if (deferred.state() === 'pending') {
              deferred.reject();
            }
          }).modal('show');
        }).promise();
      };
  
      /**
       * show help dialog
       *
       * @param {jQuery} $dialog
       */
      this.showHelpDialog = function ($editable, $dialog) {
        return $.Deferred(function (deferred) {
          var $helpDialog = $dialog.find('.note-help-dialog');
  
          $helpDialog.one('hidden.bs.modal', function () {
            deferred.resolve();
          }).modal('show');
        }).promise();
      };
    };
  
    return Dialog;
  });
  