Purchase Stock

purchase_stock
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/19.0/purchase_stock
VERSION
VERSION 1.2
CATEGORY
CATEGORYSupply Chain/Purchase
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSOdoo S.A.
MAINTAINERS
MAINTAINERSOdoo S.A.
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Thibault Delavallée, Xavier Morel, Laurent Smet, Jorge Pinna Puissant, Arnold Moyaux, Julien Castiaux, Victor Feyens, Andrea Grazioso (agr-odoo), William Henrotin, Anh Thao Pham (pta), svs-odoo, Prakash Prajapati, Tiffany Chang (tic), Rémy Voet (ryv), Gorash, Mathieu Duckerts-Antoine, william-andre, David (dafr), JF Aubert, John Laterre (jol), Aurelien van Delft (avd), Mathieu Walravens, luvi, Elias Regopoulos, Habib (ayh), alsh-odoo, Louis Wicket (wil), Adrien Widart (awt), Victor Piryns (pivi), clesgow, Djamel Touati, Pieter Claeys (clpi), Dylan Kiss (dyki), Odoo, Martin Maes, Paweł Fertyk, Walid (wasa), kdeb@odoo.com, Ethan Vincent, lase@odoo.com, Quentin Wolfs, Cyril Dutrieux (cydu), kcv-odoo, nihp-odoo, Chrysanthe (chgo), mano-odoo, Stéphane Diez, dhha-odoo, kawkb, Léo Gizard, Hesham Saleh, Julien Schwanen, David Van Droogenbroeck (DROD), pkgu-odoo, Mohammad Abdulmoneim (abdu), djameltouati, Shrey Mehta, MaximeNoirhomme, plha-odoo, Krzysztof Magusiak (krma), Omar (OSAH), joseph, krip-odoo, Guillaume V, bhna-odoo, rare-odoo, sawer, agbr-odoo, Junqi, Lulu Grimalkin (lugr), Lancelot Semal, adip-odoo, Ayush Modi, Robert Smith (rosm), daiduongnguyen-odoo, srap-odoo, Do Anh Duy, steji, tpma-odoo, Zachary (zavan), msho-odoo, hapt-odoo, Youssef, jeanschoenlaub, Abhishek Yadav
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:51:43
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock_account
    - stock
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - uom
    - barcodes_gs1_nomenclature
    - barcodes
    - digest
    - portal
    - http_routing
    - auth_signup
    - resource
    - account
    - onboarding
    - analytic
    - purchase
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (27)
XML IDNameModelTypeStatus
exception_on_po exception_on_po ir.ui.view qweb New
product_supplierinfo_replenishment_tree_view product.supplierinfo.replenishment.list.view product.supplierinfo field Inherits product.product_supplierinfo_tree_view
product_view_kanban_catalog_purchase_only product.view.kanban.catalog.purchase_stock product.product field Inherits purchase.product_view_kanban_catalog_purchase_only
product_view_search_catalog purchase.view.search.catalog.inherit.purchase_stock product.product xpath Inherits purchase.product_view_search_catalog
purchase_help_message_template purchase_help_message_template ir.ui.view qweb Inherits stock.help_message_template
purchase_order_line_view_form_inherit purchase.order.line.form.inherit purchase.order.line xpath Inherits purchase.purchase_order_line_form2
purchase_order_view_form_inherit purchase.order.form.inherit purchase.order xpath Inherits purchase.purchase_order_form
purchase_order_view_tree_inherit purchase.order.list.inherit purchase.order field Inherits purchase.purchase_order_view_tree
purchase_report_stock_rule purchase_report_stock_rule ir.ui.view qweb Inherits stock.report_stock_rule
purchase_report_view_search purchase.report.search.stock purchase.report xpath Inherits purchase.view_purchase_order_search
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb Inherits purchase.report_purchaseorder_document
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb Inherits purchase.report_purchasequotation_document
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits purchase.res_config_settings_view_form_purchase
res_config_settings_view_form_stock res.config.settings.view.form.inherit.purchase.stock res.config.settings div Inherits stock.res_config_settings_view_form
res_partner_view_purchase_buttons_inherit res.partner.purchase.stock.form.inherit res.partner xpath Inherits purchase.view_partner_property_form
stock_move_purchase stock.move.form stock.move xpath Inherits stock.view_move_form
stock_production_lot_view_form stock.production.lot.view.form stock.lot xpath Inherits stock.view_production_lot_form
stock_reference_purchase_view_form stock.reference.purchase stock.reference xpath Inherits stock.stock_reference_form_view
vendor_delay_report_filter vendor.delay.report.search vendor.delay.report search New
vendor_delay_report_view_graph vendor.delay.report.view.graph vendor.delay.report graph New
view_picking_form purchase.stock.view.picking.form stock.picking xpath Inherits stock.view_picking_form
view_product_replenish_form_inherit_stock product.replenish.form.inherit.stock product.replenish xpath Inherits stock.view_product_replenish
view_stock_replenishment_info_stock_purchase_inherit stock.replenishment.information.purchase.stock.inherit stock.replenishment.info xpath Inherits stock.view_stock_replenishment_info
view_stock_rule_form_stock_inherit_purchase_stock stock.rule.form.stock.inherit.purchase_stock stock.rule field Inherits stock.view_stock_rule_form
view_warehouse_inherited Stock Warehouse Inherited stock.warehouse xpath Inherits stock.view_warehouse
view_warehouse_orderpoint_tree_editable_inherited_mrp stock.warehouse.orderpoint.list.editable.inherit.mrp stock.warehouse.orderpoint xpath Inherits stock.view_warehouse_orderpoint_tree_editable
warehouse_orderpoint_search_inherit stock.warehouse.orderpoint.search.inherit stock.warehouse.orderpoint xpath Inherits stock.stock_reorder_report_search
Models touched (28)

New fields (0)

No new fields.

