Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

can't see data in my view

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
2 Antwoorden
3101 Weergaven
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
Annuleer
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
Auteur

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
Auteur Beste antwoord

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
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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