Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

can't see data in my view

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
2 Respuestas
3095 Vistas
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
Descartar
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
Autor

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
Autor Mejor respuesta

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
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Sitio web hecho con

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