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

Open tree view by default in tree without view_mode form

Odebírat

Get notified when there's activity on this post

This question has been flagged
treetree_view
2 Odpovědi
12484 Zobrazení
Avatar
Michael Jurke

I specified a tree view and action view to open the tree view for a model. It works as first with the following XML:

```

<record id="my_feature_tree" model="ir.ui.view">
  ...
</record>

<record id="action_my_feature_tree1" model="ir.actions.act_window">
  <field name="name">My Feature</field>
  <field name="res_model">my_module.my_model</field>
  <field name="view_type">form</field>
  <field name="view_mode">tree,kanban,form,pivot,graph</field>
  <field eval="False" name="view_id"/>
  <field name="domain">
    [('agent_id','!=',False)]
  </field>
  <!-- <field name="search_view_id" ref="view_account_invoice_filter"/> -->
</record>

<record id="action_my_feature_tree1_view1" model="ir.actions.act_window.view">
  <field eval="1" name="sequence"/>
  <field name="view_mode">tree</field>
  <field name="view_id" ref="my_feature_tree"/>
  <field name="act_window_id" ref="action_my_feature_tree1"/>
</record>

```

But when I remove the view_mode "form" and set view_type to "tree", the view is broken:

* tree view is missing entirely (only kanban, pivot and graph are available

Is this a bug? This tree view is just a database view and record creations is undesirable. I already added create="false" to the tree element to get rid of the "Create" and "Import" buttons, but still it opens the form when clicking on a line.

It would also solve my problem if I could specify another form view AND model to represent in the form view. But the tree model and the default form view cannot be used.

Thanks a lot!

1
Avatar
Zrušit
Avatar
Michael Jurke
Nejlepší odpověď

I found a workaround by specifying separate views for tree and form.

However, it does not really answer the question, because I did not find a way to disable the form view. It is still a bit confusing for the customer, it would be preferable not to open the form view at all because there are other clickable buttons in the rows. 

But I leave the workaround here for whoever needs it. You can create a custom action and assign custom action views to it like this:

  <record id="action_my_products" model="ir.actions.act_window">
    <field name="name">Products</field>
    <field name="type">ir.actions.act_window</field>
    <field name="res_model">product.product</field>
    <field name="view_mode">tree,form</field>
    <field name="view_id" ref="<tree_view_ref>"/>
  </record>

  <record id="action_my_products_tree" model="ir.actions.act_window.view">
    <field name="view_mode">tree</field>
    <field name="view_id" ref="<tree_view_ref>"/>
    <field name="act_window_id" ref="action_my_products"/>
  </record>

  <record id="action_my_product_form" model="ir.actions.act_window.view">
    <field name="view_mode">form</field>
    <field name="view_id" ref="<form_view_ref>"/>
    <field name="act_window_id" ref="action_my_products"/>
  </record>


0
Avatar
Zrušit
Avatar
yasir iqbal
Nejlepší odpověď

same problem

0
Avatar
Zrušit
Michael Jurke

In another, more recent project I used the above workaround with an informational dummy form view. Maybe it helps you, too.

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
Error while printing a tree: Can't render view base.view_partner_form for model: res.partner
treeview tree tree_view
Avatar
1
dub 16
4658
Reduced Tree view screen space or multiple trees in single screen
tree tree_but_open tree_view
Avatar
Avatar
1
bře 15
5040
tree colors in a view contains a statusbar ?? Vyřešeno
tree colors tree_view
Avatar
Avatar
1
bře 15
7027
Show a field from many2many relationship in a tree view Vyřešeno
treeview tree many2many tree_view
Avatar
Avatar
Avatar
Avatar
4
čvn 25
12349
Making a tree column invisible depending on the view or model
tree_view
Avatar
Avatar
2
kvě 22
4408
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