Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textile
    • Kov
    • Nábytek
    • Jídlo
    • Brewery
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • IT hardware a podpora
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Browse all Industries
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Services for Partners
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

How to create a new tree view for inherited(res.users) model without modifying the original view? v16

Odebírat

Get notified when there's activity on this post

This question has been flagged
treeviewxmlinheritanceodoo16features
1 Odpovědět
3702 Zobrazení
Avatar
Rithik Sandron

I have inherited 'res.users' and added some custom fields.

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

start_date = fields.Date(string='Start Date')
renew_date = fields.Date(string='Renew Date')

I want to create a new tree view under a new menu with these custom fields(start_date, renew_date, login, name) without modifying the existing view. My current code tree view.


        users.view.inherit
        res.users
        primary
       
           
               
               
               
               
           
       
   

Using the above xml still overrides the existing view, more specifically the 'users' - many2many field in res.groups and it's corresponding view with ID view_groups_form in base.action_res_groups action.


Is there anyway to not override the above view_groups_form users many2many view?


Thanks for the help

0
Avatar
Zrušit
Rithik Sandron
Autor

here's the xml code:
<record id="users_view_inherits" model="ir.ui.view">
<field name="name">users.view.inherit</field>
<field name="model">res.users</field>
<field name="mode">primary</field>
<field name="arch" type="xml">
<tree delete="0">
<field name="login"/>
<field name="name"/>
<field name="start_date"/>
<field name="renew_date"/>
</tree>
</field>
</record>

Avatar
Jainesh Shah(Aktiv Software)
Nejlepší odpověď

Hello @Rithik Sandron


To create new tree view without making changes in original tree view, you can use this code.

Please find code in comment. 

Thanks & Regards,
Email:  odoo@aktivsoftware.com   

Skype: kalpeshmaheshwari

0
Avatar
Zrušit
Jainesh Shah(Aktiv Software)

Please find code here :-

<record model="ir.ui.view" id="view_tree_res_users">
<field name="name">res.users.tree.</field>
<field name="model">res.users</field>
<field name="arch" type="xml">
<tree editable="bottom">
<field name="login"/>
<field name="name"/>
<field name="start_date"/>
<field name="renew_date"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="res_users_configure">
<field name="name">Users Tree View</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.users</field>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_tree_res_users"/>
</record>

Rithik Sandron
Autor

Thank you for the response @Jainesh Shah. I tried the code you provided. It unfortunately did not work. The view still gets overridden.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
Odoo 16 groups on inherited views
xml inheritance groups odoo16features
Avatar
Avatar
1
kvě 23
4586
How To Reset Dynamic Tree View To Its Default Visible State After User Modifies in Odoo 16?
treeview odoo16features
Avatar
0
pro 23
2477
button tree view?
treeview odoo16features
Avatar
Avatar
Avatar
2
srp 23
4772
Create a module that can be inherited to add a common field in other custom modules Vyřešeno
inheritance odoo16features
Avatar
Avatar
Avatar
Avatar
3
lis 24
5372
Odoo 16 ce: Inheritance of View to move a field from a group to another
inheritance odoo16features
Avatar
Avatar
Avatar
2
čvc 23
4920
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 ภาษาไทย Türkçe українська Tiếng Việt

Odoo je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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