Repository
odoo/odoo · module folder
Module version
1.0
Category
Hidden
Folder size
1.25 MB
License
LGPL-3
Application
No
Auto-installable
Yes
Website
https://www.odoo.com/page/manufacturing
Last tracking update
2026-08-07 04:59:46
Authors
Maintainers
None
Committers
Olivier Dony, Fabien Pinckaers, Raphael Collet, Christophe Simonis, Thibault Delavallée, Martin Trigaux, Odoo Translation Bot, Denis Ledoux, Nicolas Martinelli, Julien Legros, Richard Mathot, qdp-odoo, Jeremy Kersten, Yannick Tivisse, amoyaux
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
crm_rma_location, crm_rma_stock_location, framework_agreement, procurement_analytic, procurement_auto_create_group, procurement_insulation, procurement_operating_unit, procurement_purchase_no_grouping, product_quick_stock_rule, purchase_request_procurement, purchase_request_to_procurement, sale, sale_jit_on_services, sale_order_lot_selection, sale_order_priority, stock, stock_orderpoint_automatic_creation, stock_orderpoint_creator, stock_reord_rule
Description
This is the module for computing Procurements.
==============================================

This procurement module only depends on the product module and is not useful
on itself.  Procurements represent needs that need to be solved by a procurement
rule.  When a procurement is created, it is confirmed.  When a rule is found,
it will be put in running state.  After, it will check if what needed to be done
for the rule has been executed.  Then it will go to the done state.  A procurement
can also go into exception, for example when it can not find a rule and it can be cancelled.

The mechanism will be extended by several modules.  The procurement rule of stock will
create a move and the procurement will be fulfilled when the move is done.
The procurement rule of sale_service will create a task.  Those of purchase or
mrp will create a purchase order or a manufacturing order.

The scheduler will check if it can assign a rule to confirmed procurements and if
it can put running procurements to done.

Procurements in exception should be checked manually and can be re-run.
    

Code Analysis

Views touched (10)
XML IDNameModelTypeStatus
procurement_form_view procurement.order.form procurement.order form New
procurement_group_form_view procurement.group.form procurement.group form New
procurement_tree_view procurement.order.tree procurement.order tree New
product_product_view_form_procurement_button product.product.procurement.stat.button product.product form Inherits product.product_normal_form_view
product_template_view_form_procurement_button product.template.procurement.stat.button product.template form Inherits product.product_template_only_form_view
view_compute_schedulers_wizard Run Schedulers procurement.order.compute.all form New
view_procurement_filter procurement.order.select procurement.order search New
view_procurement_rule_filter procurement.rule.select procurement.rule search New
view_procurement_rule_form procurement.rule.form procurement.rule form New
view_procurement_rule_tree procurement.rule.tree procurement.rule tree New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (4)

New fields (3)
  • move_type Selection
    default='direct' required=True string='Delivery Type' args: [('direct', 'Partial'), ('one', 'All at once')]
  • name Char
    default=<expr> required=True args: 'Reference'
  • procurement_ids One2many → procurement.order
    args: 'procurement.order', 'group_id', 'Procurements'
Public methods (0)

No public methods.

New fields (11)
  • company_id Many2one → res.company
    default=<expr> required=True args: 'res.company', 'Company'
  • date_planned Datetime
    default=fields.Datetime.now index=True required=True track_visibility='onchange' args: 'Scheduled Date'
  • group_id Many2one → procurement.group
    args: 'procurement.group', 'Procurement Group'
  • name Text
    required=True args: 'Description'
  • origin Char
    help='Reference of the document that created this Procurement. This is automatically completed by Odoo.' args: 'Source Document'
  • priority Selection
    default='1' index=True required=True string='Priority' track_visibility='onchange' args: PROCUREMENT_PRIORITIES
  • product_id Many2one → product.product
    readonly=True required=True states={'confirmed': [('readonly', False)]} args: 'product.product', 'Product'
  • product_qty Float
    digits=dp.get_precision('Product Unit of Measure') readonly=True required=True states={'confirmed': [('readonly', False)]} args: 'Quantity'
  • product_uom Many2one → product.uom
    readonly=True required=True states={'confirmed': [('readonly', False)]} args: 'product.uom', 'Product Unit of Measure'
  • rule_id Many2one → procurement.rule
    help='Chosen rule for the procurement resolution. Usually chosen by the system but can be manually set by the procurement manager to force an unusual behavior.' track_visibility='onchange' args: 'procurement.rule', 'Rule'
  • state Selection
    copy=False default='confirmed' required=True string='Status' track_visibility='onchange' args: [('cancel', 'Cancelled'), ('confirmed', 'Confirmed'), ('exception', 'Exception'), ('running', 'Running'), ('done', 'Done')]
Public methods (9)
  • cancel(self)
    @api.multi
  • check(self, autocommit=False)
    @api.multi@api.returns('self', <expr>)
  • create(self, vals)
    @api.model
  • do_view_procurements(self)
    @api.multi
    This function returns an action that display existing procurement orders of same procurement group of given ids.
  • onchange_product_id(self)
    @api.onchange('product_id')
    Finds UoM of changed product.
  • reset_to_confirmed(self)
    @api.multi
  • run(self, autocommit=False)
    @api.multi
  • run_scheduler(self, use_new_cursor=False, company_id=False)
    @api.model
    Call the scheduler to check the procurement order. This is intented to be done for all existing companies at the same time, so we're running all the methods as SUPERUSER to avoid intercompany and access rights issues. @param use_new_cursor: if set, use a dedicated cursor and auto-commit after processing each procurement. This is appropriate for batch jobs only. @return: Dictionary of values
  • unlink(self)
    @api.multi

New fields (0)

No new fields.

Public methods (1)
  • procure_calculation(self)
    @api.multi

New fields (7)
  • action Selection
    required=True selection='_get_action' string='Action'
  • active Boolean
    default=True help='If unchecked, it will allow you to hide the rule without removing it.' args: 'Active'
  • company_id Many2one → res.company
    args: 'res.company', 'Company'
  • group_id Many2one → procurement.group
    args: 'procurement.group', 'Fixed Procurement Group'
  • group_propagation_option Selection
    default='propagate' string='Propagation of Procurement Group' args: [('none', 'Leave Empty'), ('propagate', 'Propagate'), ('fixed', 'Fixed')]
  • name Char
    help='This field will fill the packing origin and the name of its moves' required=True translate=True args: 'Name'
  • sequence Integer
    default=20 args: 'Sequence'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…