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
    • e-learning
    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 pub
    • 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
    • Cervecería
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y soporte técnico
    • 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
    Explorar todos los sectores
  • 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
    • Servicios para 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

quantity on hand database table

Suscribirse

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

Se marcó esta pregunta
7 Respuestas
15303 Vistas
Avatar
Florian

Hello,

I'm looking for the field quantity on hand from the warehouse  in my Odoo Database. I searched in a lot  of table and i can't find it .

I would like to select  this field on my SQL query.

Is someone can help me to find this data.

Thank you.

0
Avatar
Descartar
Yenthe Van Ginneken (Mainframe Monkey)

Which Odoo version? Do you mean the product quantity on hand from the product? Please add more info / context..

Avatar
Florian
Autor Mejor respuesta

I'm using Odoo version 7. Pgadmin 4 to read the database. 

yes, The quantity on hand from product. this is the available quantity in the warehouse found in the menu wharehouse --> products and the tab inventory.

the inscription in  developer mode is :

Field : qty_available

object : product.product

type : float

Modifiers :{"readonly":true}


 in the table product_product, the field qty_available doesn't exist.

 


to Pat answer :

thank you pat, if i can get it through a sql query what should i write? "SELECT qty_available FROM product_product" can't work.


Sorry i can't write an other answer, so i edit , this one...

Thank you for your help , but i'm a beginner and i don't know where i can find the files python and how to modify it.

By the way, i found a solution using the table stock_move,  and subtract the entries with the issues , it result the quantity in hand.

Thank you for your help.


Dear Paulo, 

I used 2 queries, made the query easier :

query 1 (entry):

SELECT product_id, Sum(product_qty)

FROM stock_move W

WHERE (location_dest_id=12)

GROUP BY product_id;


query 2 (issue): 

SELECT product_id, Sum(product_qty)

FROM stock_move

WHERE view_src_location Like '12'

GROUP BY product_id;


And via excel subtract the entry with issues.

It's working but there are some movement on the DB who are not in Odoo interface who create some qty mistake.

I know it's not the best way to do, but as a beginner it's all i found according my knowledge.

I'll appreciate if you can add +1 to my answer to raise my karma to 8 to be able to comment in the right place in the forum.

1
Avatar
Descartar
Parth Patel (pat)

Usually, we didn't require to get data through sql query except in some special scenarios.

you can get data by doing something like this:

product_obj = self.pool.get('product.product')

pids = product_obj.search(cr, uid, [('id','=','1')], context=context)

Avatar
subbarao
Mejor respuesta

qty_available is computed field and it's readonly, so it will not available on DB.

To get an idea you can check compute function how there are getting value.

I hope your problem will solve after checking qty_available compute function

0
Avatar
Descartar
Avatar
Mike Lorusso
Mejor respuesta

I'm using Power BI connected to Odoo v11. I've found what seems to be the correct on hand quantity for each of our products by using the sum of "remaining_qty" from stock_move.

0
Avatar
Descartar
Avatar
Paulo
Mejor respuesta

Do you have an SQL Query that works to have this value?


I try this but the second query give me an error because it says

WHERE view_src_location Like '12' 

and view_src_location don´t exist

0
Avatar
Descartar
Avatar
Parth Patel (pat)
Mejor respuesta

Hello Florian,
Quantity on hand = qty_available (technical name)
Model: product.product


This field is inherited in stock module in product.py.
NOTE: As this is compute field, an instance of it will not available in the database table, you will be able to directly get it in through your sql query.



0
Avatar
Descartar
¿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