hunk.code_window:     # activity
       activity_type_id = fields.Many2one(
           'mail.activity.type', 'Activity',
           domain="['|', ('res_model_id', '=', False), ('res_model_id', '=', res_model_id)]")
       activity_category = fields.Selection(related='activity_type_id.category')
       icon = fields.Char('Icon', related='activity_type_id.icon')
       summary = fields.Char('Summary')
       note = fields.Html('Note')
       feedback = fields.Html('Feedback')
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.after_edit:         domain="['|', ('res_model_id', '=', False), ('res_model_id', '=', res_model_id)]", ondelete='restrict')
  
hunk.file_path: addons/mail/models/mail_activity.py
hunk.type: replace
file: <?xml version="1.0"?>
  <odoo>
  
      <record id="mail_activity_type_view_form" model="ir.ui.view">
          <field name="name">mail.activity.type.form.inherit.calendar</field>
          <field name="model">mail.activity.type</field>
          <field name="inherit_id" ref="mail.mail_activity_type_view_form"/>
          <field name="arch" type="xml">
              <xpath expr="//field[@name='category']" position="attributes">
                  <attribute name="invisible">0</attribute>
              </xpath>
          </field>
      </record>
  
      <record id="mail_activity_view_form_popup" model="ir.ui.view">
          <field name="name">mail.activity.form.inherit.calendar</field>
          <field name="model">mail.activity</field>
          <field name="inherit_id" ref="mail.mail_activity_view_form_popup"/>
          <field name="arch" type="xml">
              <xpath expr="//field[@name='date_deadline']" position="attributes">
                    <attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
              </xpath>
              <xpath expr="//field[@name='user_id']" position="attributes">
                    <attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
              </xpath>
              <xpath expr="//button[@name='action_close_dialog']" position="attributes">
                    <attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
              </xpath>
              <xpath expr="//button[@name='action_done']" position="attributes">
                    <attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
              </xpath>
              <xpath expr="//button[@special='cancel']" position="attributes">
                    <attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
              </xpath>
              <xpath expr="//button[@name='action_close_dialog']" position="before">
                  <button string="Schedule a meeting"
                      attrs="{'invisible': [('activity_category', '!=', 'meeting')]}"
                      name="action_create_calendar_event"
                      type="object"
                      class="btn-primary"/>
              </xpath>
          </field>
      </record>
  
  </odoo>
  