Public methods (1)
  • button_draft(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • monthly_demand Float
    compute='_compute_monthly_demand'
  • purchase_order_line_ids One2many → purchase.order.line
    string='PO Lines' args: 'purchase.order.line', 'product_id'
  • suggest_estimated_price Float
    compute='_compute_suggest_estimated_price'
  • suggested_qty Integer
    compute='_compute_suggested_quantity' search='_search_product_with_suggested_quantity'
Public methods (1)
  • get_total_routes(self)

New fields (0)

No new fields.

Public methods (2)
  • action_stock_replenishment_info(self)
  • default_get(self, fields)
    @api.model

New fields (2)
  • last_purchase_date Date
    compute='_compute_last_purchase_date' args: 'Last Purchase'
  • show_set_supplier_button Boolean
    compute='_compute_show_set_supplier_button' args: 'Show Set Supplier Button'
Public methods (1)
  • action_set_supplier(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (11)
  • default_location_dest_id_usage Selection
    help='Technical field used to display the Drop Ship Address' readonly=True related='picking_type_id.default_location_dest_id.usage' string='Destination Location Type'
  • dest_address_id Many2one → res.partner
    compute='_compute_dest_address_id' readonly=False store=True args: 'res.partner'
  • effective_date Datetime
    compute='_compute_effective_date' copy=False help='Completion date of the first receipt order.' store=True args: 'Arrival'
  • incoming_picking_count Integer
    compute='_compute_incoming_picking_count' args: 'Incoming Shipment count'
  • incoterm_location Char
    string='Incoterm Location'
  • is_shipped Boolean
    compute='_compute_is_shipped'
  • on_time_rate Float
    compute_sudo=False related='partner_id.on_time_rate'
  • picking_ids Many2many → stock.picking
    compute='_compute_picking_ids' copy=False store=True string='Receptions' args: 'stock.picking'
  • picking_type_id Many2one → stock.picking.type
    default=_default_picking_type domain="['|', ('warehouse_id', '=', False), ('warehouse_id.company_id', '=', company_id)]" help='This will determine operation type of incoming shipment' required=True args: 'stock.picking.type', 'Deliver To'
  • receipt_status Selection
    compute='_compute_receipt_status' help='Red: Late\n Orange: To process today\n Green: On time' store=True string='Receipt Status' args: [('pending', 'Not Received'), ('partial', 'Partially Received'), ('full', 'Fully Received')]
  • reference_ids Many2many → stock.reference
    copy=False string='References' args: 'stock.reference', 'stock_reference_purchase_rel', 'purchase_id', 'reference_id'
Public methods (7)
  • action_add_from_catalog(self)
  • action_purchase_order_suggest(self)
    Adds suggested products to PO, removing products with no suggested_qty, and collapsing existing po_lines into at most 1 orderline. Saves suggestion params (eg. number_of_days) to partner table.
  • action_view_picking(self)
  • button_approve(self, force=False)
  • button_cancel(self)
  • retrieve_dashboard(self)
    @api.model
  • write(self, vals)

New fields (9)
  • forecasted_issue Boolean
    compute='_compute_forecasted_issue'
  • is_storable Boolean
    related='product_id.is_storable'
  • location_final_id Many2one → stock.location
    args: 'stock.location', 'Location from procurement'
  • move_dest_ids Many2many → stock.move
    args: 'stock.move', 'stock_move_created_purchase_line_rel', 'created_purchase_line_id', 'move_id', 'Downstream moves alt'
  • move_ids One2many → stock.move
    copy=False readonly=True string='Reservation' args: 'stock.move', 'purchase_line_id'
  • orderpoint_id Many2one → stock.warehouse.orderpoint
    copy=False index='btree_not_null' ondelete='set null' args: 'stock.warehouse.orderpoint', 'Orderpoint'
  • product_description_variants Char
    args: 'Custom Description'
  • propagate_cancel Boolean
    default=True args: 'Propagate cancellation'
  • qty_received_method Selection
    ondelete={'stock_moves': _ondelete_stock_moves} selection_add=[('stock_moves', 'Stock Moves')]
Public methods (4)
  • action_product_forecast_report(self)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)
  • write(self, vals)

New fields (3)
  • days_to_arrival Float
    aggregator='avg' digits=(16, 2) readonly=True args: 'Effective Days To Arrival'
  • effective_date Datetime
    string='Effective Date'
  • picking_type_id Many2one → stock.warehouse
    readonly=True args: 'stock.warehouse', 'Warehouse'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • days_to_purchase Float
    help='Days needed to confirm a PO, define when a PO should be validated' string='Days to Purchase'
Public methods (0)

No public methods.

New fields (3)
  • days_to_purchase Float
    readonly=False related='company_id.days_to_purchase'
  • is_installed_sale Boolean
    string='Is the Sale Module Installed'
  • module_stock_dropshipping Boolean
    args: 'Dropshipping'
Public methods (1)
  • get_values(self)
    @api.model

New fields (7)
  • group_on Selection
    default='default' required=True string='Week Day' args: [('default', 'Expected Date'), ('1', 'Monday'), ('2', 'Tuesday'), ('3', 'Wednesday'), ('4', 'Thursday'), ('5', 'Friday'), ('6', 'Saturday'), ('7', 'Sunday')]
  • group_rfq Selection
    default='default' help='Define if RFQ should be grouped together based on expected arrival, except for dropship operations.\n On Order: Replenishment needs will be grouped together except for MTO.\n Daily: Replenishment needs will be grouped if the expected arrival is the same day\n Weekly: Replenishment needs will be grouped if the expected arrival is the same week or week day\n Always: Replenishment needs will always be grouped.' required=True string='Group RFQ' args: [('default', 'On Order'), ('day', 'Daily'), ('week', 'Weekly'), ('all', 'Always')]
  • on_time_rate Float
    compute='_compute_on_time_rate' help='Over the past x days; the number of products received on time divided by the number of ordered products.x is either the System Parameter purchase_stock.on_time_delivery_days or the default 365' args: 'On-Time Delivery Rate'
  • purchase_line_ids One2many → purchase.order.line
    string='Purchase Lines' args: 'purchase.order.line', 'partner_id'
  • suggest_based_on Char
    default='30_days'
  • suggest_days Integer
    default=7
  • suggest_percent Integer
    default=100
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • purchase_order_count Integer
    compute='_compute_purchase_order_ids' args: 'Purchase order count'
  • purchase_order_ids Many2many → purchase.order
    compute='_compute_purchase_order_ids' readonly=True store=False string='Purchase Orders' args: 'purchase.order'
Public methods (1)
  • action_view_po(self)

New fields (2)
  • created_purchase_line_ids Many2many → purchase.order.line
    copy=False args: 'purchase.order.line', 'stock_move_created_purchase_line_rel', 'move_id', 'created_purchase_line_id', 'Created Purchase Order Lines'
  • purchase_line_id Many2one → purchase.order.line
    index='btree_not_null' ondelete='set null' readonly=True args: 'purchase.order.line', 'Purchase Order Line'
Public methods (0)

No public methods.

New fields (3)
  • days_to_arrive Datetime
    compute='_compute_effective_date' copy=False search='_search_days_to_arrive'
  • delay_pass Datetime
    compute='_compute_date_order' copy=False index=True search='_search_delay_pass'
  • purchase_id Many2one → purchase.order
    readonly=True related='move_ids.purchase_line_id.order_id' string='Purchase Orders' args: 'purchase.order'
Public methods (0)

No public methods.

New fields (1)
  • purchase_ids Many2many → purchase.order
    copy=False string='Purchases' args: 'purchase.order', 'stock_reference_purchase_rel', 'reference_id', 'purchase_id'
Public methods (0)

No public methods.

New fields (2)
  • show_vendor Boolean
    compute='_compute_show_vendor'
  • supplier_id Many2one → product.supplierinfo
    string='Vendor' args: 'product.supplierinfo'
Public methods (0)

No public methods.

New fields (3)
  • show_vendor_tab Boolean
    compute='_compute_show_vendor_tab'
  • supplierinfo_id Many2one
    related='orderpoint_id.supplier_id'
  • supplierinfo_ids Many2many → product.supplierinfo
    compute='_compute_supplierinfo_ids' store=True args: 'product.supplierinfo'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • select_route(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • action Selection
    ondelete={'buy': 'cascade'} selection_add=[('buy', 'Buy')]
Public methods (1)
  • run(self, procurements, raise_user_error=True)
    @api.model

New fields (2)
  • buy_pull_id Many2one → stock.rule
    copy=False args: 'stock.rule', 'Buy rule'
  • buy_to_resupply Boolean
    compute='_compute_buy_to_resupply' default=True help='When products are bought, they can be delivered to this warehouse' inverse='_inverse_buy_to_resupply' args: 'Buy to Resupply'
Public methods (1)
  • get_rules_dict(self)

New fields (6)
  • available_vendor Many2one → res.partner
    help="Any vendor on the product's pricelist" search='_search_available_vendor' store=False string='Available Vendor' args: 'res.partner'
  • effective_vendor_id Many2one → res.partner
    compute='_compute_effective_vendor_id' help='Either the vendor set directly or the one computed to be used by this replenishment' search='_search_effective_vendor_id' store=False args: 'res.partner'
  • show_supplier Boolean
    compute='_compute_show_supplier' args: 'Show supplier column'
  • supplier_id Many2one → product.supplierinfo
    check_company=True domain="['|', ('product_id', '=', product_id), '&', ('product_id', '=', False), ('product_tmpl_id', '=', product_tmpl_id)]" inverse='_inverse_supplier_id' string='Vendor Pricelist' args: 'product.supplierinfo'
  • supplier_id_placeholder Char
    compute='_compute_supplier_id_placeholder'
  • vendor_ids One2many
    related='product_id.seller_ids' string='Vendors'
Public methods (1)
  • action_view_purchase(self)
    This function returns an action that display existing purchase orders of given orderpoint.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (7)
  • category_id Many2one → product.category
    readonly=True args: 'product.category', 'Product Category'
  • date Datetime
    readonly=True args: 'Effective Date'
  • on_time_rate Float
    readonly=True args: 'On-Time Delivery Rate'
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Vendor'
  • product_id Many2one → product.product
    readonly=True args: 'product.product', 'Product'
  • qty_on_time Float
    readonly=True args: 'On-Time Quantity'
  • qty_total Float
    readonly=True args: 'Total Quantity'
Public methods (1)
  • init(self)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/18.0/purchase_stock
VERSION
VERSION 1.2
CATEGORY
CATEGORYInventory/Purchase
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Xavier Morel, Yannick Tivisse, Odoo Online, Laurent Smet, Christophe Monniez, Arnold Moyaux, Andrea Grazioso (agr-odoo), William Henrotin, Anh Thao Pham (pta), Tiffany Chang (tic), Rémy Voet (ryv), Gorash, snd, Miquel Raïch, David (dafr), yhu-odoo, JordiMForgeFlow, John Laterre (jol), Ruben Gomes, Aurelien van Delft (avd), Mathieu Walravens, Vincent Larcin, jbw-odoo, alsh-odoo, Louis Wicket (wil), Walid, Adrien Widart (awt), nda, Victor Piryns (pivi), Gauthier Wala (gawa), clesgow, Djamel Touati, Pieter Claeys (clpi), Claire Bretton (clbr), Levi Siuzdak (sile), Antoine Dupuis (andu), Dylan Kiss (dyki), kir-odoo, Michael (mcm), Chong Wang (cwg), Odoo, Martin Maes, matteoopenf, Paweł Fertyk, AH-Yussef, Arnaud Sibille, Andrzej(pian), Walid (wasa), kdeb@odoo.com, Ethan Vincent, lase@odoo.com, Aurelien MARIE (auma), Richard Prosser, Sven Fuehr, Nathaniel (naja), Cyril Dutrieux (cydu), kcv-odoo, adsh-odoo, Chrysanthe (chgo), sami odoo, Louis (wil), Quang Nguyen, mano-odoo, kago-odoo, Stéphane Diez, Mohammad Abdulmoneim, Mathias Mathy (MAMA), kawkb, Pierre Pulinckx (PIPU), Julien Schwanen, Jitendra Prajapat, pkgu-odoo, djameltouati, MaximeNoirhomme, plha-odoo, joseph, Guillaume V, Maeva De Keyser (MDEK), kinhosz, temo-odoo, sbel-odoo, hossamelgendy1, steji, tpma-odoo, msho-odoo
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:25:56
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock_account
    - stock
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - uom
    - barcodes_gs1_nomenclature
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
    - account
    - onboarding
    - analytic
    - purchase
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (27)
XML IDNameModelTypeStatus
exception_on_po exception_on_po ir.ui.view qweb New
product_supplierinfo_replenishment_tree_view product.supplierinfo.replenishment.list.view product.supplierinfo field Inherits product.product_supplierinfo_tree_view
product_template_form_view product.normal.form.inherit.purchase.stock product.template field Inherits account.product_template_form_view
product_view_kanban_catalog_purchase_only product.view.kanban.catalog.purchase_stock product.product div Inherits product.product_view_kanban_catalog
purchase_help_message_template purchase_help_message_template ir.ui.view qweb Inherits stock.help_message_template
purchase_order_line_view_form_inherit purchase.order.line.form.inherit purchase.order.line xpath Inherits purchase.purchase_order_line_form2
purchase_order_view_form_inherit purchase.order.form.inherit purchase.order xpath Inherits purchase.purchase_order_form
purchase_order_view_tree_inherit purchase.order.list.inherit purchase.order field Inherits purchase.purchase_order_view_tree
purchase_report_stock_rule purchase_report_stock_rule ir.ui.view qweb Inherits stock.report_stock_rule
purchase_report_view_search purchase.report.search.stock purchase.report xpath Inherits purchase.view_purchase_order_search
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb Inherits purchase.report_purchaseorder_document
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb Inherits purchase.report_purchasequotation_document
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits purchase.res_config_settings_view_form_purchase
res_config_settings_view_form_stock res.config.settings.view.form.inherit.purchase.stock res.config.settings xpath Inherits stock.res_config_settings_view_form
res_partner_view_purchase_buttons_inherit res.partner.purchase.stock.form.inherit res.partner xpath Inherits purchase.res_partner_view_purchase_buttons
stock_move_purchase stock.move.form stock.move xpath Inherits stock.view_move_form
stock_production_lot_view_form stock.production.lot.view.form stock.lot xpath Inherits stock.view_production_lot_form
stock_reorder_report_search_inherited_purchase_stock stock.warehouse.orderpoint.search.inherit.purchase.stock stock.warehouse.orderpoint xpath Inherits stock.stock_reorder_report_search
vendor_delay_report_filter vendor.delay.report.search vendor.delay.report search New
vendor_delay_report_view_graph vendor.delay.report.view.graph vendor.delay.report graph New
view_category_property_form product.category.property.form.inherit.purchase.stock product.category field Inherits account.view_category_property_form
view_product_replenish_form_inherit_stock product.replenish.form.inherit.stock product.replenish xpath Inherits stock.view_product_replenish
view_stock_replenishment_info_stock_purchase_inherit stock.replenishment.information.purchase.stock.inherit stock.replenishment.info xpath Inherits stock.view_stock_replenishment_info
view_stock_rule_form_stock_inherit_purchase_stock stock.rule.form.stock.inherit.purchase_stock stock.rule field Inherits stock.view_stock_rule_form
view_warehouse_inherited Stock Warehouse Inherited stock.warehouse xpath Inherits stock.view_warehouse
view_warehouse_orderpoint_tree_editable_inherited_mrp stock.warehouse.orderpoint.list.editable.inherit.mrp stock.warehouse.orderpoint xpath Inherits stock.view_warehouse_orderpoint_tree_editable
warehouse_orderpoint_search_inherit stock.warehouse.orderpoint.search.inherit stock.warehouse.orderpoint xpath Inherits stock.warehouse_orderpoint_search
Models touched (28)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • purchase_line_ids One2many → purchase.order.line
    copy=False string='Linked Purchase Order Lines' args: 'purchase.order.line', 'group_id'
Public methods (1)
  • run(self, procurements, raise_user_error=True)
    @api.model

New fields (1)
  • property_account_creditor_price_difference_categ Many2one → account.account
    company_dependent=True help='This account will be used to value price difference between purchase price and accounting cost.' ondelete='restrict' string='Price Difference Account' args: 'account.account'
Public methods (0)

No public methods.

New fields (1)
  • purchase_order_line_ids One2many → purchase.order.line
    string='PO Lines' args: 'purchase.order.line', 'product_id'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (2)
  • action_stock_replenishment_info(self)
  • default_get(self, fields)
    @api.model

New fields (2)
  • last_purchase_date Date
    compute='_compute_last_purchase_date' args: 'Last Purchase'
  • show_set_supplier_button Boolean
    compute='_compute_show_set_supplier_button' args: 'Show Set Supplier Button'
Public methods (1)
  • action_set_supplier(self)

New fields (2)
  • property_account_creditor_price_difference Many2one → account.account
    company_dependent=True help='This account is used in automated inventory valuation to record the price difference between a purchase order and its related vendor bill when validating this vendor bill.' ondelete='restrict' string='Price Difference Account' args: 'account.account'
  • route_ids Many2many
    default=<expr>
Public methods (0)

No public methods.

New fields (11)
  • default_location_dest_id_usage Selection
    help='Technical field used to display the Drop Ship Address' readonly=True related='picking_type_id.default_location_dest_id.usage' string='Destination Location Type'
  • dest_address_id Many2one → res.partner
    compute='_compute_dest_address_id' readonly=False store=True args: 'res.partner'
  • effective_date Datetime
    compute='_compute_effective_date' copy=False help='Completion date of the first receipt order.' store=True args: 'Arrival'
  • group_id Many2one → procurement.group
    copy=False string='Procurement Group' args: 'procurement.group'
  • incoming_picking_count Integer
    compute='_compute_incoming_picking_count' args: 'Incoming Shipment count'
  • incoterm_location Char
    string='Incoterm Location'
  • is_shipped Boolean
    compute='_compute_is_shipped'
  • on_time_rate Float
    compute_sudo=False related='partner_id.on_time_rate'
  • picking_ids Many2many → stock.picking
    compute='_compute_picking_ids' copy=False store=True string='Receptions' args: 'stock.picking'
  • picking_type_id Many2one → stock.picking.type
    default=_default_picking_type domain="['|', ('warehouse_id', '=', False), ('warehouse_id.company_id', '=', company_id)]" help='This will determine operation type of incoming shipment' required=True args: 'stock.picking.type', 'Deliver To'
  • receipt_status Selection
    compute='_compute_receipt_status' help='Red: Late\n Orange: To process today\n Green: On time' store=True string='Receipt Status' args: [('pending', 'Not Received'), ('partial', 'Partially Received'), ('full', 'Fully Received')]
Public methods (5)
  • action_add_from_catalog(self)
  • action_view_picking(self)
  • button_approve(self, force=False)
  • button_cancel(self)
  • write(self, vals)

New fields (10)
  • forecasted_issue Boolean
    compute='_compute_forecasted_issue'
  • group_id Many2one → procurement.group
    args: 'procurement.group', 'Procurement group that generated this line'
  • is_storable Boolean
    related='product_id.is_storable'
  • location_final_id Many2one → stock.location
    args: 'stock.location', 'Location from procurement'
  • move_dest_ids Many2many → stock.move
    args: 'stock.move', 'stock_move_created_purchase_line_rel', 'created_purchase_line_id', 'move_id', 'Downstream moves alt'
  • move_ids One2many → stock.move
    copy=False readonly=True string='Reservation' args: 'stock.move', 'purchase_line_id'
  • orderpoint_id Many2one → stock.warehouse.orderpoint
    copy=False index='btree_not_null' args: 'stock.warehouse.orderpoint', 'Orderpoint'
  • product_description_variants Char
    args: 'Custom Description'
  • propagate_cancel Boolean
    default=True args: 'Propagate cancellation'
  • qty_received_method Selection
    ondelete={'stock_moves': _ondelete_stock_moves} selection_add=[('stock_moves', 'Stock Moves')]
Public methods (4)
  • action_product_forecast_report(self)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)
  • write(self, values)

New fields (3)
  • days_to_arrival Float
    aggregator='avg' digits=(16, 2) readonly=True args: 'Effective Days To Arrival'
  • effective_date Datetime
    string='Effective Date'
  • picking_type_id Many2one → stock.warehouse
    readonly=True args: 'stock.warehouse', 'Warehouse'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • days_to_purchase Float
    help='Days needed to confirm a PO, define when a PO should be validated' string='Days to Purchase'
Public methods (0)

No public methods.

New fields (3)
  • days_to_purchase Float
    readonly=False related='company_id.days_to_purchase'
  • is_installed_sale Boolean
    string='Is the Sale Module Installed'
  • module_stock_dropshipping Boolean
    args: 'Dropshipping'
Public methods (1)
  • get_values(self)

New fields (2)
  • on_time_rate Float
    compute='_compute_on_time_rate' help='Over the past x days; the number of products received on time divided by the number of ordered products.x is either the System Parameter purchase_stock.on_time_delivery_days or the default 365' args: 'On-Time Delivery Rate'
  • purchase_line_ids One2many → purchase.order.line
    string='Purchase Lines' args: 'purchase.order.line', 'partner_id'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • purchase_order_count Integer
    compute='_compute_purchase_order_ids' args: 'Purchase order count'
  • purchase_order_ids Many2many → purchase.order
    compute='_compute_purchase_order_ids' readonly=True store=False string='Purchase Orders' args: 'purchase.order'
Public methods (1)
  • action_view_po(self)

New fields (2)
  • created_purchase_line_ids Many2many → purchase.order.line
    copy=False args: 'purchase.order.line', 'stock_move_created_purchase_line_rel', 'move_id', 'created_purchase_line_id', 'Created Purchase Order Lines'
  • purchase_line_id Many2one → purchase.order.line
    index='btree_not_null' ondelete='set null' readonly=True args: 'purchase.order.line', 'Purchase Order Line'
Public methods (0)

No public methods.

New fields (3)
  • days_to_arrive Datetime
    compute='_compute_effective_date' copy=False search='_search_days_to_arrive'
  • delay_pass Datetime
    compute='_compute_date_order' copy=False index=True search='_search_delay_pass'
  • purchase_id Many2one → purchase.order
    readonly=True related='move_ids.purchase_line_id.order_id' string='Purchase Orders' args: 'purchase.order'
Public methods (0)

No public methods.

New fields (2)
  • show_vendor Boolean
    compute='_compute_show_vendor'
  • supplier_id Many2one → product.supplierinfo
    string='Vendor' args: 'product.supplierinfo'
Public methods (0)

No public methods.

New fields (2)
  • supplierinfo_id Many2one
    related='orderpoint_id.supplier_id'
  • supplierinfo_ids Many2many → product.supplierinfo
    compute='_compute_supplierinfo_ids' store=True args: 'product.supplierinfo'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • select_route(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • action Selection
    ondelete={'buy': 'cascade'} selection_add=[('buy', 'Buy')]
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • buy_pull_id Many2one → stock.rule
    copy=False args: 'stock.rule', 'Buy rule'
  • buy_to_resupply Boolean
    default=True help='When products are bought, they can be delivered to this warehouse' args: 'Buy to Resupply'
Public methods (1)
  • get_rules_dict(self)

New fields (5)
  • product_supplier_id Many2one → res.partner
    compute='_compute_product_supplier_id' store=True string='Product Supplier' args: 'res.partner'
  • purchase_visibility_days Float
    default=0.0 help='Visibility Days applied on the purchase routes.'
  • show_supplier Boolean
    compute='_compute_show_suppplier' args: 'Show supplier column'
  • supplier_id Many2one → product.supplierinfo
    check_company=True domain="['|', ('product_id', '=', product_id), '&', ('product_id', '=', False), ('product_tmpl_id', '=', product_tmpl_id)]" string='Supplier' args: 'product.supplierinfo'
  • vendor_id Many2one
    related='supplier_id.partner_id' store=True string='Vendor'
Public methods (1)
  • action_view_purchase(self)
    This function returns an action that display existing purchase orders of given orderpoint.

New fields (7)
  • category_id Many2one → product.category
    readonly=True args: 'product.category', 'Product Category'
  • date Datetime
    readonly=True args: 'Effective Date'
  • on_time_rate Float
    readonly=True args: 'On-Time Delivery Rate'
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Vendor'
  • product_id Many2one → product.product
    readonly=True args: 'product.product', 'Product'
  • qty_on_time Float
    readonly=True args: 'On-Time Quantity'
  • qty_total Float
    readonly=True args: 'Total Quantity'
Public methods (1)
  • init(self)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/17.0/purchase_stock
VERSION
VERSION 1.2
CATEGORY
CATEGORYInventory/Purchase
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Thibault Delavallée, Denis Ledoux, Xavier Morel, qdp-odoo, Yannick Tivisse, Odoo Online, Laurent Smet, Jorge Pinna Puissant, Arnold Moyaux, Xavier-Do, Andrea Grazioso (agr-odoo), William Henrotin, Anh Thao Pham (pta), svs-odoo, Samuel Degueldre, Achraf (abz), Adrien Widart, Touati Djamel (otd), Tiffany Chang (tic), Rémy Voet (ryv), Gorash, Pierre Paridans, snd, MerlinGuillaume, David (dafr), yhu-odoo, Bruno Zanotti, bat-odoo, JordiMForgeFlow, Walid HANNICHE (waha), Yolann Sabaux, John Laterre (jol), Aurelien van Delft (avd), Mathieu Walravens, niyasraphy, jbw-odoo, mehjabinfarsana, Gaetan Vanden Bergh (gavb), Louis Wicket (wil), Walid, Adrien Widart (awt), nda, althaf shaik, Maximilien (malb), Victor Piryns (pivi), Mahamadasif Ansari, Ali Alfie (alal), Tom De Caluwé, clesgow, Djamel Touati, Pieter Claeys (clpi), Levi Siuzdak (sile), Dylan Kiss (dyki), kir-odoo, Jérôme Hellinckx, Michael (mcm), Odoo, Martin Maes, Ahmed Khalaf, matteoopenf, AH-Yussef, Arnaud Sibille, Andrzej(pian), Walid (wasa), kdeb@odoo.com, Ethan Vincent, lase@odoo.com, InCeyN, Richard Prosser, Karl Southern, adsh-odoo, Chrysanthe (chgo), Louis (wil), Quang Nguyen, kago-odoo, Mathias Mathy (MAMA), kawkb, Jonathan Castillo (jcs), Julien Schwanen, pkgu-odoo, djameltouati, Pierre Pulinckx (pipu), Bastien PIERRE, plha-odoo, Guillaume V, Sohail JAIDI (soja), Lancelot Semal, sbel-odoo, Orrin Zhong, Cooper Spinelli
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:02:07
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock_account
    - stock
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - barcodes_gs1_nomenclature
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
    - account
    - onboarding
    - analytic
    - purchase
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (25)
XML IDNameModelTypeStatus
exception_on_po exception_on_po ir.ui.view qweb New
product_supplierinfo_replenishment_tree_view product.supplierinfo.replenishment.tree.view product.supplierinfo field Inherits product.product_supplierinfo_tree_view
product_template_form_view product.normal.form.inherit.purchase.stock product.template field Inherits account.product_template_form_view
product_view_kanban_catalog_purchase_only product.view.kanban.catalog.purchase_stock product.product div Inherits product.product_view_kanban_catalog
purchase_order_line_view_form_inherit purchase.order.line.form.inherit purchase.order.line xpath Inherits purchase.purchase_order_line_form2
purchase_order_view_form_inherit purchase.order.form.inherit purchase.order xpath Inherits purchase.purchase_order_form
purchase_order_view_tree_inherit purchase.order.tree.inherit purchase.order field Inherits purchase.purchase_order_view_tree
purchase_report_stock_rule purchase_report_stock_rule ir.ui.view qweb Inherits stock.report_stock_rule
purchase_report_view_search purchase.report.search.stock purchase.report xpath Inherits purchase.view_purchase_order_search
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb Inherits purchase.report_purchaseorder_document
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb Inherits purchase.report_purchasequotation_document
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits purchase.res_config_settings_view_form_purchase
res_config_settings_view_form_stock res.config.settings.view.form.inherit.purchase.stock res.config.settings xpath Inherits stock.res_config_settings_view_form
res_partner_view_purchase_buttons_inherit res.partner.purchase.stock.form.inherit res.partner xpath Inherits purchase.res_partner_view_purchase_buttons
stock_move_purchase stock.move.form stock.move xpath Inherits stock.view_move_form
stock_production_lot_view_form stock.production.lot.view.form stock.lot xpath Inherits stock.view_production_lot_form
stock_reorder_report_search_inherited_purchase_stock stock.warehouse.orderpoint.search.inherit.purchase.stock stock.warehouse.orderpoint xpath Inherits stock.stock_reorder_report_search
vendor_delay_report_filter vendor.delay.report.search vendor.delay.report search New
vendor_delay_report_view_graph vendor.delay.report.view.graph vendor.delay.report graph New
view_category_property_form product.category.property.form.inherit.purchase.stock product.category field Inherits account.view_category_property_form
view_product_replenish_form_inherit_stock product.replenish.form.inherit.stock product.replenish xpath Inherits stock.view_product_replenish
view_stock_replenishment_info_stock_purchase_inherit stock.replenishment.information.purchase.stock.inherit stock.replenishment.info xpath Inherits stock.view_stock_replenishment_info
view_stock_rule_form_stock_inherit_purchase_stock stock.rule.form.stock.inherit.purchase_stock stock.rule field Inherits stock.view_stock_rule_form
view_warehouse_inherited Stock Warehouse Inherited stock.warehouse xpath Inherits stock.view_warehouse
view_warehouse_orderpoint_tree_editable_inherited_mrp stock.warehouse.orderpoint.tree.editable.inherit.mrp stock.warehouse.orderpoint xpath Inherits stock.view_warehouse_orderpoint_tree_editable
Models touched (28)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • run(self, procurements, raise_user_error=True)
    @api.model

New fields (1)
  • property_account_creditor_price_difference_categ Many2one → account.account
    company_dependent=True help='This account will be used to value price difference between purchase price and accounting cost.' string='Price Difference Account' args: 'account.account'
Public methods (0)

No public methods.

New fields (1)
  • purchase_order_line_ids One2many → purchase.order.line
    string='PO Lines' args: 'purchase.order.line', 'product_id'
Public methods (0)

No public methods.

New fields (2)
  • show_vendor Boolean
    compute='_compute_show_vendor'
  • supplier_id Many2one → product.supplierinfo
    string='Vendor' args: 'product.supplierinfo'
Public methods (2)
  • action_stock_replenishment_info(self)
  • default_get(self, fields)
    @api.model

New fields (2)
  • last_purchase_date Date
    compute='_compute_last_purchase_date' args: 'Last Purchase'
  • show_set_supplier_button Boolean
    compute='_compute_show_set_supplier_button' args: 'Show Set Supplier Button'
Public methods (1)
  • action_set_supplier(self)

New fields (2)
  • property_account_creditor_price_difference Many2one → account.account
    company_dependent=True help='This account is used in automated inventory valuation to record the price difference between a purchase order and its related vendor bill when validating this vendor bill.' string='Price Difference Account' args: 'account.account'
  • route_ids Many2many
    default=<expr>
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (11)
  • default_location_dest_id_usage Selection
    help='Technical field used to display the Drop Ship Address' readonly=True related='picking_type_id.default_location_dest_id.usage' string='Destination Location Type'
  • dest_address_id Many2one → res.partner
    compute='_compute_dest_address_id' readonly=False store=True args: 'res.partner'
  • effective_date Datetime
    compute='_compute_effective_date' copy=False help='Completion date of the first receipt order.' store=True args: 'Arrival'
  • group_id Many2one → procurement.group
    copy=False string='Procurement Group' args: 'procurement.group'
  • incoming_picking_count Integer
    compute='_compute_incoming_picking_count' args: 'Incoming Shipment count'
  • incoterm_location Char
    string='Incoterm Location'
  • is_shipped Boolean
    compute='_compute_is_shipped'
  • on_time_rate Float
    compute_sudo=False related='partner_id.on_time_rate'
  • picking_ids Many2many → stock.picking
    compute='_compute_picking_ids' copy=False store=True string='Receptions' args: 'stock.picking'
  • picking_type_id Many2one → stock.picking.type
    default=_default_picking_type domain="['|', ('warehouse_id', '=', False), ('warehouse_id.company_id', '=', company_id)]" help='This will determine operation type of incoming shipment' required=True args: 'stock.picking.type', 'Deliver To'
  • receipt_status Selection
    compute='_compute_receipt_status' store=True string='Receipt Status' args: [('pending', 'Not Received'), ('partial', 'Partially Received'), ('full', 'Fully Received')]
Public methods (5)
  • action_add_from_catalog(self)
  • action_view_picking(self)
  • button_approve(self, force=False)
  • button_cancel(self)
  • write(self, vals)

New fields (7)
  • forecasted_issue Boolean
    compute='_compute_forecasted_issue'
  • move_dest_ids Many2many → stock.move
    args: 'stock.move', 'stock_move_created_purchase_line_rel', 'created_purchase_line_id', 'move_id', 'Downstream moves alt'
  • move_ids One2many → stock.move
    copy=False readonly=True string='Reservation' args: 'stock.move', 'purchase_line_id'
  • orderpoint_id Many2one → stock.warehouse.orderpoint
    copy=False index='btree_not_null' args: 'stock.warehouse.orderpoint', 'Orderpoint'
  • product_description_variants Char
    args: 'Custom Description'
  • propagate_cancel Boolean
    default=True args: 'Propagate cancellation'
  • qty_received_method Selection
    ondelete={'stock_moves': _ondelete_stock_moves} selection_add=[('stock_moves', 'Stock Moves')]
Public methods (4)
  • action_product_forecast_report(self)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)
  • write(self, values)

New fields (2)
  • effective_date Datetime
    string='Effective Date'
  • picking_type_id Many2one → stock.warehouse
    readonly=True args: 'stock.warehouse', 'Warehouse'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • days_to_purchase Float
    help='Days needed to confirm a PO, define when a PO should be validated' string='Days to Purchase'
Public methods (0)

No public methods.

New fields (3)
  • days_to_purchase Float
    readonly=False related='company_id.days_to_purchase'
  • is_installed_sale Boolean
    string='Is the Sale Module Installed'
  • module_stock_dropshipping Boolean
    args: 'Dropshipping'
Public methods (1)
  • get_values(self)

New fields (2)
  • on_time_rate Float
    compute='_compute_on_time_rate' help='Over the past x days; the number of products received on time divided by the number of ordered products.x is either the System Parameter purchase_stock.on_time_delivery_days or the default 365' args: 'On-Time Delivery Rate'
  • purchase_line_ids One2many → purchase.order.line
    string='Purchase Lines' args: 'purchase.order.line', 'partner_id'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • purchase_order_count Integer
    compute='_compute_purchase_order_ids' args: 'Purchase order count'
  • purchase_order_ids Many2many → purchase.order
    compute='_compute_purchase_order_ids' readonly=True store=False string='Purchase Orders' args: 'purchase.order'
Public methods (1)
  • action_view_po(self)

New fields (2)
  • created_purchase_line_ids Many2many → purchase.order.line
    copy=False args: 'purchase.order.line', 'stock_move_created_purchase_line_rel', 'move_id', 'created_purchase_line_id', 'Created Purchase Order Lines'
  • purchase_line_id Many2one → purchase.order.line
    index='btree_not_null' ondelete='set null' readonly=True args: 'purchase.order.line', 'Purchase Order Line'
Public methods (0)

No public methods.

New fields (1)
  • purchase_id Many2one → purchase.order
    readonly=True related='move_ids.purchase_line_id.order_id' string='Purchase Orders' args: 'purchase.order'
Public methods (0)

No public methods.

New fields (2)
  • supplierinfo_id Many2one
    related='orderpoint_id.supplier_id'
  • supplierinfo_ids Many2many → product.supplierinfo
    compute='_compute_supplierinfo_ids' store=True args: 'product.supplierinfo'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • select_route(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • action Selection
    ondelete={'buy': 'cascade'} selection_add=[('buy', 'Buy')]
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • buy_pull_id Many2one → stock.rule
    copy=False args: 'stock.rule', 'Buy rule'
  • buy_to_resupply Boolean
    default=True help='When products are bought, they can be delivered to this warehouse' args: 'Buy to Resupply'
Public methods (1)
  • get_rules_dict(self)

New fields (4)
  • purchase_visibility_days Float
    default=0.0 help='Visibility Days applied on the purchase routes.'
  • show_supplier Boolean
    compute='_compute_show_suppplier' args: 'Show supplier column'
  • supplier_id Many2one → product.supplierinfo
    check_company=True domain="['|', ('product_id', '=', product_id), '&', ('product_id', '=', False), ('product_tmpl_id', '=', product_tmpl_id)]" string='Product Supplier' args: 'product.supplierinfo'
  • vendor_id Many2one
    related='supplier_id.partner_id' store=True string='Vendor'
Public methods (1)
  • action_view_purchase(self)
    This function returns an action that display existing purchase orders of given orderpoint.

New fields (7)
  • category_id Many2one → product.category
    readonly=True args: 'product.category', 'Product Category'
  • date Datetime
    readonly=True args: 'Effective Date'
  • on_time_rate Float
    readonly=True args: 'On-Time Delivery Rate'
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Vendor'
  • product_id Many2one → product.product
    readonly=True args: 'product.product', 'Product'
  • qty_on_time Float
    readonly=True args: 'On-Time Quantity'
  • qty_total Float
    readonly=True args: 'Total Quantity'
Public methods (1)
  • init(self)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/16.0/purchase_stock
VERSION
VERSION 1.2
CATEGORY
CATEGORYInventory/Purchase
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Fabien Pinckaers, Denis Ledoux, Xavier Morel, Wolfgang Taferner, Yannick Tivisse, Laurent Smet, Arnold Moyaux, Xavier-Do, Romeo Fragomeli, Victor Feyens, Andrea Grazioso (agr-odoo), Hugo Adan, William Henrotin, oco-odoo, svs-odoo, Brice bib Bartoletti, Adrien Widart, Ivan Yelizariev, Touati Djamel (otd), Tiffany Chang (tic), Rémy Voet (ryv), Guillaume (guva), roen-odoo, Nicolas (vin), william-andre, Merlin (megu), David (dafr), JF Aubert, PNO, yhu-odoo, aliya, william, JordiMForgeFlow, anhe-odoo, Walid HANNICHE (waha), Yolann Sabaux, John Laterre (jol), Antoine Vandevenne (anv), Aurelien van Delft (avd), Mathieu Walravens, Roy Le, niyasraphy, Gaetan Vanden Bergh (gavb), Walid, Adrien Widart (awt), nda, Victor Piryns (pivi), Mahamadasif Ansari, Tom De Caluwé, clesgow, Djamel Touati, Pieter Claeys (clpi), Nicolas Pierre, Levi Siuzdak (sile), Piero (pca), Jérôme Hellinckx, Chong Wang (cwg), Odoo, matteoopenf, Paweł Fertyk, Ahmed Khalaf (ahkh), AH-Yussef, Arnaud Sibille, Ethan Vincent, lase@odoo.com, Aurelien MARIE (auma), axtr, Richard Prosser, Karl Southern, Martin Trigaux (mat), Chrysanthe (chgo), Aungkokolin1997, Quang Nguyen, Hussein Ebrahim(hyhe), kago-odoo, Mathias Mathy (MAMA), Jonathan Castillo (jcs), hs-oerp
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:49
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock_account
    - stock
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - barcodes_gs1_nomenclature
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
    - account
    - analytic
    - purchase
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (21)
XML IDNameModelTypeStatus
exception_on_po exception_on_po ir.ui.view qweb New
product_supplierinfo_replenishment_tree_view product.supplierinfo.replenishment.tree.view product.supplierinfo field Inherits product.product_supplierinfo_tree_view
purchase_order_line_view_form_inherit purchase.order.line.form.inherit purchase.order.line xpath Inherits purchase.purchase_order_line_form2
purchase_order_view_form_inherit purchase.order.form.inherit purchase.order xpath Inherits purchase.purchase_order_form
purchase_order_view_tree_inherit purchase.order.tree.inherit purchase.order field Inherits purchase.purchase_order_view_tree
purchase_report_product_product_replenishment purchase_report_product_product_replenishment ir.ui.view qweb Inherits stock.report_product_product_replenishment
purchase_report_stock_rule purchase_report_stock_rule ir.ui.view qweb Inherits stock.report_stock_rule
purchase_report_view_search purchase.report.search.stock purchase.report xpath Inherits purchase.view_purchase_order_search
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb Inherits purchase.report_purchaseorder_document
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb Inherits purchase.report_purchasequotation_document
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits purchase.res_config_settings_view_form_purchase
res_config_settings_view_form_stock res.config.settings.view.form.inherit.purchase.stock res.config.settings xpath Inherits stock.res_config_settings_view_form
res_partner_view_purchase_buttons_inherit res.partner.purchase.stock.form.inherit res.partner xpath Inherits purchase.res_partner_view_purchase_buttons
stock_move_purchase stock.move.form stock.move xpath Inherits stock.view_move_form
stock_production_lot_view_form stock.production.lot.view.form stock.lot xpath Inherits stock.view_production_lot_form
vendor_delay_report_filter vendor.delay.report.search vendor.delay.report search New
vendor_delay_report_view_graph vendor.delay.report.view.graph vendor.delay.report graph New
view_stock_replenishment_info_stock_purchase_inherit stock.replenishment.information.purchase.stock.inherit stock.replenishment.info xpath Inherits stock.view_stock_replenishment_info
view_stock_rule_form_stock_inherit_purchase_stock stock.rule.form.stock.inherit.purchase_stock stock.rule field Inherits stock.view_stock_rule_form
view_warehouse_inherited Stock Warehouse Inherited stock.warehouse xpath Inherits stock.view_warehouse
view_warehouse_orderpoint_tree_editable_inherited_mrp stock.warehouse.orderpoint.tree.editable.inherit.mrp stock.warehouse.orderpoint xpath Inherits stock.view_warehouse_orderpoint_tree_editable
Models touched (24)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • run(self, procurements, raise_user_error=True)
    @api.model

New fields (1)
  • purchase_order_line_ids One2many → purchase.order.line
    string='PO Lines' args: 'purchase.order.line', 'product_id'
Public methods (0)

No public methods.

New fields (2)
  • last_purchase_date Date
    compute='_compute_last_purchase_date' args: 'Last Purchase'
  • show_set_supplier_button Boolean
    compute='_compute_show_set_supplier_button' args: 'Show Set Supplier Button'
Public methods (1)
  • action_set_supplier(self)

New fields (1)
  • route_ids Many2many
    default=<expr>
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (12)
  • default_location_dest_id_usage Selection
    help='Technical field used to display the Drop Ship Address' readonly=True related='picking_type_id.default_location_dest_id.usage' string='Destination Location Type'
  • dest_address_id Many2one → res.partner
    compute='_compute_dest_address_id' readonly=False store=True args: 'res.partner'
  • effective_date Datetime
    compute='_compute_effective_date' copy=False help='Completion date of the first receipt order.' store=True args: 'Arrival'
  • group_id Many2one → procurement.group
    copy=False string='Procurement Group' args: 'procurement.group'
  • incoming_picking_count Integer
    compute='_compute_incoming_picking_count' args: 'Incoming Shipment count'
  • incoterm_id Many2one → account.incoterms
    help='International Commercial Terms are a series of predefined commercial terms used in international transactions.' states={'done': [('readonly', True)]} args: 'account.incoterms', 'Incoterm'
  • incoterm_location Char
    states={'done': [('readonly', True)]} string='Incoterm Location'
  • is_shipped Boolean
    compute='_compute_is_shipped'
  • on_time_rate Float
    compute_sudo=False related='partner_id.on_time_rate'
  • picking_ids Many2many → stock.picking
    compute='_compute_picking_ids' copy=False store=True string='Receptions' args: 'stock.picking'
  • picking_type_id Many2one → stock.picking.type
    default=_default_picking_type domain="['|', ('warehouse_id', '=', False), ('warehouse_id.company_id', '=', company_id)]" help='This will determine operation type of incoming shipment' required=True states=Purchase.READONLY_STATES args: 'stock.picking.type', 'Deliver To'
  • receipt_status Selection
    compute='_compute_receipt_status' store=True string='Receipt Status' args: [('pending', 'Not Received'), ('partial', 'Partially Received'), ('full', 'Fully Received')]
Public methods (4)
  • action_view_picking(self)
  • button_approve(self, force=False)
  • button_cancel(self)
  • write(self, vals)

New fields (7)
  • forecasted_issue Boolean
    compute='_compute_forecasted_issue'
  • move_dest_ids One2many → stock.move
    args: 'stock.move', 'created_purchase_line_id', 'Downstream Moves'
  • move_ids One2many → stock.move
    copy=False readonly=True string='Reservation' args: 'stock.move', 'purchase_line_id'
  • orderpoint_id Many2one → stock.warehouse.orderpoint
    copy=False index='btree_not_null' args: 'stock.warehouse.orderpoint', 'Orderpoint'
  • product_description_variants Char
    args: 'Custom Description'
  • propagate_cancel Boolean
    default=True args: 'Propagate cancellation'
  • qty_received_method Selection
    ondelete={'stock_moves': _ondelete_stock_moves} selection_add=[('stock_moves', 'Stock Moves')]
Public methods (4)
  • action_product_forecast_report(self)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)
  • write(self, values)

New fields (3)
  • avg_receipt_delay Float
    digits=(16, 2) help='Amount of time between expected and effective receipt date. Due to a hack needed to calculate this, every record will show the same average value, therefore only use this as an aggregated value with group_operator=avg' readonly=True store=False args: 'Average Receipt Delay'
  • effective_date Datetime
    string='Effective Date'
  • picking_type_id Many2one → stock.warehouse
    readonly=True args: 'stock.warehouse', 'Warehouse'
Public methods (1)
  • read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True)
    @api.model
    This is a hack to allow us to correctly calculate the average of PO specific date values since the normal report query result will duplicate PO values across its PO lines during joins and lead to incorrect aggregation values. Only the AVG operator is supported for avg_receipt_delay.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • days_to_purchase Float
    help='Days needed to confirm a PO, define when a PO should be validated' string='Days to Purchase'
