Skip to Content
Odoo मेन्यू
  • Sign in
  • मुफ़्त में आज़माएं
  • ऐप्लिकेशन
    फ़ाइनेंस
    • अकाउंटिंग
    • इनवॉइसिंग
    • एक्सपेंस
    • स्प्रेडशीट (बीआई)
    • डॉक्यूमेंट्स
    • साइन
    सेल्स
    • सीआरएम
    • सेल्स
    • पीओएस शॉप
    • पीओएस रेस्टोरेंट
    • सब्सक्रिप्शन
    • रेंटल
    वेबसाइट
    • वेबसाइट बिल्डर
    • ई-कॉमर्स
    • ब्लॉग
    • फ़ोरम
    • लाइव चैट
    • ई-लर्निंग
    सप्लाई चेन
    • इन्वेंट्री
    • मैन्युफ़ैक्चरिंग
    • पीएलएम
    • परचेज़
    • मेंटेनेंस
    • क्वालिटी
    मानव संसाधन
    • कर्मचारी
    • रिक्रूटमेंट
    • टाइम ऑफ़
    • अप्रेज़ल
    • रेफ़रल
    • फ़्लीट
    मार्केटिंग
    • सोशल मार्केटिंग
    • ईमेल मार्केटिंग
    • एसएमएस मार्केटिंग
    • इवेंट
    • मार्केटिंग ऑटोमेशन
    • सर्वे
    सेवाएं
    • प्रोजेक्ट
    • टाइमशीट
    • फ़ील्ड सर्विस
    • हेल्पडेस्क
    • प्लानिंग
    • अपॉइंटमेंट
    प्रॉडक्टिविटी
    • डिस्कस
    • अप्रूवल
    • आईओटी
    • वीओआईपी
    • नॉलेज
    • WhatsApp
    तीसरे पक्ष के ऐप्लिकेशन Odoo स्टूडियो Odoo क्लाउड प्लेटफ़ॉर्म
  • इंडस्ट्री
    रीटेल
    • बुक स्टोर
    • क्लोदिंग स्टोर
    • फ़र्नीचर स्टोर
    • ग्रॉसरी स्टोर
    • हार्डवेयर स्टोर
    • टॉय स्टोर
    Food & Hospitality
    • बार और पब
    • रेस्टोरेंट
    • फ़ास्ट फ़ूड
    • Guest House
    • बेवरिज डिस्ट्रीब्यूटर
    • होटल
    रियल एस्टेट
    • Real Estate Agency
    • आर्किटेक्चर फ़र्म
    • कंसट्रक्शन
    • एस्टेट मैनेजमेंट
    • गार्ड्निंग
    • प्रॉपर्टी ओनर असोसिएशन
    कंसल्टिंग
    • अकाउंटिंग फ़र्म
    • Odoo पार्टनर
    • मार्केटिंग एजेंसी
    • लॉ फ़र्म
    • टैलेंट ऐक्विज़िशन
    • ऑडिट & सर्टिफ़िकेशन
    मैन्युफ़ैक्चरिंग
    • टेक्सटाइल
    • Metal
    • फ़र्नीचर
    • फ़ूड
    • Brewery
    • कॉर्पोरेट गिफ़्ट
    हेल्थ & फिटनेस
    • स्पोर्ट्स क्लब
    • आईवियर स्टोर
    • फिटनेस सेंटर
    • वेलनेस प्रैक्टिशनर
    • फॉर्मेसी
    • हेयर सैलून
    Trades
    • Handyman
    • आईटी हॉर्डवेयर और सपोर्ट
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    अन्य
    • Nonprofit Organization
    • एन्वायरमेंटल एजेंसी
    • बिलबोर्ड रेंटल
    • फ़ोटोग्राफी
    • बाइक लीजिंग
    • सॉफ़्टवेयर रीसेलर
    Browse all Industries
  • कम्यूनिटी
    सीखें
    • ट्यूटोरियल्स
    • दस्तावेज़
    • सर्टिफ़िकेशन
    • ट्रेनिंग
    • ब्लॉग
    • पॉडकास्ट
    शिक्षा को बढ़ावा दें
    • एजुकेशन प्रोग्राम
    • स्केल अप! बिजनेस गेम
    • Odoo के ऑफ़िस में आएं
    सॉफ़्टवेयर पाएं
    • डाउनलोड
    • वर्शन की तुलना करें
    • रिलीज़
    साथ मिलकर काम करें
    • Github
    • फ़ोरम
    • इवेंट
    • अनुवाद
    • पार्टनर बनें
    • Services for Partners
    • अपना अकाउंटिंग फ़र्म रजिस्टर करें
    सेवाएं पाएं
    • पार्टनर ढूंढें
    • अकाउंटेंट खोजें
    • सलाहकार की मदद लें
    • इम्प्लिमेंटेशन सेवाएं
    • कस्टमर रेफ़रेंस
    • सहायता
    • अपग्रेड
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    डेमो देखें
  • कीमत
  • सहायता

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

  • सीआरएम
  • e-Commerce
  • लेखांकन
  • इन्वेंटरी
  • PoS
  • प्रोजेक्ट
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
Help

