Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

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

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

Add customer name manufacturing order

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
salesmanufacturingManufacturing Order
1 Balas
3707 Tampilan
Avatar
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
Avatar
Buang
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.

Avatar
Chris TRINGHAM
Jawaban Terbai

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
Avatar
Buang
Aunchalee
Penulis

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

Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
How get a report about the Consumption of raw materials to delivery orders per month?
sales manufacturing
Avatar
Avatar
1
Jun 23
4384
Odoo16 Scheduling the Parent WO after Child WO
manufacturing Manufacturing Order
Avatar
0
Apr 23
2629
How to group and filter order lines for manufacturing order?
sales manufacturing
Avatar
0
Jan 23
3333
What does "Plan" do in a Manufacturing Order? v15 Diselesaikan
manufacturing Manufacturing Order
Avatar
Avatar
1
Sep 24
4687
How to do sale of per-customer custom-product that spawns manufacturing order. Diselesaikan
sales manufacturing
Avatar
Avatar
1
Jun 22
4054
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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