<commit_before><openerp>
  <data>
    <record id="view_partner_simple_form_firstname" model="ir.ui.view">
      <field name="name">res.partner.simplified.form.firstname</field>
      <field name="model">res.partner</field>
      <field name="inherit_id" ref="base.view_partner_simple_form"/>
      <field name="arch" type="xml">
        <field name="name" position="attributes">
            <attribute name="attrs">{'readonly': [('is_company', '=', False)]}</attribute>
        </field>
        <field name="category_id" position="before">
          <group attrs="{'invisible': [('is_company', '=', True)]}">
            <field name="lastname"/>
            <field name="firstname"/>
          </group>
        </field>
      </field>
    </record>

    <record id="view_partner_form_firstname" model="ir.ui.view">
      <field name="name">res.partner.form.firstname</field>
      <field name="model">res.partner</field>
      <field name="inherit_id" ref="base.view_partner_form"/>
      <field name="arch" type="xml">
        <field name="name" position="attributes">
            <attribute name="attrs">{'readonly': [('is_company', '=', False)]}</attribute>
        </field>
        <field name="category_id" position="before">
          <group attrs="{'invisible': [('is_company', '=', True)]}">
            <field name="lastname"/>
            <field name="firstname"/>
          </group>
        </field>
        <!-- Add firstname and last name in inner contact form of child_ids -->
        <xpath expr="//form[@string='Contact']/sheet/div/h1/field[@name='name']" position="after">
            <field name="lastname"/>
            <field name="firstname"/>
        </xpath>
      </field>
    </record>

  </data>
</openerp>
<commit_msg>[FIX] get required attributes right for companies and non-companies<commit_after><openerp>
  <data>
    <record id="view_partner_simple_form_firstname" model="ir.ui.view">
      <field name="name">res.partner.simplified.form.firstname</field>
      <field name="model">res.partner</field>
      <field name="inherit_id" ref="base.view_partner_simple_form"/>
      <field name="arch" type="xml">
        <field name="name" position="attributes">
            <attribute name="attrs">{'readonly': [('is_company', '=', False)], 'required': [('is_company', '=', True)]}</attribute>
        </field>
        <field name="category_id" position="before">
          <group attrs="{'invisible': [('is_company', '=', True)]}">
              <field name="lastname" attrs="{'required': [('is_company', '=', False)]}"/>
            <field name="firstname" />
          </group>
        </field>
      </field>
    </record>

    <record id="view_partner_form_firstname" model="ir.ui.view">
      <field name="name">res.partner.form.firstname</field>
      <field name="model">res.partner</field>
      <field name="inherit_id" ref="base.view_partner_form"/>
      <field name="arch" type="xml">
        <field name="name" position="attributes">
            <attribute name="attrs">{'readonly': [('is_company', '=', False)], 'required': [('is_company', '=', True)]}</attribute>
        </field>
        <field name="category_id" position="before">
          <group attrs="{'invisible': [('is_company', '=', True)]}">
            <field name="lastname" attrs="{'required': [('is_company', '=', False)]}"/>
            <field name="firstname"/>
          </group>
        </field>
        <!-- Add firstname and last name in inner contact form of child_ids -->
        <xpath expr="//form[@string='Contact']/sheet/div/h1/field[@name='name']" position="after">
            <field name="lastname"/>
            <field name="firstname"/>
        </xpath>
      </field>
    </record>

  </data>
</openerp>

{'fraction_non_alphanumeric': 0.19807022246046635, 'fraction_numerical': 0.0005360493165371214, 'mean_word_length': 2.9408658922914466, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 97, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3609906', 'n_tokens_mistral': 1150, 'n_tokens_neox': 1141, 'n_words': 210}