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

model is not created even though imported in __init__

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
modelstutorial
1 Balas
3532 Tampilan
Avatar
吴毅

This is the model file

from odoo import fields, models


class PropertyOffer(models.Model):

_name = 'longdick.estate.offer'
_description = 'Offers data of a property, One to Many relation. One: property, many: offers'

price = fields.Float(default = 500000, string = 'Offer Price', required = True)
status = fields.Selection(string = 'Offer Status',
default
= 'considering',
selection
= [
('accepted', 'Accepted'),
('considering', 'Considering'),
('negotiating', 'Negotiating'),
('refused', 'Refused'),
],
copy
= False)
offer_maker = fields.Many2one('res.partner', string = 'Offer Maker', required = True)
property = fields.Many2one('longdick.estate', string = 'Property', required = True)



==============================
This is my init file

from . import longdick_estate, \
longdick_estate_property_type, \
longdick_estate_property_tag, \
longdick_estate_offer

The first three models were just working fine, however, the fourth just couldn't be created
I even tried to reboot my PC, just not working.

I checked both technical setting and my database in postgreSQL, there's no my offer table.
However, estate/property_type/property_tag and estate&tag rel table are created properly.

I'm also sure about that my ir model access csv​ is set properly, as below:

id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink
access_longdick_estate,longdick.estate,model_longdick_estate,base.group_user,1,1,1,1
access_longdick_estate_offer,longdick.estate.offer,model_longdick_estate_offer,base.group_user,1,1,1,1
access_longdick_estate_property_tag,longdick.estate.property.tag,model_longdick_estate_property_tag,base.group_user,1,1,1,1
access_longdick_estate_property_type,longdick.estate.property.type,model_longdick_estate_property_type,base.group_user,1,1,1,1

Furthermore, I'm using superuser mode, therefore, it's shouldn't be a problem, even if I have some typo in the access file.

Thanks for answering in advance!!!


@Mehjabin Farsana, Thank you miss mehjabin for answering my question so fast.
And sorry for replying your answer in such a way because I don't have enough karma points.
However, your answer doesn't quit solve my problem. Would you mind help me a little bit more?


Problem solved, I just uninstalled my App and then installed it. It began to work.





0
Avatar
Buang
Avatar
Mehjabin Farsana
Jawaban Terbai

Hi,

Can you ensure that the model is created or not by checking in the Models menu under settings -> technical -> database structure -> models.

If it get added there and if you are talking about missing menu, please make sure that you have defined the access rights for your model in ir.model.access.csv file for users to access this model.

Points to check:
1. Ensure odoo service is restarted
2. python file is imported in the init
3. Module is upgraded in the db


Thanks

0
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
Odoo 'build a module'...Model not seen in my module
models model tutorial
Avatar
Avatar
4
Nov 20
7823
How can I use two models in an API (foreign key - relations)?
models
Avatar
0
Des 24
2148
Import Data From Another Model Diselesaikan
models
Avatar
Avatar
1
Mar 24
3266
how can i return a form view from a model method and i just want to show only a specific field instead of all the fields of this model ? Diselesaikan
models
Avatar
Avatar
1
Jun 23
13425
Error al tratar de borrar un campo en un modelo.
models
Avatar
0
Jan 23
3759
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