İç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

Inherited view creates new tree instead of extending website.homepage

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
websitesWebsite
2 Cevaplar
605 Görünümler
Avatar
Diego Martinez

I have this code from a custom module that I want to add as an inherited view. However, the view I want to assign it to is website.homepage. When I do it this way, a different tree is created with the inherited view instead of assigning it to the already existing one. Any idea what might be happening?

<odoo>

  <data>

    <record id="alx_al_website" model="ir.ui.view">

      <field name="name">(CUSTOM) - landing page</field>

      <field name="type">qweb</field>

      <field name="inherit_id" ref="website.homepage"/>

      <field name="priority" eval="1000"/>

      <field name="website_id" ref="website.default_website"/>

      <field name="arch" type="xml">

        <xpath expr="//div[@id='wrap']" position="replace">

          <div><p>hello world</p></div>

        </xpath>

      </field>

    </record>

  </data>

</odoo>

0
Avatar
Vazgeç
Avatar
Cybrosys Techno Solutions Pvt.Ltd
En İyi Yanıt

Hi,


Try the following,

<odoo>

  <data>

    <record id="alx_al_website" model="ir.ui.view">

      <field name="name">(CUSTOM) - landing page</field>

      <field name="type">qweb</field>

      <field name="inherit_id" ref="website.homepage"/>

      <field name="priority" eval="1000"/>

      <field name="arch" type="xml">

        <xpath expr="//div[@id='wrap']" position="replace">

          <div><p>hello world</p></div>

        </xpath>

      </field>

    </record>

  </data>

</odoo>


When you create an inherited view in Odoo:

  • If you don’t set website_id, the view applies globally to all websites. Updating the module will always refresh it everywhere, including new websites.
  • If you set website_id, the view is tied only to that website. Updates to the module will refresh it only for that site, and new websites won’t automatically get the changes.

Best practice:

Use global inheritance if you want one universal homepage design, and add website_id only if you want different designs per website.


Hope it helps

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

Hi Diego,

What’s happening is due to how website-specific views work in Odoo. When you include a <field name="website_id" .../> in your inherited view, Odoo doesn’t just extend the existing website.homepage — instead, it creates a website-restricted variant of the homepage. That’s why you see a new view “tree” instead of your code extending the original one.

If you want your changes to apply globally (for all websites), simply remove the website_id field:

<record id="alx_al_website" model="ir.ui.view"> <field name="name">(CUSTOM) - landing page</field> <field name="type">qweb</field> <field name="inherit_id" ref="website.homepage"/> <field name="arch" type="xml"> <xpath expr="//div[@id='wrap']" position="replace"> <div><p>hello world</p></div> </xpath> </field> </record>

If you really need it to apply only to a specific website, then keeping website_id is correct, but in that case Odoo will always generate a new branch of the view for that website — that’s the expected behavior.

Hope this helps!

0
Avatar
Vazgeç
Diego Martinez
Üretici

Thanks for the answer, however I have a question if a website already exists, this template only applies to new sites, but if I update the module with a new view The inherited view logically will not be updated and will only apply to sites closed later to the installation of the module, not to those previously created, any strategy that you can propose to me?

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 remove the 'Powered by Odoo - The #1 Open Source eCommerce' footer from the website? Çözüldü
websites
Avatar
Avatar
Avatar
Avatar
3
Kas 25
1928
Custom shop and cart page
websites
Avatar
Avatar
1
Haz 25
2591
How to enable Popup block in Odoo Website Module
websites
Avatar
0
Şub 25
2019
Suddenly disappeared website menu
websites
Avatar
Avatar
Avatar
3
Eki 24
2561
Website Edit not Launching (Odoo v17)
websites
Avatar
0
Haz 24
2041
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