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.

42 lines
1.5 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  3. © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. -->
  4. <openerp>
  5. <data>
  6. <!-- Required before modifying `base.vew_users_form`.
  7. https://github.com/odoo/odoo/issues/6324#issuecomment-93534579 -->
  8. <function model="res.groups" name="update_user_groups_view" />
  9. <record id="users_form" model="ir.ui.view">
  10. <field name="name">Add second last name</field>
  11. <field name="model">res.users</field>
  12. <field name="inherit_id" ref="partner_firstname.view_users_form"/>
  13. <field name="arch" type="xml">
  14. <data>
  15. <xpath expr="//field[@name='firstname']" position="attributes">
  16. <attribute name="attrs">{
  17. 'required': [('lastname', '=', False),
  18. ('lastname2', '=', False)]
  19. }</attribute>
  20. </xpath>
  21. <xpath expr="//field[@name='lastname']" position="attributes">
  22. <attribute name="attrs">{
  23. 'required': [('firstname', '=', False),
  24. ('lastname2', '=', False)]
  25. }</attribute>
  26. </xpath>
  27. <xpath expr="//field[@name='lastname']" position="after">
  28. <field name="lastname2"
  29. attrs="{'required': [('firstname', '=', False),
  30. ('lastname', '=', False)]}"/>
  31. </xpath>
  32. </data>
  33. </field>
  34. </record>
  35. </data>
  36. </openerp>