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.

49 lines
1.7 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Odoo, Open Source Management Solution
  4. Author: Nicolas Bessi. Copyright Camptocamp SA
  5. Copyright (C)
  6. 2014: Agile Business Group (<http://www.agilebg.com>)
  7. 2015: Grupo ESOC <www.grupoesoc.es>
  8. This program is free software: you can redistribute it and/or modify
  9. it under the terms of the GNU Affero General Public License as published by
  10. the Free Software Foundation, either version 3 of the License, or
  11. (at your option) any later version.
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. GNU Affero General Public License for more details.
  16. You should have received a copy of the GNU Affero General Public License
  17. along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. -->
  19. <openerp>
  20. <data>
  21. <record id="users_form" model="ir.ui.view">
  22. <field name="name">Add firstname and surnames</field>
  23. <field name="model">res.users</field>
  24. <field name="inherit_id" ref="base.view_users_form"/>
  25. <field name="arch" type="xml">
  26. <data>
  27. <xpath expr="//field[@name='name']" position="attributes">
  28. <attribute name="readonly">True</attribute>
  29. </xpath>
  30. <xpath expr="//field[@name='email']" position="after">
  31. <group>
  32. <field name="lastname"
  33. attrs="{'required': [('firstname', '=', False)]}"/>
  34. <field name="firstname"
  35. attrs="{'required': [('lastname', '=', False)]}"/>
  36. </group>
  37. </xpath>
  38. </data>
  39. </field>
  40. </record>
  41. </data>
  42. </openerp>