hunk.code_window:         """ Returns a ServiceWorker javascript file scoped for website_event
           """
           sw_file = get_module_resource('website_event_track', 'static/src/js/service_worker.js')
           with open(sw_file, 'rb') as fp:
               body = fp.read()
  
hunk.labels: keep keep keep replace keep
hunk.after_edit:         with open(sw_file, 'r') as fp:
  
hunk.file_path: addons/website_event_track/controllers/webmanifest.py
hunk.type: replace
file: # -*- coding: utf-8 -*-
  
  from odoo import _, models
  from odoo.exceptions import UserError
  
  
  class AccountFiscalPosition(models.Model):
      _inherit = "account.fiscal.position"
  
      def write(self, vals):
          if "tax_ids" in vals:
              if self.env["pos.order"].sudo().search_count([("fiscal_position_id", "in", self.ids)]):
                  raise UserError(
                      _(
                          "You cannot modify a fiscal position used in a POS order. "
                          "You should archive it and create a new one."
                      )
                  )
          return super(AccountFiscalPosition, self).write(vals)
  