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

New Model - Cannot find field

Suscribirse

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

Se marcó esta pregunta
developmentdatabasemany2manymodel
7318 Vistas
Avatar
Dave Ellison
Update  **The below example is not exclusive to my model design.**

Certainly tested 6.1 and 7.0. When using the model screen and creating a new model, the database table does not have the correct columns, hence the error. I can manually add the colums to the database table, but this didn't used to work like this. I really think I am missing something or there is a problem, but even looking at my old documents for 5.x the steps were create the model and the correct table/columns were created.

I have tested 6.1 and 7.0. It seems that if you literally go to settings>technical>database structure. Add a model with just x_name field and then create a menu. Go to add a new record via the new menu, it cannot find the new field in the new database table. Have I missed a simple setup??

I created a new model within Settings>Technical>Database Structure called x_contracts.

name                  field-label field-type required readonly searchable-Type
x_name                Title       char       True     False    Custom Field
x_expired             Expired     boolean    False    False    Custom Field
x_last_payment_date   Date        Date       False    False    Custom Field

I am extending the res.partner by adding a custom field called x_contracts manytomany using model x_contracts. Now if I add the new field x_contracts to my view res.partner, in page:

<page string="Maintenance" attrs="{'invisible': [('is_company','=',False)]}"> <field name="x_contracts"> </field></page>

This is done via development mode>manage views under debug>edit (res.partner.form) and adding the field in there.

I get the error, when I go to the page tab under customers and select the dropdown create and edit, then save the new record:

ProgrammingError: column "x_last_payment_date" of relation "x_contracts" does not exist

LINE 1: insert into "x_contracts" (id,"x_last_payment_date","x_maint...

Now checking the database, yes there is no x_last_payment_date in the table x_contracts physically in PostgreSQL. However when using the interface to create a new model, I believe it is stored else where.

So the question may be, have I missed a step or mis-configured it?

How do I display the data in a page within the customers screen and link the two.

0
Avatar
Descartar
Lithin T

'x_last_payment_date' may not be created in the x_contracts so plz try to create the filed x_last_payment_date in your x_contracts and try again

Dave Ellison
Autor

Hi thanks for the response. Directly in the table or via the OpenERP system within the models menu?

Dave Ellison
Autor

So if I create the fields manually in the table, it works. But in version 5 and earlier version 6 installs, adding a model has created the necessary information to be able to just start adding records. That's without going to the database direct and adding fields.

¿Le interesa esta conversación? ¡Participe en ella!

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

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
How to reset the development database Resuelto
development database
Avatar
Avatar
Avatar
2
ago 25
3048
Can I create a model out of the relation table in a many2many relationship?
many2many model
Avatar
Avatar
1
abr 24
7223
Restore backup to postgresql for odoo
development database pgadmin
Avatar
0
nov 24
50
Database selector for on-premises instance first setup
development setup database
Avatar
0
abr 22
109
How do I dump all the fields and values in a model (ideally including those from relationships)? Resuelto
development orm model
Avatar
1
oct 20
13863
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.

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