Public methods (0)

No public methods.

New fields (3)
  • days_to_purchase Float
    readonly=False related='company_id.days_to_purchase'
  • is_installed_sale Boolean
    string='Is the Sale Module Installed'
  • module_stock_dropshipping Boolean
    args: 'Dropshipping'
Public methods (1)
  • get_values(self)

New fields (2)
  • on_time_rate Float
    compute='_compute_on_time_rate' help='Over the past x days; the number of products received on time divided by the number of ordered products.x is either the System Parameter purchase_stock.on_time_delivery_days or the default 365' args: 'On-Time Delivery Rate'
  • purchase_line_ids One2many → purchase.order.line
    string='Purchase Lines' args: 'purchase.order.line', 'partner_id'
Public methods (0)

No public methods.

New fields (2)
  • purchase_order_count Integer
    compute='_compute_purchase_order_ids' args: 'Purchase order count'
  • purchase_order_ids Many2many → purchase.order
    compute='_compute_purchase_order_ids' readonly=True store=False string='Purchase Orders' args: 'purchase.order'
Public methods (1)
  • action_view_po(self)

New fields (2)
  • created_purchase_line_id Many2one → purchase.order.line
    copy=False index='btree_not_null' ondelete='set null' readonly=True args: 'purchase.order.line', 'Created Purchase Order Line'
  • purchase_line_id Many2one → purchase.order.line
    index='btree_not_null' ondelete='set null' readonly=True args: 'purchase.order.line', 'Purchase Order Line'
