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

ODOO SQL Query and POWER BI

Suscribirse

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

Se marcó esta pregunta
postgresqlPowerBI
5 Respuestas
3416 Vistas
Avatar
Jose

Hello,


I am new to ODOO and I have the following queries:


1- I would like to create postgreSQL queries or directly in Microsoft ACCESS via an ODBC connection that I already have configured.


Can someone give me the most important sales tables and their relationships?


       - Sales documents

       - Detail of sales lines

                - with sales price, cost price, batch number of the product sold

       - Table of third parties, articles, commercials, payment methods, risk, ...



2- Has anyone created SQL queries (mainly for sales) to pass to me so I don't waste a lot of time testing?


3- my final idea is after creating the queries that I mentioned above, connect them with POWER BI.


Does anyone have any POWER BI development already done?

0
Avatar
Descartar
Avatar
Muji
Mejor respuesta

Hello Jose

How did you solve sql queries to create powerbi report?


0
Avatar
Descartar
Avatar
Jose
Autor Mejor respuesta

Hi Mayur,


thank you very much for your response.


Could you help me with the following query:

I want to obtain the orders invoiced with the sales lines:

- Invoice number

- Customer

- Article

- sale price

- Cost price (or Margin)

- batch number of the item sold.


I have thought about linking [account_move] with [sale_order] and [sale_order_line], to extract the sales lines, which I have achieved but my question is for this example:

   ++I have an order with 2 sales lines

   ++I have invoiced the two lines separately in 2 invoices

Where do I find the information (field filter) to know that this order line has gone to invoice 1 and the other order line has gone to invoice 2?


many tks

0
Avatar
Descartar
Avatar
Mayur Suthar
Mejor respuesta

Hi Jose, 


Basic PSQL query is here. 

select * from public.sale_order a LEFT JOIN public.sale_order_line b on a.id = b.order_id where a.name =xxxx (Replace order number);


You may required to explore more tables and join them.

- stock_picking (sale_order.id = stock.picking.sale_id)

- stock_move (stock_picking.id = stock_move.picking_id) (sale_order.name = stock_move.origin)

Stock Move Line table  will provide detailed info of lot number and final quantities with status done.

-stock_move_line (stock_move.id = stock_move_line.move_id) 

- account_move (Invoice information) (journal_id = pick the journal id from your system)

http://localhost:0000/web#cids=2%2C3%2C1&menu_id=114&action=236&model=account.journal&view_type=list

- account_move_line (Invoice lines)



0
Avatar
Descartar
Avatar
Blake Edwards
Mejor respuesta

Hi Jose, 

I specialise in creating Power BI reports for Odoo using Techneith's direct connector. If you want to check out my portfolio you can find it at bepbi.com 

All of the reports showcased have been created using the Odoo data model, so the relationships have already been established. Some require joins from over 20 tables. If you need any assistance, I would love to help. If not, I'd definitely recommend checking out Techneith's connector if you want to create the reports yourself. 

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
Publicaciones relacionadas Respuestas Vistas Actividad
Power BI
PowerBI
Avatar
Avatar
Avatar
2
may 25
2183
When Odoo 14 connects to PostgreSQL 15.7, the connection is idle but cannot be released
postgresql
Avatar
0
feb 25
2906
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: fe_sendauth: no password supplied
postgresql
Avatar
Avatar
Avatar
2
ene 25
10128
Odoo backend to Google Data Studio Resuelto
postgresql
Avatar
Avatar
2
ene 24
10139
Reason why Odoo being slow when there is huge data inside the database
postgresql
Avatar
Avatar
Avatar
Avatar
7
ene 24
50946
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