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

quantity on hand database table

Suscribirse

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

Se marcó esta pregunta
7 Respuestas
15304 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.

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