Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

Add customer name manufacturing order

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
salesmanufacturingManufacturing Order
1 Odpowiedz
3713 Widoki
Awatar
Aunchalee
By follow this

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


I can't find "A Related Field" is the Thirdly Part

How to Add customer name in manufacturing order? 

Is there another way to Add customer name in manufacturing order? (uesing odoo online 16 - 17) 

Thank you 

0
Awatar
Odrzuć
Lars Aam

Hello Chris.
We enter the sales order manually into the manuifacturong order, and collect som additional information. I will try your automatic action to be more efficient.
But we have another challenge: Multi level manufaturing and we want the sales order information also on the child order. We can have two or three levels below the top order. Do you have any tips to include that in automation?

Chris TRINGHAM

Hello Lars,
The same logic can be used anywhere if there is a link. For a child MO, the source is the parent MO. I think the fields Count of Source SO and Number of source MO will tell you whether the parent is an SO or MO.

Lars Aam

Hello Chris.
The field 'mrp_production_source_count' is not available to set criteria in the domain in the action. Confused there. But I will get help on the coding anyway, so we will solve it.

Chris TRINGHAM

Hello Lars,
It should be possible to add it to the Python code, something like this

if record.origin record and mrp_production_source_count:

Lars Aam

Thanks Chris
Your comment was very helpful. I will explain some details, if anybody else should be interested:

It was in the user interface where you can define the domain that the field 'Number of source' was not available to look up. But I could modify in that window where the code is generated. Just write the right field name on the right place. So domain for the action looks like this, so we do not run this action on child orders, and we do not need it on backorders:
["&", ("backorder_sequence", "=", 0), ("mrp_production_source_count", "=", 0)]

This is to select the top order. And the code to find the sales order number:

if record.origin:
order = env['sale.order'].search([('name','=',record.origin)])
record['x_studio_many2one_field_416E4'] = order.id

The top order is created first. We have MTO also on the semifinished products. So child order is generated after the top order. For those I wanted to copy the sales order number that exist in the top order. Or more correct - from the source order.
Domain filter is a little different, so we only run this action if the order is a child order and is not a backorder:
["&", ("backorder_sequence", "=", 0), ("mrp_production_source_count", "=", 1)]

Code to get the sales order number:
if record.origin:
order = env['mrp.production'].search([('name','=',record.origin)])
record['x_studio_many2one_field_416E4'] = order.x_studio_many2one_field_416E4

So today I could make our sales person happy as manual work is reduced.

Chris TRINGHAM

I suppose that you can't select mrp_production_source_count from the UI because it is a computed field. If you can enter it manually that is a good solution.

Awatar
Chris TRINGHAM
Najlepsza odpowiedź

Create a many2one field on the Manufacturing Order (production.order) linked to Contacts (res.partner).  I called it x_studio_customer.

Create an Automated Action with Execute Python code as the Action and this should get you the customer:



if record.origin:
  order =  env['sale.order'].search([('name','=',record.origin)])
  record['x_studio_customer'] = order.partner_id


Substitute x_studio_customer with your field name


This can also be created as a server action.  I have added more checking to make it extra robust, but can't guarantee it will work in every case:


for record in records:
  order = False
  if record.origin:
      if record.sale_order_count:
          order = record.env['sale.order'].search([('name','=',record.origin)])
          if order:
            record['x_studio_customer'] = order.partner_id

This checks that 

  1. There is a source and
  2. There is a sales order in the source and 
  3. The sales order can be retrieved.  

This Python code can be used in the Automated Action (and if you create an Automated Action it can also be used as a Server Action).

Creating a contextual action lets you update the customer on existing manufacturing orders.


Check it with your configuration / version of Odoo

0
Awatar
Odrzuć
Aunchalee
Autor

Can you give me more guide on how to do it? I might do sometings wrong
the Customer name it's not showing.

Thank you sir

Chris TRINGHAM

I added a screenshot and some extra information

Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
How get a report about the Consumption of raw materials to delivery orders per month?
sales manufacturing
Awatar
Awatar
1
cze 23
4385
Odoo16 Scheduling the Parent WO after Child WO
manufacturing Manufacturing Order
Awatar
0
kwi 23
2632
How to group and filter order lines for manufacturing order?
sales manufacturing
Awatar
0
sty 23
3337
What does "Plan" do in a Manufacturing Order? v15 Rozwiązane
manufacturing Manufacturing Order
Awatar
Awatar
1
wrz 24
4688
How to do sale of per-customer custom-product that spawns manufacturing order. Rozwiązane
sales manufacturing
Awatar
Awatar
1
cze 22
4055
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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