hunk.code_window:     </record>
       <record id="action_view_unpaid_quotation_tree" model="ir.actions.act_window">
           <field name="name">Unpaid Orders</field>
           <field name="res_model">sale.order</field>
           <field name="view_mode">tree,kanban,form</field>
           <field name="view_type">form</field>
           <field name="domain">[('state', '=', 'sent'), ('team_id.team_type', '=', 'website')]</field>
           <field name="context" eval="{'show_sale': True, 'create': False}"/>
           <field name="view_id" ref="sale.view_quotation_tree"/>
           <field name="search_view_id" ref="view_sales_order_filter_ecommerce_unpaid"/>
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep keep
hunk.after_edit:         <field name="view_mode">tree,kanban,form,activity</field>
  
hunk.file_path: addons/website_sale/views/sale_order_views.xml
hunk.type: replace
file: odoo.define('web.PieChart', function (require) {
  "use strict";
  
  /**
   * This widget render a Pie Chart. It is used in the dashboard view.
   */
  
  var core = require('web.core');
  var Domain = require('web.Domain');
  var viewRegistry = require('web.view_registry');
  var Widget = require('web.Widget');
  var widgetRegistry = require('web.widget_registry');
  
  var qweb = core.qweb;
  
  var PieChart = Widget.extend({
      className: 'o_pie_chart',
      xmlDependencies: ['/web/static/src/xml/pie_chart.xml'],
  
      /**
       * @override
       * @param {Widget} parent
       * @param {Object} record
       * @param {Object} node node from arch
       */
      init: function (parent, record, node) {
          this._super.apply(this, arguments);
  
          var modifiers = node.attrs.modifiers;
          var domain = record.domain.concat(
              Domain.prototype.stringToArray(modifiers.domain || '[]'));
          var arch = qweb.render('web.PieChart', {
              modifiers: modifiers,
          });
  
          this.subViewParams = {
              context: record.context,
              domain: domain,
              groupBy: [],
              modelName: record.model,
              withControlPanel: false,
              isEmbedded: true,
              mode: 'pie',
          };
  
          this.viewInfo = {
              arch: arch,
              fields: record.fields,
              viewFields: record.fieldsInfo.dashboard,
          };
      },
      /**
       * Instantiates the pie chart view and starts the graph controller.
       *
       * @override
       */
      willStart: function () {
          var self = this;
          var def1 = this._super.apply(this, arguments);
  
          var SubView = viewRegistry.get('graph');
          var subView = new SubView(this.viewInfo, this.subViewParams);
          var def2 = subView.getController(this).then(function (controller) {
              self.controller = controller;
              return self.controller.appendTo(document.createDocumentFragment());
          });
          return $.when(def1, def2);
      },
      /**
       * @override
       */
      start: function () {
          this.$el.append(this.controller.$el);
          return this._super.apply(this, arguments);
      },
      /**
       * Call `on_attach_callback` for each subview
       *
       * @override
       */
      on_attach_callback: function () {
          this.controller.on_attach_callback();
      },
  });
  
  widgetRegistry.add('pie_chart', PieChart);
  
  return PieChart;
  
  });
  