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í
    Food & Hospitality
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Guest House
    • Distributor nápojů
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Trades
    • Údržbář
    • IT hardware a podpora
    • Solar Energy Systems
    • Výrobce obuvi
    • Úklidové služby
    • HVAC Services
    Others
    • Nonprofit Organization
    • 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

Show differents tree views to same model in inventory module

Odebírat

Get notified when there's activity on this post

This question has been flagged
treeviewcustominventorytree
1 Odpovědět
3239 Zobrazení
Avatar
Angel

Hi, I need to show one or other tree view by menuitem to the same model (product.template), when I use the XML below it shows all columns (model, origin) using menuitem1 or menuitem2 and I want to show a tree with colum 'model' by menuitem1 and by menuitem2 columm 'origin'.


record id="extra_tree1" model="ir.ui.view">
field
name="name">product.extra.tree
field
name="model">product.template
field
name="inherit_id" ref="product.product_template_tree_view"/>
field
name="arch" type="xml">
tree>
field
name="model"/>
/tree>
/field>
/record>

record
id="extra_tree2" model="ir.ui.view">
field
name="name">product.extra.tree
field
name="model">product.template
field
name="inherit_id" ref="product.product_template_tree_view"/>
field
name="arch" type="xml">
tree>
field
name="origin"/>
/tree>
/field>
/record>

record
id="action1" model="ir.actions.act_window">
field
name="name">Test action 1
field
name="type">ir.actions.act_window
field
name="res_model">product.template
field
name="view_type">form
field
name="view_mode">form,tree
field
name="view_ids" eval="[
(5, 0, 0),
(0, 0, {'view_mode': 'tree', 'view_id': ref('inventory_extras.extra_tree1')})]"
/>
field
name="context">{}
/record>

record
id="action2" model="ir.actions.act_window">
field
name="name">Test action 2
field
name="type">ir.actions.act_window
field
name="res_model">product.template
field
name="view_type">tree
field
name="view_mode">form,tree
field
name="view_ids" eval="[
(5, 0, 0),
(0, 0, {'view_mode': 'tree', 'view_id': ref('inventory_extras.extra_tree2')})]"
/>
field
name="context">{}/field>
/record>

menuitem
id="test_model_menu_action1" action="action1"/>

menuitem
id="test_model_menu_action2" action="action2"/>

0
Avatar
Zrušit
Avatar
Jitendra Bhatt
Nejlepší odpověď

Please try below code with context. you can have separate view by managing context.


id="extra_tree1" model="ir.ui.view">
name="name">product.extra.tree
name="model">product.template
name="inherit_id" ref="product.product_template_tree_view"/>
name="arch" type="xml">

name="model" invisible="context.get('model')"/>
name="origin" invisible="context.get('origin')"/>


id="action1" model="ir.actions.act_window">
name="name">Test action 1
name="type">ir.actions.act_window
name="res_model">product.template
name="view_mode">tree
name="context">{"model":True}

id="action2" model="ir.actions.act_window">
name="name">Test action 2
name="type">ir.actions.act_window
name="res_model">product.template
name="view_mode">tree
name="context">{"origin":True}


id="test_model_menu_action1" action="action1" parent="stock.menu_stock_root"/>
id="test_model_menu_action2" action="action2" parent="stock.menu_stock_root"/>



0
Avatar
Zrušit
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
Show differents views by condition
custom inventory tree features
Avatar
Avatar
1
čvc 22
2984
Highlight Records in Tree Vyřešeno
treeview tree odoo
Avatar
Avatar
Avatar
Avatar
3
kvě 23
2877
How to hide import button in a specific tree view in Odoo v12
import treeview tree
Avatar
Avatar
1
dub 23
4564
How do you add a header in a tree view? Vyřešeno
treeview header tree
Avatar
Avatar
Avatar
2
kvě 25
32397
How to create a button for every row in view tree
treeview tree button
Avatar
Avatar
1
zář 18
11672
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