Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • eLearning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Conocimientos
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Browse all Industries
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Services for Partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar 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
  • Proyecto
  • 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

Linking Between Tables in Studio

Suscribirse

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

Se marcó esta pregunta
linking-tables
2 Respuestas
5316 Vistas
Avatar
Sam Gray

I'm an experienced SQL guy and I've just started tinkering with Odoo, so this is a general question. In Studio, how can do I link records across two tables. Typically, in SQL you would create a linking table of sorts. So for instances lets say that Table A is "Fruit" and Table B is "Color", for each fruit in Table A I specify a color from Table B, for example if I create Apple, Strawberry, and Tomato in Table A and specify they are Red- that's easy, but now I want to go to my Colors and click on "Red" and see which fruits are "Red", does that make sense? Anyhow, if someone could point me in the right direction on this, I'd be grateful.

Thanks.

0
Avatar
Descartar
Avatar
Chris TRINGHAM
Mejor respuesta

It's done with one2many, many2one, many2many and related fields

For example, adding a many2one field creates a link.

If you drag the many2one icon on to the Form View, Odoo will display a list of all models (database tables). The model you select will be linked to the current model (as a parent).

You can enter a few characters to search for the Model

Then click on the correct Model.

 

More information: https://odootricks.tips/relational-fields-odoo-studio/

1
Avatar
Descartar
Sam Gray
Autor

Hi Chris,

Thank you for your reply. This isn't the part I'm trying to figure out- in your example, let's say I choose Canada as the "Country of Origin" for 25 Inventory Items, what I would then like to be able to do is go, to the "Country of Origin" table itself, select "Canada" and see a list of the Inventory Items where Canada was specified as the Country of Origin.

Another example- lets say I have a device inventory table and a vendor table, both of which have a number of fields themselves. For each inventory item, I specify the vendor of the item. I would then like to go to my Vendor table and select, let's say, "Dell" and see all the items in my inventory table with Dell specified as vendor.

Chris TRINGHAM

You can add a one2many on the Country table to see all the products. Same for Vendors. These are usually shown in tabs or as "smart buttons".

https://odootricks.tips/odoo-studio-adding-a-one2many-field/

Sam Gray
Autor

Welp that worked. I thought I had tried the one2many field before, but apparently not.

Thanks for your help.

Sam Gray
Autor

Ok. Another quick question- for the one2many field- is there a way to set the number of rows it displays for paginating within the one2many field. Right now, it's showing 40 records, I'd just like to show 10 or 25 at a time, or at the very least make the field vertically shorter.

Chris TRINGHAM

I believe it's possible to do this in the XML:

<tree limit="25">

Sam Gray
Autor

I'm still pretty new. Where would I insert the XML snippet?

Chris TRINGHAM

Here's an example: https://odootricks.tips/some-xml-tips/#limit

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

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

Inscribirse
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información 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 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