hunk.code_window:         if not dbname:
               return
           with tools.ignore(Exception), tools.mute_logger('odoo.sql_db'), sql_db.db_connect(dbname, allow_uri=True).cursor() as cr:
               cr.autocommit(True)
               msg = tools.ustr(record.msg)
               if record.args:
                   msg = msg % record.args
               traceback = getattr(record, 'exc_text', '')
               if traceback:
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.after_edit:             # preclude risks of deadlocks
               cr.execute("SET LOCAL statement_timeout = 1000")
  
hunk.file_path: odoo/netsvc.py
hunk.type: replace
file: -
    Setting property field
  -
    !python {model: ir.model.data, id: False} : |
        account_id = self.env['account.account'].search([('tag_ids', 'in', [ref('account.demo_stock_account')])], limit=1).id
        fields_id = self.env['ir.model.fields'].search([('model','=','product.category'),('name','=','property_stock_valuation_account_id')], limit=1).id
        if not account_id:
            account_id = self.env['account.account'].search([('user_type_id', '=', ref('account.data_account_type_current_assets'))], limit=1).id
        if account_id:
            vals = {
                'name': 'property_stock_valuation_account_id',
                'fields_id': fields_id,
                'value': 'account.account,'+str(account_id),
                'company_id': ref('base.main_company'),
            }
            self._update('ir.property', 'stock_account', vals, 'property_stock_valuation_account_id')
  