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
    • Información
    • 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

Select custom supplier when creating sale.order.line

Suscribirse

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

Se marcó esta pregunta
sale.order.linepurchase_orderodooV8odoo8.0
2 Respuestas
5920 Vistas
Avatar
Juanma

Hello,

I have the following issue with odoo 8:

When I create a sale.order with sale.order.lines with multiple product.supplierinfo for a product, if two or more suppliers have the same criteria, always the first one is selected (and the purchase.order created from the invoice is always for the first supplier), my issue is that i need to be able to select the supplier when creating the sale.order because sometimes the supplier selection is related with external factors from odoo (supplier availability or other business logic not related with odoo)


I have few knowledges with odoo and with odoo modules so can someone give me some tips about how to develop this with python or if there is any module that can help me achieve this?


regards,

juanma.

0
Avatar
Descartar
Avatar
Denis Baranov
Mejor respuesta

Hi,

it would be quite hard, since when purchase orders are created you do not have info about a sales order.

Generally, what you should do:

  1. Add in sale.order.line info about a supplier as m2o to supplier info (the same as in a product)

  2. Somehow transfer SO this info through procurement. E.g. have a look at the method _prepare_order_line_procurement of sale.order and at how a chain of procurements is generated in the module 'procurement'. 

  3. Then in the purchase.order method _check_supplier_info add a check from this info, instead of getting it from a product.

Simplier way would be to define some logical parameter how to select a supplier. So, you add some extra parameter to supplier.info (such as availability for example) and use this parameter to _check_supplier_info to select a proper vendor.

Hope that helps.



 


0
Avatar
Descartar
Avatar
Juanma
Autor Mejor respuesta

I can't edit the topic so I will explain again my issue:

When I create a sale.order, when adding a product in the sale.order.lines the supplier is selected automatically depending on some criteria, that is ok, the common behaviour, but if two or more suppliers have the same criteria, always the first one is selected (and the purchase.order created automatically from MRP module is always for the first supplier), my issue is that i need to be able to select the supplier within the same criteria when creating the sale.order because sometimes the supplier selection is related with external apart away from odoo (supplier availability or other business logic not related with odoo)

0
Avatar
Descartar
Denis Baranov

And the answer is still the same: you need to-rework procurement, what is quite hard

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

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

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
Sale order page configuration
sale.order.line purchase_order
Avatar
Avatar
1
may 25
1727
Let Delivery Order create one PURCHASE ORDER per Source Doc / not multiple sources in one P.O Resuelto
purchase_order odooV8
Avatar
Avatar
1
jun 21
6825
Using with_context in super call turns into infinite call in odoo Resuelto
odooV8 odoo8.0
Avatar
Avatar
Avatar
2
ene 20
16182
Edit inherited field definition in odoo 8 Resuelto
odooV8 odoo8.0
Avatar
Avatar
Avatar
Avatar
Avatar
16
ago 19
11543
display field depending the value of another field in the view (odoo 8) Resuelto
odooV8 odoo8.0
Avatar
Avatar
1
ene 19
6129
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