Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • e-learning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Inteligencia artificial
    • IoT
    • VoIP
    • Información
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Sectores
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Asesoría contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Cervecería
    • Regalos corporativos
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Oficios
    • Servicios de mantenimiento
    • Hardware y soporte técnico
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de vallas publicitarias
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Explorar todos los sectores
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Servicios para partners
    • Registrar tu asesoría contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar una demostración
  • Precios
  • Ayuda
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Sobre este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Sobre este foro
Ayuda

Adding a field to the res.users form view

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Esta pregunta ha sido marcada
settingsusersodoo18
4 Respuestas
464 Vistas
Avatar
samual

Hello odooers.
i added a field to the res.users model/table in python and then extended the res.users form view to add that field to the view.
but when i access the users form view via settings the field is no where to be found is there a different way of adding fields to the user form view in odo?

its not the first time i extend view and add fields to them i did this alot before but here it doesnt seem to work.

i am trying to add the new field inside the access_rights tab

0
Avatar
Descartar
Avatar
samual
Autor Mejor respuesta

Well somehow someway adding this arguement to the field definition made it appear in the user form
website_form_blacklisted=False

0
Avatar
Descartar
Avatar
Zehntech Technologies Inc.
Mejor respuesta

Hello, 

Yes, it is possible to add custom fields to the res.users form view in Odoo.

The first thing to verify is that you are inheriting the correct User form view, as res.users has multiple inherited views and some sections (including Access Rights) may be modified by other modules. Also check:

  • The field is added to the res.users model (not res.partner by mistake).
  • The inherited view is applied successfully without XML errors.
  • The field is inserted at the correct XPath location within the Access Rights tab.
  • Any groups, attrs, or visibility conditions are not hiding the field.

A good troubleshooting step is to activate Developer Mode and inspect the final combined form view to confirm whether your field is being injected into the view architecture.

Hope this works for you! If you need any help implementing this or want a more optimized approach, feel free to reach out for further discussion.

Regards,

Zehntech Technologies Inc.

santosh.sekwadia@zehntech.com

0
Avatar
Descartar
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Mejor respuesta
Hi,

If the field is correctly added to res.users but does not appear in the Access Rights tab, you may be inheriting the wrong view. The user form displayed under Settings → Users & Companies → Users is usually based on the view base.view_users_form. Also, some sections of the user form are restricted by groups, so ensure your user has sufficient access rights.

For example, you can add a custom field as follows:

Python

from odoo import models, fields

class ResUsers(models.Model):
_inherit = 'res.users'

employee_code = fields.Char(string="Employee Code")

XML

<record id="view_users_form_inherit" model="ir.ui.view">
<field name="name">res.users.form.inherit</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">

<xpath expr="//page[@name='access_rights']/group" position="inside">
<field name="employee_code"/>
</xpath>

</field>
</record>


After adding the field, upgrade your module and activate Developer Mode. Then go to Settings → Technical → User Interface → Views and verify that your inherited view is applied correctly.

If the field still does not appear, inspect the final generated view using Developer Mode → Edit View: Form and confirm that:

    The field exists in res.users.
    Your inherited view is active.
    The XPath matches an element that exists in your Odoo version.
    No groups or attrs conditions are hiding the field.

The exact XPath may vary depending on the Odoo version, so checking the structure of base.view_users_form in Developer Mode is often the quickest way to identify the correct insertion point.

Hope it helps

0
Avatar
Descartar
Avatar
Muhammad Farooq Iqbal
Mejor respuesta

Hi,

Yes, res.users is a bit special compared to normal models.

The user form opened from Settings > Users & Companies > Users is usually not a simple single form view. Odoo has different inherited views for users, especially for access rights/preferences, and the Access Rights tab is dynamically handled with groups/security-related content.

So if your field is added to res.users correctly but does not appear, check these points:

  1. Make sure you are inheriting the correct user form view, usually:

base.view_users_form
  1. Make sure your module depends on base and any module that adds the tab you are trying to inherit.

  2. The access_rights tab may be modified dynamically, so try adding your field to another stable place first, such as after the login/email field, to confirm the field and view inheritance are working.

Example:

<record id="view_users_form_inherit_custom" model="ir.ui.view">
    <field name="name">res.users.form.inherit.custom</field>
    <field name="model">res.users</field>
    <field name="inherit_id" ref="base.view_users_form"/>
    <field name="arch" type="xml">
        <xpath expr="//field[@name='login']" position="after">
            <field name="your_field_name"/>
        </xpath>
    </field>
</record>
  1. If you specifically want to place it inside the Access Rights tab, inspect the final view in developer mode and confirm the exact XPath. The page name may not be the same as what you expect.

  2. Also make sure the field has proper access rights. Since res.users is security-sensitive, visibility can be affected by groups.

  3. Upgrade your custom module after changing Python/XML:

./odoo-bin -d your_db -u your_module

In short, adding fields to res.users is possible, but the Access Rights tab is special. First confirm the field appears in a stable location, then use developer mode to inspect the final inherited view and target the correct XPath inside the access rights page.

0
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
Technical User Settings > Odoo V14
settings users v14
Avatar
Avatar
Avatar
2
feb 24
4701
Configure user's rights to modify General setting
settings users v7
Avatar
Avatar
2
dic 19
13882
Administrator rights, User editing rights
settings users v7
Avatar
Avatar
1
sept 16
16380
Odoo user error how to fix? Resuelto
settings users odoo8
Avatar
Avatar
Avatar
3
may 16
6208
Creating a Readonly User Group in Odoo Without Code Modifications Resuelto
settings users groups access rights
Avatar
Avatar
2
ene 25
4200
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información legal • Privacidad
  • Seguridad
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones empresariales de código abierto que cubre todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now