Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Odoo Studio customer name on manufacturing order

Subscriure's

Get notified when there's activity on this post

This question has been flagged
manufacturingstudio
4 Respostes
5852 Vistes
Avatar
Kent Koski

Hello, Im new to Odoo Studio and Im trying to figure out how to add the Customer name from a Sales order to a Manufacturing Order.  Does anyone have an online example or an explanation they can share to point me in the right direction?

0
Avatar
Descartar
Lucas

How are you creating the manufacturing order?

Kent Koski
Autor

The manufacturing orders are created at confirmation of the Sales Order.

Lucas

Are they generated by reordering rules or the Replenish on Order (MTO) route?

Kent Koski
Autor

Hi Lucas. They are generated with Replenish On Order (MTO).

Lucas

I have a solution for you, I will post the answer here

Kent Koski
Autor

Awesome. Thank you for your help.

Avatar
Lucas
Best Answer

When you confirm a sales order that contains a product with the MTO Route, then the 'Source' field on the 'Miscellaneous' tab on the manufacturing order will contain the Sales Order number as a text field.

We can use this to create a firm link between the Sales Order and Manufacturing Order.

Firstly, open Studio on the Manufacturing Order and add a 'Many2One' field that is linked to the 'Sales Order' model.

Secondly, create an automated action with the following settings:

- Model: Production Order

- Action To Do: Update the Record

- Trigger: On Creation

- Field: (Select the custom Many2One field that is linked to the sales order model)

- Evaluation Type: Python Expression

- Value: record.env['sale.order'].search([('name','=',record.origin)])

Thirdly, Add a Related Field on the Manufacturing Order using Studio. Use the path Sales Order > Customer > Display Name

Now, when a Sales Order is confirmed the Manufacturing Order that is generated will be formally linked to the Sales Order and the related field will pull through the customer name from that Sales Order. You can also add more related fields to pull any other fields from the SO, e.g. customer phone number etc.

Please let me know if this works for you

1
Avatar
Descartar
Kent Koski
Autor

Thank you so much. I will give it a try and let you know.

Kent Koski
Autor

So on the 1st field I see it is pulling in the Sales Order number. However, on the Related Field it is not bringing in the customer name. I made sure to delete all my manufacturing orders, cancel the sales order, then confirm it again to create new records. Any ideas?

Lucas

You can manually select the Sales Order number in the Many2One field to test if the related field is pulling the correct data through. It is easier to test the link manually rather than creating a new sales/manufacturing order.

Open Studio, select the related field and check the 'Related Field' box in the left hand pane and make sure it says something like:
x_studio_many2one_field_9yWzD.partner_id.display_name

It must say partner_id.display_name , please check that

Kent Koski
Autor

The Related Field value is: x_studio_sales_order.partner_id.display_name

Lucas

Which Odoo version are you on?

Kent Koski
Autor

Im doing a trial of Odoo so it should be latest. Im preparing for a test run and we will then subscribe.

Kent Koski
Autor

I noticed when I was adding the Related Field there were multiple Sales Order values listed. I took the first one. Im not sure why so many are listed. I was thinking about creating another test database to try your steps again. It seems like it should work.

Lucas

If there were multiple Sales Order values listed then it means that you have added multiple Many2One fields referencing the Sales Order model

Kent Koski
Autor

Yea, I just created a new database and did it again and it worked! I did create many fields trying to figure this out. Thank you so much for your help. I have a better understanding of how Studio works now too.

Lucas

You are welcome, I had the same requirement and spent waaaaay too long trying to figure it out.

The automated action will only update one Many2One field with the SO number. If you have multiple Many2One fields (from testing etc) you have to make sure the related field is referencing the correct one.

Good luck!

Avatar
Mindaugas
Best Answer

hi, this is realy good starting position help. try it.
https://odootricks.tips/about/odoo-studio/

1
Avatar
Descartar
Avatar
Aunchalee
Best Answer

How about not have "related field" in Odoo 16 and 17 What can i ues?

0
Avatar
Descartar
Avatar
Pieter Van Den Weghe
Best Answer

Hi,

Lucas's example is good, but it still requires manual selection of the sales order in the Manufacturing Order in order to display the customer name. With the following solution you will immediately enter the customer name when creating the production order:

1. Go to a Manufacturing order and open Odoo Studio

2. Add a 'Many2One' field that is linked to the 'Sales Order' model.

3. Add a Related Field on the Manufacturing Order using Studio. Use the path Sales Order > Customer > Display Name. Give it a technical name x_studio_production_customer
4. C
reate an automated action with the following settings:

- Model: Production Order

- Trigger: On Creation

- Action to do : Python Expression

- The Python code

order = record.env['sale.order'].search([('name','=',record.origin)])
if order:
​record.write({'x_studio_production_customer': order.partner_id.name})

Good luck!

-1
Avatar
Descartar
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
Comment afficher un champ personnalisé de type Float du modéle mrp.workcenter.productivity dans un tableau croisée dynamique
manufacturing dashboard studio
Avatar
Avatar
1
de juny 25
781
[v16] Information from Sales Order to MO
manufacturing sale.order studio
Avatar
Avatar
1
de maig 25
3427
Delivery Date Shown In Manufacturing Order
sales manufacturing studio
Avatar
Avatar
1
de març 23
2736
How can I link Sales Order information to a Manufacturing Order? Solved
manufacturing studio v15
Avatar
Avatar
Avatar
3
de maig 25
8451
debit and credit in currency
studio
Avatar
Avatar
1
de nov. 25
2120
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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