Public methods (0)

No public methods.

New fields (1)
  • purchase_id Many2one → purchase.order
    readonly=True related='move_ids.purchase_line_id.order_id' string='Purchase Orders' args: 'purchase.order'
Public methods (0)

No public methods.

New fields (2)
  • supplierinfo_id Many2one
    related='orderpoint_id.supplier_id'
  • supplierinfo_ids Many2many → product.supplierinfo
    compute='_compute_supplierinfo_ids' store=True args: 'product.supplierinfo'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • action Selection
    ondelete={'buy': 'cascade'} selection_add=[('buy', 'Buy')]
Public methods (0)

No public methods.

New fields (2)
  • buy_pull_id Many2one → stock.rule
    args: 'stock.rule', 'Buy rule'
  • buy_to_resupply Boolean
    default=True help='When products are bought, they can be delivered to this warehouse' args: 'Buy to Resupply'
Public methods (1)
  • get_rules_dict(self)

New fields (4)
  • purchase_visibility_days Float
    default=0.0 help='Visibility Days applied on the purchase routes.'
  • show_supplier Boolean
    compute='_compute_show_suppplier' args: 'Show supplier column'
  • supplier_id Many2one → product.supplierinfo
    check_company=True domain="['|', ('product_id', '=', product_id), '&', ('product_id', '=', False), ('product_tmpl_id', '=', product_tmpl_id)]" string='Product Supplier' args: 'product.supplierinfo'
  • vendor_id Many2one
    related='supplier_id.partner_id' store=True string='Vendor'
