hunk.code_window:     line = fields.Char(required=True)
       @api.model_cr
       def init(self):
           super(IrLogging, self).init()
           self._cr.execute("ALTER TABLE ir_logging DROP CONSTRAINT IF EXISTS ir_logging_write_uid_fkey")
  
hunk.labels: keep keep keep keep keep replace
hunk.after_edit:         self._cr.execute("select 1 from information_schema.constraint_column_usage where table_name = 'ir_logging' and constraint_name = 'ir_logging_write_uid_fkey'")
           if self._cr.rowcount:
               # DROP CONSTRAINT unconditionally takes an ACCESS EXCLUSIVE lock
               # on the table, even "IF EXISTS" is set and not matching; disabling
               # the relevant trigger instead acquires SHARE ROW EXCLUSIVE, which
               # still conflicts with the ROW EXCLUSIVE needed for an insert
               self._cr.execute("ALTER TABLE ir_logging DROP CONSTRAINT ir_logging_write_uid_fkey")
hunk.file_path: odoo/addons/base/ir/ir_logging.py
hunk.type: replace
file: # -*- coding: utf-8 -*-
  
  from odoo.addons.product.tests import common
  
  
  class TestStockCommon(common.TestProductCommon):
  
      def _create_procurement(self, user, **values):
          Procurement = self.env['procurement.order'].sudo(user)
          procurement = Procurement.new(values)
          procurement.onchange_product_id()
          return Procurement.create(procurement._convert_to_write(procurement._cache))
  
      @classmethod
      def setUpClass(cls):
          super(TestStockCommon, cls).setUpClass()
  
          user_group_employee = cls.env.ref('base.group_user')
  
          # User Data: lambda user
          Users = cls.env['res.users'].with_context({'no_reset_password': True, 'mail_create_nosubscribe': True})
          cls.user_employee = Users.create({
              'name': 'Fabricette Manivelle',
              'login': 'fabricette',
              'email': 'f.f@example.com',
              'notification_type': 'inbox',
              'groups_id': [(6, 0, [user_group_employee.id])]})
  