İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

How to Create MRP From Scrap in Odoo 15

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
mrpscrapEnterprisev15
1 Cevapla
2839 Görünümler
Avatar
waheed
I want to Please create the MRP order whenever the Main Products scrap orders created and validated. Please note that
if Child MO of MRP is used in MRP those should be created as well. Once created
then validate the MRP orders and its associated Child MO. The below code create main and child mrps when it goes to to_close state it generate error "Produce qty must be positive"
Any body know which step i missed.

_inherit = 'stock.scrap'

def action_validate(self):
res = super(StockScrap, self).action_validate()

for scrap in self:
boms = self.env['mrp.bom'].search([('product_tmpl_id', '=', scrap.product_id.product_tmpl_id.id)])
if not boms:
raise exceptions.UserError("No Bill of Materials found for the product.")

mrp_orders_to_confirm = []
print('.............', boms)

for scrap in self:
for bom in boms:
mrp_order_vals = {
'product_id': scrap.product_id.id,
'product_qty': scrap.scrap_qty,
'product_uom_id': scrap.product_id.uom_id.id,
'bom_id': bom.id,

}
print(bom.product_id.name, '.................................PRD ID')

print(mrp_order_vals, '.......................created mrp order')
mrp_order = self.env['mrp.production'].create(mrp_order_vals)
mrp_orders_to_confirm.append(mrp_order)
print(mrp_order, 'MRP ODER ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,')

for line in bom.bom_line_ids:
print(line.product_id.name, ',,,,,,,,,,,,,,,,,,,,,,,,,,,,,PRODUCT NAME')

if line.child_bom_id:
child_mrp_order_vals = {
'product_id': line.product_id.id,
'product_qty': scrap.scrap_qty,
'product_uom_id': line.product_id.uom_id.id,
'bom_id': line.child_bom_id.id,
# 'move_raw_ids': [(0, 0, {
# 'product_id': line.product_id.id, })]
}
child_mrp_order = self.env['mrp.production'].create(child_mrp_order_vals)
mrp_orders_to_confirm.append(child_mrp_order)

for mrp_order in mrp_orders_to_confirm:
mrp_order.action_confirm()

return res

Thanks
your reply will be appreciable


0
Avatar
Vazgeç
Avatar
Lars Aam
En İyi Yanıt

Instead of coding, take a look at standard functions in Odoo.  

On products you want to keep in stock create a reorder rule.  Here you can set MIN / MAX QTY and a reorder qty.  If you set MIN / MAX = 0 and reorder (Qty Multiple) = 1  it will only reorder when there is a demand.

You can choose Manual or Automatic trigger.  With Manual setting, you must use the function in Inventory -> Operation -> Replenishment and press button 'Order'. You can manually adjust qty you want to create order.

Automatic trigger: By default there is an automatic job - Scheduler that will create new orders, when there is a demand. You find the automatic job in Scheduled Action named Procurement Run Scheduler.  By default in run once a day.  You can modify the time to suit your needs.  It can also be run manually from Inventory -> Operations -> Run Scheduler.

An option for you might also be to create an automatic action to run scheduler when a scrap order is posted.

You can use Automatic trigger for some products, and manual for others according to what suits your business process.

The result will be that for whatever reason you are short for the product, an order will be created.

Child order:  If you use MTO route a child order will always be created connected to the mother order.  If you do not use MTO and you have multilevel manufacturing, the semifinished product will be created also with the same logic as for the main product.


0
Avatar
Vazgeç
Enjoying the discussion? Don't just read, join in!

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

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
✅ SOLVED - Reusing Scrap in Odoo
mrp scrap
Avatar
0
Şub 25
2025
Cost gets affected by inter branch transfer through the sales and purchase order synchronization
Enterprise v15
Avatar
0
Ara 23
2233
Override def application
Enterprise v15
Avatar
0
Tem 22
462
How can I pad online appointments? Çözüldü
Enterprise v15
Avatar
Avatar
1
Tem 22
2868
Link between mrp.production and subcontractor Çözüldü
mrp v15 subcontracting
Avatar
Avatar
1
Haz 23
3500
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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