Public methods (1)
  • action_view_purchase(self)
    This function returns an action that display existing purchase orders of given orderpoint.

New fields (7)
  • category_id Many2one → product.category
    readonly=True args: 'product.category', 'Product Category'
  • date Datetime
    readonly=True args: 'Effective Date'
  • on_time_rate Float
    readonly=True args: 'On-Time Delivery Rate'
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Vendor'
  • product_id Many2one → product.product
    readonly=True args: 'product.product', 'Product'
  • qty_on_time Float
    readonly=True args: 'On-Time Quantity'
  • qty_total Float
    readonly=True args: 'Total Quantity'
Public methods (2)
  • init(self)
  • read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True)
    @api.model
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/15.0/purchase_stock
VERSION
VERSION 1.2
CATEGORY
CATEGORYInventory/Purchase
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Thibault Delavallée, Denis Ledoux, Xavier Morel, Goffin Simon, Nicolas Martinelli, Stefan Rijnhart, Pedro M. Baeza, Jeremy Kersten, GitHub, Wolfgang Taferner, Yannick Tivisse, Laurent Smet, Arnold Moyaux, wan, Xavier-Do, Victor Feyens, Andrea Grazioso (agr-odoo), Hugo Adan, William Henrotin, Nasreddin (bon), Florent de Labarre, Julien Mougenot, Uku Lagle, svs-odoo, Achraf (abz), Brice bib Bartoletti, Adrien Widart, Ivan Yelizariev, Hubert (huvw), Touati Djamel (otd), Nicolas Galler, Swapnesh Shah, Tiffany Chang (tic), Rémy Voet (ryv), fja-odoo, Mathieu Duckerts-Antoine, jbw, Aurélien (avd), Kevin Baptiste, Guillaume (guva), william-andre, Víctor Martínez, Merlin (megu), David (dafr), JF Aubert, PNO, yhu-odoo, mafo-odoo, Walid HANNICHE (waha), Aurelien van Delft (avd), Habib (ayh), Gaetan Vanden Bergh (gavb), Walid, Adrien Widart (awt), Victor Piryns (pivi), Tom De Caluwé, clesgow, Djamel Touati, Pieter Claeys (clpi), Nicolas Pierre, Levi Siuzdak (sile), Piero (pca), Jérôme Hellinckx, AH-Yussef, Noe Antoine, guva-odoo, lase@odoo.com, Aurelien MARIE (auma), Richard Prosser, Karl Southern, Ricardoalso
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:25:27
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock_account
    - stock
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
    - account
    - analytic
    - purchase
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (24)
XML IDNameModelTypeStatus
exception_on_po exception_on_po ir.ui.view qweb New
product_category_view_form product.category.view.form.inherit.purchase.stock product.category field Inherits purchase.view_category_property_form
product_supplierinfo_replenishment_tree_view product.supplierinfo.replenishment.tree.view product.supplierinfo field Inherits product.product_supplierinfo_tree_view
purchase_order_line_view_form_inherit purchase.order.line.form.inherit purchase.order.line xpath Inherits purchase.purchase_order_line_form2
purchase_order_view_form_inherit purchase.order.form.inherit purchase.order xpath Inherits purchase.purchase_order_form
purchase_report_product_product_replenishment purchase_report_product_product_replenishment ir.ui.view qweb Inherits stock.report_product_product_replenishment
purchase_report_stock_rule purchase_report_stock_rule ir.ui.view qweb Inherits stock.report_stock_rule
purchase_report_view_search purchase.report.search.stock purchase.report xpath Inherits purchase.view_purchase_order_search
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb Inherits purchase.report_purchaseorder_document
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb Inherits purchase.report_purchasequotation_document
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits purchase.res_config_settings_view_form_purchase
res_config_settings_view_form_stock res.config.settings.view.form.inherit.purchase.stock res.config.settings xpath Inherits stock.res_config_settings_view_form
res_partner_view_purchase_buttons_inherit res.partner.purchase.stock.form.inherit res.partner xpath Inherits purchase.res_partner_view_purchase_buttons
stock.product_template_kanban_stock_view New
stock.view_stock_product_template_tree New
stock.view_stock_product_tree New
stock_move_purchase stock.move.form stock.move xpath Inherits stock.view_move_form
stock_production_lot_view_form stock.production.lot.view.form stock.production.lot xpath Inherits stock.view_production_lot_form
vendor_delay_report_filter vendor.delay.report.search vendor.delay.report search New
vendor_delay_report_view_graph vendor.delay.report.view.graph vendor.delay.report graph New
view_stock_replenishment_info_stock_purchase_inherit stock.replenishment.information.purchase.stock.inherit stock.replenishment.info xpath Inherits stock.view_stock_replenishment_info
view_stock_rule_form_stock_inherit_purchase_stock stock.rule.form.stock.inherit.purchase_stock stock.rule field Inherits stock.view_stock_rule_form
view_warehouse_inherited Stock Warehouse Inherited stock.warehouse xpath Inherits stock.view_warehouse
view_warehouse_orderpoint_tree_editable_inherited_mrp stock.warehouse.orderpoint.tree.editable.inherit.mrp stock.warehouse.orderpoint xpath Inherits stock.view_warehouse_orderpoint_tree_editable
Models touched (23)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • run(self, procurements, raise_user_error=True)
    @api.model

