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

Odoo 12 new menu not shown. What's wrong with this code?

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
menumenuitemOdoo12.0
2 Cevaplar
29703 Görünümler
Avatar
Paulo Matos

Hi all,

I am trying to create a new menu based on a new module I am working on for Odoo v12.

I have "scaffolded" the module and using the scaffold struture.

The problem I found is that the menu structure is not shown on Odoo after module installed.

I have checked under Technical | Menu Items and they exist.

Also checked for the "action" and views and they also part of the database.

The code I used:

1. Module.py

class vehicles_brands(models.Model):
    _name='vehicles.brands'
    _description="Vehicle Brands"
    name = fields.Char(string="Brand", size=64, required=True)

2. Xml

<odoo>
  <data>   
<!-- TREE VIEW DEFINITION   -->
    <record model="ir.ui.view" id="vehicles.brands_tree_view">
      <field name="name">Vehicles</field>
      <field name="model">vehicles.brands</field>
      <field name="arch" type="xml">
        <tree>
          <field name="name"/>
        </tree>
      </field>
    </record>

    <!-- actions opening views on models -->
    <record model="ir.actions.act_window" id="vehicles.brands_action_window">
      <field name="name">Vehicle Brands</field>
      <field name="res_model">vehicles.brands</field>
      <field name="view_mode">tree,form</field>
    </record>

      <!-- Top menu item -->
    <menuitem name="Vehicles" id="vehicles.menu_root"/>
    <!-- Menu Category -->
    <menuitem name="Master Data" id="vehicles.data_menu" parent="vehicles.menu_root"/>
    <menuitem name="Brands" id="vehicles.brands_option" parent="vehicles.data_menu" action="vehicles.brands_action_window"/>
      </data>
</odoo>


I have no errors on the log and also confirm that the module is upgraded after every test.

What is wrong with this code?

PS: If I use the exact same code on Odoo 11 everything works fine.

Thank you in advance.


3
Avatar
Vazgeç
Sehrish

Odoo Access Rights: https://goo.gl/8DZYRT

Paulo Matos
Üretici

Sehrish, thanks for the link. I have everything I need in this link. Regards

Odoo Mates

The menu is not visible as the access rights is not set, see this video to understand how to set access rights in odoo: https://www.youtube.com/watch?v=W5ya521uTlo&list=PLqRRLx0cl0hoJhjFWkFYowveq2Zn55dhM&index=7

Avatar
Niyas Raphy (Walnut Software Solutions)
En İyi Yanıt

Hi,

The reason why you are not seeing the menu is that you haven't given security/acessrights for the menu and model you have given.


Create a file named ir.model.acces.csv inside the security folder and define a rule for the model  vehicles.brands

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_vehicles_brands,access_vehicles_brands,model_vehicles_brands,base.group_user,1,1,1,0

Also, you give the groups="base.group_user" for the menus, this is just an example, you can set your permission accordingly.


In odoo11 where you say your code works fine, you can see the menu only when the admin is logged in. If any other user logged in the system, the same menu will not be visible. That is the case here in Odoo 12.

The admin users ID is not 1, to make menu visible give access rights to the menu and the model. Or you can see the menu after switching to superuser.



For switching to superuser, activate the developer mode and click the lady debugger button near the logged in users name in the top bar and click the Become Superuser option in the list. Once this is done, you can see the menu even without adding the security.


Different Reasons For A Menu Not Visible In Odoo


Thanks

7
Avatar
Vazgeç
Paulo Matos
Üretici

Great Niyas. This exactly as you stated. This "superuser" option is new to me. Thank you very much.

Avatar
subbarao
En İyi Yanıt

Hello

You have to give access rights. Read, Write, Delete, Create permissions to your model

1
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
Dropdown sub-menu offset away from position
menu menuitem
Avatar
0
Ara 24
1769
How to create a new menu item and place it under other module's menu? Çözüldü
menu menuitem
Avatar
Avatar
Avatar
Avatar
4
Eki 19
35173
After finishing installation I do not get any menu items the page is blank
menu menuitem
Avatar
Avatar
1
Nis 17
4490
No such external ID currently defined in the system error while adding a menu item.
menu menuitem
Avatar
Avatar
2
Mar 15
8125
Hide Or Remove Messaging Menu From Top Menu Bar ? Çözüldü
menu menuitem
Avatar
Avatar
Avatar
2
Oca 24
14634
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