hunk.code_window:     </record>
       <record id="action_orders_ecommerce" model="ir.actions.act_window">
           <field name="name">Orders</field>
           <field name="res_model">sale.order</field>
           <field name="view_mode">tree,form,kanban</field>
           <field name="context">{'show_sale': True, 'search_default_order_confirmed': 1, 'search_default_from_website': 1}</field>
           <field name="search_view_id" ref="view_sales_order_filter_ecommerce"/>
           <field name="help" type="html">
               <p class="o_view_nocontent_empty_folder">
                   There is no confirmed order from the website
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep keep
hunk.after_edit:         <field name="view_mode">tree,form,kanban,activity</field>
  
hunk.file_path: addons/website_sale/views/sale_order_views.xml
hunk.type: replace
file: # -*- coding:utf-8 -*-
  # Part of Odoo. See LICENSE file for full copyright and licensing details.
  
  from odoo import api, fields, models
  
  
  class HrContract(models.Model):
      """
      Employee contract based on the visa, work permits
      allows to configure different Salary structure
      """
      _inherit = 'hr.contract'
      _description = 'Employee Contract'
  
      struct_id = fields.Many2one('hr.payroll.structure', string='Salary Structure')
      schedule_pay = fields.Selection([
          ('monthly', 'Monthly'),
          ('quarterly', 'Quarterly'),
          ('semi-annually', 'Semi-annually'),
          ('annually', 'Annually'),
          ('weekly', 'Weekly'),
          ('bi-weekly', 'Bi-weekly'),
          ('bi-monthly', 'Bi-monthly'),
      ], string='Scheduled Pay', index=True, default='monthly',
      help="Defines the frequency of the wage payment.")
      resource_calendar_id = fields.Many2one(required=True, help="Employee's working schedule.")
  
      @api.multi
      def get_all_structures(self):
          """
          @return: the structures linked to the given contracts, ordered by hierachy (parent=False first,
                   then first level children and so on) and without duplicata
          """
          structures = self.mapped('struct_id')
          if not structures:
              return []
          # YTI TODO return browse records
          return list(set(structures._get_parent_structure().ids))
  
      @api.multi
      def get_attribute(self, code, attribute):
          return self.env['hr.contract.advantage.template'].search([('code', '=', code)], limit=1)[attribute]
  
      @api.multi
      def set_attribute_value(self, code, active):
          for contract in self:
              if active:
                  value = self.env['hr.contract.advantage.template'].search([('code', '=', code)], limit=1).default_value
                  contract[code] = value
              else:
                  contract[code] = 0.0
  
  
  class HrContractAdvandageTemplate(models.Model):
      _name = 'hr.contract.advantage.template'
      _description = "Employee's Advantage on Contract"
  
      name = fields.Char('Name', required=True)
      code = fields.Char('Code', required=True)
      lower_bound = fields.Float('Lower Bound', help="Lower bound authorized by the employer for this advantage")
      upper_bound = fields.Float('Upper Bound', help="Upper bound authorized by the employer for this advantage")
      default_value = fields.Float('Default value for this advantage')
  