New fields (1)
  • purchase_order_line_ids One2many → purchase.order.line
    help='Technical: used to compute quantities.' args: 'purchase.order.line', 'product_id'
Public methods (0)

No public methods.

New fields (2)
  • last_purchase_date Date
    compute='_compute_last_purchase_date' args: 'Last Purchase'
  • show_set_supplier_button Boolean
    compute='_compute_show_set_supplier_button' args: 'Show Set Supplier Button'
Public methods (1)
  • action_set_supplier(self)

New fields (1)
  • route_ids Many2many
    default=<expr>
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (9)
  • default_location_dest_id_usage Selection
    help='Technical field used to display the Drop Ship Address' readonly=True related='picking_type_id.default_location_dest_id.usage' string='Destination Location Type'
  • effective_date Datetime
    compute='_compute_effective_date' copy=False help='Completion date of the first receipt order.' store=True args: 'Effective Date'
  • group_id Many2one → procurement.group
    copy=False string='Procurement Group' args: 'procurement.group'
  • incoming_picking_count Integer
    compute='_compute_incoming_picking_count' args: 'Incoming Shipment count'
  • incoterm_id Many2one → account.incoterms
    help='International Commercial Terms are a series of predefined commercial terms used in international transactions.' states={'done': [('readonly', True)]} args: 'account.incoterms', 'Incoterm'
  • is_shipped Boolean
    compute='_compute_is_shipped'
  • on_time_rate Float
    compute_sudo=False related='partner_id.on_time_rate'
  • picking_ids Many2many → stock.picking
    compute='_compute_picking_ids' copy=False store=True string='Receptions' args: 'stock.picking'
  • picking_type_id Many2one → stock.picking.type
    default=_default_picking_type domain="['|', ('warehouse_id', '=', False), ('warehouse_id.company_id', '=', company_id)]" help='This will determine operation type of incoming shipment' required=True states=Purchase.READONLY_STATES args: 'stock.picking.type', 'Deliver To'
Public methods (4)
  • action_view_picking(self)
  • button_approve(self, force=False)
  • button_cancel(self)
  • write(self, vals)

New fields (7)
  • forecasted_issue Boolean
    compute='_compute_forecasted_issue'
  • move_dest_ids One2many → stock.move
    args: 'stock.move', 'created_purchase_line_id', 'Downstream Moves'
  • move_ids One2many → stock.move
    copy=False readonly=True string='Reservation' args: 'stock.move', 'purchase_line_id'
  • orderpoint_id Many2one → stock.warehouse.orderpoint
    copy=False index=True args: 'stock.warehouse.orderpoint', 'Orderpoint'
  • product_description_variants Char
    args: 'Custom Description'
  • propagate_cancel Boolean
    default=True args: 'Propagate cancellation'
  • qty_received_method Selection
    selection_add=[('stock_moves', 'Stock Moves')]
Public methods (4)
  • action_product_forecast_report(self)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)
  • write(self, values)

New fields (3)
  • avg_receipt_delay Float
    digits=(16, 2) help='Amount of time between expected and effective receipt date. Due to a hack needed to calculate this, every record will show the same average value, therefore only use this as an aggregated value with group_operator=avg' readonly=True store=False args: 'Average Receipt Delay'
  • effective_date Datetime
    string='Effective Date'
  • picking_type_id Many2one → stock.warehouse
    readonly=True args: 'stock.warehouse', 'Warehouse'
Public methods (1)
  • read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True)
    @api.model
    This is a hack to allow us to correctly calculate the average of PO specific date values since the normal report query result will duplicate PO values across its PO lines during joins and lead to incorrect aggregation values. Only the AVG operator is supported for avg_receipt_delay.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • days_to_purchase Float
    help='Days needed to confirm a PO, define when a PO should be validated' string='Days to Purchase'
Public methods (0)

No public methods.

New fields (3)
  • days_to_purchase Float
    readonly=False related='company_id.days_to_purchase'
  • is_installed_sale Boolean
    string='Is the Sale Module Installed'
  • module_stock_dropshipping Boolean
    args: 'Dropshipping'
Public methods (1)
  • get_values(self)

New fields (2)
  • on_time_rate Float
    compute='_compute_on_time_rate' help='Over the past x days; the number of products received on time divided by the number of ordered products.x is either the System Parameter purchase_stock.on_time_delivery_days or the default 365' args: 'On-Time Delivery Rate'
  • purchase_line_ids One2many → purchase.order.line
    string='Purchase Lines' args: 'purchase.order.line', 'partner_id'
Public methods (0)

No public methods.

New fields (2)
  • created_purchase_line_id Many2one → purchase.order.line
    copy=False index=True ondelete='set null' readonly=True args: 'purchase.order.line', 'Created Purchase Order Line'
  • purchase_line_id Many2one → purchase.order.line
    index=True ondelete='set null' readonly=True args: 'purchase.order.line', 'Purchase Order Line'
Public methods (0)

No public methods.

New fields (1)
  • purchase_id Many2one → purchase.order
    readonly=True related='move_lines.purchase_line_id.order_id' string='Purchase Orders' args: 'purchase.order'
Public methods (0)

No public methods.

New fields (2)
  • purchase_order_count Integer
    compute='_compute_purchase_order_ids' args: 'Purchase order count'
  • purchase_order_ids Many2many → purchase.order
    compute='_compute_purchase_order_ids' readonly=True store=False string='Purchase Orders' args: 'purchase.order'
Public methods (1)
  • action_view_po(self)

New fields (2)
  • supplierinfo_id Many2one
    related='orderpoint_id.supplier_id'
  • supplierinfo_ids Many2many → product.supplierinfo
    compute='_compute_supplierinfo_ids' store=True args: 'product.supplierinfo'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • action Selection
    ondelete={'buy': 'cascade'} selection_add=[('buy', 'Buy')]
Public methods (0)

No public methods.

New fields (2)
  • buy_pull_id Many2one → stock.rule
    args: 'stock.rule', 'Buy rule'
  • buy_to_resupply Boolean
    default=True help='When products are bought, they can be delivered to this warehouse' args: 'Buy to Resupply'
Public methods (1)
  • get_rules_dict(self)

New fields (3)
  • show_supplier Boolean
    compute='_compute_show_suppplier' args: 'Show supplier column'
  • supplier_id Many2one → product.supplierinfo
    check_company=True domain="['|', ('product_id', '=', product_id), '&', ('product_id', '=', False), ('product_tmpl_id', '=', product_tmpl_id)]" string='Product Supplier' args: 'product.supplierinfo'
  • vendor_id Many2one
    related='supplier_id.name' store=True string='Vendor'
Public methods (1)
  • action_view_purchase(self)
    This function returns an action that display existing purchase orders of given orderpoint.

New fields (7)
  • category_id Many2one → product.category
    readonly=True args: 'product.category', 'Product Category'
  • date Datetime
    readonly=True args: 'Effective Date'
  • on_time_rate Float
    readonly=True args: 'On-Time Delivery Rate'
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Vendor'
  • product_id Many2one → product.product
    readonly=True args: 'product.product', 'Product'
  • qty_on_time Float
    readonly=True args: 'On-Time Quantity'
  • qty_total Float
    readonly=True args: 'Total Quantity'
