İç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 inherit invoice view (list/tree and form)?

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
treeviewinheritanceaccount.invoiceformview
1 Cevapla
12580 Görünümler
Avatar
Jean Donaires

Hello. I am creating a new module where I will inherit the tree view and form view from the account.invoice module.

So far I've found a lot of examples on how to inherit a form view. As far as i know I should be fine if I edit the my module's view.xml file and just do the following:

<record model="ir.ui.view" id="mymodule.list">
      <field name="name">mymodule list</field>
      <field name="model">mymodule.mymodule</field>
      <field name="inherit_id" ref="account.invoice_tree"/>
      <field name="mode">primary</field>
      <field name="arch" type="xml">
        <tree create="false" edit="false">
                    <field name="partner_id" groups="base.group_user" string="Customer"/>
                    <field name="date_invoice"/>
                    <field name="number"/>
                    ...
        </tree>
      </field>
    </record>

(I would do the same for the form view but with ref="account.invoice_form")


But when i try to do the tree view i get 2 errors.

1 of them regarding the create and delete records

Element '<tree create="false" edit="false">' cannot be located in parent view

The other one asking for partner_id (this one pops up when i delete "create=false" "edit=false" on the tree tag)

Field `partner_id` does not exist

The big picture in here is that. I want to extend fields on account.invoice (1 boolean and the other one string)

Then show the exact same account.invoice tree view on a custom module with the only difference that in this inherited custom tree view I will show those accounts with the boolean set on "true". So what I need right now is to inherit the account.invoice tree and form view, into my custom module. 

0
Avatar
Vazgeç
Avatar
Ray Carnes (ray)
En İyi Yanıt

When you inherit a View in Odoo, the XML in the arch field is expected to redefine, not define.

Review the documentation at \https://www.odoo.com/documentation/11.0/reference/views.html#inheritance


The error is Odoo's way of telling you - "I looked for a tree node matching create and false the way you list it, but I couldn't find it in the view you are inheriting".

The <tree> node in this case is defining an ANCHOR to which your changes will be made.  After locating the TREE node, you can REPLACE the node, change the ATTRIBUTES of the node, or put something AFTER or BEFORE the node.


Instead of defining tree:

<tree create="false" edit="false">

You redefine tree:

<tree position="replace">
<tree create="false" edit="false">
<field name="..."/>
</tree>
</tree>

or, even better:

<tree position="attributes">
<attribute name="create">false</attribute>
<attribute name="edit">false</attribute>
</tree>

<field name="partner_id" position="after">
<field name="..."/>
</field>
3
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
From tree view to dynamic form view
treeview formview
Avatar
Avatar
1
Eyl 23
5369
Inheriting model new fields from res.partner model are not visible in the inherited form
inheritance formview delegation
Avatar
Avatar
Avatar
2
Tem 23
4133
How to show children elements in parent form view?
treeview inheritance models
Avatar
0
Nis 23
3715
Its possible to add a tree view inside a form view with group_by filter applied
treeview group_by formview
Avatar
Avatar
2
Haz 22
4717
How to redirect to form view after clicking row in custom SQL tree view? (14.0)
views treeview formview
Avatar
0
Eyl 21
3161
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