Update purchase order from received products

Subscribe

Get notified when there's activity on this post

This question has been flagged
purchase_orderreceptionAutomatedActionsKeepItSimpleOdoo17
1 Reply
4164 Views
Avatar
Ricardo Gross

Is there a way or maybe an automated action that makes it possible to update the PO based on products that have been received but aren't in the PO?

For example, with the barcode scanner, it's possible to add products to a receipt of products, but the PO is not updated with these products, neither the vendor bill.

0
Avatar
Discard
Ricardo Gross
Author

in sales, if an extra product is added during a delivery using the barcode scanner, this product is automatically added to the Sales Order and can be invoiced.
why doesn't it work with the reception of goods and POs?

Chris TRINGHAM

Hi Ricardo, I think the answer below is correct. If you raise a Purchase Order for Apples and the supplier sends you Oranges, you should really reject them (or keep them but refuse to pay). However, having said that, I have worked with a company who had suppliers who delivered whatever they had available and someone then had to match up the various POs with what had been received. They lived with it for a while until they could stop using that supplier.

Avatar
Gracious Joseph
Best Answer

In Odoo, the behavior you described is by design. Odoo's Purchase Order (PO) and Goods Receipt (GR) processes are deliberately separate to ensure a clear audit trail between the purchase agreement (PO) and what is actually received. However, this can be modified if you want to update the Purchase Order (PO) and Vendor Bill automatically when extra products are received.

Here’s how you can achieve it:

Solution 1: Automated Action

You can use Odoo's Automated Actions to automatically update the Purchase Order based on extra products received in the receipt.

Steps:

  1. Enable Developer Mode:
    • Go to Settings > Activate Developer Mode.
  2. Create the Automated Action:
    • Go to Settings > Technical > Automated Actions.
    • Create a new Automated Action with the following configuration:
      • Model: Stock Picking
      • Trigger: On Creation & Update
      • Filter Domain: picking_type_id.code = 'incoming'
      • Action To Do: Execute Python Code.
  3. Python Code for the Action: Add the following code to update the PO with extra received products:
    for move in record.move_ids_without_package:
        po_line = record.purchase_id.order_line.filtered(lambda l: l.product_id == move.product_id)
        if not po_line:
            record.purchase_id.order_line.create({
                'order_id': record.purchase_id.id,
                'product_id': move.product_id.id,
                'product_qty': move.product_uom_qty,
                'product_uom': move.product_uom.id,
                'price_unit': move.product_id.standard_price,  # Or use a custom logic for pricing
                'date_planned': record.scheduled_date or fields.Datetime.now(),
            })
    
    Explanation:
    • This code checks if the product received (move.product_id) is already in the Purchase Order line.
    • If not, it creates a new PO line with the details from the stock move.
  4. Test the Automated Action:
    • Create a PO and validate a Goods Receipt with extra products using the barcode scanner.
    • Verify that the PO updates with the new products.