Public methods (2)
  • init(self)
  • read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True)
    @api.model
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/14.0/purchase_stock
VERSION
VERSION 1.2
CATEGORY
CATEGORYInventory/Purchase
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Olivier Dony, Thibault Delavallée, Denis Ledoux, Christophe Simonis, Xavier Morel, Goffin Simon, Simon Lejeune, Nicolas Martinelli, Stefan Rijnhart, GitHub, Barad Mahendra, Yannick Tivisse, Laurent Smet, Jorge Pinna Puissant, Arnold Moyaux, wan, Julien Castiaux, Xavier-Do, jvm-odoo, Victor Feyens, Andrea Grazioso (agr-odoo), William Henrotin, Nasreddin (bon), oco-odoo, fw-bot, Uku Lagle, Debauche Stéphane, svs-odoo, Rémy Baranx (bar), Achraf (abz), Brice bib Bartoletti, Adrien Widart, Ivan Yelizariev, Hubert (huvw), Baptiste Vergote, Touati Djamel (otd), Nicolas Galler, Swapnesh Shah, Tiffany Chang (tic), Rémy Voet (ryv), fja-odoo, Mathieu Duckerts-Antoine, Aurélien (avd), Kevin Baptiste, Pratima Gupta, Guillaume (guva), roen-odoo, Jigar Vaghela, Nicolás Mac Rouillon, Merlin (megu), David (dafr), PNO, yhu-odoo, mafo-odoo, william, Walid HANNICHE (waha), Donatas, Aurelien van Delft (avd), David Beal, Gaetan Vanden Bergh (gavb), Adrien Widart (awt), Tom De Caluwé, Pieter Claeys (clpi), Hbto [ Vauxoo ], clementmbr, Piero (pca), Jérôme Hellinckx
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:14:29
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock_account
    - stock
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
    - account
    - analytic
    - purchase
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (20)
XML IDNameModelTypeStatus
assets_backend purchase stock assets ir.ui.view qweb Inherits web.assets_backend
exception_on_po exception_on_po ir.ui.view qweb New
product_category_view_form product.category.view.form.inherit.purchase.stock product.category field Inherits purchase.view_category_property_form
purchase_order_line_view_form_inherit purchase.order.line.form.inherit purchase.order.line xpath Inherits purchase.purchase_order_line_form2
purchase_order_view_form_inherit purchase.order.form.inherit purchase.order xpath Inherits purchase.purchase_order_form
purchase_report_product_product_replenishment purchase_report_product_product_replenishment ir.ui.view qweb Inherits stock.report_product_product_replenishment
purchase_report_stock_rule purchase_report_stock_rule ir.ui.view qweb Inherits stock.report_stock_rule
purchase_report_view_search purchase.report.search.stock purchase.report xpath Inherits purchase.view_purchase_order_search
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb Inherits purchase.report_purchaseorder_document
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb Inherits purchase.report_purchasequotation_document
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits purchase.res_config_settings_view_form_purchase
res_config_settings_view_form_stock res.config.settings.view.form.inherit.purchase.stock res.config.settings xpath Inherits stock.res_config_settings_view_form
res_partner_view_purchase_buttons_inherit res.partner.purchase.stock.form.inherit res.partner xpath Inherits purchase.res_partner_view_purchase_buttons
stock_move_purchase stock.move.form stock.move xpath Inherits stock.view_move_form
stock_production_lot_view_form stock.production.lot.view.form stock.production.lot xpath Inherits stock.view_production_lot_form
vendor_delay_report_filter vendor.delay.report.search vendor.delay.report search New
vendor_delay_report_view_graph vendor.delay.report.view.graph vendor.delay.report graph New
view_stock_rule_form_stock_inherit_purchase_stock stock.rule.form.stock.inherit.purchase_stock stock.rule field Inherits stock.view_stock_rule_form
view_warehouse_inherited Stock Warehouse Inherited stock.warehouse xpath Inherits stock.view_warehouse
view_warehouse_orderpoint_tree_editable_inherited_mrp stock.warehouse.orderpoint.tree.editable.inherit.mrp stock.warehouse.orderpoint field Inherits stock.view_warehouse_orderpoint_tree_editable
Models touched (20)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • run(self, procurements, raise_user_error=True)
    @api.model

New fields (1)
  • purchase_order_line_ids One2many → purchase.order.line
    help='Technical: used to compute quantities.' args: 'purchase.order.line', 'product_id'
Public methods (0)

No public methods.

New fields (1)
  • route_ids Many2many
    default=<expr>
Public methods (0)

No public methods.

New fields (9)
  • default_location_dest_id_usage Selection
    help='Technical field used to display the Drop Ship Address' readonly=True related='picking_type_id.default_location_dest_id.usage' string='Destination Location Type'
  • effective_date Datetime
    compute='_compute_effective_date' copy=False help='Completion date of the first receipt order.' store=True args: 'Effective Date'
  • group_id Many2one → procurement.group
    copy=False string='Procurement Group' args: 'procurement.group'
  • incoterm_id Many2one → account.incoterms
    help='International Commercial Terms are a series of predefined commercial terms used in international transactions.' states={'done': [('readonly', True)]} args: 'account.incoterms', 'Incoterm'
  • is_shipped Boolean
    compute='_compute_is_shipped'
  • on_time_rate Float
    compute_sudo=False related='partner_id.on_time_rate'
  • picking_count Integer
    compute='_compute_picking' default=0 store=True string='Picking count'
  • picking_ids Many2many → stock.picking
    compute='_compute_picking' copy=False store=True string='Receptions' args: 'stock.picking'
  • picking_type_id Many2one → stock.picking.type
    default=_default_picking_type domain="['|', ('warehouse_id', '=', False), ('warehouse_id.company_id', '=', company_id)]" help='This will determine operation type of incoming shipment' required=True states=Purchase.READONLY_STATES args: 'stock.picking.type', 'Deliver To'
Public methods (4)
  • action_view_picking(self)
    This function returns an action that display existing picking orders of given purchase order ids. When only one found, show the picking immediately.
  • button_approve(self, force=False)
  • button_cancel(self)
  • write(self, vals)

New fields (6)
  • move_dest_ids One2many → stock.move
    args: 'stock.move', 'created_purchase_line_id', 'Downstream Moves'
  • move_ids One2many → stock.move
    copy=False readonly=True string='Reservation' args: 'stock.move', 'purchase_line_id'
  • orderpoint_id Many2one → stock.warehouse.orderpoint
    copy=False index=True args: 'stock.warehouse.orderpoint', 'Orderpoint'
  • product_description_variants Char
    args: 'Custom Description'
  • propagate_cancel Boolean
    default=True args: 'Propagate cancellation'
  • qty_received_method Selection
    selection_add=[('stock_moves', 'Stock Moves')]
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)
  • write(self, values)

New fields (3)
  • avg_receipt_delay Float
    digits=(16, 2) help='Amount of time between expected and effective receipt date. Due to a hack needed to calculate this, every record will show the same average value, therefore only use this as an aggregated value with group_operator=avg' readonly=True store=False args: 'Average Receipt Delay'
  • effective_date Datetime
    string='Effective Date'
  • picking_type_id Many2one → stock.warehouse
    readonly=True args: 'stock.warehouse', 'Warehouse'
Public methods (1)
  • read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True)
    @api.model
    This is a hack to allow us to correctly calculate the average of PO specific date values since the normal report query result will duplicate PO values across its PO lines during joins and lead to incorrect aggregation values. Only the AVG operator is supported for avg_receipt_delay.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • days_to_purchase Float
    help='Days needed to confirm a PO, define when a PO should be validated' string='Days to Purchase'
Public methods (0)

No public methods.

New fields (3)
  • days_to_purchase Float
    readonly=False related='company_id.days_to_purchase'
  • is_installed_sale Boolean
    string='Is the Sale Module Installed'
  • module_stock_dropshipping Boolean
    args: 'Dropshipping'
Public methods (1)
  • get_values(self)

New fields (2)
  • on_time_rate Float
    compute='_compute_on_time_rate' help='Over the past x days; the number of products received on time divided by the number of ordered products.x is either the System Parameter purchase_stock.on_time_delivery_days or the default 365' args: 'On-Time Delivery Rate'
  • purchase_line_ids One2many → purchase.order.line
    string='Purchase Lines' args: 'purchase.order.line', 'partner_id'
Public methods (0)

No public methods.

New fields (2)
  • created_purchase_line_id Many2one → purchase.order.line
    copy=False index=True ondelete='set null' readonly=True args: 'purchase.order.line', 'Created Purchase Order Line'
  • purchase_line_id Many2one → purchase.order.line
    index=True ondelete='set null' readonly=True args: 'purchase.order.line', 'Purchase Order Line'
Public methods (0)

No public methods.

New fields (1)
  • purchase_id Many2one → purchase.order
    readonly=True related='move_lines.purchase_line_id.order_id' string='Purchase Orders' args: 'purchase.order'
Public methods (0)

No public methods.

New fields (2)
  • purchase_order_count Integer
    compute='_compute_purchase_order_ids' args: 'Purchase order count'
  • purchase_order_ids Many2many → purchase.order
    compute='_compute_purchase_order_ids' readonly=True store=False string='Purchase Orders' args: 'purchase.order'
Public methods (1)
  • action_view_po(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • action Selection
    ondelete={'buy': 'cascade'} selection_add=[('buy', 'Buy')]
Public methods (0)

No public methods.

New fields (2)
  • buy_pull_id Many2one → stock.rule
    args: 'stock.rule', 'Buy rule'
  • buy_to_resupply Boolean
    default=True help='When products are bought, they can be delivered to this warehouse' args: 'Buy to Resupply'
Public methods (1)
  • get_rules_dict(self)

New fields (2)
  • show_supplier Boolean
    compute='_compute_show_suppplier' args: 'Show supplier column'
  • supplier_id Many2one → product.supplierinfo
    check_company=True domain="['|', ('product_id', '=', product_id), '&', ('product_id', '=', False), ('product_tmpl_id', '=', product_tmpl_id)]" string='Vendor' args: 'product.supplierinfo'
Public methods (1)
  • action_view_purchase(self)
    This function returns an action that display existing purchase orders of given orderpoint.

New fields (7)
  • category_id Many2one → product.category
    readonly=True args: 'product.category', 'Product Category'
  • date Datetime
    readonly=True args: 'Effective Date'
  • on_time_rate Float
    readonly=True args: 'On-Time Delivery Rate'
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Vendor'
  • product_id Many2one → product.product
    readonly=True args: 'product.product', 'Product'
  • qty_on_time Float
    readonly=True args: 'On-Time Quantity'
  • qty_total Float
    readonly=True args: 'Total Quantity'
Public methods (2)
  • init(self)
  • read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True)
    @api.model
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/13.0/purchase_stock
VERSION
VERSION 1.2
CATEGORY
CATEGORYOperations/Purchase
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Thibault Delavallée, Denis Ledoux, Christophe Simonis, Xavier Morel, Goffin Simon, Simon Lejeune, Nicolas Martinelli, qdp-odoo, GitHub, Damien Bouvy, Olivier Colson, David Arnold, Yannick Tivisse, Odoo Online, Laurent Smet, jem-odoo, Jorge Pinna Puissant, Arnold Moyaux, Adrian Torres, Xavier-Do, jvm-odoo, Victor Feyens, Andrea Grazioso (agr-odoo), William Henrotin, Sébastien Theys, david, Nasreddin (bon), Uku Lagle, svs-odoo, Lois Rilo, Brice bib Bartoletti, Adrien Widart, Ivan Yelizariev, Hubert (huvw), Baptiste Vergote, Touati Djamel (otd), Swapnesh Shah, Nathan Marotte (nama), fja-odoo, Aurélien (avd), Jinal Patel, Kevin Baptiste, Pratima Gupta, Arnaud Baes, Miquel Raïch, Hetal Dhanak, Nicolás Mac Rouillon, arbaes, Juhil Somaiya, Florian Gilbert, Donatas
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:06:42
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock_account
    - stock
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - barcodes
    - account
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - purchase
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (13)
XML IDNameModelTypeStatus
exception_on_po exception_on_po ir.ui.view qweb New
purchase_order_line_view_form_inherit purchase.order.line.form.inherit purchase.order.line xpath Inherits purchase.purchase_order_line_form2
purchase_order_view_form_inherit purchase.order.form.inherit purchase.order xpath Inherits purchase.purchase_order_form
purchase_report_stock_rule purchase_report_stock_rule ir.ui.view qweb Inherits stock.report_stock_rule
purchase_report_view_search purchase.report.search.stock purchase.report xpath Inherits purchase.view_purchase_order_search
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb Inherits purchase.report_purchaseorder_document
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb Inherits purchase.report_purchasequotation_document
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits purchase.res_config_settings_view_form_purchase
res_config_settings_view_form_stock res.config.settings.view.form.inherit.purchase.stock res.config.settings xpath Inherits stock.res_config_settings_view_form
stock_move_purchase stock.move.form stock.move xpath Inherits stock.view_move_form
stock_production_lot_view_form stock.production.lot.view.form stock.production.lot xpath Inherits stock.view_production_lot_form
view_stock_rule_form_stock_inherit_purchase_stock stock.rule.form.stock.inherit.purchase_stock stock.rule field Inherits stock.view_stock_rule_form
view_warehouse_inherited Stock Warehouse Inherited stock.warehouse xpath Inherits stock.view_warehouse
Models touched (14)

