OdooWiki OCA HUB

Stock Override Procurement

stock_override_procurement folder_open OCA/stock-logistics-workflow open_in_new
Uncategorised License: AGPL-3

In odoo core modules there is often a method to provide the procurement values but not the attributes like location, product_id, etc. This technical module makes it possible to override them if they are passed in the values.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

This technical module lets other modules override the key details of a stock procurement (product, quantity, unit of measure, source location, reference and origin) by passing them in the procurement values.

This is a technical module with no menus or screens of its own. It changes how Odoo processes stock procurements (the internal requests that trigger moves such as deliveries, receipts or manufacturing) by extending the procurement.group model.

When a procurement is run, the module checks the values dictionary attached to each procurement. If a value is provided for product, quantity, unit of measure, source location, reference name or origin, that value is used instead of the one already set on the procurement. If no value is provided, the original procurement attribute is kept.

  • It overrides the run method of procurement.group so the replacement happens automatically before the standard procurement logic executes.
  • It adds helper methods _override_procurements and _get_override_procurement that build a new procurement record with the overridden values.
  • The company is always taken from the original procurement, not from the values.

Because it only touches procurement.group, it affects any Odoo flow that creates procurements, such as sales orders, purchase orders, manufacturing orders and reordering rules, but only when another module or customization passes the override values. Without such values, behaviour is unchanged.

Depends on

stock
Models and fields (1)
  • procurement.group · extends an existing model

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 2 confirmed, 7 with no information of 9 versions.

Sources · Odoo 18.0

Confirmed on 2026-11-03 in branch 18.0 of OCA/stock-logistics-workflow.

terminal Installation and usage

OCA documentation · Odoo 18.0
self.env["procurement.group"].run(
      [
          self.env["procurement.group"].Procurement(
              product,
              1,
              uom,
              customer_location,
              "procurement",
              "procurement",
              company,
              {"location_id": output_location},
          )
      ]
  )

No verified information in OCA: Installation, Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.