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

Determine status of sales orders

Suscribirse

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

Se marcó esta pregunta
statussales.order
2 Respuestas
10501 Vistas
Avatar
Dajac Inc.

Odoo 13


How can I get a list of sales orders, showing the status of each order? The status indicators would be something like the following.


Confirmed - A PO was received and the quote confirmed. Now the order needs to be processed.

Partial - Some items have shipped. Some items still need to be processed.

Done - All items have shipped.


Thanks,
David


0
Avatar
Descartar
Avatar
Paresh Wagh
Mejor respuesta

Hi:

You can add a computed field to the sale.order model and use it to filter the list.

1
Avatar
Descartar
Dajac Inc.
Autor

I'm a software engineer so this should be no problem, but I'm totally new to Odoo.

Can you provide some details on how to accomplish this in Odoo?

Chris TRINGHAM

Maybe this will help: https://odootricks.tips/computed-fields/

Paresh Wagh

The link provided by Chris gives the details of how to do this through the UI.

There is also a second way of doing this through python code using class inheritance. The code option is a little more convoluted and useful only in scenarios where you are hosting Odoo yourself.

Dajac Inc.
Autor

This solution looks like exactly what I need! Thanks so much for the help.

What dependent fields do you recommend I use to compute this new field? I assume I'll need to compare Quantity to Delivered, but I'm not sure how to get the source code names of those fields.

Also, I'll have to iterate through each line of the sales order to get Quantity and Delivered values for each line. How do I iterate through the lines?

Where can I find a list of available fields and their definitions?

Paresh Wagh

You can activate developer mode and go to Settings > Technical > Models to see the fields and their definitions.

Dajac Inc.
Autor

I found the Dependencies and Compute advanced properties, for my newly created field, but these properties are disabled. The interface won't allow me to edit them. What can I do to enable them?

Dajac Inc.
Autor

I'm able to edit the properties now. I neglected to click Edit.

How do I iterate through the lines of the sales order and get the Quantity of each line?

Paresh Wagh

Here's an example of adding up the delivered quantities in the sale.order.line model. The total field is to be defined in the sale.order model

for record in self:

record['x_total_qty_delivered'] = sum(line.qty_delivered for line in record.order_line)

Dajac Inc.
Autor

Excellent help. Thanks!

It's working now. Here is the complete solution.

Using Studio...

Add a new text field to the Sales Order form.

Set it's name to Delivery Status.

Click "More".

Activate Read Only.

Set Dependencies and Compute as shown below.

Text Field

Delivery Status

x_studio_delivery_status

Dependencies:

order_line.product_uom_qty, order_line.qty_delivered

Compute:

for record in self:

# Calculate sum of quantity on order.

qty_sum = sum(line.product_uom_qty for line in record.order_line)

# Calculate sum of deliverd.

del_sum = sum(line.qty_delivered for line in record.order_line)

if del_sum == 0:

# None delivered, so this is a new order.

record['x_studio_delivery_status'] ="New"

elif qty_sum != del_sum:

# Some delivered, but not all.

record['x_studio_delivery_status'] ="Partial"

else:

# The number delivered is equal to the number ordered, so order fully shipped.

record['x_studio_delivery_status'] ="Done"

Chris TRINGHAM

When I tried to use this, the value of the variable qty_sum seems to be from the first order line only. Any ideas what might be wrong?

Paresh Wagh

Check the definition of the qty_sum field to make sure it is recomputed every time the order lines are updated. Also, store=False.

Chris TRINGHAM

Thanks Paresh. I think it's working now.

Giles M

Thanks Dajac, this is really helpful. It should be part of Odoo really.

¿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
Transform Quotations to sales orders or invoices in a bulk action
sales.order
Avatar
Avatar
Avatar
3
feb 25
3258
Orden de venta borrada por error
sales.order
Avatar
Avatar
1
dic 24
2816
How to create a subsection in the product order line and make the main section sum the total of the subsections in Odoo? Resuelto
sales.order
Avatar
Avatar
2
mar 24
3184
Managing orders from repeat customers Resuelto
sales.order
Avatar
Avatar
Avatar
2
mar 24
3747
Sales order from customer order.
sales.order
Avatar
0
sept 23
2115
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