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
42 lines
1.5 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
© 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. -->
|
|
|
|
<openerp>
|
|
<data>
|
|
|
|
<!-- Required before modifying `base.vew_users_form`.
|
|
https://github.com/odoo/odoo/issues/6324#issuecomment-93534579 -->
|
|
<function model="res.groups" name="update_user_groups_view" />
|
|
|
|
<record id="users_form" model="ir.ui.view">
|
|
<field name="name">Add second last name</field>
|
|
<field name="model">res.users</field>
|
|
<field name="inherit_id" ref="partner_firstname.view_users_form"/>
|
|
<field name="arch" type="xml">
|
|
<data>
|
|
<xpath expr="//field[@name='firstname']" position="attributes">
|
|
<attribute name="attrs">{
|
|
'required': [('lastname', '=', False),
|
|
('lastname2', '=', False)]
|
|
}</attribute>
|
|
</xpath>
|
|
|
|
<xpath expr="//field[@name='lastname']" position="attributes">
|
|
<attribute name="attrs">{
|
|
'required': [('firstname', '=', False),
|
|
('lastname2', '=', False)]
|
|
}</attribute>
|
|
</xpath>
|
|
|
|
<xpath expr="//field[@name='lastname']" position="after">
|
|
<field name="lastname2"
|
|
attrs="{'required': [('firstname', '=', False),
|
|
('lastname', '=', False)]}"/>
|
|
</xpath>
|
|
</data>
|
|
</field>
|
|
</record>
|
|
|
|
</data>
|
|
</openerp>
|