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

How is the relationship between sales order and purchase order created

Suscribirse

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

Se marcó esta pregunta
salesrelationshipchangePurchase
1 Responder
10160 Vistas
Avatar
Herbert Van de Poel

We are a service company; we have created products that are purchased automatically when they are sold to our customer. This creates a smart button on the sales order to the purchase order, and the other way around. 

However, I want to change the relationship and link an other purchase order to the sales order. Where can I change this relationship - I would like to fix this using studio


any insights much appreciated

0
Avatar
Descartar
Jamshid Chungath

You can set vendor in the product, and set buy routes and Make to order, this will generate a purchase order whenever you make sales order for that product

Avatar
Herbert Van de Poel
Autor Mejor respuesta

Finally I managed to find the answer myself. The link between purchase order and sales order is not created on the level of the orders, but on the level of the order lines. Actually, in our case where we subcontract a service we sell, by setting the product (service) as being outsourced, whenever a SO is validated, this triggers the creation of a PO for the respective supplier. 

By using Studio, you can modify the PO order lines section in the form view. Add the field "Sale_order_id" to it, and make sure this field is not 'read only'. (this can be achieved by adding a domain to the 'read only' flag (like e.g. Id is not set). And for security reasons, make sure this field is only visible to certain user groups. 

Now you can edit / add / link the purchase order line to the sales order it should be linked to. In addition, you can even add the sales order line on the above mentioned list view, so that you can back link the purchase order line to the original sales order line. 

By going back to the sales order, you will find that the smart button in the top corner now links to the adapted PO.

Glad I could help myself (and others.)

0
Avatar
Descartar
Prih Hatmoko

Hello Herbert,

I'm interest about this, because I have same problem too.

I try this tutorial but I can't find it. This field is existing in Po Order Lines or we need to add new relation field?

Btw, I'm using odoo v16

Thank you,

Ignacio Fernández

@Prih Herbert you have to add it: "Add the field "Sale_order_id" to it, and make sure this field is not 'read only'. (this can be achieved by adding a domain to the 'read only' flag (like e.g. Id is not set)."

Jeff MacKenzie

i have tried adding this field you mention with the flag to prevent read only to the purchase order forms and it doesnt work, we are using version 17, is there anyway you can add screenshots or a step by step of which field should be added to what part of the form?

A S

I believe this is only true for real dropship processes, i.e. if supplier is sending directly the product to customer.

For ordinary PO - SO relations (so someone orders a product which is not on stock but has to be bought via PO first, delivered to your WH and then send to customer), it seems that procurement groups are used to establish link. See code here: https://github.com/odoo/odoo/blob/17.0/addons/sale_purchase_stock/models/purchase_order.py#L14

For us, on purchase.order.line, the sale_order_id and sale_order_line are empty. They are only store values when a true dropship process is used.

¿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
XLS mistake in sales report pivot
sales relationship
Avatar
Avatar
1
abr 23
2149
How to move order line from one module to another module?
sales odoo Purchase v15
Avatar
Avatar
1
sept 22
3722
Modify confirm Sale Order
sales manufacturing orders change
Avatar
0
mar 15
7348
community v10 vs v14
sales invoicing Purchase Inventory Accounting
Avatar
Avatar
1
sept 22
2923
How to allow quotation requests (RFQ) from the eCommerce instead of direct sales
sales
Avatar
Avatar
Avatar
2
dic 25
1536
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 empresariales de código abierto que cubre 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