You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.1 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <!-- Required before modifying `base.vew_users_form`.
  5. https://github.com/odoo/odoo/issues/6324#issuecomment-93534579 -->
  6. <function model="res.groups" name="update_user_groups_view" />
  7. <record id="view_users_form" model="ir.ui.view">
  8. <field name="name">Add firstname and surnames</field>
  9. <field name="model">res.users</field>
  10. <field name="inherit_id" ref="base.view_users_form"/>
  11. <field name="arch" type="xml">
  12. <data>
  13. <xpath expr="//field[@name='name']" position="attributes">
  14. <attribute name="readonly">True</attribute>
  15. </xpath>
  16. <xpath expr="//field[@name='email']" position="after">
  17. <group>
  18. <field name="lastname"
  19. attrs="{'required': [('firstname', '=', False)]}"/>
  20. <field name="firstname"
  21. attrs="{'required': [('lastname', '=', False)]}"/>
  22. </group>
  23. </xpath>
  24. </data>
  25. </field>
  26. </record>
  27. </data>
  28. </openerp>