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

can't see data in my view

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
2 Replies
3093 Tampilan
Avatar
Dominic Pain

https://gist.github.com/WeeDom/d5b9f02f710b198a131cb711b3d933ad.

Odoo 10 can't see values in view of new model I've just created. I got the model to create correctly, I can see the right joins and data through psql cli. All info on a github gist, and pasted below in case the gist goes away at some point in the future. I get no errors in the logs, and when running odoo with log-level=debug_sql there's no mention of my tables. One suggestion has been that the view isn't being seen, but if I change the field="name" bit to field="namety-mcnameface" then I do get a ParseError in the gui.


client=# \d report_template_management_report_template_management_notes

                                        Table "public.report_template_management_report_template_management_notes"

       Column       |            Type             |                                               Modifiers                                               

--------------------+-----------------------------+-------------------------------------------------------------------------------------------------------

 id                 | integer                     | not null default nextval('report_template_management_report_template_management_no_id_seq'::regclass)

 notes_and_guidance | text                        | 

 create_uid         | integer                     | 

 create_date        | timestamp without time zone | 

 name               | character varying           | 

 write_uid          | integer                     | 

 write_date         | timestamp without time zone | 

Indexes:

    "report_template_management_report_template_management_note_pkey" PRIMARY KEY, btree (id)

Foreign-key constraints:

    "report_template_management_report_template_man_create_uid_fkey1" FOREIGN KEY (create_uid) REFERENCES res_users(id) ON DELETE SET NULL

    "report_template_management_report_template_mana_write_uid_fkey1" FOREIGN KEY (write_uid) REFERENCES res_users(id) ON DELETE SET NULL

Referenced by:

    TABLE "report_template_management_report_template_management" CONSTRAINT "report_template_management_report_template_managemen_notes_fkey" FOREIGN KEY (notes) REFERENCES report_template_management_report_template_management_notes(id) ON DELETE SET NULL


client=# \d report_template_management_report_template_management

                                        Table "public.report_template_management_report_template_management"

     Column      |            Type             |                                             Modifiers                                              

-----------------+-----------------------------+----------------------------------------------------------------------------------------------------

 id              | integer                     | not null default nextval('report_template_management_report_template_management_id_seq'::regclass)

 create_uid      | integer                     | 

 name            | character varying           | 

 notes           | integer                     | 

 write_uid       | integer                     | 

 report_template | text                        | 

 write_date      | timestamp without time zone | 

 create_date     | timestamp without time zone | 

Indexes:

    "report_template_management_report_template_management_pkey" PRIMARY KEY, btree (id)

Foreign-key constraints:

    "report_template_management_report_template_mana_create_uid_fkey" FOREIGN KEY (create_uid) REFERENCES res_users(id) ON DELETE SET NULL

    "report_template_management_report_template_manag_write_uid_fkey" FOREIGN KEY (write_uid) REFERENCES res_users(id) ON DELETE SET NULL

    "report_template_management_report_template_managemen_notes_fkey" FOREIGN KEY (notes) REFERENCES report_template_management_report_template_management_notes(id) ON DELETE SET NULL


client=# select * from report_template_management_report_template_management_notes 

client-# ;

 id | notes_and_guidance | create_uid |        create_date        |  name  | write_uid |        write_date         

----+--------------------+------------+---------------------------+--------+-----------+---------------------------

  1 | some guidance      |          1 | 2019-04-23 13:48:28.45109 | a test |         1 | 2019-04-23 13:48:28.45109

(1 row)


client=#

client=# select * from report_template_management_report_template_management;

 id | create_uid |      name       | notes | write_uid |          report_template          |         write_date         |        create_date

----+------------+-----------------+-------+-----------+-----------------------------------+----------------------------+----------------------------

  1 |          1 | test template 1 |     1 |         1 | some text that will be a template | 2019-04-23 15:37:21.404463 | 2019-04-23 15:37:21.404463

(1 row)


client=#.

models.py


from odoo import models, fields, api                                                                                                                                                                                              
                                                                                                                                                                                                                                  
class report_template_management(models.Model):                                                                                                                                                                                   
    _name = 'report_template_management.templates'                                                                                                                                                                                
                                                                                                                                                                                                                                  
    name = fields.Char()                                                                                                                                                                                                          
    report_template = fields.Html()                                                                                                                                                                                               
    notes = fields.Many2one('report_template_management.notes')                                                                                                                                                                   
                                                                                                                                                                                                                                  
class report_template_management_notes(models.Model):                                                                                                                                                                             
    _name = 'report_template_management.notes'                                                                                                                                                                                    
                                                                                                                                                                                                                                  
    name = fields.Char()                                                                                                                                                                                                          
    notes_and_guidance = fields.Html()

views.xml

<odoo>
  <data>
    <record model="ir.ui.view" id="report_template_management.notes_list">                                                                                                                                                        
        <field name="name">report_template_management notes list</field>                                                                                                                                                            
        <field name="model">report_template_management.notes</field>                                                                                                                                                                
        <field name="arch" type="xml">                                                                                                                                                                                              
          <tree string="Report Template Notes">                                                                                                                                                                                     
            <field name="name"/>                                                                                                                                                                                       
            <field name="notes_and_guidance"/>                                                                                                                                                                             
          </tree>                                                                                                                                                                                                                   
        </field>                                                                                                                                                                                                                    
      </record>
  </data>
</odoo>
0
Avatar
Buang
Samo Arko

really don't understand what you wanted to say. Have you at least any data in the model? Did you define an action window and added the view to that action? I would suggest that you look at pythons and odoos coding guidelines so your code will be easily readable.

Dominic Pain
Penulis

Hi, Tabla,

Yes, there's one line of data in the templates table and one line of data in the notes table. I entered it manually from the cli in psql.

as to your other questions, everything I've done is in the code I posted. I created the module using 'odoo scaffold' and tried to work from the examples that provided.

Avatar
Dominic Pain
Penulis Jawaban Terbai

For people looking for help with this in the future, I found that following this video step-by-step got me going:

https://www.youtube.com/watch?v=ImCS9xog_M4

absolute gold

0
Avatar
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
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