Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Discuss
    • Kecerdasan Buatan
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Manajemen Properti
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Konsultasi
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

Adding a field to the res.users form view

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
settingsusersodoo18
4 Replies
463 Tampilan
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
Buang
Avatar
samual
Penulis Jawaban Terbai

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

0
Avatar
Buang
Avatar
Zehntech Technologies Inc.
Jawaban Terbai

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
Buang
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Jawaban Terbai
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
Buang
Avatar
Muhammad Farooq Iqbal
Jawaban Terbai

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
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
Technical User Settings > Odoo V14
settings users v14
Avatar
Avatar
Avatar
2
Feb 24
4695
Configure user's rights to modify General setting
settings users v7
Avatar
Avatar
2
Des 19
13880
Administrator rights, User editing rights
settings users v7
Avatar
Avatar
1
Sep 16
16376
Odoo user error how to fix? Diselesaikan
settings users odoo8
Avatar
Avatar
Avatar
3
Mei 16
6208
Creating a Readonly User Group in Odoo Without Code Modifications Diselesaikan
settings users groups access rights
Avatar
Avatar
2
Jan 25
4199
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Karir
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 adalah software terintegrasi dengan 70+ aplikasi seperti CRM, Akuntansi, Inventaris, Sales, eCommerce, Marketing, POS; plus fitur lokal Indonesia!

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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