İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

How to manage tree view inside a form view

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
treeviewone2manyformview
2 Cevaplar
29997 Görünümler
Avatar
arthur

Hello, I am creating a custom form view for odoo stock.picking module

My xml file contains the following record:

<record id="raizs_stock_picking_form_view" model="ir.ui.view">
    <field name="name">raizs.stock.picking.form.view</field>
    <field name="model">stock.picking</field>
    <field name="priority" eval="20"/>
    <field name="arch" type="xml">
        <form string="Movimentos">
            <sheet>
                <group>
                    <field name="name"></field>
                    <field name="partner_id"></field>
                    <field name="state"></field>
                </group>
                <notebook>
                    <page string="Produtos" >
                            <field name="id" invisible="1"/>
                        <field name="move_lines" style="pointer-events:none;">
                            <tree create="false" edit="false" editable="bottom" options="{'no_open': True}">
                                    <field name="state" invisible="True"/>
                                    <field name="additional" invisible="
                                    <field name="is_initial_demand_editable" invisible="True"/>
                                    <field name="is_quantity_done_editable" invisible="True"/>
                                    <field name="has_move_lines" invisible="True"/>
                                    <field name="product_id" required="1" attrs="{'readonly': ['|', '&amp;', ('state', '!=', 'draft'),                                                 ('additional', '=', False), ('has_move_lines', '=', True)]}"/>
                                    <field name="product_uom_qty" string="Initial Demand" attrs="{'readonly':                                                 [('is_initial_demand_editable', '=', False)]}"/>
                                    <field name="quantity_done" string="Done" attrs="{'readonly': [('is_quantity_done_editable',                                                 '=', False)]}"/>
                                    <field name="product_uom" attrs="{'readonly': [('state', '!=', 'draft'), ('additional', '=', False)]}"                                             options="{'no_open': True, 'no_create': True}" string="Unit of Measure"                                             groups="product.group_uom"/>
                            </tree>
                    </field>
            </page>
        </notebook>
    </sheet>
</form>
</field>
  </record>


I am having two problems:

1. I am trying to prevent the clicking on the move_line tree lines from opening the form view, but it keeps opening.

2. I want to display this tree view on odoo app for android, but it keeps showing the move_line records as a kanban view, even if I didn't specify it.

How do I get these 2 points right?

Thank you!

0
Avatar
Vazgeç
Avatar
arthur
Üretici En İyi Yanıt

Thanks to your answer @subbarao, Unfortunately, the changes  you mentioned didn't work for me =/

I will post my whole view to clarify things, but basically I created to two menuitems and two actions for them, that open the same list and form views, but with different domains.

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <menuitem
        id="raizs_receipt_root_menu"
        name="Recebimentos"
    />

<record id="raizs_stock_picking_form_view" model="ir.ui.view">
    <field name="name">raizs.stock.picking.form.view</field>
    <field name="model">stock.picking</field>
    <field name="priority" eval="20"/>
    <field name="arch" type="xml">
    <form string="Movimentos">
        <sheet>
            <group>
                <field name="name"></field>
                <field name="partner_id"></field>
                <field name="state"></field>
           </group>
           <notebook>
                <page string="Produtos" >
                    <field name="id" invisible="1"/>
                    <field name="move_lines">
                        <tree create="false" editable="bottom" options="{'no_open': True}">
                            <field name="state" invisible="True"/>
                            <field name="additional" invisible="True"/>
                            <field name="is_initial_demand_editable" invisible="True"/>
                            <field name="is_quantity_done_editable" invisible="True"/>
                            <field name="has_move_lines" invisible="True"/>
                            <field name="product_id" required="1" attrs="{'readonly': ['|', '&amp;', ('state', '!=', 'draft'),                             ('additional', '=', False), ('has_move_lines', '=', True)]}"/>
                            <field name="product_uom_qty" string="Initial Demand" attrs="{'readonly':                             [('is_initial_demand_editable', '=', False)]}"/>
                            <field name="quantity_done" string="Done" attrs="{'readonly': [('is_quantity_done_editable', '=',                             False)]}"/>
                            <field name="product_uom" attrs="{'readonly': [('state', '!=', 'draft'), ('additional', '=', False)]}"                             options="{'no_open': True, 'no_create': True}" string="Unit of Measure"                             groups="product.group_uom"/>
                            <button name="add_quantity_done" string="+" type="object"/>
                            <button name="remove_quantity_done" string="-" type="object"/>
                        </tree>
                    </field>
                </page>
                </notebook>
            </sheet>
         </form>
    </field>
