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
    Rantai Pasokan
    • 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
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-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
    • Estate Management
    • 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
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

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

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
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

odoo-13 create treeview inside treeview

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
treeviewxmlodoo-13
1 Balas
5209 Tampilan
Avatar
Mohammed Salah

in odoo 10 its possible to create treeview inside treeview using view_type: 


 tree


for examble: 


                    Chart of Accounts            account.account                        tree                        [('parent_id','=',False)]            {'view_all': True}        

​



 and its will make parent child accounts view, something like this:


00000000

​1111111111

​ ​222222222

​ ​ ​33333333333


but this feature is dropped in odoo-13, is there are an alternative way to make similar view?

0
Avatar
Buang
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Jawaban Terbai

Hi,

In Odoo 10, you can create a tree view inside another tree view by defining related fields and using the groups feature in the XML view definition. This allows you to display related records as a nested tree view within the parent tree view.

Here's a step-by-step guide on how to achieve this:

  1. Define Related Fields: First, you need to define related fields in your model. These related fields will establish the relationship between the parent and child records.For example, let's assume you have two models: parent.model and child.model. You want to display a list of related child.model records within the parent.model tree view. You would define a related field in the parent.model like this:

    from odoo import models, fields

    class ParentModel(models.Model):
        _name = 'parent.model'
        _description = 'Parent Model'

        name = fields.Char(string='Name')
        child_ids = fields.One2many('child.model', 'parent_id', string='Children')

    Define the Parent Tree View: In your XML view definition for the parent.model, define a tree view for it. Include the related field child_ids to display the related records.

<record id="view_parent_model_tree" model="ir.ui.view">
<field name="name">parent.model.tree</field>
<field name="model">parent.model</field>
    <field name="arch" type="xml">
        <tree>
<field name="name"/>
            <field name="child_ids" widget="one2many_list">
                <form string="Child Records">
                    <field name="field1"/>
                    <field name="field2"/>
<!-- Add more fields as needed -->
                </form>
            </field>
        </tree>
    </field>
</record>

  1. The widget="one2many_list" attribute tells Odoo to display the related records as a nested list view within the parent tree view.
  2. Define the Child Tree View (Optional): If you want to customize the tree view for the child.model, you can define a separate tree view for it in a similar way.
  3. Apply Security Groups (Optional): If you want to restrict access to certain records, you can use Odoo's security groups to control who can see the child records within the parent tree view.

Once you've defined the related fields and created the appropriate views, you should be able to see the child records displayed as a nested tree view within the parent tree view.

Keep in mind that this approach allows you to display related records in a nested fashion within the parent tree view. If you need more complex tree view structures, you might need to explore custom Odoo module development or consult with an Odoo developer for additional customization.


Hope it helps

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
How can I create treeview inside a treeview
treeview xml
Avatar
0
Jun 15
4462
Show history sale by partner by product
treeview xml
Avatar
0
Mar 15
4341
select check box for tree view inside a form
treeview xml tree_view
Avatar
0
Agu 15
8925
How to create a new tree view for inherited(res.users) model without modifying the original view? v16
treeview xml inheritance odoo16features
Avatar
Avatar
1
Okt 23
3695
tree view issue editable="bottom"
treeview xml one2many attachments
Avatar
Avatar
Avatar
3
Mar 24
27665
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
  • Tugas
  • 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 ภาษาไทย Türkçe українська Tiếng Việt

Odoo adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

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