Solution 2: Customize the Behavior with a Custom Module

For more robust and maintainable functionality, creating a custom module is recommended. Below is an outline of how this could be implemented.

Key Features:

  • Detect extra products during receipt validation.
  • Update the Purchase Order and Vendor Bill with the extra products.

Code Example:

from odoo import api, models

class StockPicking(models.Model):
    _inherit = 'stock.picking'

    @api.model
    def button_validate(self):
        res = super(StockPicking, self).button_validate()
        if self.picking_type_id.code == 'incoming' and self.purchase_id:
            for move in self.move_ids_without_package:
                po_line = self.purchase_id.order_line.filtered(lambda l: l.product_id == move.product_id)
                if not po_line:
                    self.purchase_id.order_line.create({
                        'order_id': self.purchase_id.id,
                        'product_id': move.product_id.id,
                        'product_qty': move.product_uom_qty,
                        'product_uom': move.product_uom.id,
                        'price_unit': move.product_id.standard_price,  # Or custom pricing
                        'date_planned': self.scheduled_date or fields.Datetime.now(),
                    })
        return res

Steps:

  1. Create a custom Odoo module with the above logic.
  2. Extend the button_validate method in stock.picking to trigger the PO update during Goods Receipt validation.
  3. Install the module and test its behavior.

Solution 3: Manual Update Option

If you prefer to keep the process more controlled, you can create a custom button or wizard to review extra products received and update the Purchase Order manually.

Why It Doesn't Work Automatically for POs?

Odoo does not update POs automatically during Goods Receipts because:

  • A Purchase Order is a legally binding agreement between the company and the vendor.
  • Updating it dynamically may create inconsistencies in terms of traceability and accountability.
  • Sales Orders allow updates since they are typically more dynamic and less tied to vendor agreements.

Conclusion

While Odoo doesn’t natively support this functionality for Purchase Orders, the above approaches can be used to automate or streamline the process. Using a custom module is the most reliable and scalable solution for this requirement. Let me know if you'd like help with the custom module code or configuration!

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

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

Sign up
Related Posts Replies Views Activity
automated action Solved
AutomatedActions Odoo17
Avatar
Avatar
1
सित॰ 24
2209
Import field value from one model to another model.
AutomatedActions Odoo17
Avatar
0
सित॰ 24
22
Purchase order required for reception in V16
purchase_order reception
Avatar
Avatar
1
नव॰ 23
1967
Switching from 3 step shipping/receiving to 1 step Solved
purchase_order reception
Avatar
Avatar
1
दिस॰ 21
3622
Copy a value from a computed field in the Sell Order invoice , to the price of one Service added to that invoice.
AutomatedActions Odoo17 Odoo-Enterprise
Avatar
Avatar
1
सित॰ 24
1708
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • Github
  • रनबॉट
  • अनुवाद
सेवाएं
  • Odoo.sh Hosting
  • सहायता
  • अपग्रेड
  • कस्टम डेवलपमेंट्स
  • शिक्षा
  • अकाउंटेंट खोजें
  • पार्टनर ढूंढें
  • पार्टनर बनें
हमारे बारे में
  • हमारी कंपनी
  • ब्रांड ऐसेट
  • संपर्क करें
  • नौकरियां
  • इवेंट
  • पॉडकास्ट
  • ब्लॉग
  • ग्राहक
  • लीगल • गोपनीयता
  • सुरक्षा
الْعَرَبيّة 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, बिज़नेस से जुड़े ऐप्लिकेशन का एक कलेक्शन है जो ओपन सोर्स पर आधारित है. इसमें आपकी कंपनी की हर ज़रूरत के लिए ऐप्लिकेशन हैं. जैसे, सीआरएम, ई-कॉमर्स, अकाउंटिंग, इन्वेंट्री, पॉइंट ऑफ़ सेल, प्रोजेक्ट मैनेजमेंट वगैरह.

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