</record>

<record id="raizs_stock_picking_tree_view" model="ir.ui.view">
    <field name="name">raizs.stock.picking.tree.view</field>
    <field name="model">stock.picking</field>
    <field name="arch" type="xml">
        <tree string="Movimentos">
            <field name="partner_id"></field>
            <field name="scheduled_date"></field>
            <field name="state"></field>
        </tree>
    </field>
</record>

<record model="ir.actions.act_window" id="action_raizs_today_receipts">
    <field name="name">Recebimentos de hoje</field>
    <field name="res_pmodel">stock.picking</field>
    <field name="view_model">tree,form</field>
    <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'tree', 'view_id': ref('raizs_stock_picking_tree_view')}),
            (0, 0, {'view_mode': 'form', 'view_id': ref('raizs_stock_picking_form_view')})]"
    />
    <field name="domain">
        [
            ('scheduled_date','&gt;=',(context_today().strftime('%Y-%m-%d'))),
            ('location_dest_id','=',38)
        ]
    </field>
</record>
<menuitem
    id="raizs_today_receipts_menu"
    parent="raizs_receipt_root_menu"
    action="action_raizs_today_receipts"
/>

<record model="ir.actions.act_window" id="action_raizs_late_receipts">
    <field name="name">Recebimentos atrasados</field>
    <field name="res_model">stock.picking</field>
    <field name="view_model">tree,form</field>
    <field name="view_ids" eval="[(5, 0, 0),
        (0, 0, {'view_mode': 'tree', 'view_id': ref('raizs_stock_picking_tree_view')}),
        (0, 0, {'view_mode': 'form', 'view_id': ref('raizs_stock_picking_form_view')})]"
    />
    <field name="domain">
    [
        ('scheduled_date','&lt;=',(context_today().strftime('%Y-%m-%d'))),
        ('location_dest_id','=',38)
    ]
    </field>
</record>
<menuitem
    id="raizs_late_receipts_menu"
    parent="raizs_receipt_root_menu"
    action="action_raizs_late_receipts"
/>

</odoo> 


0
Avatar
Vazgeç
Avatar
subbarao
En İyi Yanıt

solution for Point 1

edit="false"  you have to remove
create="false" if you use ting you can't able to add new lines only possible to edit the existing lines

<field name="move_lines" style="pointer-events:none;">
                            <tree create="false" editable="bottom" options="{'no_open': True}">
                                    <field name="state" invisible="True"/>
                                    <field name="is_initial_demand_editable" invisible="True"/>
                                    <field name="is_quantity_done_editable" invisible="True"/>
                                    <field name="has_move_lines" invisible="True"/>
                                    <field name="product_id" required="1" attrs="{'readonly': ['|', '&amp;', ('state', '!=', 'draft'),                                                 ('additional', '=', False), ('has_move_lines', '=', True)]}"/>
                                    <field name="product_uom_qty" string="Initial Demand" attrs="{'readonly':                                                 [('is_initial_demand_editable', '=', False)]}"/>
                                    <field name="quantity_done" string="Done" attrs="{'readonly': [('is_quantity_done_editable',                                                 '=', False)]}"/>
                                    <field name="product_uom" attrs="{'readonly': [('state', '!=', 'draft'), ('additional', '=', False)]}"                                             options="{'no_open': True, 'no_create': True}" string="Unit of Measure"                                            groups="product.group_uom"/>
                            </tree>
                    </field>


to reflect these changes you have inherit and add menu action of picking
form view_id = raizs_stock_picking_form_view
0
Avatar
Vazgeç
Enjoying the discussion? Don't just read, join in!

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

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
How to repeat basic mechanism for deleting lines inside form view.
treeview one2many delete formview
Avatar
Avatar
1
Oca 23
2781
In one to many relation each many record having one more one to many relation... how can i show those data(one more one to many Çözüldü
treeview one2many repeatin formview
Avatar
Avatar
Avatar
Avatar
3
Ara 23
24091
From tree view to dynamic form view
treeview formview
Avatar
Avatar
1
Eyl 23
5314
how to add a button in a one2many tree view Çözüldü
treeview one2many
Avatar
Avatar
Avatar
Avatar
Avatar
4
Ara 23
18591
Display One2many field value in tree view (Odoo 9)
treeview one2many
Avatar
Avatar
1
Eyl 16
8055
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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