New fields (0)

No new fields.

Public methods (1)
  • post(self)

New fields (1)
  • route_ids Many2many
    default=<expr>
Public methods (0)

No public methods.

New fields (7)
  • default_location_dest_id_usage Selection
    help='Technical field used to display the Drop Ship Address' readonly=True related='picking_type_id.default_location_dest_id.usage' string='Destination Location Type'
  • group_id Many2one → procurement.group
    copy=False string='Procurement Group' args: 'procurement.group'
  • incoterm_id Many2one → account.incoterms
    help='International Commercial Terms are a series of predefined commercial terms used in international transactions.' states={'done': [('readonly', True)]} args: 'account.incoterms', 'Incoterm'
  • is_shipped Boolean
    compute='_compute_is_shipped'
  • picking_count Integer
    compute='_compute_picking' default=0 store=True string='Picking count'
  • picking_ids Many2many → stock.picking
    compute='_compute_picking' copy=False store=True string='Receptions' args: 'stock.picking'
  • picking_type_id Many2one → stock.picking.type
    default=_default_picking_type domain="['|', ('warehouse_id', '=', False), ('warehouse_id.company_id', '=', company_id)]" help='This will determine operation type of incoming shipment' required=True states=Purchase.READONLY_STATES args: 'stock.picking.type', 'Deliver To'
Public methods (4)
  • action_view_picking(self)
    This function returns an action that display existing picking orders of given purchase order ids. When only one found, show the picking immediately.
  • button_approve(self, force=False)
  • button_cancel(self)
  • write(self, vals)

New fields (7)
  • move_dest_ids One2many → stock.move
    args: 'stock.move', 'created_purchase_line_id', 'Downstream Moves'
  • move_ids One2many → stock.move
    copy=False ondelete='set null' readonly=True string='Reservation' args: 'stock.move', 'purchase_line_id'
  • orderpoint_id Many2one → stock.warehouse.orderpoint
    args: 'stock.warehouse.orderpoint', 'Orderpoint'
  • propagate_cancel Boolean
    default=True args: 'Propagate cancellation'
  • propagate_date Boolean
    help='The rescheduling is propagated to the next move.' string='Propagate Rescheduling'
  • propagate_date_minimum_delta Integer
    help='The change must be higher than this value to be propagated' string='Reschedule if Higher Than'
  • qty_received_method Selection
    selection_add=[('stock_moves', 'Stock Moves')]
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)
  • write(self, values)

New fields (1)
  • picking_type_id Many2one → stock.warehouse
    readonly=True args: 'stock.warehouse', 'Warehouse'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • is_installed_sale Boolean
    string='Is the Sale Module Installed'
  • module_stock_dropshipping Boolean
    args: 'Dropshipping'
Public methods (1)
  • get_values(self)

New fields (2)
  • created_purchase_line_id Many2one → purchase.order.line
    copy=False index=True ondelete='set null' readonly=True args: 'purchase.order.line', 'Created Purchase Order Line'
  • purchase_line_id Many2one → purchase.order.line
    index=True ondelete='set null' readonly=True args: 'purchase.order.line', 'Purchase Order Line'
Public methods (0)

No public methods.

New fields (1)
  • purchase_id Many2one → purchase.order
    readonly=True related='move_lines.purchase_line_id.order_id' string='Purchase Orders' args: 'purchase.order'
Public methods (0)

No public methods.

New fields (2)
  • purchase_order_count Integer
    compute='_compute_purchase_order_ids' args: 'Purchase order count'
  • purchase_order_ids Many2many → purchase.order
    compute='_compute_purchase_order_ids' readonly=True store=False string='Purchase Orders' args: 'purchase.order'
Public methods (1)
  • action_view_po(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • action Selection
    selection_add=[('buy', 'Buy')]
Public methods (0)

No public methods.

New fields (2)
  • buy_pull_id Many2one → stock.rule
    args: 'stock.rule', 'Buy rule'
  • buy_to_resupply Boolean
    default=True help='When products are bought, they can be delivered to this warehouse' args: 'Buy to Resupply'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (2)
  • action_view_purchase(self)
    This function returns an action that display existing purchase orders of given orderpoint.
  • write(self, vals)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/12.0/purchase_stock
VERSION
VERSION 1.2
CATEGORY
CATEGORYPurchases
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Fabien Pinckaers, Thibault Delavallée, Denis Ledoux, Christophe Simonis, David Monjoie, Goffin Simon, Simon Lejeune, Nicolas Martinelli, Nicolas Lempereur, qdp-odoo, GitHub, Yannick Tivisse, qsm-odoo, Pierre Masereel, Laurent Smet, jem-odoo, RomainLibert, Nans Lefebvre, Arnold Moyaux, Adrian Torres, Xavier-Do, Victor Feyens, Andrea Grazioso (agr-odoo), Uku Lagle, Adrien Widart, Touati Djamel (otd), Aurélien (avd)
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:57:01
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock_account
    - stock
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - barcodes
    - account
    - analytic
    - portal
    - http_routing
    - digest
    - purchase
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (14)
XML IDNameModelTypeStatus
exception_on_po exception_on_po ir.ui.view qweb New
purchase_order_line_view_form_inherit purchase.order.line.form.inherit purchase.order.line xpath Inherits purchase.purchase_order_line_form2
purchase_order_view_form_inherit purchase.order.form.inherit purchase.order xpath Inherits purchase.purchase_order_form
purchase_report_stock_rule purchase_report_stock_rule ir.ui.view qweb Inherits stock.report_stock_rule
purchase_report_view_search purchase.report.search.stock purchase.report xpath Inherits purchase.view_purchase_order_search
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb Inherits purchase.report_purchaseorder_document
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb Inherits purchase.report_purchasequotation_document
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits purchase.res_config_settings_view_form_purchase
res_config_settings_view_form_stock res.config.settings.view.form.inherit.purchase.stock res.config.settings div Inherits stock.res_config_settings_view_form
stock_move_purchase stock.move.form stock.move xpath Inherits stock.view_move_form
stock_production_lot_view_form stock.production.lot.view.form stock.production.lot xpath Inherits stock.view_production_lot_form
stock_production_lot_view_form_simple stock.production.lot.view.form.simple stock.production.lot xpath Inherits stock.view_production_lot_form_simple
view_stock_rule_form_stock_inherit_purchase_stock stock.rule.form.stock.inherit.purchase_stock stock.rule field Inherits stock.view_stock_rule_form
view_warehouse_inherited Stock Warehouse Inherited stock.warehouse xpath Inherits stock.view_warehouse
Models touched (15)

New fields (0)

No new fields.

Public methods (1)
  • invoice_line_move_line_get(self)
    @api.model

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • route_ids Many2many
    default=<expr>
Public methods (0)

No public methods.

New fields (7)
  • default_location_dest_id_usage Selection
    help='Technical field used to display the Drop Ship Address' readonly=True related='picking_type_id.default_location_dest_id.usage' string='Destination Location Type'
  • group_id Many2one → procurement.group
    copy=False string='Procurement Group' args: 'procurement.group'
  • incoterm_id Many2one → account.incoterms
    help='International Commercial Terms are a series of predefined commercial terms used in international transactions.' states={'done': [('readonly', True)]} args: 'account.incoterms', 'Incoterm'
  • is_shipped Boolean
    compute='_compute_is_shipped'
  • picking_count Integer
    compute='_compute_picking' default=0 store=True string='Picking count'
  • picking_ids Many2many → stock.picking
    compute='_compute_picking' copy=False store=True string='Receptions' args: 'stock.picking'
  • picking_type_id Many2one → stock.picking.type
    default=_default_picking_type help='This will determine operation type of incoming shipment' required=True states=Purchase.READONLY_STATES args: 'stock.picking.type', 'Deliver To'
Public methods (4)
  • action_view_picking(self)
    @api.multi
    This function returns an action that display existing picking orders of given purchase order ids. When only one found, show the picking immediately.
  • button_approve(self, force=False)
    @api.multi
  • button_cancel(self)
    @api.multi
  • write(self, vals)

New fields (3)
  • move_dest_ids One2many → stock.move
    args: 'stock.move', 'created_purchase_line_id', 'Downstream Moves'
  • move_ids One2many → stock.move
    copy=False ondelete='set null' readonly=True string='Reservation' args: 'stock.move', 'purchase_line_id'
  • orderpoint_id Many2one → stock.warehouse.orderpoint
    args: 'stock.warehouse.orderpoint', 'Orderpoint'
Public methods (2)
  • create(self, values)
    @api.model
  • write(self, values)
    @api.multi

New fields (1)
  • picking_type_id Many2one → stock.warehouse
    readonly=True args: 'stock.warehouse', 'Warehouse'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • is_installed_sale Boolean
    string='Is the Sale Module Installed'
  • module_stock_dropshipping Boolean
    args: 'Dropshipping'
Public methods (1)
  • get_values(self)
    @api.multi

New fields (2)
  • created_purchase_line_id Many2one → purchase.order.line
    copy=False ondelete='set null' readonly=True args: 'purchase.order.line', 'Created Purchase Order Line'
  • purchase_line_id Many2one → purchase.order.line
    index=True ondelete='set null' readonly=True args: 'purchase.order.line', 'Purchase Order Line'
Public methods (1)
  • write(self, vals)

New fields (1)
  • purchase_id Many2one → purchase.order
    readonly=True related='move_lines.purchase_line_id.order_id' string='Purchase Orders' args: 'purchase.order'
Public methods (0)

No public methods.

New fields (2)
  • purchase_order_count Integer
    compute='_compute_purchase_order_ids' args: 'Purchase order count'
  • purchase_order_ids Many2many → purchase.order
    compute='_compute_purchase_order_ids' readonly=True store=False string='Purchase Orders' args: 'purchase.order'
Public methods (1)
  • action_view_po(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • action Selection
    selection_add=[('buy', 'Buy')]
Public methods (0)

No public methods.

New fields (2)
  • buy_pull_id Many2one → stock.rule
    args: 'stock.rule', 'Buy rule'
  • buy_to_resupply Boolean
    default=True help='When products are bought, they can be delivered to this warehouse' args: 'Buy to Resupply'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • action_view_purchase(self)
    This function returns an action that display existing purchase orders of given orderpoint.