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
    • Discuss
    • 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

Custom Fields in Purchase Order Lines

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
4 Replies
7403 Tampilan
Avatar
Vishal Mehra

I have added custom fields in Sales Order Line and the same to Purchase Order Line. Which method should I override to be able to set these correctly? I tried inheriting purchase.order, but while navigating through the purchase order line items, it does not let me make those changes. 


Regards,

Vishal

0
Avatar
Buang
Qutechs, Ahmed M.Elmubarak

Hi, what these changes you want to make and set ? what version you're using ... more details will be helpful to get the answer

Avatar
Qutechs, Ahmed M.Elmubarak
Jawaban Terbai

Hello Vishal,
Thanks for the feedback
As I got; you're trying to fetch a value from a sale order line to the automatically generated purchase order [by using procurement method such as MTO then Buy]. 

If what I get is correct then it is not simple ... lots of logic should be considered as:

First: for each sale order line a procurement order created. Then after running the procurement order(s) new stock moves will be created. Those stock moves will be confirmed and new procurement orders will be created from those stock moves. Those new procurement orders will generate the purchase orders. And this why there is  2 procurement orders will be generated if you confirmed the Sale order [one is running "the first one generated by the Sale order, the Second one "Confirmed" generated by the Stock move].

So its as: SaleOrder->Procurement Order->Stock Move->New Procurement Order->Purchase Order..
IMHO, there are two options to solve this: using context or do few modifications in some models and functions.
I didn't debug both options but I think using context will not work because running procurement can be for more than one procurement order.

So I think you need to modify some methods.

Actually the procurement.order contains a field called 'sale_line_id' and this will be automatically filled by the first first generation of the procurement order by this function . So we need to pass this field to the newly generated stock.move

So we need to add a new column to stock move and that is 'sale_line_id' then set this field in the function that will generate the stock move from the procurement . You can simple get the sale_line_id by using procurement.sale_line_id.id

after that we need to fill the sale_line_id again to the new procurement generated by the confirmation of the stock move in the _prepare_procurement_from_move . Then the new created procurement order will contains the sale_line_id that contains your new field 'preferred account number'. The last step is to fill the purchase order line with this field by using _get_po_line_values_from_proc  . 

I know this seems somehow complex . But I didn't know more simpler way to do it :( .  And it'll be great if someone else can give an idea ...

Hope it can help ...

Waiting for your feedback ....

1
Avatar
Buang
Travis Waelbroeck

Your answer may or may not have helped Vishal, but it helped me immensely! Thank you very much for the detailed description and links to the appropriate methods.

Avatar
Akhil P Sivan
Jawaban Terbai

Hi,

I hope you want to get the "preferred account number"  field value on adding a product in sale order line or purchase order line, like unit price.

Then you need to override the methods, product_id_change() in sale.order.line and onchange_product_id() in purchase.order.line.



0
Avatar
Buang
Avatar
Vishal Mehra
Penulis Jawaban Terbai

I have added a "preferred account number" field to the sales order line and I would like the same to be reflected in the purchase.order.line. There are no calculations involved, but just lookups. 

At this time, I am looking at overriding create_procurement_purchase_order method in procurement.order.

Using Odoo 8.

0
Avatar
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

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

Daftar
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