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 12 new menu not shown. What's wrong with this code?

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
menumenuitemOdoo12.0
2 Replies
29705 Tampilan
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
Buang
Sehrish

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

Paulo Matos
Penulis

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)
Jawaban Terbai

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
Buang
Paulo Matos
Penulis

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

Avatar
subbarao
Jawaban Terbai

Hello

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

1
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
Dropdown sub-menu offset away from position
menu menuitem
Avatar
0
Des 24
1769
How to create a new menu item and place it under other module's menu? Diselesaikan
menu menuitem
Avatar
Avatar
Avatar
Avatar
4
Okt 19
35174
After finishing installation I do not get any menu items the page is blank
menu menuitem
Avatar
Avatar
1
Apr 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 ? Diselesaikan
menu menuitem
Avatar
Avatar
Avatar
2
Jan 24
14635
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