hunk.code_window:             <tree string="POS Orders" create="0" sample="1" decoration-info="state == 'draft'" decoration-muted="state == 'cancel'">
                   <field name="currency_id" column_invisible="True"/>
                   <field name="name" decoration-bf="1"/>
                   <field name="session_id"  readonly="state != 'draft'"/>
                   <field name="date_order"/>
                   <field name="pos_reference"/>
                   <field name="partner_id"/>
                   <field string="Cashier" name="user_id" widget="many2one_avatar_user" readonly="state in ['done', 'invoiced']"/>
                   <field name="amount_total" sum="Amount total" widget="monetary" decoration-bf="1"/>
  
hunk.labels: keep keep keep keep add keep keep keep keep
hunk.after_edit:                 <field name="config_id" />
  
hunk.file_path: addons/point_of_sale/views/pos_order_view.xml
hunk.type: add
file: # Part of Odoo. See LICENSE file for full copyright and licensing details.
  
  from odoo.exceptions import AccessError
  from odoo.http import Controller, route, request
  from odoo.tools.translate import _
  
  
  class View(Controller):
  
      @route('/web/view/edit_custom', type='json', auth="user")
      def edit_custom(self, custom_id, arch):
          """
          Edit a custom view
  
          :param int custom_id: the id of the edited custom view
          :param str arch: the edited arch of the custom view
          :returns: dict with acknowledged operation (result set to True)
          """
          custom_view = request.env['ir.ui.view.custom'].sudo().browse(custom_id)
          if not custom_view.user_id == request.env.user:
              raise AccessError(_("Custom view %s does not belong to user %s", custom_id, self.env.user.login))
          custom_view.write({'arch': arch})
          return {'result': True}
  