Purchase

purchase
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/19.0/purchase
VERSION
VERSION 1.2
CATEGORY
CATEGORYSupply Chain/Purchase
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo S.A.
MAINTAINERS
MAINTAINERSOdoo S.A.
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Thibault Delavallée, Xavier Morel, Joren Van Onder, Atul Patel, Géry Debongnie, Aaron Bohy, Laurent Smet, Adrien Dieudonne, Arnold Moyaux, Julien Castiaux, Victor Feyens, Andrea Grazioso (agr-odoo), Paul Morelle, William Henrotin, Julien Mougenot, svs-odoo, Brice bib Bartoletti, Tiffany Chang (tic), Rémy Voet (ryv), Gorash, Mathieu Duckerts-Antoine, Florent Xicluna, JF Aubert, John Laterre (jol), Ruben Gomes, luvi, Valentin Chevalier, Renaud Thiry, Julien Banken, Graeme Gellatly, bve-odoo, alsh-odoo, Louis Wicket (wil), Adrien Widart (awt), Maximilien (malb), Victor Piryns (pivi), Thomas Becquevort (thbe), Gauthier Wala (gawa), clesgow, Djamel Touati, Levi Siuzdak (sile), Dylan Kiss (dyki), Odoo, Simon Goffaux (sigo), Maksym Yankin, Arnaud Sibille, Nicolas Viseur (vin), Walid (wasa), kdeb@odoo.com, Paul Stroobant, lase@odoo.com, jorv-odoo, suth-odoo, reka-odoo, yosa-odoo, kcv-odoo, Louis Gobert, nihp-odoo, mano-odoo, Harsh Shah, aamo-odoo, Hussein Ebrahim(hyhe), Victorien (viso), thle-odoo, Patricia Daloze (pda), guce, Stéphane Diez, dhha-odoo, gteboul, Rocío Vega, Antoine Dupuis, Julien Schwanen, aizu-odoo, Ricardo Gomes Rodrigues, roto-odoo, Maira Salazar (srma), Arthur Nanson, David Van Droogenbroeck (DROD), elhayyany, pkgu-odoo, Mohammad Abdulmoneim (abdu), djameltouati, khsr-odoo, Michaël Mattiello, Pierre Pulinckx, Anton Romanova (roan), AnhBT, Corentin Heinix (cohe), ppat-odoo, zel-odoo, Carmine, Shrey Mehta, pish-odoo, chha-odoo, plha-odoo, Krzysztof Magusiak (krma), Mahdi Alijani (malj), Ajit Singh, joseph, hatr-odoo, utma-odoo, Maeva De Keyser (MDEK), Ester Andreetto, bhra-odoo, bhna-odoo, MAGREMENT, rare-odoo, Lulu Grimalkin (lugr), temo-odoo, igbe, Lancelot Semal, Laurent Smet (LAS), adip-odoo, Ayush Modi, Martin Doyen, lrizzi1, Elliot ELCO, Felipe Garcia Suez, Waleed Elgamal, srap-odoo, saurabh, Romain (roto), sako-odoo, Youssef (abyo), smjo-odoo, Zachary (zavan), soza-odoo, Jaishyam (JRBR), msho-odoo, chpa-odoo, hapt-odoo, jeanschoenlaub, Abhishek Yadav, modm-odoo
WEBSITE
WEBSITEhttps://www.odoo.com/app/purchase
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:51:42
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - html_editor
    - uom
    - analytic
    - portal
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (55)
XML IDNameModelTypeStatus
account_analytic_account_view_form_purchase account.analytic.account.form.purchase account.analytic.account div Inherits analytic.view_account_analytic_account_form
bill_to_po_wizard_form bill.to.po.wizard.form bill.to.po.wizard form New
document_tax_totals document_tax_totals ir.ui.view qweb Inherits account.document_tax_totals_template
portal_my_home_menu_purchase Portal layout : purchase menu entries ir.ui.view qweb Inherits portal.portal_breadcrumbs
portal_my_home_purchase Requests for Quotation / Purchase Orders ir.ui.view qweb Inherits portal.portal_my_home
portal_my_purchase_order Purchase Order ir.ui.view qweb Inherits portal.portal_sidebar
portal_my_purchase_order_update_date Portal: My Purchase Order Update Dates ir.ui.view qweb Inherits purchase.portal_my_purchase_order
portal_my_purchase_orders My Purchase Orders ir.ui.view qweb New
portal_my_purchase_rfqs My Requests For Quotation ir.ui.view qweb New
product_normal_form_view_inherit_purchase product.product.purchase.order product.product div Inherits product.product_normal_form_view
product_product_supplierinfo_tree_view2 product.supplierinfo.list.view2.product product.supplierinfo xpath Inherits purchase.product_supplierinfo_tree_view2
product_supplierinfo_tree_view2 product.supplierinfo.list.view2 product.supplierinfo xpath Inherits product.product_supplierinfo_tree_view
product_template_search_view_purchase product.template.search.purchase product.template field Inherits product.product_template_search_view
product_view_kanban_catalog_purchase_only product.view.kanban.catalog.purchase product.product xpath Inherits product.product_view_kanban_catalog
product_view_search_catalog product.view.search.catalog.inherit.purchase product.product xpath Inherits product.product_view_search_catalog
purchase_bill_line_match_tree purchase.bill.line.match.list purchase.bill.line.match list New
purchase_history_graph purchase.history.graph purchase.order.line graph New
purchase_history_pivot purchase.history.pivot purchase.order.line pivot New
purchase_history_tree purchase.history.list purchase.order.line list New
purchase_order_calendar purchase.order.calendar purchase.order calendar New
purchase_order_form purchase.order.form purchase.order form New
purchase_order_graph purchase.order.graph purchase.order graph New
purchase_order_kpis_tree purchase.order.inherit.purchase.order.list purchase.order list New
purchase_order_line_form2 purchase.order.line.form2 purchase.order.line form New
purchase_order_line_search purchase.order.line.search purchase.order.line search New
purchase_order_line_tree purchase.order.line.list purchase.order.line list New
purchase_order_pivot purchase.order.pivot purchase.order pivot New
purchase_order_portal_content Purchase Order Portal Content ir.ui.view qweb New
purchase_order_portal_content_totals_table purchase_order_portal_content_totals_table ir.ui.view qweb New
purchase_order_tree purchase.order.list purchase.order list New
purchase_order_view_activity purchase.order.activity purchase.order activity New
purchase_order_view_kanban_without_dashboard purchase.order.view.kanban.without.dashboard purchase.order xpath Inherits purchase.view_purchase_order_kanban
purchase_order_view_search purchase.order.select purchase.order search New
purchase_order_view_tree purchase.order.view.list purchase.order list New
purchase_report_view_tree purchase.report.view.list purchase.report list New
report_purchaseorder report_purchaseorder ir.ui.view qweb New
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb New
report_purchasequotation report_purchasequotation ir.ui.view qweb New
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb New
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits base.res_config_settings_view_form
res_partner_view_purchase_buttons res.partner.view.purchase.buttons res.partner div Inherits base.view_partner_form
track_po_line_qty_received_template track_po_line_qty_received_template ir.ui.view qweb New
track_po_line_template track_po_line_template ir.ui.view qweb New
view_move_form_inherit_purchase account.move.inherit.purchase account.move field Inherits account.view_move_form
view_partner_property_form res.partner.purchase.property.form.inherit res.partner group Inherits base.view_partner_form
view_product_product_supplier_inherit product.product.form product.product field Inherits product.product_normal_form_view
view_product_supplier_inherit product.template.supplier.form.inherit product.template xpath Inherits product.product_template_form_view
view_product_template_purchase_buttons_from product.template.purchase.button.inherit product.template button Inherits product.product_template_only_form_view
view_purchase_bill_union_filter purchase.bill.union.select purchase.bill.union search New
view_purchase_bill_union_tree purchase.bill.union.list purchase.bill.union list New
view_purchase_order_filter request.quotation.select purchase.order search New
view_purchase_order_graph product.month.graph purchase.report graph New
view_purchase_order_kanban purchase.order.kanban purchase.order kanban New
view_purchase_order_pivot product.month.pivot purchase.report pivot New
view_purchase_order_search report.purchase.order.search purchase.report search New
Models touched (18)

New fields (1)
  • purchase_order_count Integer
    compute='_compute_purchase_order_count' args: 'Purchase Order Count'
Public methods (1)
  • action_view_purchase_orders(self)

New fields (1)
  • business_domain Selection
    ondelete={'purchase_order': 'cascade'} selection_add=[('purchase_order', 'Purchase Order')]
Public methods (0)

No public methods.

New fields (6)
  • is_purchase_matched Boolean
    compute='_compute_is_purchase_matched'
  • purchase_id Many2one → purchase.order
    help='Auto-complete from a past purchase order.' readonly=False store=False string='Purchase Order' args: 'purchase.order'
  • purchase_order_count Integer
    compute='_compute_origin_po_count' string='Purchase Order Count'
  • purchase_order_name Char
    compute='_compute_purchase_order_name'
  • purchase_vendor_bill_id Many2one → purchase.bill.union
    help='Auto-complete from a previous bill, refund, or purchase order.' readonly=False store=False string='Auto-complete' args: 'purchase.bill.union'
  • purchase_warning_text Text
    compute='_compute_purchase_warning_text' help='Internal warning for the partner or the products as set by the user.' args: 'Purchase Warning'
Public methods (4)
  • action_purchase_matching(self)
  • action_view_source_purchase_orders(self)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (4)
  • is_downpayment Boolean
  • purchase_line_id Many2one → purchase.order.line
    copy=False index='btree_not_null' ondelete='set null' args: 'purchase.order.line', 'Purchase Order Line'
  • purchase_line_warn_msg Text
    compute='_compute_purchase_line_warn_msg'
  • purchase_order_id Many2one → purchase.order
    readonly=True related='purchase_line_id.order_id' args: 'purchase.order', 'Purchase Order'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • partner_id Many2one → res.partner
    comodel_name='res.partner'
  • purchase_order_id Many2one → purchase.order
    comodel_name='purchase.order'
Public methods (2)
  • action_add_downpayment(self)
  • action_add_to_po(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • is_in_purchase_order Boolean
    compute='_compute_is_in_purchase_order' search='_search_is_in_purchase_order'
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' digits='Product Unit' string='Purchased'
Public methods (1)
  • action_view_po(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (3)
  • purchase_line_warn_msg Text
    args: 'Message for Purchase Order Line'
  • purchase_method Selection
    compute='_compute_purchase_method' help='On ordered quantities: Control bills based on ordered quantities.\nOn received quantities: Control bills based on received quantities.' precompute=True readonly=False store=True string='Control Policy' args: [('purchase', 'On ordered quantities'), ('receive', 'On received quantities')]
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' digits='Product Unit' string='Purchased'
Public methods (2)
  • action_view_po(self)
  • get_import_templates(self)
    @api.model

New fields (20)
  • account_move_id Many2one → account.move
    comodel_name='account.move' readonly=True
  • aml_id Many2one → account.move.line
    comodel_name='account.move.line' readonly=True
  • billed_amount_untaxed Monetary
    compute='_compute_amount_untaxed_fields' currency_field='currency_id'
  • company_id Many2one → res.company
    comodel_name='res.company' readonly=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True
  • line_amount_untaxed Monetary
    readonly=True
  • line_qty Float
    readonly=True
  • line_uom_id Many2one → uom.uom
    comodel_name='uom.uom' readonly=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True
  • pol_id Many2one → purchase.order.line
    comodel_name='purchase.order.line' readonly=True
  • product_id Many2one → product.product
    comodel_name='product.product' readonly=True
  • product_uom_id Many2one → uom.uom
    comodel_name='uom.uom' related='product_id.uom_id'
  • product_uom_price Float
    compute='_compute_product_uom_price' inverse='_inverse_product_uom_price' readonly=False
  • product_uom_qty Float
    compute='_compute_product_uom_qty' inverse='_inverse_product_uom_qty' readonly=False
  • purchase_amount_untaxed Monetary
    compute='_compute_amount_untaxed_fields' currency_field='currency_id'
  • purchase_order_id Many2one → purchase.order
    comodel_name='purchase.order' readonly=True
  • qty_invoiced Float
    readonly=True
  • qty_to_invoice Float
    readonly=True args: 'Qty to invoice'
  • reference Char
    compute='_compute_reference'
  • state Char
    readonly=True
Public methods (3)
  • action_add_to_po(self)
  • action_match_lines(self)
  • action_open_line(self)

New fields (9)
  • amount Float
    readonly=True string='Amount'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • currency_id Many2one → res.currency
    readonly=True string='Currency' args: 'res.currency'
  • date Date
    readonly=True string='Date'
  • name Char
    readonly=True string='Reference'
  • partner_id Many2one → res.partner
    readonly=True string='Vendor' args: 'res.partner'
  • purchase_order_id Many2one → purchase.order
    readonly=True string='Purchase Order' args: 'purchase.order'
  • reference Char
    readonly=True string='Source'
  • vendor_bill_id Many2one → account.move
    readonly=True string='Vendor Bill' args: 'account.move'
Public methods (1)
  • init(self)

New fields (44)
  • acknowledged Boolean
    copy=False help='It indicates that the vendor has acknowledged the receipt of the purchase order.' tracking=True args: 'Acknowledged'
  • amount_tax Monetary
    compute='_amount_all' readonly=True store=True string='Taxes'
  • amount_total Monetary
    compute='_amount_all' readonly=True store=True string='Total'
  • amount_total_cc Monetary
    compute='_amount_all' currency_field='company_currency_id' readonly=True store=True string='Total in currency'
  • amount_untaxed Monetary
    compute='_amount_all' readonly=True store=True string='Untaxed Amount' tracking=True
  • company_currency_id Many2one
    related='company_id.currency_id' string='Company Currency'
  • company_id Many2one → res.company
    default=<expr> index=True required=True args: 'res.company', 'Company'
  • company_price_include Selection
    related='company_id.account_price_include'
  • country_code Char
    related='company_id.account_fiscal_country_id.code' string='Country code'
  • currency_id Many2one → res.currency
    compute='_compute_currency_id' precompute=True readonly=False required=True store=True args: 'res.currency', 'Currency'
  • currency_rate Float
    compute='_compute_currency_rate' digits=0 precompute=True store=True string='Currency Rate'
  • date_approve Datetime
    copy=False index=True readonly=True args: 'Confirmation Date'
  • date_calendar_start Datetime
    compute='_compute_date_calendar_start' readonly=True store=True
  • date_order Datetime
    copy=False default=fields.Datetime.now help='Depicts the date within which the Quotation should be confirmed and converted into a purchase order.' index=True required=True args: 'Order Deadline'
  • date_planned Datetime
    compute='_compute_date_planned' copy=False help='Delivery date promised by vendor. This date is used to determine expected arrival of products.' index=True readonly=False store=True string='Expected Arrival'
  • dest_address_id Many2one → res.partner
    check_company=True help='Put an address if you want to deliver directly from the vendor to the customer. Otherwise, keep empty to deliver to your own company.' string='Dropship Address' args: 'res.partner'
  • duplicated_order_ids Many2many → purchase.order
    comodel_name='purchase.order' compute='_compute_duplicated_order_ids'
  • fiscal_position_id Many2one → account.fiscal.position
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" string='Fiscal Position' args: 'account.fiscal.position'
  • incoterm_id Many2one → account.incoterms
    help='International Commercial Terms are a series of predefined commercial terms used in international transactions.' args: 'account.incoterms', 'Incoterm'
  • invoice_count Integer
    compute='_compute_invoice' copy=False default=0 store=True string='Bill Count'
  • invoice_ids Many2many → account.move
    compute='_compute_invoice' copy=False store=True string='Bills' args: 'account.move'
  • invoice_status Selection
    compute='_get_invoiced' copy=False default='no' readonly=True store=True string='Billing Status' args: [('no', 'Nothing to Bill'), ('to invoice', 'Waiting Bills'), ('invoiced', 'Fully Billed')]
  • is_late Boolean
    search='_search_is_late' store=False args: 'Is Late'
  • lock_confirmed_po Selection
    related='company_id.po_lock'
  • locked Boolean
    copy=False default=False help='Locked Purchase Orders cannot be modified.' tracking=True
  • name Char
    copy=False default=<expr> index='trigram' required=True args: 'Order Reference'
  • note Html
    args: 'Terms and Conditions'
  • order_line One2many → purchase.order.line
    copy=True string='Order Lines' args: 'purchase.order.line', 'order_id'
  • origin Char
    copy=False help='Reference of the document that generated this purchase order request (e.g. a sales order)' args: 'Source'
  • partner_bill_count Integer
    related='partner_id.supplier_invoice_count'
  • partner_id Many2one → res.partner
    change_default=True check_company=True help='You can find a vendor by its Name, TIN, Email or Internal Reference.' index=True required=True string='Vendor' tracking=True args: 'res.partner'
  • partner_ref Char
    copy=False help="Reference of the sales order or bid sent by the vendor. It's used to do the matching when you receive the products as this reference is usually written on the delivery order sent by your vendor." args: 'Vendor Reference'
  • payment_term_id Many2one → account.payment.term
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" args: 'account.payment.term', 'Payment Terms'
  • priority Selection
    default='0' index=True args: [('0', 'Normal'), ('1', 'Urgent')], 'Priority'
  • product_id Many2one → product.product
    related='order_line.product_id' string='Product' args: 'product.product'
  • purchase_warning_text Text
    compute='_compute_purchase_warning_text' help='Internal warning for the partner or the products as set by the user.' args: 'Purchase Warning'
  • receipt_reminder_email Boolean
    compute='_compute_receipt_reminder_email' readonly=False store=True args: 'Receipt Reminder Email'
  • reminder_date_before_receipt Integer
    compute='_compute_receipt_reminder_email' readonly=False store=True args: 'Days Before Receipt'
  • show_comparison Boolean
    compute='_compute_show_comparison' args: 'Show Comparison'
  • state Selection
    copy=False default='draft' index=True readonly=True string='Status' tracking=True args: [('draft', 'RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('cancel', 'Cancelled')]
  • tax_calculation_rounding_method Selection
    readonly=True related='company_id.tax_calculation_rounding_method' string='Tax calculation rounding method'
  • tax_country_id Many2one → res.country
    comodel_name='res.country' compute='_compute_tax_country_id' compute_sudo=True help='Technical field to filter the available taxes depending on the fiscal country and fiscal position.'
  • tax_totals Binary
    compute='_compute_tax_totals' exportable=False
  • user_id Many2one → res.users
    check_company=True default=<expr> index=True string='Buyer' tracking=True args: 'res.users'
Public methods (31)
  • action_acknowledge(self)
  • action_add_from_catalog(self)
  • action_bill_matching(self)
  • action_create_invoice(self, attachment_ids=False)
    Create the invoice associated to the PO.
  • action_merge(self)
  • action_open_business_doc(self)
  • action_purchase_comparison(self)
  • action_rfq_send(self)
    This function opens a window to compose an email, with the edi purchase template message loaded by default
  • action_view_invoice(self, invoices=False)
    This function returns an action that display existing vendor bills of given purchase order ids. When only one found, show the vendor bill immediately.
  • button_approve(self, force=False)
  • button_cancel(self)
  • button_confirm(self)
  • button_draft(self)
  • button_lock(self)
  • button_unlock(self)
  • copy(self, default=None)
  • create(self, vals_list)
    @api.model_create_multi
  • create_document_from_attachment(self, attachment_ids)
    Create the purchase orders from given attachment_ids and redirect newly create order view. :param list attachment_ids: List of attachments process. :return: An action redirecting to related sale order view. :rtype: dict
  • get_acknowledge_url(self)
  • get_confirm_url(self, confirm_type=None)
    Create url for confirm reminder or purchase reception email for sending in mail. Unsuported anymore. We only use the acknowledge mechanism. Keep it for backward compatibility
  • get_import_templates(self)
    @api.model
  • get_localized_date_planned(self, date_planned=False)
    Returns the localized date planned in the timezone of the order's user or the company's partner or UTC if none of them are set.
  • get_order_timezone(self)
    Returns the timezone of the order's user or the company's partner or UTC if none of them are set.
  • get_update_url(self)
    Create portal url for user to update the scheduled date on purchase order lines.
  • message_post(self, **kwargs)
  • onchange(self, values, field_names, fields_spec)
    Override onchange to NOT update all date_planned on PO lines when date_planned on PO is updated by the change of date_planned on PO lines.
  • onchange_date_planned(self)
    @api.onchange('date_planned')
  • onchange_partner_id(self)
    @api.onchange('partner_id', 'company_id')
  • print_quotation(self)
  • retrieve_dashboard(self)
    @api.model
    This function returns the values to populate the custom dashboard in the purchase order views.
  • send_reminder_preview(self)

New fields (43)
  • allowed_uom_ids Many2many → uom.uom
    compute='_compute_allowed_uom_ids' args: 'uom.uom'
  • amount_to_invoice_at_date Float
    compute='_compute_amount_to_invoice_at_date' string='Amount'
  • company_id Many2one → res.company
    readonly=True related='order_id.company_id' store=True string='Company' args: 'res.company'
  • currency_id Many2one
    related='order_id.currency_id' string='Currency'
  • date_approve Datetime
    readonly=True related='order_id.date_approve' string='Confirmation Date'
  • date_order Datetime
    readonly=True related='order_id.date_order' string='Order Date'
  • date_planned Datetime
    compute='_compute_price_unit_and_date_planned_and_name' help="Delivery date expected from vendor. This date respectively defaults to vendor pricelist lead time then today's date." index=True readonly=False store=True string='Expected Arrival'
  • discount Float
    compute='_compute_price_unit_and_date_planned_and_name' digits='Discount' readonly=False store=True string='Discount (%)'
  • display_type Selection
    default=False help='Technical field for UX purpose.' args: [('line_section', 'Section'), ('line_subsection', 'Subsection'), ('line_note', 'Note')]
  • invoice_lines One2many → account.move.line
    copy=False readonly=True string='Bill Lines' args: 'account.move.line', 'purchase_line_id'
  • is_downpayment Boolean
  • name Text
    compute='_compute_price_unit_and_date_planned_and_name' readonly=False required=True store=True string='Description'
  • order_id Many2one → purchase.order
    index=True ondelete='cascade' required=True string='Order Reference' args: 'purchase.order'
  • parent_id Many2one → purchase.order.line
    compute='_compute_parent_id' string='Parent Section Line' args: 'purchase.order.line'
  • partner_id Many2one → res.partner
    index='btree_not_null' readonly=True related='order_id.partner_id' store=True string='Partner' args: 'res.partner'
  • price_subtotal Monetary
    compute='_compute_amount' store=True string='Subtotal'
  • price_tax Float
    compute='_compute_amount' store=True string='Tax'
  • price_total Monetary
    compute='_compute_amount' store=True string='Total'
  • price_unit Float
    aggregator='avg' compute='_compute_price_unit_and_date_planned_and_name' min_display_digits='Product Price' readonly=False required=True store=True string='Unit Price'
  • price_unit_discounted Float
    compute='_compute_price_unit_discounted' args: 'Unit Price (Discounted)'
  • price_unit_product_uom Float
    compute='_compute_price_unit_product_uom' help="The Price of one unit of the product's Unit of Measure" min_display_digits='Product Price' string='Unit Price Product UoM'
  • product_id Many2one → product.product
    change_default=True domain=[('purchase_ok', '=', True)] index='btree_not_null' ondelete='restrict' string='Product' args: 'product.product'
  • product_no_variant_attribute_value_ids Many2many → product.template.attribute.value
    ondelete='restrict' string='Product attribute values that do not create variants' args: 'product.template.attribute.value'
  • product_qty Float
    digits='Product Unit' required=True string='Quantity'
  • product_template_attribute_value_ids Many2many
    readonly=True related='product_id.product_template_attribute_value_ids'
  • product_type Selection
    readonly=True related='product_id.type'
  • product_uom_id Many2one → uom.uom
    domain="[('id', 'in', allowed_uom_ids)]" ondelete='restrict' string='Unit' args: 'uom.uom'
  • product_uom_qty Float
    compute='_compute_product_uom_qty' store=True string='Total Quantity'
  • purchase_line_warn_msg Text
    compute='_compute_purchase_line_warn_msg'
  • qty_invoiced Float
    compute='_compute_qty_invoiced' digits='Product Unit' store=True string='Billed Qty'
  • qty_invoiced_at_date Float
    compute='_compute_qty_invoiced_at_date' digits='Product Unit' string='Billed'
  • qty_received Float
    compute='_compute_qty_received' compute_sudo=True digits='Product Unit' inverse='_inverse_qty_received' store=True args: 'Received Qty'
  • qty_received_at_date Float
    compute='_compute_qty_received_at_date' digits='Product Unit' string='Received'
  • qty_received_manual Float
    copy=False digits='Product Unit' args: 'Manual Received Qty'
  • qty_received_method Selection
    compute='_compute_qty_received_method' help='According to product configuration, the received quantity can be automatically computed by mechanism:\n - Manual: the quantity is set manually on the line\n - Stock Moves: the quantity comes from confirmed pickings\n' store=True string='Received Qty Method' args: [('manual', 'Manual')]
  • qty_to_invoice Float
    compute='_compute_qty_invoiced' digits='Product Unit' readonly=True store=True string='To Invoice Quantity'
  • selected_seller_id Many2one → product.supplierinfo
    compute='_compute_selected_seller_id' help='Technical field to get the vendor pricelist used to generate this line' args: 'product.supplierinfo'
  • sequence Integer
    default=10 string='Sequence'
  • state Selection
    related='order_id.state'
  • tax_calculation_rounding_method Selection
    readonly=True related='company_id.tax_calculation_rounding_method' string='Tax calculation rounding method'
  • tax_ids Many2many → account.tax
    context={'active_test': False, 'hide_original_tax_ids': True} string='Taxes' args: 'account.tax'
  • technical_price_unit Float
    help='Technical field for price computation'
  • translated_product_name Text
    compute='_compute_translated_product_name'
Public methods (6)
  • action_add_from_catalog(self)
  • action_open_order(self)
  • create(self, vals_list)
    @api.model_create_multi
  • get_parent_section_line(self)
  • onchange_product_id(self)
    @api.onchange('product_id')
  • write(self, vals)

New fields (27)
  • category_id Many2one → product.category
    readonly=True args: 'product.category', 'Product Category'
  • commercial_partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Commercial Entity'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • country_id Many2one → res.country
    readonly=True args: 'res.country', 'Partner Country'
  • currency_id Many2one → res.currency
    readonly=True args: 'res.currency', 'Currency'
  • date_approve Datetime
    readonly=True args: 'Confirmation Date'
  • date_order Datetime
    readonly=True args: 'Order Date'
  • delay Float
    aggregator='avg' digits=(16, 2) help='Amount of time between purchase approval and order by date.' readonly=True args: 'Days to Confirm'
  • delay_pass Float
    aggregator='avg' digits=(16, 2) help='Amount of time between date planned and order by date for each purchase order line.' readonly=True args: 'Days to Receive'
  • fiscal_position_id Many2one → account.fiscal.position
    readonly=True string='Fiscal Position' args: 'account.fiscal.position'
  • nbr_lines Integer
    readonly=True args: '# of Lines'
  • order_id Many2one → purchase.order
    readonly=True args: 'purchase.order', 'Order'
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Vendor'
  • price_average Monetary
    aggregator='avg' readonly=True args: 'Average Cost'
  • price_total Monetary
    readonly=True args: 'Total'
  • product_id Many2one → product.product
    readonly=True args: 'product.product', 'Product'
  • product_tmpl_id Many2one → product.template
    readonly=True args: 'product.template', 'Product Template'
  • product_uom_id Many2one → uom.uom
    readonly=True args: 'uom.uom', 'Reference Unit of Measure'
  • qty_billed Float
    readonly=True args: 'Qty Billed'
  • qty_ordered Float
    readonly=True args: 'Qty Ordered'
  • qty_received Float
    readonly=True args: 'Qty Received'
  • qty_to_be_billed Float
    readonly=True args: 'Qty to be Billed'
  • state Selection
    readonly=True args: [('draft', 'Draft RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('cancel', 'Cancelled')], 'Status'
  • untaxed_total Monetary
    readonly=True args: 'Untaxed Total'
  • user_id Many2one → res.users
    readonly=True args: 'res.users', 'Buyer'
  • volume Float
    readonly=True args: 'Volume'
  • weight Float
    readonly=True args: 'Gross Weight'
Public methods (0)

No public methods.

New fields (3)
  • po_double_validation Selection
    default='one_step' help='Provide a double validation mechanism for purchases' string='Levels of Approvals' args: [('one_step', 'Confirm purchase orders in one step'), ('two_step', 'Get 2 levels of approvals to confirm a purchase order')]
  • po_double_validation_amount Monetary
    default=5000 help='Minimum amount for which a double validation is required' string='Double validation amount'
  • po_lock Selection
    default='edit' help='Purchase Order Modification used when you want to purchase order editable after confirm' string='Purchase Order Modification' args: [('edit', 'Allow to edit purchase orders'), ('lock', 'Confirmed purchase orders are not editable')]
Public methods (0)

No public methods.

New fields (11)
  • company_currency_id Many2one → res.currency
    readonly=True related='company_id.currency_id' string='Company Currency' args: 'res.currency'
  • group_send_reminder Boolean
    default=True help='Allow automatically send email to remind your vendor the receipt date' implied_group='purchase.group_send_reminder' args: 'Receipt Reminder'
  • group_warning_purchase Boolean
    implied_group='purchase.group_warning_purchase' args: 'Purchase Warnings'
  • lock_confirmed_po Boolean
    default=<expr> args: 'Lock Confirmed Orders'
  • module_account_3way_match Boolean
    args: '3-way matching: purchases, receptions and bills'
  • module_purchase_product_matrix Boolean
    args: 'Purchase Grid Entry'
  • module_purchase_requisition Boolean
    args: 'Purchase Agreements'
  • po_double_validation Selection
    readonly=False related='company_id.po_double_validation' string='Levels of Approvals *'
  • po_double_validation_amount Monetary
    currency_field='company_currency_id' readonly=False related='company_id.po_double_validation_amount' string='Minimum Amount'
  • po_lock Selection
    readonly=False related='company_id.po_lock' string='Purchase Order Modification *'
  • po_order_approval Boolean
    default=<expr> args: 'Purchase Order Approval'
Public methods (1)
  • set_values(self)

New fields (6)
  • buyer_id Many2one → res.users
    string='Buyer' args: 'res.users'
  • property_purchase_currency_id Many2one → res.currency
    company_dependent=True help='This currency will be used for purchases from the current partner' string='Supplier Currency' args: 'res.currency'
  • purchase_order_count Integer
    compute='_compute_purchase_order_count' groups='purchase.group_purchase_user' string='Purchase Order Count'
  • purchase_warn_msg Text
    args: 'Message for Purchase Order'
  • receipt_reminder_email Boolean
    company_dependent=True help='Automatically send a confirmation email to the vendor X days before the expected receipt date, asking him to confirm the exact date.' args: 'Receipt Reminder'
  • reminder_date_before_receipt Integer
    company_dependent=True help='Number of days to send reminder email before the promised receipt date' args: 'Days Before Receipt'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/18.0/purchase
VERSION
VERSION 1.2
CATEGORY
CATEGORYInventory/Purchase
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Thibault Delavallée, Christophe Simonis, Xavier Morel, Joren Van Onder, Stefan Rijnhart, Aaron Bohy, Damien Bouvy, Yannick Tivisse, Odoo Online, Pierre Masereel, Romain Derie, Laurent Smet, Jorge Pinna Puissant, Arnold Moyaux, Aurélien Warnon, Xavier-Do, Victor Feyens, Andrea Grazioso (agr-odoo), Adrien Dieudonné, William Henrotin, oco-odoo, Julien Mougenot, Anh Thao Pham (pta), svs-odoo, Nasreddin Boulif (bon), Tiffany Chang (tic), Rémy Voet (ryv), Gorash, william-andre, Louis Baudoux, Ruben Gomes, Julien Banken, Vincent Larcin, jbw-odoo, bve-odoo, Habib (ayh), alsh-odoo, Louis Wicket (wil), Walid, Maximilien (malb), Victor Piryns (pivi), Thomas Becquevort (thbe), Gauthier Wala (gawa), Pierre-Yves Dufays, clesgow, Djamel Touati, Pieter Claeys (clpi), Yosua Nicolaus, Levi Siuzdak (sile), Maruan Aguerdouh (magm), Antoine Boonen, Dylan Kiss (dyki), kir-odoo, Chong Wang (cwg), Simon Goffaux (sigo), Martin Maes, tanghulu0608, Xavier Bol (xbo), Maksym Yankin, Paweł Fertyk, AH-Yussef, Sarah Bellefroid, Arnaud Sibille, Mattis Megevand (mmeg), omra-odoo, Joris Makauskis, Walid (wasa), guva-odoo, kdeb@odoo.com, Paul Stroobant, Jay Savaliya, Hesham, Ethan Vincent, Mathieu (mcou), lase@odoo.com, bary, Maryam Kia, reka-odoo, Sven Fuehr, AMZIL Ayoub, yosa-odoo, Nathaniel (naja), vava-odoo, Julien Carion (juca), kcv-odoo, Louis Gobert, Chrysanthe (chgo), sami odoo, Louis (wil), mano-odoo, aamo-odoo, Hussein Ebrahim(hyhe), Victorien (viso), thle-odoo, Xavier Luyckx (xlu), Mohammad Abdulmoneim, dhha-odoo, gteboul, Rocío Vega, Pierre Pulinckx (PIPU), Julien Schwanen, aizu-odoo, Ricardo Gomes Rodrigues, roto-odoo, Maira Salazar (srma), Arthur Nanson, David Van Droogenbroeck (DROD), Morgane (morm), elhayyany, pkgu-odoo, djameltouati, khsr-odoo, Pierre Pulinckx (pipu), Pierre Pulinckx, Bastien PIERRE, Anton Romanova (roan), AnhBT, jeep-odoo, Corentin Heinix (cohe), Corentin Lombard, ppat-odoo, Carmine, kusi-odoo, Bastien (bvdn), chha-odoo, plha-odoo, Krzysztof Magusiak (krma), Mahdi Alijani (malj), Omar (OSAH), rupa-odoo, joseph, Maeva De Keyser (MDEK), bhra-odoo, bhna-odoo, MAGREMENT, rare-odoo, kinhosz, temo-odoo, Lancelot Semal, sbel-odoo, adip-odoo, ABE-Mark45, Ayush Modi, Michel Jacquemin (mija), lrizzi1, Zachary (zavan), Jaishyam (JRBR)
WEBSITE
WEBSITEhttps://www.odoo.com/app/purchase
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:25:55
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - html_editor
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (59)
XML IDNameModelTypeStatus
account_analytic_account_view_form_purchase account.analytic.account.form.purchase account.analytic.account div Inherits analytic.view_account_analytic_account_form
bill_to_po_wizard_form bill.to.po.wizard.form bill.to.po.wizard form New
document_tax_totals document_tax_totals ir.ui.view qweb Inherits account.document_tax_totals_template
portal_my_home_menu_purchase Portal layout : purchase menu entries ir.ui.view qweb Inherits portal.portal_breadcrumbs
portal_my_home_purchase Requests for Quotation / Purchase Orders ir.ui.view qweb Inherits portal.portal_my_home
portal_my_purchase_order Purchase Order ir.ui.view qweb Inherits portal.portal_sidebar
portal_my_purchase_order_update_date Portal: My Purchase Order Update Dates ir.ui.view qweb Inherits purchase.portal_my_purchase_order
portal_my_purchase_orders My Purchase Orders ir.ui.view qweb New
portal_my_purchase_rfqs My Requests For Quotation ir.ui.view qweb New
product_normal_form_view_inherit_purchase product.product.purchase.order product.product div Inherits product.product_normal_form_view
product_packaging_form_view_purchase product.packaging.form.view.purchase product.packaging xpath Inherits product.product_packaging_form_view
product_packaging_tree_view_purchase product.packaging.list.view.purchase product.packaging xpath Inherits product.product_packaging_tree_view
product_product_supplierinfo_tree_view2 product.supplierinfo.list.view2.product product.supplierinfo xpath Inherits purchase.product_supplierinfo_tree_view2
product_supplierinfo_tree_view2 product.supplierinfo.list.view2 product.supplierinfo xpath Inherits product.product_supplierinfo_tree_view
product_template_search_view_purchase product.template.search.purchase product.template xpath Inherits product.product_template_search_view
product_view_kanban_catalog_purchase_only product.view.kanban.catalog.purchase product.product field Inherits product.product_view_kanban_catalog
product_view_search_catalog product.view.search.catalog.inherit.purchase product.product xpath Inherits product.product_view_search_catalog
purchase_bill_line_match_tree purchase.bill.line.match.list purchase.bill.line.match list New
purchase_history_graph purchase.history.graph purchase.order.line graph New
purchase_history_pivot purchase.history.pivot purchase.order.line pivot New
purchase_history_tree purchase.history.list purchase.order.line list New
purchase_order_calendar purchase.order.calendar purchase.order calendar New
purchase_order_form purchase.order.form purchase.order form New
purchase_order_graph purchase.order.graph purchase.order graph New
purchase_order_kpis_tree purchase.order.inherit.purchase.order.list purchase.order list New
purchase_order_line_form2 purchase.order.line.form2 purchase.order.line form New
purchase_order_line_search purchase.order.line.search purchase.order.line search New
purchase_order_line_tree purchase.order.line.list purchase.order.line list New
purchase_order_pivot purchase.order.pivot purchase.order pivot New
purchase_order_portal_content Purchase Order Portal Content ir.ui.view qweb New
purchase_order_portal_content_totals_table purchase_order_portal_content_totals_table ir.ui.view qweb New
purchase_order_tree purchase.order.list purchase.order list New
purchase_order_view_activity purchase.order.activity purchase.order activity New
purchase_order_view_kanban_without_dashboard purchase.order.view.kanban.without.dashboard purchase.order xpath Inherits purchase.view_purchase_order_kanban
purchase_order_view_search purchase.order.select purchase.order search New
purchase_order_view_tree purchase.order.view.list purchase.order list New
purchase_partner_kanban_view res.partner.kanban.purchaseorder.inherit res.partner xpath Inherits base.res_partner_kanban_view
purchase_report_view_tree purchase.report.view.list purchase.report list New
report_purchaseorder report_purchaseorder ir.ui.view qweb New
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb New
report_purchasequotation report_purchasequotation ir.ui.view qweb New
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb New
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits base.res_config_settings_view_form
res_partner_view_purchase_account_buttons res.partner.view.purchase.account.buttons res.partner div Inherits base.view_partner_form
res_partner_view_purchase_buttons res.partner.view.purchase.buttons res.partner div Inherits base.view_partner_form
track_po_line_qty_received_template track_po_line_qty_received_template ir.ui.view qweb New
track_po_line_template track_po_line_template ir.ui.view qweb New
view_move_form_inherit_purchase account.move.inherit.purchase account.move field Inherits account.view_move_form
view_partner_property_form res.partner.purchase.property.form.inherit res.partner group Inherits base.view_partner_form
view_product_product_supplier_inherit product.product.form product.product field Inherits product.product_normal_form_view
view_product_supplier_inherit product.template.supplier.form.inherit product.template xpath Inherits product.product_template_form_view
view_product_template_purchase_buttons_from product.template.purchase.button.inherit product.template button Inherits product.product_template_only_form_view
view_purchase_bill_union_filter purchase.bill.union.select purchase.bill.union search New
view_purchase_bill_union_tree purchase.bill.union.list purchase.bill.union list New
view_purchase_order_filter request.quotation.select purchase.order search New
view_purchase_order_graph product.month.graph purchase.report graph New
view_purchase_order_kanban purchase.order.kanban purchase.order kanban New
view_purchase_order_pivot product.month.pivot purchase.report pivot New
view_purchase_order_search report.purchase.order.search purchase.report search New
Models touched (19)

New fields (1)
  • purchase_order_count Integer
    compute='_compute_purchase_order_count' args: 'Purchase Order Count'
Public methods (1)
  • action_view_purchase_orders(self)

New fields (1)
  • business_domain Selection
    ondelete={'purchase_order': 'cascade'} selection_add=[('purchase_order', 'Purchase Order')]
Public methods (0)

No public methods.

New fields (5)
  • is_purchase_matched Boolean
    compute='_compute_is_purchase_matched'
  • purchase_id Many2one → purchase.order
    help='Auto-complete from a past purchase order.' readonly=False store=False string='Purchase Order' args: 'purchase.order'
  • purchase_order_count Integer
    compute='_compute_origin_po_count' string='Purchase Order Count'
  • purchase_order_name Char
    compute='_compute_purchase_order_name'
  • purchase_vendor_bill_id Many2one → purchase.bill.union
    help='Auto-complete from a past bill / purchase order.' readonly=False store=False string='Auto-complete' args: 'purchase.bill.union'
Public methods (4)
  • action_purchase_matching(self)
  • action_view_source_purchase_orders(self)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (3)
  • is_downpayment Boolean
  • purchase_line_id Many2one → purchase.order.line
    copy=False index='btree_not_null' ondelete='set null' args: 'purchase.order.line', 'Purchase Order Line'
  • purchase_order_id Many2one → purchase.order
    readonly=True related='purchase_line_id.order_id' args: 'purchase.order', 'Purchase Order'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • partner_id Many2one → res.partner
    comodel_name='res.partner'
  • purchase_order_id Many2one → purchase.order
    comodel_name='purchase.order'
Public methods (2)
  • action_add_downpayment(self)
  • action_add_to_po(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • purchase Boolean
    default=True help='If true, the packaging can be used for purchase orders' args: 'Purchase'
Public methods (0)

No public methods.

New fields (2)
  • is_in_purchase_order Boolean
    compute='_compute_is_in_purchase_order' search='_search_is_in_purchase_order'
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' digits='Product Unit of Measure' string='Purchased'
Public methods (1)
  • action_view_po(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • purchase_line_warn Selection
    default='no-message' help=WARNING_HELP required=True args: WARNING_MESSAGE, 'Purchase Order Line Warning'
  • purchase_line_warn_msg Text
    args: 'Message for Purchase Order Line'
  • purchase_method Selection
    compute='_compute_purchase_method' help='On ordered quantities: Control bills based on ordered quantities.\nOn received quantities: Control bills based on received quantities.' precompute=True readonly=False store=True string='Control Policy' args: [('purchase', 'On ordered quantities'), ('receive', 'On received quantities')]
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' digits='Product Unit of Measure' string='Purchased'
Public methods (2)
  • action_view_po(self)
  • get_import_templates(self)
    @api.model

New fields (19)
  • account_move_id Many2one → account.move
    comodel_name='account.move' readonly=True
  • aml_id Many2one → account.move.line
    comodel_name='account.move.line' readonly=True
  • billed_amount_untaxed Monetary
    compute='_compute_amount_untaxed_fields' currency_field='currency_id'
  • company_id Many2one → res.company
    comodel_name='res.company' readonly=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True
  • line_amount_untaxed Monetary
    readonly=True
  • line_qty Float
    readonly=True
  • line_uom_id Many2one → uom.uom
    comodel_name='uom.uom' readonly=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True
  • pol_id Many2one → purchase.order.line
    comodel_name='purchase.order.line' readonly=True
  • product_id Many2one → product.product
    comodel_name='product.product' readonly=True
  • product_uom_id Many2one → uom.uom
    comodel_name='uom.uom' related='product_id.uom_id'
  • product_uom_price Float
    compute='_compute_product_uom_price' inverse='_inverse_product_uom_price' readonly=False
  • product_uom_qty Float
    compute='_compute_product_uom_qty' inverse='_inverse_product_uom_qty' readonly=False
  • purchase_amount_untaxed Monetary
    compute='_compute_amount_untaxed_fields' currency_field='currency_id'
  • purchase_order_id Many2one → purchase.order
    comodel_name='purchase.order' readonly=True
  • qty_invoiced Float
    readonly=True
  • reference Char
    compute='_compute_reference'
  • state Char
    readonly=True
Public methods (3)
  • action_add_to_po(self)
  • action_match_lines(self)
  • action_open_line(self)

New fields (9)
  • amount Float
    readonly=True string='Amount'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • currency_id Many2one → res.currency
    readonly=True string='Currency' args: 'res.currency'
  • date Date
    readonly=True string='Date'
  • name Char
    readonly=True string='Reference'
  • partner_id Many2one → res.partner
    readonly=True string='Vendor' args: 'res.partner'
  • purchase_order_id Many2one → purchase.order
    readonly=True string='Purchase Order' args: 'purchase.order'
  • reference Char
    readonly=True string='Source'
  • vendor_bill_id Many2one → account.move
    readonly=True string='Vendor Bill' args: 'account.move'
Public methods (1)
  • init(self)

New fields (40)
  • amount_tax Monetary
    compute='_amount_all' readonly=True store=True string='Taxes'
  • amount_total Monetary
    compute='_amount_all' readonly=True store=True string='Total'
  • amount_total_cc Monetary
    compute='_amount_all' currency_field='company_currency_id' readonly=True store=True string='Company Total'
  • amount_untaxed Monetary
    compute='_amount_all' readonly=True store=True string='Untaxed Amount' tracking=True
  • company_currency_id Many2one
    related='company_id.currency_id' string='Company Currency'
  • company_id Many2one → res.company
    default=<expr> index=True required=True args: 'res.company', 'Company'
  • company_price_include Selection
    related='company_id.account_price_include'
  • country_code Char
    related='company_id.account_fiscal_country_id.code' string='Country code'
  • currency_id Many2one → res.currency
    compute='_compute_currency_id' precompute=True readonly=False required=True store=True args: 'res.currency', 'Currency'
  • currency_rate Float
    compute='_compute_currency_rate' digits=0 precompute=True store=True string='Currency Rate'
  • date_approve Datetime
    copy=False index=True readonly=True args: 'Confirmation Date'
  • date_calendar_start Datetime
    compute='_compute_date_calendar_start' readonly=True store=True
  • date_order Datetime
    copy=False default=fields.Datetime.now help='Depicts the date within which the Quotation should be confirmed and converted into a purchase order.' index=True required=True args: 'Order Deadline'
  • date_planned Datetime
    compute='_compute_date_planned' copy=False help='Delivery date promised by vendor. This date is used to determine expected arrival of products.' index=True readonly=False store=True string='Expected Arrival'
  • dest_address_id Many2one → res.partner
    check_company=True help='Put an address if you want to deliver directly from the vendor to the customer. Otherwise, keep empty to deliver to your own company.' string='Dropship Address' args: 'res.partner'
  • fiscal_position_id Many2one → account.fiscal.position
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" string='Fiscal Position' args: 'account.fiscal.position'
  • incoterm_id Many2one → account.incoterms
    help='International Commercial Terms are a series of predefined commercial terms used in international transactions.' args: 'account.incoterms', 'Incoterm'
  • invoice_count Integer
    compute='_compute_invoice' copy=False default=0 store=True string='Bill Count'
  • invoice_ids Many2many → account.move
    compute='_compute_invoice' copy=False store=True string='Bills' args: 'account.move'
  • invoice_status Selection
    compute='_get_invoiced' copy=False default='no' readonly=True store=True string='Billing Status' args: [('no', 'Nothing to Bill'), ('to invoice', 'Waiting Bills'), ('invoiced', 'Fully Billed')]
  • mail_reception_confirmed Boolean
    copy=False default=False help='True if PO reception is confirmed by the vendor.' readonly=True args: 'Reception Confirmed'
  • mail_reception_declined Boolean
    copy=False help='True if PO reception is declined by the vendor.' readonly=True args: 'Reception Declined'
  • mail_reminder_confirmed Boolean
    copy=False default=False help='True if the reminder email is confirmed by the vendor.' readonly=True args: 'Reminder Confirmed'
  • name Char
    copy=False default=<expr> index='trigram' required=True args: 'Order Reference'
  • notes Html
    args: 'Terms and Conditions'
  • order_line One2many → purchase.order.line
    copy=True string='Order Lines' args: 'purchase.order.line', 'order_id'
  • origin Char
    copy=False help='Reference of the document that generated this purchase order request (e.g. a sales order)' args: 'Source Document'
  • partner_bill_count Integer
    related='partner_id.supplier_invoice_count'
  • partner_id Many2one → res.partner
    change_default=True check_company=True help='You can find a vendor by its Name, TIN, Email or Internal Reference.' index=True required=True string='Vendor' tracking=True args: 'res.partner'
  • partner_ref Char
    copy=False help="Reference of the sales order or bid sent by the vendor. It's used to do the matching when you receive the products as this reference is usually written on the delivery order sent by your vendor." args: 'Vendor Reference'
  • payment_term_id Many2one → account.payment.term
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" args: 'account.payment.term', 'Payment Terms'
  • priority Selection
    default='0' index=True args: [('0', 'Normal'), ('1', 'Urgent')], 'Priority'
  • product_id Many2one → product.product
    related='order_line.product_id' string='Product' args: 'product.product'
  • receipt_reminder_email Boolean
    compute='_compute_receipt_reminder_email' args: 'Receipt Reminder Email'
  • reminder_date_before_receipt Integer
    compute='_compute_receipt_reminder_email' args: 'Days Before Receipt'
  • state Selection
    copy=False default='draft' index=True readonly=True string='Status' tracking=True args: [('draft', 'RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Locked'), ('cancel', 'Cancelled')]
  • tax_calculation_rounding_method Selection
    readonly=True related='company_id.tax_calculation_rounding_method' string='Tax calculation rounding method'
  • tax_country_id Many2one → res.country
    comodel_name='res.country' compute='_compute_tax_country_id' compute_sudo=True help='Technical field to filter the available taxes depending on the fiscal country and fiscal position.'
  • tax_totals Binary
    compute='_compute_tax_totals' exportable=False
  • user_id Many2one → res.users
    check_company=True default=<expr> index=True string='Buyer' tracking=True args: 'res.users'
Public methods (28)
  • action_add_from_catalog(self)
  • action_bill_matching(self)
  • action_create_invoice(self)
    Create the invoice associated to the PO.
  • action_merge(self)
  • action_rfq_send(self)
    This function opens a window to compose an email, with the edi purchase template message loaded by default
  • action_view_invoice(self, invoices=False)
    This function returns an action that display existing vendor bills of given purchase order ids. When only one found, show the vendor bill immediately.
  • button_approve(self, force=False)
  • button_cancel(self)
  • button_confirm(self)
  • button_done(self)
  • button_draft(self)
  • button_unlock(self)
  • confirm_reminder_mail(self, confirmed_date=False)
  • copy(self, default=None)
  • create(self, vals_list)
    @api.model_create_multi
  • get_confirm_url(self, confirm_type=None)
    Create url for confirm reminder or purchase reception email for sending in mail.
  • get_localized_date_planned(self, date_planned=False)
    Returns the localized date planned in the timezone of the order's user or the company's partner or UTC if none of them are set.
  • get_order_timezone(self)
    Returns the timezone of the order's user or the company's partner or UTC if none of them are set.
  • get_update_url(self)
    Create portal url for user to update the scheduled date on purchase order lines.
  • message_post(self, **kwargs)
    @api.returns('mail.message', <expr>)
  • onchange(self, values, field_names, fields_spec)
    Override onchange to NOT update all date_planned on PO lines when date_planned on PO is updated by the change of date_planned on PO lines.
  • onchange_date_planned(self)
    @api.onchange('date_planned')
  • onchange_partner_id(self)
    @api.onchange('partner_id', 'company_id')
  • onchange_partner_id_warning(self)
    @api.onchange('partner_id')
  • print_quotation(self)
  • retrieve_dashboard(self)
    @api.model
    This function returns the values to populate the custom dashboard in the purchase order views.
  • send_reminder_preview(self)
  • write(self, vals)

New fields (36)
  • company_id Many2one → res.company
    readonly=True related='order_id.company_id' store=True string='Company' args: 'res.company'
  • currency_id Many2one
    readonly=True related='order_id.currency_id' store=True string='Currency'
  • date_approve Datetime
    readonly=True related='order_id.date_approve' string='Confirmation Date'
  • date_order Datetime
    readonly=True related='order_id.date_order' string='Order Date'
  • date_planned Datetime
    compute='_compute_price_unit_and_date_planned_and_name' help="Delivery date expected from vendor. This date respectively defaults to vendor pricelist lead time then today's date." index=True readonly=False store=True string='Expected Arrival'
  • discount Float
    compute='_compute_price_unit_and_date_planned_and_name' digits='Discount' readonly=False store=True string='Discount (%)'
  • display_type Selection
    default=False help='Technical field for UX purpose.' args: [('line_section', 'Section'), ('line_note', 'Note')]
  • invoice_lines One2many → account.move.line
    copy=False readonly=True string='Bill Lines' args: 'account.move.line', 'purchase_line_id'
  • is_downpayment Boolean
  • name Text
    compute='_compute_price_unit_and_date_planned_and_name' readonly=False required=True store=True string='Description'
  • order_id Many2one → purchase.order
    index=True ondelete='cascade' required=True string='Order Reference' args: 'purchase.order'
  • partner_id Many2one → res.partner
    index='btree_not_null' readonly=True related='order_id.partner_id' store=True string='Partner' args: 'res.partner'
  • price_subtotal Monetary
    aggregator=None compute='_compute_amount' store=True string='Subtotal'
  • price_tax Float
    compute='_compute_amount' store=True string='Tax'
  • price_total Monetary
    compute='_compute_amount' store=True string='Total'
  • price_unit Float
    aggregator='avg' compute='_compute_price_unit_and_date_planned_and_name' min_display_digits='Product Price' readonly=False required=True store=True string='Unit Price'
  • price_unit_discounted Float
    compute='_compute_price_unit_discounted' args: 'Unit Price (Discounted)'
  • product_id Many2one → product.product
    change_default=True domain=[('purchase_ok', '=', True)] index='btree_not_null' ondelete='restrict' string='Product' args: 'product.product'
  • product_no_variant_attribute_value_ids Many2many → product.template.attribute.value
    ondelete='restrict' string='Product attribute values that do not create variants' args: 'product.template.attribute.value'
  • product_packaging_id Many2one → product.packaging
    check_company=True compute='_compute_product_packaging_id' domain="[('purchase', '=', True), ('product_id', '=', product_id)]" readonly=False store=True string='Packaging' args: 'product.packaging'
  • product_packaging_qty Float
    compute='_compute_product_packaging_qty' readonly=False store=True args: 'Packaging Quantity'
  • product_qty Float
    compute='_compute_product_qty' digits='Product Unit of Measure' readonly=False required=True store=True string='Quantity'
  • product_template_attribute_value_ids Many2many
    readonly=True related='product_id.product_template_attribute_value_ids'
  • product_type Selection
    readonly=True related='product_id.type'
  • product_uom Many2one → uom.uom
    domain="[('category_id', '=', product_uom_category_id)]" ondelete='restrict' string='Unit of Measure' args: 'uom.uom'
  • product_uom_category_id Many2one
    related='product_id.uom_id.category_id'
  • product_uom_qty Float
    compute='_compute_product_uom_qty' store=True string='Total Quantity'
  • qty_invoiced Float
    compute='_compute_qty_invoiced' digits='Product Unit of Measure' store=True string='Billed Qty'
  • qty_received Float
    compute='_compute_qty_received' compute_sudo=True digits='Product Unit of Measure' inverse='_inverse_qty_received' store=True args: 'Received Qty'
  • qty_received_manual Float
    copy=False digits='Product Unit of Measure' args: 'Manual Received Qty'
  • qty_received_method Selection
    compute='_compute_qty_received_method' help='According to product configuration, the received quantity can be automatically computed by mechanism:\n - Manual: the quantity is set manually on the line\n - Stock Moves: the quantity comes from confirmed pickings\n' store=True string='Received Qty Method' args: [('manual', 'Manual')]
  • qty_to_invoice Float
    compute='_compute_qty_invoiced' digits='Product Unit of Measure' readonly=True store=True string='To Invoice Quantity'
  • sequence Integer
    default=10 string='Sequence'
  • state Selection
    related='order_id.state' store=True
  • tax_calculation_rounding_method Selection
    readonly=True related='company_id.tax_calculation_rounding_method' string='Tax calculation rounding method'
  • taxes_id Many2many → account.tax
    context={'active_test': False} string='Taxes' args: 'account.tax'
Public methods (7)
  • action_add_from_catalog(self)
  • action_open_order(self)
  • action_purchase_history(self)
  • create(self, vals_list)
    @api.model_create_multi
  • onchange_product_id(self)
    @api.onchange('product_id')
  • onchange_product_id_warning(self)
    @api.onchange('product_id')
  • write(self, values)

New fields (27)
  • category_id Many2one → product.category
    readonly=True args: 'product.category', 'Product Category'
  • commercial_partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Commercial Entity'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • country_id Many2one → res.country
    readonly=True args: 'res.country', 'Partner Country'
  • currency_id Many2one → res.currency
    readonly=True args: 'res.currency', 'Currency'
  • date_approve Datetime
    readonly=True args: 'Confirmation Date'
  • date_order Datetime
    readonly=True args: 'Order Date'
  • delay Float
    aggregator='avg' digits=(16, 2) help='Amount of time between purchase approval and order by date.' readonly=True args: 'Days to Confirm'
  • delay_pass Float
    aggregator='avg' digits=(16, 2) help='Amount of time between date planned and order by date for each purchase order line.' readonly=True args: 'Days to Receive'
  • fiscal_position_id Many2one → account.fiscal.position
    readonly=True string='Fiscal Position' args: 'account.fiscal.position'
  • nbr_lines Integer
    readonly=True args: '# of Lines'
  • order_id Many2one → purchase.order
    readonly=True args: 'purchase.order', 'Order'
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Vendor'
  • price_average Monetary
    aggregator='avg' readonly=True args: 'Average Cost'
  • price_total Monetary
    readonly=True args: 'Total'
  • product_id Many2one → product.product
    readonly=True args: 'product.product', 'Product'
  • product_tmpl_id Many2one → product.template
    readonly=True args: 'product.template', 'Product Template'
  • product_uom Many2one → uom.uom
    required=True args: 'uom.uom', 'Reference Unit of Measure'
  • qty_billed Float
    readonly=True args: 'Qty Billed'
  • qty_ordered Float
    readonly=True args: 'Qty Ordered'
  • qty_received Float
    readonly=True args: 'Qty Received'
  • qty_to_be_billed Float
    readonly=True args: 'Qty to be Billed'
  • state Selection
    readonly=True args: [('draft', 'Draft RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status'
  • untaxed_total Monetary
    readonly=True args: 'Untaxed Total'
  • user_id Many2one → res.users
    readonly=True args: 'res.users', 'Buyer'
  • volume Float
    readonly=True args: 'Volume'
  • weight Float
    readonly=True args: 'Gross Weight'
Public methods (0)

No public methods.

New fields (4)
  • po_double_validation Selection
    default='one_step' help='Provide a double validation mechanism for purchases' string='Levels of Approvals' args: [('one_step', 'Confirm purchase orders in one step'), ('two_step', 'Get 2 levels of approvals to confirm a purchase order')]
  • po_double_validation_amount Monetary
    default=5000 help='Minimum amount for which a double validation is required' string='Double validation amount'
  • po_lead Float
    default=0.0 help='Margin of error for vendor lead times. When the system generates Purchase Orders for procuring products, they will be scheduled that many days earlier to cope with unexpected vendor delays.' required=True string='Purchase Lead Time'
  • po_lock Selection
    default='edit' help='Purchase Order Modification used when you want to purchase order editable after confirm' string='Purchase Order Modification' args: [('edit', 'Allow to edit purchase orders'), ('lock', 'Confirmed purchase orders are not editable')]
Public methods (0)

No public methods.

New fields (14)
  • company_currency_id Many2one → res.currency
    readonly=True related='company_id.currency_id' string='Company Currency' args: 'res.currency'
  • default_purchase_method Selection
    default='receive' default_model='product.template' help='This default value is applied to any new product created. This can be changed in the product detail form.' string='Bill Control' args: [('purchase', 'Ordered quantities'), ('receive', 'Received quantities')]
  • group_send_reminder Boolean
    default=True help='Allow automatically send email to remind your vendor the receipt date' implied_group='purchase.group_send_reminder' args: 'Receipt Reminder'
  • group_warning_purchase Boolean
    implied_group='purchase.group_warning_purchase' args: 'Purchase Warnings'
  • lock_confirmed_po Boolean
    default=<expr> args: 'Lock Confirmed Orders'
  • module_account_3way_match Boolean
    args: '3-way matching: purchases, receptions and bills'
  • module_purchase_product_matrix Boolean
    args: 'Purchase Grid Entry'
  • module_purchase_requisition Boolean
    args: 'Purchase Agreements'
  • po_double_validation Selection
    readonly=False related='company_id.po_double_validation' string='Levels of Approvals *'
  • po_double_validation_amount Monetary
    currency_field='company_currency_id' readonly=False related='company_id.po_double_validation_amount' string='Minimum Amount'
  • po_lead Float
    readonly=False related='company_id.po_lead'
  • po_lock Selection
    readonly=False related='company_id.po_lock' string='Purchase Order Modification *'
  • po_order_approval Boolean
    default=<expr> args: 'Purchase Order Approval'
  • use_po_lead Boolean
    config_parameter='purchase.use_po_lead' help='Margin of error for vendor lead times. When the system generates Purchase Orders for reordering products,they will be scheduled that many days earlier to cope with unexpected vendor delays.' string='Security Lead Time for Purchase'
Public methods (1)
  • set_values(self)

New fields (7)
  • buyer_id Many2one → res.users
    string='Buyer' args: 'res.users'
  • property_purchase_currency_id Many2one → res.currency
    company_dependent=True help='This currency will be used, instead of the default one, for purchases from the current partner' string='Supplier Currency' args: 'res.currency'
  • purchase_order_count Integer
    compute='_compute_purchase_order_count' groups='purchase.group_purchase_user' string='Purchase Order Count'
  • purchase_warn Selection
    default='no-message' help=WARNING_HELP args: WARNING_MESSAGE, 'Purchase Order Warning'
  • purchase_warn_msg Text
    args: 'Message for Purchase Order'
  • receipt_reminder_email Boolean
    company_dependent=True help='Automatically send a confirmation email to the vendor X days before the expected receipt date, asking him to confirm the exact date.' args: 'Receipt Reminder'
  • reminder_date_before_receipt Integer
    company_dependent=True help='Number of days to send reminder email before the promised receipt date' args: 'Days Before Receipt'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/17.0/purchase
VERSION
VERSION 1.2
CATEGORY
CATEGORYInventory/Purchase
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Fabien Pinckaers, Thibault Delavallée, Christophe Simonis, Xavier Morel, Goffin Simon, Nicolas Lempereur, qdp-odoo, Géry Debongnie, Aaron Bohy, Damien Bouvy, Yannick Tivisse, Odoo Online, Pierre Masereel, Jorge Pinna Puissant, Arnold Moyaux, Xavier-Do, Romeo Fragomeli, Victor Feyens, Andrea Grazioso (agr-odoo), Adrien Dieudonné, William Henrotin, Joseph Caburnay, Julien Mougenot, Anh Thao Pham (pta), svs-odoo, Samuel Degueldre, Achraf (abz), Nasreddin Boulif (bon), Touati Djamel (otd), Prakash Prajapati, Tiffany Chang (tic), Rémy Voet (ryv), Gorash, Pierre Paridans, roen-odoo, Hubert Van de Walle (huvw), Ricardo Gomes Rodrigues (rigr), william-andre, David (dafr), JF Aubert, yhu-odoo, bat-odoo, Nshimiyimana Séna, Louis Baudoux, Walid HANNICHE (waha), Yolann Sabaux, Abdelouahab (abla), Thibault Libioulle, gawa-odoo, Demesmaeker, Renaud Thiry, niyasraphy, jbw-odoo, nda-odoo, Habib (ayh), mehjabinfarsana, alsh-odoo, Matheus Leal Viana (malv), Louis Wicket (wil), Walid, Adrien Widart (awt), Maximilien (malb), Victor Piryns (pivi), Hamza (hisl), Pierre-Yves Dufays, clesgow, Djamel Touati, Yosua Nicolaus, Om Rabara, Levi Siuzdak (sile), Maruan Aguerdouh (magm), Antoine Boonen, Dylan Kiss (dyki), Hansun (hale), Antoine (ande), ノウラ, Maitri Patel, FrancoisGe, Michael (mcm), tong-odoo, Anita (anko), Xavier Bol (xbo), Brieuc-brd, Paweł Fertyk, AH-Yussef, Sarah Bellefroid, Mattis Megevand (mmeg), Joris Makauskis, Walid (wasa), guva-odoo, Hesham, Ethan Vincent, Mathieu (mcou), lase@odoo.com, bary, Maryam Kia, Sven Fuehr, AMZIL Ayoub, yosa-odoo, Nathaniel (naja), Cyril Dutrieux (cydu), det, Julien Carion (juca), Louis Gobert, Chrysanthe (chgo), Louis (wil), Aungkokolin1997, Hussein Ebrahim(hyhe), thle-odoo, Xavier Luyckx (xlu), dhha-odoo, gteboul, German Loredo [Vauxoo], Ricardo Gomes Rodrigues, Kawtar Drissi El Bouzaidi (kdeb), Arthur Nanson, David Van Droogenbroeck (DROD), Cuong, Nguyen Minh Tran Manh, Morgane (morm), Boullé Benjamin (bebo), elhayyany, djameltouati, Pierre Lamotte (pila), Pierre Pulinckx (pipu), Bastien PIERRE, Corentin Heinix (cohe), Bastien (bvdn), Tejas Modi, plha-odoo, Omar (OSAH), Pulinckx Pierre (PIPU), Arthur Jochems (ajoc), sbel-odoo, Michel Jacquemin (mija), lrizzi1
WEBSITE
WEBSITEhttps://www.odoo.com/app/purchase
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:02:06
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (55)
XML IDNameModelTypeStatus
account_analytic_account_view_form_purchase account.analytic.account.form.purchase account.analytic.account div Inherits analytic.view_account_analytic_account_form
document_tax_totals document_tax_totals ir.ui.view qweb Inherits account.document_tax_totals_template
portal_my_home_menu_purchase Portal layout : purchase menu entries ir.ui.view qweb Inherits portal.portal_breadcrumbs
portal_my_home_purchase Show Requests for Quotation / Purchase Orders ir.ui.view qweb Inherits portal.portal_my_home
portal_my_purchase_order Purchase Order ir.ui.view qweb Inherits portal.portal_sidebar
portal_my_purchase_order_update_date Portal: My Purchase Order Update Dates ir.ui.view qweb Inherits purchase.portal_my_purchase_order
portal_my_purchase_orders My Purchase Orders ir.ui.view qweb New
portal_my_purchase_rfqs My Requests For Quotation ir.ui.view qweb New
product_normal_form_view_inherit_purchase product.product.purchase.order product.product div Inherits product.product_normal_form_view
product_packaging_form_view_purchase product.packaging.form.view.purchase product.packaging xpath Inherits product.product_packaging_form_view
product_packaging_tree_view_purchase product.packaging.tree.view.purchase product.packaging xpath Inherits product.product_packaging_tree_view
product_supplierinfo_tree_view2 product.supplierinfo.tree.view2 product.supplierinfo xpath Inherits product.product_supplierinfo_tree_view
product_template_search_view_purchase product.template.search.purchase product.template xpath Inherits product.product_template_search_view
product_view_kanban_catalog_purchase_only product.view.kanban.catalog.purchase product.product field Inherits product.product_view_kanban_catalog
product_view_search_catalog product.view.search.catalog.inherit.purchase product.product xpath Inherits product.product_view_search_catalog
purchase_history_tree purchase.history.tree purchase.order.line tree New
purchase_order_calendar purchase.order.calendar purchase.order calendar New
purchase_order_form purchase.order.form purchase.order form New
purchase_order_graph purchase.order.graph purchase.order graph New
purchase_order_kpis_tree purchase.order.inherit.purchase.order.tree purchase.order tree New
purchase_order_line_form2 purchase.order.line.form2 purchase.order.line form New
purchase_order_line_search purchase.order.line.search purchase.order.line search New
purchase_order_line_tree purchase.order.line.tree purchase.order.line tree New
purchase_order_pivot purchase.order.pivot purchase.order pivot New
purchase_order_portal_content Purchase Order Portal Content ir.ui.view qweb New
purchase_order_portal_content_totals_table purchase_order_portal_content_totals_table ir.ui.view qweb New
purchase_order_tree purchase.order.tree purchase.order tree New
purchase_order_view_activity purchase.order.activity purchase.order activity New
purchase_order_view_kanban_without_dashboard purchase.order.view.kanban.without.dashboard purchase.order xpath Inherits purchase.view_purchase_order_kanban
purchase_order_view_search purchase.order.select purchase.order search New
purchase_order_view_tree purchase.order.view.tree purchase.order tree New
purchase_partner_kanban_view res.partner.kanban.purchaseorder.inherit res.partner field Inherits base.res_partner_kanban_view
purchase_report_view_tree purchase.report.view.tree purchase.report tree New
report_purchaseorder report_purchaseorder ir.ui.view qweb New
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb New
report_purchasequotation report_purchasequotation ir.ui.view qweb New
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb New
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits base.res_config_settings_view_form
res_partner_view_purchase_account_buttons res.partner.view.purchase.account.buttons res.partner div Inherits base.view_partner_form
res_partner_view_purchase_buttons res.partner.view.purchase.buttons res.partner div Inherits base.view_partner_form
track_po_line_qty_received_template track_po_line_qty_received_template ir.ui.view qweb New
track_po_line_template track_po_line_template ir.ui.view qweb New
view_move_form_inherit_purchase account.move.inherit.purchase account.move field Inherits account.view_move_form
view_partner_property_form res.partner.purchase.property.form.inherit res.partner group Inherits base.view_partner_form
view_product_account_purchase_ok_form product.template.account.purchase.ok.form.inherit product.template field Inherits account.product_template_form_view
view_product_product_supplier_inherit product.product.form product.product field Inherits product.product_normal_form_view
view_product_supplier_inherit product.template.supplier.form.inherit product.template xpath Inherits product.product_template_form_view
view_product_template_purchase_buttons_from product.template.purchase.button.inherit product.template div Inherits product.product_template_only_form_view
view_purchase_bill_union_filter purchase.bill.union.select purchase.bill.union search New
view_purchase_bill_union_tree purchase.bill.union.tree purchase.bill.union tree New
view_purchase_order_filter request.quotation.select purchase.order search New
view_purchase_order_graph product.month.graph purchase.report graph New
view_purchase_order_kanban purchase.order.kanban purchase.order kanban New
view_purchase_order_pivot product.month.pivot purchase.report pivot New
view_purchase_order_search report.purchase.order.search purchase.report search New
Models touched (19)

New fields (1)
  • purchase_order_count Integer
    compute='_compute_purchase_order_count' args: 'Purchase Order Count'
Public methods (1)
  • action_view_purchase_orders(self)

New fields (1)
  • business_domain Selection
    ondelete={'purchase_order': 'cascade'} selection_add=[('purchase_order', 'Purchase Order')]
Public methods (0)

No public methods.

New fields (3)
  • purchase_id Many2one → purchase.order
    help='Auto-complete from a past purchase order.' readonly=False store=False string='Purchase Order' args: 'purchase.order'
  • purchase_order_count Integer
    compute='_compute_origin_po_count' string='Purchase Order Count'
  • purchase_vendor_bill_id Many2one → purchase.bill.union
    help='Auto-complete from a past bill / purchase order.' readonly=False store=False string='Auto-complete' args: 'purchase.bill.union'
Public methods (3)
  • action_view_source_purchase_orders(self)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

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

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • purchase Boolean
    default=True help='If true, the packaging can be used for purchase orders' args: 'Purchase'
Public methods (0)

No public methods.

New fields (1)
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' digits='Product Unit of Measure' string='Purchased'
Public methods (1)
  • action_view_po(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • purchase_line_warn Selection
    default='no-message' help=WARNING_HELP required=True args: WARNING_MESSAGE, 'Purchase Order Line Warning'
  • purchase_line_warn_msg Text
    args: 'Message for Purchase Order Line'
  • purchase_method Selection
    compute='_compute_purchase_method' default='receive' help='On ordered quantities: Control bills based on ordered quantities.\nOn received quantities: Control bills based on received quantities.' readonly=False store=True string='Control Policy' args: [('purchase', 'On ordered quantities'), ('receive', 'On received quantities')]
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' digits='Product Unit of Measure' string='Purchased'
Public methods (2)
  • action_view_po(self)
  • get_import_templates(self)
    @api.model

New fields (9)
  • amount Float
    readonly=True string='Amount'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • currency_id Many2one → res.currency
    readonly=True string='Currency' args: 'res.currency'
  • date Date
    readonly=True string='Date'
  • name Char
    readonly=True string='Reference'
  • partner_id Many2one → res.partner
    readonly=True string='Vendor' args: 'res.partner'
  • purchase_order_id Many2one → purchase.order
    readonly=True string='Purchase Order' args: 'purchase.order'
  • reference Char
    readonly=True string='Source'
  • vendor_bill_id Many2one → account.move
    readonly=True string='Vendor Bill' args: 'account.move'
Public methods (1)
  • init(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (35)
  • amount_tax Monetary
    compute='_amount_all' readonly=True store=True string='Taxes'
  • amount_total Monetary
    compute='_amount_all' readonly=True store=True string='Total'
  • amount_untaxed Monetary
    compute='_amount_all' readonly=True store=True string='Untaxed Amount' tracking=True
  • company_id Many2one → res.company
    default=<expr> index=True required=True args: 'res.company', 'Company'
  • country_code Char
    related='company_id.account_fiscal_country_id.code' string='Country code'
  • currency_id Many2one → res.currency
    default=<expr> required=True args: 'res.currency', 'Currency'
  • currency_rate Float
    compute='_compute_currency_rate' compute_sudo=True help='Ratio between the purchase order currency and the company currency' readonly=True store=True args: 'Currency Rate'
  • date_approve Datetime
    copy=False index=True readonly=True args: 'Confirmation Date'
  • date_calendar_start Datetime
    compute='_compute_date_calendar_start' readonly=True store=True
  • date_order Datetime
    copy=False default=fields.Datetime.now help='Depicts the date within which the Quotation should be confirmed and converted into a purchase order.' index=True required=True args: 'Order Deadline'
  • date_planned Datetime
    compute='_compute_date_planned' copy=False help='Delivery date promised by vendor. This date is used to determine expected arrival of products.' index=True readonly=False store=True string='Expected Arrival'
  • dest_address_id Many2one → res.partner
    check_company=True help='Put an address if you want to deliver directly from the vendor to the customer. Otherwise, keep empty to deliver to your own company.' string='Dropship Address' args: 'res.partner'
  • fiscal_position_id Many2one → account.fiscal.position
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" string='Fiscal Position' args: 'account.fiscal.position'
  • incoterm_id Many2one → account.incoterms
    help='International Commercial Terms are a series of predefined commercial terms used in international transactions.' args: 'account.incoterms', 'Incoterm'
  • invoice_count Integer
    compute='_compute_invoice' copy=False default=0 store=True string='Bill Count'
  • invoice_ids Many2many → account.move
    compute='_compute_invoice' copy=False store=True string='Bills' args: 'account.move'
  • invoice_status Selection
    compute='_get_invoiced' copy=False default='no' readonly=True store=True string='Billing Status' args: [('no', 'Nothing to Bill'), ('to invoice', 'Waiting Bills'), ('invoiced', 'Fully Billed')]
  • mail_reception_confirmed Boolean
    copy=False default=False help='True if PO reception is confirmed by the vendor.' readonly=True args: 'Reception Confirmed'
  • mail_reminder_confirmed Boolean
    copy=False default=False help='True if the reminder email is confirmed by the vendor.' readonly=True args: 'Reminder Confirmed'
  • name Char
    copy=False default='New' index='trigram' required=True args: 'Order Reference'
  • notes Html
    args: 'Terms and Conditions'
  • order_line One2many → purchase.order.line
    copy=True string='Order Lines' args: 'purchase.order.line', 'order_id'
  • origin Char
    copy=False help='Reference of the document that generated this purchase order request (e.g. a sales order)' args: 'Source Document'
  • partner_id Many2one → res.partner
    change_default=True check_company=True help='You can find a vendor by its Name, TIN, Email or Internal Reference.' required=True string='Vendor' tracking=True args: 'res.partner'
  • partner_ref Char
    copy=False help="Reference of the sales order or bid sent by the vendor. It's used to do the matching when you receive the products as this reference is usually written on the delivery order sent by your vendor." args: 'Vendor Reference'
  • payment_term_id Many2one → account.payment.term
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" args: 'account.payment.term', 'Payment Terms'
  • priority Selection
    default='0' index=True args: [('0', 'Normal'), ('1', 'Urgent')], 'Priority'
  • product_id Many2one → product.product
    related='order_line.product_id' string='Product' args: 'product.product'
  • receipt_reminder_email Boolean
    compute='_compute_receipt_reminder_email' args: 'Receipt Reminder Email'
  • reminder_date_before_receipt Integer
    compute='_compute_receipt_reminder_email' args: 'Days Before Receipt'
  • state Selection
    copy=False default='draft' index=True readonly=True string='Status' tracking=True args: [('draft', 'RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Locked'), ('cancel', 'Cancelled')]
  • tax_calculation_rounding_method Selection
    readonly=True related='company_id.tax_calculation_rounding_method' string='Tax calculation rounding method'
  • tax_country_id Many2one → res.country
    comodel_name='res.country' compute='_compute_tax_country_id' compute_sudo=True help='Technical field to filter the available taxes depending on the fiscal country and fiscal position.'
  • tax_totals Binary
    compute='_compute_tax_totals' exportable=False
  • user_id Many2one → res.users
    check_company=True default=<expr> index=True string='Buyer' tracking=True args: 'res.users'
Public methods (25)
  • action_create_invoice(self)
    Create the invoice associated to the PO.
  • action_rfq_send(self)
    This function opens a window to compose an email, with the edi purchase template message loaded by default
  • action_view_invoice(self, invoices=False)
    This function returns an action that display existing vendor bills of given purchase order ids. When only one found, show the vendor bill immediately.
  • button_approve(self, force=False)
  • button_cancel(self)
  • button_confirm(self)
  • button_done(self)
  • button_draft(self)
  • button_unlock(self)
  • confirm_reminder_mail(self, confirmed_date=False)
  • copy(self, default=None)
  • create(self, vals_list)
    @api.model_create_multi
  • get_confirm_url(self, confirm_type=None)
    Create url for confirm reminder or purchase reception email for sending in mail.
  • get_localized_date_planned(self, date_planned=False)
    Returns the localized date planned in the timezone of the order's user or the company's partner or UTC if none of them are set.
  • get_order_timezone(self)
    Returns the timezone of the order's user or the company's partner or UTC if none of them are set.
  • get_update_url(self)
    Create portal url for user to update the scheduled date on purchase order lines.
  • message_post(self, **kwargs)
    @api.returns('mail.message', <expr>)
  • onchange(self, values, field_names, fields_spec)
    Override onchange to NOT update all date_planned on PO lines when date_planned on PO is updated by the change of date_planned on PO lines.
  • onchange_date_planned(self)
    @api.onchange('date_planned')
  • onchange_partner_id(self)
    @api.onchange('partner_id', 'company_id')
  • onchange_partner_id_warning(self)
    @api.onchange('partner_id')
  • print_quotation(self)
  • retrieve_dashboard(self)
    @api.model
    This function returns the values to populate the custom dashboard in the purchase order views.
  • send_reminder_preview(self)
  • write(self, vals)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (33)
  • company_id Many2one → res.company
    readonly=True related='order_id.company_id' store=True string='Company' args: 'res.company'
  • currency_id Many2one
    readonly=True related='order_id.currency_id' store=True string='Currency'
  • date_approve Datetime
    readonly=True related='order_id.date_approve' string='Confirmation Date'
  • date_order Datetime
    readonly=True related='order_id.date_order' string='Order Date'
  • date_planned Datetime
    compute='_compute_price_unit_and_date_planned_and_name' help="Delivery date expected from vendor. This date respectively defaults to vendor pricelist lead time then today's date." index=True readonly=False store=True string='Expected Arrival'
  • discount Float
    compute='_compute_price_unit_and_date_planned_and_name' digits='Discount' readonly=False store=True string='Discount (%)'
  • display_type Selection
    default=False help='Technical field for UX purpose.' args: [('line_section', 'Section'), ('line_note', 'Note')]
  • invoice_lines One2many → account.move.line
    copy=False readonly=True string='Bill Lines' args: 'account.move.line', 'purchase_line_id'
  • name Text
    compute='_compute_price_unit_and_date_planned_and_name' readonly=False required=True store=True string='Description'
  • order_id Many2one → purchase.order
    index=True ondelete='cascade' required=True string='Order Reference' args: 'purchase.order'
  • partner_id Many2one → res.partner
    index='btree_not_null' readonly=True related='order_id.partner_id' store=True string='Partner' args: 'res.partner'
  • price_subtotal Monetary
    compute='_compute_amount' store=True string='Subtotal'
  • price_tax Float
    compute='_compute_amount' store=True string='Tax'
  • price_total Monetary
    compute='_compute_amount' store=True string='Total'
  • price_unit Float
    compute='_compute_price_unit_and_date_planned_and_name' digits='Product Price' readonly=False required=True store=True string='Unit Price'
  • price_unit_discounted Float
    compute='_compute_price_unit_discounted' args: 'Unit Price (Discounted)'
  • product_id Many2one → product.product
    change_default=True domain=[('purchase_ok', '=', True)] index='btree_not_null' string='Product' args: 'product.product'
  • product_packaging_id Many2one → product.packaging
    check_company=True compute='_compute_product_packaging_id' domain="[('purchase', '=', True), ('product_id', '=', product_id)]" readonly=False store=True string='Packaging' args: 'product.packaging'
  • product_packaging_qty Float
    compute='_compute_product_packaging_qty' readonly=False store=True args: 'Packaging Quantity'
  • product_qty Float
    compute='_compute_product_qty' digits='Product Unit of Measure' readonly=False required=True store=True string='Quantity'
  • product_type Selection
    readonly=True related='product_id.detailed_type'
  • product_uom Many2one → uom.uom
    domain="[('category_id', '=', product_uom_category_id)]" string='Unit of Measure' args: 'uom.uom'
  • product_uom_category_id Many2one
    related='product_id.uom_id.category_id'
  • product_uom_qty Float
    compute='_compute_product_uom_qty' store=True string='Total Quantity'
  • qty_invoiced Float
    compute='_compute_qty_invoiced' digits='Product Unit of Measure' store=True string='Billed Qty'
  • qty_received Float
    compute='_compute_qty_received' compute_sudo=True digits='Product Unit of Measure' inverse='_inverse_qty_received' store=True args: 'Received Qty'
  • qty_received_manual Float
    copy=False digits='Product Unit of Measure' args: 'Manual Received Qty'
  • qty_received_method Selection
    compute='_compute_qty_received_method' help='According to product configuration, the received quantity can be automatically computed by mechanism:\n - Manual: the quantity is set manually on the line\n - Stock Moves: the quantity comes from confirmed pickings\n' store=True string='Received Qty Method' args: [('manual', 'Manual')]
  • qty_to_invoice Float
    compute='_compute_qty_invoiced' digits='Product Unit of Measure' readonly=True store=True string='To Invoice Quantity'
  • sequence Integer
    default=10 string='Sequence'
  • state Selection
    related='order_id.state' store=True
  • tax_calculation_rounding_method Selection
    readonly=True related='company_id.tax_calculation_rounding_method' string='Tax calculation rounding method'
  • taxes_id Many2many → account.tax
    context={'active_test': False} string='Taxes' args: 'account.tax'
Public methods (6)
  • action_add_from_catalog(self)
  • action_purchase_history(self)
  • create(self, vals_list)
    @api.model_create_multi
  • onchange_product_id(self)
    @api.onchange('product_id')
  • onchange_product_id_warning(self)
    @api.onchange('product_id')
  • write(self, values)

New fields (27)
  • category_id Many2one → product.category
    readonly=True args: 'product.category', 'Product Category'
  • commercial_partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Commercial Entity'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • country_id Many2one → res.country
    readonly=True args: 'res.country', 'Partner Country'
  • currency_id Many2one → res.currency
    readonly=True args: 'res.currency', 'Currency'
  • date_approve Datetime
    readonly=True args: 'Confirmation Date'
  • date_order Datetime
    readonly=True args: 'Order Date'
  • delay Float
    digits=(16, 2) group_operator='avg' help='Amount of time between purchase approval and order by date.' readonly=True args: 'Days to Confirm'
  • delay_pass Float
    digits=(16, 2) group_operator='avg' help='Amount of time between date planned and order by date for each purchase order line.' readonly=True args: 'Days to Receive'
  • fiscal_position_id Many2one → account.fiscal.position
    readonly=True string='Fiscal Position' args: 'account.fiscal.position'
  • nbr_lines Integer
    readonly=True args: '# of Lines'
  • order_id Many2one → purchase.order
    readonly=True args: 'purchase.order', 'Order'
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Vendor'
  • price_average Float
    digits='Product Price' group_operator='avg' readonly=True args: 'Average Cost'
  • price_total Float
    readonly=True args: 'Total'
  • product_id Many2one → product.product
    readonly=True args: 'product.product', 'Product'
  • product_tmpl_id Many2one → product.template
    readonly=True args: 'product.template', 'Product Template'
  • product_uom Many2one → uom.uom
    required=True args: 'uom.uom', 'Reference Unit of Measure'
  • qty_billed Float
    readonly=True args: 'Qty Billed'
  • qty_ordered Float
    readonly=True args: 'Qty Ordered'
  • qty_received Float
    readonly=True args: 'Qty Received'
  • qty_to_be_billed Float
    readonly=True args: 'Qty to be Billed'
  • state Selection
    readonly=True args: [('draft', 'Draft RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status'
  • untaxed_total Float
    readonly=True args: 'Untaxed Total'
  • user_id Many2one → res.users
    readonly=True args: 'res.users', 'Buyer'
  • volume Float
    readonly=True args: 'Volume'
  • weight Float
    readonly=True args: 'Gross Weight'
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 price of product.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • po_double_validation Selection
    default='one_step' help='Provide a double validation mechanism for purchases' string='Levels of Approvals' args: [('one_step', 'Confirm purchase orders in one step'), ('two_step', 'Get 2 levels of approvals to confirm a purchase order')]
  • po_double_validation_amount Monetary
    default=5000 help='Minimum amount for which a double validation is required' string='Double validation amount'
  • po_lead Float
    default=0.0 help='Margin of error for vendor lead times. When the system generates Purchase Orders for procuring products, they will be scheduled that many days earlier to cope with unexpected vendor delays.' required=True string='Purchase Lead Time'
  • po_lock Selection
    default='edit' help='Purchase Order Modification used when you want to purchase order editable after confirm' string='Purchase Order Modification' args: [('edit', 'Allow to edit purchase orders'), ('lock', 'Confirmed purchase orders are not editable')]
Public methods (0)

No public methods.

New fields (14)
  • company_currency_id Many2one → res.currency
    readonly=True related='company_id.currency_id' string='Company Currency' args: 'res.currency'
  • default_purchase_method Selection
    default='receive' default_model='product.template' help='This default value is applied to any new product created. This can be changed in the product detail form.' string='Bill Control' args: [('purchase', 'Ordered quantities'), ('receive', 'Received quantities')]
  • group_send_reminder Boolean
    default=True help='Allow automatically send email to remind your vendor the receipt date' implied_group='purchase.group_send_reminder' args: 'Receipt Reminder'
  • group_warning_purchase Boolean
    implied_group='purchase.group_warning_purchase' args: 'Purchase Warnings'
  • lock_confirmed_po Boolean
    default=<expr> args: 'Lock Confirmed Orders'
  • module_account_3way_match Boolean
    args: '3-way matching: purchases, receptions and bills'
  • module_purchase_product_matrix Boolean
    args: 'Purchase Grid Entry'
  • module_purchase_requisition Boolean
    args: 'Purchase Agreements'
  • po_double_validation Selection
    readonly=False related='company_id.po_double_validation' string='Levels of Approvals *'
  • po_double_validation_amount Monetary
    currency_field='company_currency_id' readonly=False related='company_id.po_double_validation_amount' string='Minimum Amount'
  • po_lead Float
    readonly=False related='company_id.po_lead'
  • po_lock Selection
    readonly=False related='company_id.po_lock' string='Purchase Order Modification *'
  • po_order_approval Boolean
    default=<expr> args: 'Purchase Order Approval'
  • use_po_lead Boolean
    config_parameter='purchase.use_po_lead' help='Margin of error for vendor lead times. When the system generates Purchase Orders for reordering products,they will be scheduled that many days earlier to cope with unexpected vendor delays.' string='Security Lead Time for Purchase'
Public methods (1)
  • set_values(self)

New fields (7)
  • buyer_id Many2one → res.users
    string='Buyer' args: 'res.users'
  • property_purchase_currency_id Many2one → res.currency
    company_dependent=True help='This currency will be used, instead of the default one, for purchases from the current partner' string='Supplier Currency' args: 'res.currency'
  • purchase_order_count Integer
    compute='_compute_purchase_order_count' string='Purchase Order Count'
  • purchase_warn Selection
    default='no-message' help=WARNING_HELP args: WARNING_MESSAGE, 'Purchase Order Warning'
  • purchase_warn_msg Text
    args: 'Message for Purchase Order'
  • receipt_reminder_email Boolean
    company_dependent=True default=False help='Automatically send a confirmation email to the vendor X days before the expected receipt date, asking him to confirm the exact date.' args: 'Receipt Reminder'
  • reminder_date_before_receipt Integer
    company_dependent=True default=1 help='Number of days to send reminder email before the promised receipt date' args: 'Days Before Receipt'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/16.0/purchase
VERSION
VERSION 1.2
CATEGORY
CATEGORYInventory/Purchase
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Fabien Pinckaers, Thibault Delavallée, Denis Ledoux, Christophe Simonis, Goffin Simon, Nicolas Lempereur, Thibault Francois, qdp-odoo, Géry Debongnie, GitHub, Damien Bouvy, Yannick Tivisse, Laurent Smet, Arnold Moyaux, wan, Julien Castiaux, Xavier-Do, Romeo Fragomeli, Victor Feyens, Andrea Grazioso (agr-odoo), Daniel Reis, William Henrotin, oco-odoo, Anh Thao Pham (pta), svs-odoo, Alvaro Fuentes, Achraf (abz), Adrien Widart, Nasreddin Boulif (bon), Touati Djamel (otd), Tiffany Chang (tic), Rémy Voet (ryv), Gorash, Pierre Paridans, jbw, Aurélien (avd), root, Romain Estievenart, Richard deMeester, roen-odoo, Hubert Van de Walle (huvw), Nicolas (vin), william-andre, Paolo (pgi), Florian Damhaut, David (dafr), JF Aubert, yhu-odoo, mafo-odoo, Didier (did), aliya, william, Florian Vranckx, Florian Charlier, Patrick Hoste, anhe-odoo, Nshimiyimana Séna, Louis Baudoux, Walid HANNICHE (waha), Yolann Sabaux, Abdelouahab (abla), Pouya Malekinejad, Thomas Beckers, Adrien Minet, Antoine Vandevenne (anv), Thibault Libioulle, Jinjiu Liu, gawa-odoo, Dossogne Bertrand, niyasraphy, nda-odoo, Habib (ayh), mehjabinfarsana, alsh-odoo, Matheus Leal Viana (malv), Louis Wicket (wil), Walid, Adrien Widart (awt), Maximilien (malb), Victor Piryns (pivi), Hamza (hisl), Pierre-Yves Dufays, clesgow, Djamel Touati, Om Rabara, Levi Siuzdak (sile), Maruan Aguerdouh (magm), Hansun (hale), Sébastien Geelen (sge), smdc-odoo, Antoine (ande), ノウラ, hoangtiendung, Maitri Patel, Benjamin Willig, Paweł Fertyk, Ahmed Khalaf (ahkh), AH-Yussef, Dawn Hwang, Mattis Megevand (mmeg), Joris Makauskis, guva-odoo, Ethan Vincent, Mathieu (mcou), bary, AMZIL Ayoub, Nathaniel (naja), Cyril Dutrieux (cydu), det, Tanguy Quéguineur, Martin Trigaux (mat), Aungkokolin1997, Majed Alhanash (malh), thle-odoo, dhha-odoo, Ricardo Gomes Rodrigues, Kawtar Drissi El Bouzaidi (kdeb), Arthur Nanson, Dardenne Florent (dafl), Cuong, Nguyen Minh Tran Manh, Morgane (morm), Boullé Benjamin (bebo), elhayyany
WEBSITE
WEBSITEhttps://www.odoo.com/app/purchase
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:48
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (50)
XML IDNameModelTypeStatus
account_analytic_account_view_form_purchase account.analytic.account.form.purchase account.analytic.account div Inherits analytic.view_account_analytic_account_form
portal_my_home_menu_purchase Portal layout : purchase menu entries ir.ui.view qweb Inherits portal.portal_breadcrumbs
portal_my_home_purchase Show Requests for Quotation / Purchase Orders ir.ui.view qweb Inherits portal.portal_my_home
portal_my_purchase_order Purchase Order Portal Template ir.ui.view qweb Inherits portal.portal_sidebar
portal_my_purchase_order_update_date Portal: My Purchase Order Update Dates ir.ui.view qweb Inherits purchase.portal_my_purchase_order
portal_my_purchase_orders My Purchase Orders ir.ui.view qweb New
portal_my_purchase_rfqs My Requests For Quotation ir.ui.view qweb New
product_normal_form_view_inherit_purchase product.product.purchase.order product.product div Inherits product.product_normal_form_view
product_packaging_form_view_purchase product.packaging.form.view.purchase product.packaging xpath Inherits product.product_packaging_form_view
product_packaging_tree_view_purchase product.packaging.tree.view.purchase product.packaging xpath Inherits product.product_packaging_tree_view
product_supplierinfo_tree_view2 product.supplierinfo.tree.view2 product.supplierinfo xpath Inherits product.product_supplierinfo_tree_view
purchase_history_tree purchase.history.tree purchase.order.line tree New
purchase_order_calendar purchase.order.calendar purchase.order calendar New
purchase_order_form purchase.order.form purchase.order form New
purchase_order_graph purchase.order.graph purchase.order graph New
purchase_order_kpis_tree purchase.order.inherit.purchase.order.tree purchase.order tree New
purchase_order_line_form2 purchase.order.line.form2 purchase.order.line form New
purchase_order_line_search purchase.order.line.search purchase.order.line search New
purchase_order_line_tree purchase.order.line.tree purchase.order.line tree New
purchase_order_pivot purchase.order.pivot purchase.order pivot New
purchase_order_portal_content Purchase Order Portal Content ir.ui.view qweb New
purchase_order_portal_content_totals_table purchase_order_portal_content_totals_table ir.ui.view qweb New
purchase_order_tree purchase.order.tree purchase.order tree New
purchase_order_view_activity purchase.order.activity purchase.order activity New
purchase_order_view_kanban_without_dashboard purchase.order.view.kanban.without.dashboard purchase.order xpath Inherits purchase.view_purchase_order_kanban
purchase_order_view_search purchase.order.select purchase.order search New
purchase_order_view_tree purchase.order.view.tree purchase.order tree New
purchase_partner_kanban_view res.partner.kanban.purchaseorder.inherit res.partner field Inherits base.res_partner_kanban_view
purchase_report_view_tree purchase.report.view.tree purchase.report tree New
report_purchaseorder report_purchaseorder ir.ui.view qweb New
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb New
report_purchasequotation report_purchasequotation ir.ui.view qweb New
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb New
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits base.res_config_settings_view_form
res_partner_view_purchase_account_buttons res.partner.view.purchase.account.buttons res.partner div Inherits base.view_partner_form
res_partner_view_purchase_buttons res.partner.view.purchase.buttons res.partner div Inherits base.view_partner_form
track_po_line_qty_received_template track_po_line_qty_received_template ir.ui.view qweb New
track_po_line_template track_po_line_template ir.ui.view qweb New
view_move_form_inherit_purchase account.move.inherit.purchase account.move field Inherits account.view_move_form
view_partner_property_form res.partner.purchase.property.form.inherit res.partner group Inherits base.view_partner_form
view_product_account_purchase_ok_form product.template.account.purchase.ok.form.inherit product.template field Inherits account.product_template_form_view
view_product_supplier_inherit product.template.supplier.form.inherit product.template xpath Inherits product.product_template_form_view
view_product_template_purchase_buttons_from product.template.purchase.button.inherit product.template div Inherits product.product_template_only_form_view
view_purchase_bill_union_filter purchase.bill.union.select purchase.bill.union search New
view_purchase_bill_union_tree purchase.bill.union.tree purchase.bill.union tree New
view_purchase_order_filter request.quotation.select purchase.order search New
view_purchase_order_graph product.month.graph purchase.report graph New
view_purchase_order_kanban purchase.order.kanban purchase.order kanban New
view_purchase_order_pivot product.month.pivot purchase.report pivot New
view_purchase_order_search report.purchase.order.search purchase.report search New
Models touched (19)

New fields (1)
  • purchase_order_count Integer
    compute='_compute_purchase_order_count' args: 'Purchase Order Count'
Public methods (1)
  • action_view_purchase_orders(self)

New fields (1)
  • business_domain Selection
    ondelete={'purchase_order': 'cascade'} selection_add=[('purchase_order', 'Purchase Order')]
Public methods (0)

No public methods.

New fields (3)
  • purchase_id Many2one → purchase.order
    help='Auto-complete from a past purchase order.' readonly=True states={'draft': [('readonly', False)]} store=False string='Purchase Order' args: 'purchase.order'
  • purchase_order_count Integer
    compute='_compute_origin_po_count' string='Purchase Order Count'
  • purchase_vendor_bill_id Many2one → purchase.bill.union
    help='Auto-complete from a past bill / purchase order.' readonly=True states={'draft': [('readonly', False)]} store=False string='Auto-complete' args: 'purchase.bill.union'
Public methods (4)
  • action_view_source_purchase_orders(self)
  • create(self, vals_list)
    @api.model_create_multi
  • find_matching_subset_invoice_lines(self, invoice_lines, goal_total, timeout)
    The problem of finding the subset of `invoice_lines` which sums up to `goal_total` reduces to the 0-1 Knapsack problem. The dynamic programming approach to solve this problem is most of the time slower than this because identical sub-problems don't arise often enough. It returns the list of invoice lines which sums up to `goal_total` or an empty list if multiple or no solutions were found.
  • write(self, vals)

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

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • purchase Boolean
    default=True help='If true, the packaging can be used for purchase orders' args: 'Purchase'
Public methods (0)

No public methods.

New fields (1)
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' digits='Product Unit of Measure' string='Purchased'
Public methods (1)
  • action_view_po(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • purchase_line_warn Selection
    default='no-message' help=WARNING_HELP required=True args: WARNING_MESSAGE, 'Purchase Order Line Warning'
  • purchase_line_warn_msg Text
    args: 'Message for Purchase Order Line'
  • purchase_method Selection
    compute='_compute_purchase_method' default='receive' help='On ordered quantities: Control bills based on ordered quantities.\nOn received quantities: Control bills based on received quantities.' readonly=False store=True string='Control Policy' args: [('purchase', 'On ordered quantities'), ('receive', 'On received quantities')]
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' digits='Product Unit of Measure' string='Purchased'
Public methods (2)
  • action_view_po(self)
  • get_import_templates(self)
    @api.model

New fields (9)
  • amount Float
    readonly=True string='Amount'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • currency_id Many2one → res.currency
    readonly=True string='Currency' args: 'res.currency'
  • date Date
    readonly=True string='Date'
  • name Char
    readonly=True string='Reference'
  • partner_id Many2one → res.partner
    readonly=True string='Vendor' args: 'res.partner'
  • purchase_order_id Many2one → purchase.order
    readonly=True string='Purchase Order' args: 'purchase.order'
  • reference Char
    readonly=True string='Source'
  • vendor_bill_id Many2one → account.move
    readonly=True string='Vendor Bill' args: 'account.move'
Public methods (2)
  • init(self)
  • name_get(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (34)
  • amount_tax Monetary
    compute='_amount_all' readonly=True store=True string='Taxes'
  • amount_total Monetary
    compute='_amount_all' readonly=True store=True string='Total'
  • amount_untaxed Monetary
    compute='_amount_all' readonly=True store=True string='Untaxed Amount' tracking=True
  • company_id Many2one → res.company
    default=<expr> index=True required=True states=READONLY_STATES args: 'res.company', 'Company'
  • country_code Char
    related='company_id.account_fiscal_country_id.code' string='Country code'
  • currency_id Many2one → res.currency
    default=<expr> required=True states=READONLY_STATES args: 'res.currency', 'Currency'
  • currency_rate Float
    compute='_compute_currency_rate' compute_sudo=True help='Ratio between the purchase order currency and the company currency' readonly=True store=True args: 'Currency Rate'
  • date_approve Datetime
    copy=False index=True readonly=1 args: 'Confirmation Date'
  • date_calendar_start Datetime
    compute='_compute_date_calendar_start' readonly=True store=True
  • date_order Datetime
    copy=False default=fields.Datetime.now help='Depicts the date within which the Quotation should be confirmed and converted into a purchase order.' index=True required=True states=READONLY_STATES args: 'Order Deadline'
  • date_planned Datetime
    compute='_compute_date_planned' copy=False help='Delivery date promised by vendor. This date is used to determine expected arrival of products.' index=True readonly=False store=True string='Expected Arrival'
  • dest_address_id Many2one → res.partner
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" help='Put an address if you want to deliver directly from the vendor to the customer. Otherwise, keep empty to deliver to your own company.' states=READONLY_STATES string='Dropship Address' args: 'res.partner'
  • fiscal_position_id Many2one → account.fiscal.position
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" string='Fiscal Position' args: 'account.fiscal.position'
  • 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'
  • invoice_count Integer
    compute='_compute_invoice' copy=False default=0 store=True string='Bill Count'
  • invoice_ids Many2many → account.move
    compute='_compute_invoice' copy=False store=True string='Bills' args: 'account.move'
  • invoice_status Selection
    compute='_get_invoiced' copy=False default='no' readonly=True store=True string='Billing Status' args: [('no', 'Nothing to Bill'), ('to invoice', 'Waiting Bills'), ('invoiced', 'Fully Billed')]
  • mail_reception_confirmed Boolean
    copy=False default=False help='True if PO reception is confirmed by the vendor.' readonly=True args: 'Reception Confirmed'
  • mail_reminder_confirmed Boolean
    copy=False default=False help='True if the reminder email is confirmed by the vendor.' readonly=True args: 'Reminder Confirmed'
  • name Char
    copy=False default='New' index='trigram' required=True args: 'Order Reference'
  • notes Html
    args: 'Terms and Conditions'
  • order_line One2many → purchase.order.line
    copy=True states={'cancel': [('readonly', True)], 'done': [('readonly', True)]} string='Order Lines' args: 'purchase.order.line', 'order_id'
  • origin Char
    copy=False help='Reference of the document that generated this purchase order request (e.g. a sales order)' args: 'Source Document'
  • partner_id Many2one → res.partner
    change_default=True domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" help='You can find a vendor by its Name, TIN, Email or Internal Reference.' required=True states=READONLY_STATES string='Vendor' tracking=True args: 'res.partner'
  • partner_ref Char
    copy=False help="Reference of the sales order or bid sent by the vendor. It's used to do the matching when you receive the products as this reference is usually written on the delivery order sent by your vendor." args: 'Vendor Reference'
  • payment_term_id Many2one → account.payment.term
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" args: 'account.payment.term', 'Payment Terms'
  • priority Selection
    default='0' index=True args: [('0', 'Normal'), ('1', 'Urgent')], 'Priority'
  • product_id Many2one → product.product
    related='order_line.product_id' string='Product' args: 'product.product'
  • receipt_reminder_email Boolean
    compute='_compute_receipt_reminder_email' args: 'Receipt Reminder Email'
  • reminder_date_before_receipt Integer
    compute='_compute_receipt_reminder_email' args: 'Days Before Receipt'
  • state Selection
    copy=False default='draft' index=True readonly=True string='Status' tracking=True args: [('draft', 'RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Locked'), ('cancel', 'Cancelled')]
  • tax_country_id Many2one → res.country
    comodel_name='res.country' compute='_compute_tax_country_id' compute_sudo=True help='Technical field to filter the available taxes depending on the fiscal country and fiscal position.'
  • tax_totals Binary
    compute='_compute_tax_totals' exportable=False
  • user_id Many2one → res.users
    check_company=True default=<expr> index=True string='Buyer' tracking=True args: 'res.users'
Public methods (26)
  • action_create_invoice(self)
    Create the invoice associated to the PO.
  • action_rfq_send(self)
    This function opens a window to compose an email, with the edi purchase template message loaded by default
  • action_view_invoice(self, invoices=False)
    This function returns an action that display existing vendor bills of given purchase order ids. When only one found, show the vendor bill immediately.
  • button_approve(self, force=False)
  • button_cancel(self)
  • button_confirm(self)
  • button_done(self)
  • button_draft(self)
  • button_unlock(self)
  • confirm_reminder_mail(self, confirmed_date=False)
  • copy(self, default=None)
  • create(self, vals_list)
    @api.model_create_multi
  • get_confirm_url(self, confirm_type=None)
    Create url for confirm reminder or purchase reception email for sending in mail.
  • get_localized_date_planned(self, date_planned=False)
    Returns the localized date planned in the timezone of the order's user or the company's partner or UTC if none of them are set.
  • get_order_timezone(self)
    Returns the timezone of the order's user or the company's partner or UTC if none of them are set.
  • get_update_url(self)
    Create portal url for user to update the scheduled date on purchase order lines.
  • message_post(self, **kwargs)
    @api.returns('mail.message', <expr>)
  • name_get(self)
    @api.depends('name', 'partner_ref')
  • onchange(self, values, field_name, field_onchange)
    Override onchange to NOT to update all date_planned on PO lines when date_planned on PO is updated by the change of date_planned on PO lines.
  • onchange_date_planned(self)
    @api.onchange('date_planned')
  • onchange_partner_id(self)
    @api.onchange('partner_id', 'company_id')
  • onchange_partner_id_warning(self)
    @api.onchange('partner_id')
  • print_quotation(self)
  • retrieve_dashboard(self)
    @api.model
    This function returns the values to populate the custom dashboard in the purchase order views.
  • send_reminder_preview(self)
  • write(self, vals)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (30)
  • company_id Many2one → res.company
    readonly=True related='order_id.company_id' store=True string='Company' args: 'res.company'
  • currency_id Many2one
    readonly=True related='order_id.currency_id' store=True string='Currency'
  • date_approve Datetime
    readonly=True related='order_id.date_approve' string='Confirmation Date'
  • date_order Datetime
    readonly=True related='order_id.date_order' string='Order Date'
  • date_planned Datetime
    compute='_compute_price_unit_and_date_planned_and_name' help="Delivery date expected from vendor. This date respectively defaults to vendor pricelist lead time then today's date." index=True readonly=False store=True string='Expected Arrival'
  • display_type Selection
    default=False help='Technical field for UX purpose.' args: [('line_section', 'Section'), ('line_note', 'Note')]
  • invoice_lines One2many → account.move.line
    copy=False readonly=True string='Bill Lines' args: 'account.move.line', 'purchase_line_id'
  • name Text
    compute='_compute_price_unit_and_date_planned_and_name' readonly=False required=True store=True string='Description'
  • order_id Many2one → purchase.order
    index=True ondelete='cascade' required=True string='Order Reference' args: 'purchase.order'
  • partner_id Many2one → res.partner
    readonly=True related='order_id.partner_id' store=True string='Partner' args: 'res.partner'
  • price_subtotal Monetary
    compute='_compute_amount' store=True string='Subtotal'
  • price_tax Float
    compute='_compute_amount' store=True string='Tax'
  • price_total Monetary
    compute='_compute_amount' store=True string='Total'
  • price_unit Float
    compute='_compute_price_unit_and_date_planned_and_name' digits='Product Price' readonly=False required=True store=True string='Unit Price'
  • product_id Many2one → product.product
    change_default=True domain=[('purchase_ok', '=', True)] index='btree_not_null' string='Product' args: 'product.product'
  • product_packaging_id Many2one → product.packaging
    check_company=True compute='_compute_product_packaging_id' domain="[('purchase', '=', True), ('product_id', '=', product_id)]" readonly=False store=True string='Packaging' args: 'product.packaging'
  • product_packaging_qty Float
    compute='_compute_product_packaging_qty' readonly=False store=True args: 'Packaging Quantity'
  • product_qty Float
    compute='_compute_product_qty' digits='Product Unit of Measure' readonly=False required=True store=True string='Quantity'
  • product_type Selection
    readonly=True related='product_id.detailed_type'
  • product_uom Many2one → uom.uom
    domain="[('category_id', '=', product_uom_category_id)]" string='Unit of Measure' args: 'uom.uom'
  • product_uom_category_id Many2one
    related='product_id.uom_id.category_id'
  • product_uom_qty Float
    compute='_compute_product_uom_qty' store=True string='Total Quantity'
  • qty_invoiced Float
    compute='_compute_qty_invoiced' digits='Product Unit of Measure' store=True string='Billed Qty'
  • qty_received Float
    compute='_compute_qty_received' compute_sudo=True digits='Product Unit of Measure' inverse='_inverse_qty_received' store=True args: 'Received Qty'
  • qty_received_manual Float
    copy=False digits='Product Unit of Measure' args: 'Manual Received Qty'
  • qty_received_method Selection
    compute='_compute_qty_received_method' help='According to product configuration, the received quantity can be automatically computed by mechanism :\n - Manual: the quantity is set manually on the line\n - Stock Moves: the quantity comes from confirmed pickings\n' store=True string='Received Qty Method' args: [('manual', 'Manual')]
  • qty_to_invoice Float
    compute='_compute_qty_invoiced' digits='Product Unit of Measure' readonly=True store=True string='To Invoice Quantity'
  • sequence Integer
    default=10 string='Sequence'
  • state Selection
    related='order_id.state' store=True
  • taxes_id Many2many → account.tax
    context={'active_test': False} string='Taxes' args: 'account.tax'
Public methods (5)
  • action_purchase_history(self)
  • create(self, vals_list)
    @api.model_create_multi
  • onchange_product_id(self)
    @api.onchange('product_id')
  • onchange_product_id_warning(self)
    @api.onchange('product_id')
  • write(self, values)

New fields (28)
  • avg_days_to_purchase Float
    digits=(16, 2) help='Amount of time between purchase approval and document creation 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 Days to Purchase'
  • category_id Many2one → product.category
    readonly=True args: 'product.category', 'Product Category'
  • commercial_partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Commercial Entity'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • country_id Many2one → res.country
    readonly=True args: 'res.country', 'Partner Country'
  • currency_id Many2one → res.currency
    readonly=True args: 'res.currency', 'Currency'
  • date_approve Datetime
    readonly=True args: 'Confirmation Date'
  • date_order Datetime
    readonly=True args: 'Order Date'
  • delay Float
    digits=(16, 2) group_operator='avg' help='Amount of time between purchase approval and order by date.' readonly=True args: 'Days to Confirm'
  • delay_pass Float
    digits=(16, 2) group_operator='avg' help='Amount of time between date planned and order by date for each purchase order line.' readonly=True args: 'Days to Receive'
  • fiscal_position_id Many2one → account.fiscal.position
    readonly=True string='Fiscal Position' args: 'account.fiscal.position'
  • nbr_lines Integer
    readonly=True args: '# of Lines'
  • order_id Many2one → purchase.order
    readonly=True args: 'purchase.order', 'Order'
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Vendor'
  • price_average Float
    digits='Product Price' group_operator='avg' readonly=True args: 'Average Cost'
  • price_total Float
    readonly=True args: 'Total'
  • product_id Many2one → product.product
    readonly=True args: 'product.product', 'Product'
  • product_tmpl_id Many2one → product.template
    readonly=True args: 'product.template', 'Product Template'
  • product_uom Many2one → uom.uom
    required=True args: 'uom.uom', 'Reference Unit of Measure'
  • qty_billed Float
    readonly=True args: 'Qty Billed'
  • qty_ordered Float
    readonly=True args: 'Qty Ordered'
  • qty_received Float
    readonly=True args: 'Qty Received'
  • qty_to_be_billed Float
    readonly=True args: 'Qty to be Billed'
  • state Selection
    readonly=True args: [('draft', 'Draft RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status'
  • untaxed_total Float
    readonly=True args: 'Untaxed Total'
  • user_id Many2one → res.users
    readonly=True args: 'res.users', 'Purchase Representative'
  • volume Float
    readonly=True args: 'Volume'
  • weight Float
    readonly=True args: 'Gross Weight'
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_days_to_purchase.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • po_double_validation Selection
    default='one_step' help='Provide a double validation mechanism for purchases' string='Levels of Approvals' args: [('one_step', 'Confirm purchase orders in one step'), ('two_step', 'Get 2 levels of approvals to confirm a purchase order')]
  • po_double_validation_amount Monetary
    default=5000 help='Minimum amount for which a double validation is required' string='Double validation amount'
  • po_lead Float
    default=0.0 help='Margin of error for vendor lead times. When the system generates Purchase Orders for procuring products, they will be scheduled that many days earlier to cope with unexpected vendor delays.' required=True string='Purchase Lead Time'
  • po_lock Selection
    default='edit' help='Purchase Order Modification used when you want to purchase order editable after confirm' string='Purchase Order Modification' args: [('edit', 'Allow to edit purchase orders'), ('lock', 'Confirmed purchase orders are not editable')]
Public methods (0)

No public methods.

New fields (14)
  • company_currency_id Many2one → res.currency
    readonly=True related='company_id.currency_id' string='Company Currency' args: 'res.currency'
  • default_purchase_method Selection
    default='receive' default_model='product.template' help='This default value is applied to any new product created. This can be changed in the product detail form.' string='Bill Control' args: [('purchase', 'Ordered quantities'), ('receive', 'Received quantities')]
  • group_send_reminder Boolean
    default=True help='Allow automatically send email to remind your vendor the receipt date' implied_group='purchase.group_send_reminder' args: 'Receipt Reminder'
  • group_warning_purchase Boolean
    implied_group='purchase.group_warning_purchase' args: 'Purchase Warnings'
  • lock_confirmed_po Boolean
    default=<expr> args: 'Lock Confirmed Orders'
  • module_account_3way_match Boolean
    args: '3-way matching: purchases, receptions and bills'
  • module_purchase_product_matrix Boolean
    args: 'Purchase Grid Entry'
  • module_purchase_requisition Boolean
    args: 'Purchase Agreements'
  • po_double_validation Selection
    readonly=False related='company_id.po_double_validation' string='Levels of Approvals *'
  • po_double_validation_amount Monetary
    currency_field='company_currency_id' readonly=False related='company_id.po_double_validation_amount' string='Minimum Amount'
  • po_lead Float
    readonly=False related='company_id.po_lead'
  • po_lock Selection
    readonly=False related='company_id.po_lock' string='Purchase Order Modification *'
  • po_order_approval Boolean
    default=<expr> args: 'Purchase Order Approval'
  • use_po_lead Boolean
    config_parameter='purchase.use_po_lead' help='Margin of error for vendor lead times. When the system generates Purchase Orders for reordering products,they will be scheduled that many days earlier to cope with unexpected vendor delays.' string='Security Lead Time for Purchase'
Public methods (1)
  • set_values(self)

New fields (6)
  • property_purchase_currency_id Many2one → res.currency
    company_dependent=True help='This currency will be used, instead of the default one, for purchases from the current partner' string='Supplier Currency' args: 'res.currency'
  • purchase_order_count Integer
    compute='_compute_purchase_order_count' string='Purchase Order Count'
  • purchase_warn Selection
    default='no-message' help=WARNING_HELP args: WARNING_MESSAGE, 'Purchase Order Warning'
  • purchase_warn_msg Text
    args: 'Message for Purchase Order'
  • receipt_reminder_email Boolean
    company_dependent=True default=False help='Automatically send a confirmation email to the vendor X days before the expected receipt date, asking him to confirm the exact date.' args: 'Receipt Reminder'
  • reminder_date_before_receipt Integer
    company_dependent=True default=1 help='Number of days to send reminder email before the promised receipt date' args: 'Days Before Receipt'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/15.0/purchase
VERSION
VERSION 1.2
CATEGORY
CATEGORYInventory/Purchase
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Thibault Delavallée, Christophe Simonis, Xavier Morel, Goffin Simon, Mohammed Shekha, Nicolas Martinelli, Nicolas Lempereur, Thibault Francois, Stefan Rijnhart, qdp-odoo, Aaron Bohy, Jeremy Kersten, Sylvain LE GAL, GitHub, Barad Mahendra, Yannick Tivisse, Dharmraj Jhala, Laurent Smet, Adrien Dieudonne, Jorge Pinna Puissant, Toufik Ben Jaa, Arnold Moyaux, Adrian Torres, wan, Xavier-Do, Victor Feyens, Andrea Grazioso (agr-odoo), Daniel Reis, William Henrotin, Sébastien Theys, oco-odoo, Florent de Labarre, Julien Mougenot, Anh Thao Pham (pta), svs-odoo, Alvaro Fuentes, Achraf (abz), Adrien Widart, Ivan Yelizariev, Nasreddin Boulif (bon), Touati Djamel (otd), Tiffany Chang (tic), IEL, Rémy Voet (ryv), Mathieu Duckerts-Antoine, jbw, William Braeckman, Kevin Baptiste, Richard deMeester, roen-odoo, Hubert Van de Walle (huvw), william-andre, Paolo (pgi), Florian Damhaut, David (dafr), JF Aubert, yhu-odoo, mafo-odoo, Florian Vranckx, anhe-odoo, Nshimiyimana Séna, Yolann Sabaux, Thomas Beckers, Adrien Minet, Nicolas Bayet, Jinjiu Liu, Michael Mattiello (mcm), dht-odoo, niyasraphy, nda-odoo, mehjabinfarsana, Matheus Leal Viana (malv), Walid, Adrien Widart (awt), Maximilien (malb), Simon Genin (ges), clesgow, Djamel Touati, Nicolas Pierre, Maruan Aguerdouh (magm), Sébastien Geelen (sge), Antoine (ande), ノウラ, hoangtiendung, lathuat1997, Maitri Patel, AH-Yussef, Leonardo Pavan Rocha, Dawn Hwang, Cameron, Noe Antoine, Mattis Megevand (mmeg), guva-odoo, Mathieu (mcou), AMZIL Ayoub, Saran440, Nathaniel (naja), Cyril Dutrieux (cydu), Carlos Roca, Ricardoalso
WEBSITE
WEBSITEhttps://www.odoo.com/app/purchase
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:25:27
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (51)
XML IDNameModelTypeStatus
account_analytic_account_view_form_purchase account.analytic.account.form.purchase account.analytic.account div Inherits analytic.view_account_analytic_account_form
mail_notification_confirm Purchase: Confirmation mail notification template ir.ui.view qweb Inherits mail.mail_notification_paynow
portal_my_home_menu_purchase Portal layout : purchase menu entries ir.ui.view qweb Inherits portal.portal_breadcrumbs
portal_my_home_purchase Show Requests for Quotation / Purchase Orders ir.ui.view qweb Inherits portal.portal_my_home
portal_my_purchase_order Purchase Order Portal Template ir.ui.view qweb Inherits portal.portal_sidebar
portal_my_purchase_order_update_date Portal: My Purchase Order Update Dates ir.ui.view qweb Inherits purchase.portal_my_purchase_order
portal_my_purchase_orders My Purchase Orders ir.ui.view qweb New
portal_my_purchase_rfqs My Requests For Quotation ir.ui.view qweb New
product_normal_form_view_inherit_purchase product.product.purchase.order product.product div Inherits product.product_normal_form_view
product_packaging_form_view_purchase product.packaging.form.view.purchase product.packaging xpath Inherits product.product_packaging_form_view
product_packaging_tree_view_purchase product.packaging.tree.view.purchase product.packaging xpath Inherits product.product_packaging_tree_view
product_supplierinfo_tree_view2 product.supplierinfo.tree.view2 product.supplierinfo xpath Inherits product.product_supplierinfo_tree_view
product_template_form_view product.normal.form.inherit.stock product.template field Inherits account.product_template_form_view
purchase_order_calendar purchase.order.calendar purchase.order calendar New
purchase_order_form purchase.order.form purchase.order form New
purchase_order_graph purchase.order.graph purchase.order graph New
purchase_order_kpis_tree purchase.order.inherit.purchase.order.tree purchase.order tree New
purchase_order_line_form2 purchase.order.line.form2 purchase.order.line form New
purchase_order_line_search purchase.order.line.search purchase.order.line search New
purchase_order_line_tree purchase.order.line.tree purchase.order.line tree New
purchase_order_pivot purchase.order.pivot purchase.order pivot New
purchase_order_portal_content Purchase Order Portal Content ir.ui.view qweb New
purchase_order_portal_content_totals_table purchase_order_portal_content_totals_table ir.ui.view qweb New
purchase_order_tree purchase.order.tree purchase.order tree New
purchase_order_view_activity purchase.order.activity purchase.order activity New
purchase_order_view_search purchase.order.select purchase.order search New
purchase_order_view_tree purchase.order.view.tree purchase.order tree New
purchase_partner_kanban_view res.partner.kanban.purchaseorder.inherit res.partner field Inherits base.res_partner_kanban_view
purchase_report_view_tree purchase.report.view.tree purchase.report tree New
report_purchaseorder report_purchaseorder ir.ui.view qweb New
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb New
report_purchasequotation report_purchasequotation ir.ui.view qweb New
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb New
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits base.res_config_settings_view_form
res_partner_view_purchase_account_buttons res.partner.view.purchase.account.buttons res.partner div Inherits base.view_partner_form
res_partner_view_purchase_buttons res.partner.view.purchase.buttons res.partner div Inherits base.view_partner_form
track_po_line_qty_received_template track_po_line_qty_received_template ir.ui.view qweb New
track_po_line_template track_po_line_template ir.ui.view qweb New
view_category_property_form product.category.property.form.inherit.stock product.category field Inherits account.view_category_property_form
view_move_form_inherit_purchase account.move.inherit.purchase account.move field Inherits account.view_move_form
view_partner_property_form res.partner.purchase.property.form.inherit res.partner group Inherits base.view_partner_form
view_product_account_purchase_ok_form product.template.account.purchase.ok.form.inherit product.template field Inherits account.product_template_form_view
view_product_supplier_inherit product.template.supplier.form.inherit product.template xpath Inherits product.product_template_form_view
view_product_template_purchase_buttons_from product.template.purchase.button.inherit product.template div Inherits product.product_template_only_form_view
view_purchase_bill_union_filter purchase.bill.union.select purchase.bill.union search New
view_purchase_bill_union_tree purchase.bill.union.tree purchase.bill.union tree New
view_purchase_order_filter request.quotation.select purchase.order search New
view_purchase_order_graph product.month.graph purchase.report graph New
view_purchase_order_kanban purchase.order.kanban purchase.order kanban New
view_purchase_order_pivot product.month.pivot purchase.report pivot New
view_purchase_order_search report.purchase.order.search purchase.report search New
Models touched (19)

New fields (1)
  • purchase_order_count Integer
    compute='_compute_purchase_order_count' args: 'Purchase Order Count'
Public methods (1)
  • action_view_purchase_orders(self)

New fields (2)
  • purchase_id Many2one → purchase.order
    help='Auto-complete from a past purchase order.' readonly=True states={'draft': [('readonly', False)]} store=False string='Purchase Order' args: 'purchase.order'
  • purchase_vendor_bill_id Many2one → purchase.bill.union
    help='Auto-complete from a past bill / purchase order.' readonly=True states={'draft': [('readonly', False)]} store=False string='Auto-complete' args: 'purchase.bill.union'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

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

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

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 Boolean
    default=True help='If true, the packaging can be used for purchase orders' args: 'Purchase'
Public methods (0)

No public methods.

New fields (1)
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' string='Purchased'
Public methods (1)
  • action_view_po(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (5)
  • 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'
  • purchase_line_warn Selection
    default='no-message' help=WARNING_HELP required=True args: WARNING_MESSAGE, 'Purchase Order Line Warning'
  • purchase_line_warn_msg Text
    args: 'Message for Purchase Order Line'
  • purchase_method Selection
    compute='_compute_purchase_method' default='receive' help='On ordered quantities: Control bills based on ordered quantities.\nOn received quantities: Control bills based on received quantities.' readonly=False store=True string='Control Policy' args: [('purchase', 'On ordered quantities'), ('receive', 'On received quantities')]
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' string='Purchased'
Public methods (2)
  • action_view_po(self)
  • get_import_templates(self)
    @api.model

New fields (9)
  • amount Float
    readonly=True string='Amount'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • currency_id Many2one → res.currency
    readonly=True string='Currency' args: 'res.currency'
  • date Date
    readonly=True string='Date'
  • name Char
    readonly=True string='Reference'
  • partner_id Many2one → res.partner
    readonly=True string='Vendor' args: 'res.partner'
  • purchase_order_id Many2one → purchase.order
    readonly=True string='Purchase Order' args: 'purchase.order'
  • reference Char
    readonly=True string='Source'
  • vendor_bill_id Many2one → account.move
    readonly=True string='Vendor Bill' args: 'account.move'
Public methods (2)
  • init(self)
  • name_get(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (33)
  • amount_tax Monetary
    compute='_amount_all' readonly=True store=True string='Taxes'
  • amount_total Monetary
    compute='_amount_all' readonly=True store=True string='Total'
  • amount_untaxed Monetary
    compute='_amount_all' readonly=True store=True string='Untaxed Amount' tracking=True
  • company_id Many2one → res.company
    default=<expr> index=True required=True states=READONLY_STATES args: 'res.company', 'Company'
  • currency_id Many2one → res.currency
    default=<expr> required=True states=READONLY_STATES args: 'res.currency', 'Currency'
  • currency_rate Float
    compute='_compute_currency_rate' compute_sudo=True help='Ratio between the purchase order currency and the company currency' readonly=True store=True args: 'Currency Rate'
  • date_approve Datetime
    copy=False index=True readonly=1 args: 'Confirmation Date'
  • date_calendar_start Datetime
    compute='_compute_date_calendar_start' readonly=True store=True
  • date_order Datetime
    copy=False default=fields.Datetime.now help='Depicts the date within which the Quotation should be confirmed and converted into a purchase order.' index=True required=True states=READONLY_STATES args: 'Order Deadline'
  • date_planned Datetime
    compute='_compute_date_planned' copy=False help='Delivery date promised by vendor. This date is used to determine expected arrival of products.' index=True readonly=False store=True string='Receipt Date'
  • dest_address_id Many2one → res.partner
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" help='Put an address if you want to deliver directly from the vendor to the customer. Otherwise, keep empty to deliver to your own company.' states=READONLY_STATES string='Dropship Address' args: 'res.partner'
  • fiscal_position_id Many2one → account.fiscal.position
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" string='Fiscal Position' args: 'account.fiscal.position'
  • 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'
  • invoice_count Integer
    compute='_compute_invoice' copy=False default=0 store=True string='Bill Count'
  • invoice_ids Many2many → account.move
    compute='_compute_invoice' copy=False store=True string='Bills' args: 'account.move'
  • invoice_status Selection
    compute='_get_invoiced' copy=False default='no' readonly=True store=True string='Billing Status' args: [('no', 'Nothing to Bill'), ('to invoice', 'Waiting Bills'), ('invoiced', 'Fully Billed')]
  • mail_reception_confirmed Boolean
    copy=False default=False help='True if PO reception is confirmed by the vendor.' readonly=True args: 'Reception Confirmed'
  • mail_reminder_confirmed Boolean
    copy=False default=False help='True if the reminder email is confirmed by the vendor.' readonly=True args: 'Reminder Confirmed'
  • name Char
    copy=False default='New' index=True required=True args: 'Order Reference'
  • notes Html
    args: 'Terms and Conditions'
  • order_line One2many → purchase.order.line
    copy=True states={'cancel': [('readonly', True)], 'done': [('readonly', True)]} string='Order Lines' args: 'purchase.order.line', 'order_id'
  • origin Char
    copy=False help='Reference of the document that generated this purchase order request (e.g. a sales order)' args: 'Source Document'
  • partner_id Many2one → res.partner
    change_default=True domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" help='You can find a vendor by its Name, TIN, Email or Internal Reference.' required=True states=READONLY_STATES string='Vendor' tracking=True args: 'res.partner'
  • partner_ref Char
    copy=False help="Reference of the sales order or bid sent by the vendor. It's used to do the matching when you receive the products as this reference is usually written on the delivery order sent by your vendor." args: 'Vendor Reference'
  • payment_term_id Many2one → account.payment.term
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" args: 'account.payment.term', 'Payment Terms'
  • priority Selection
    default='0' index=True args: [('0', 'Normal'), ('1', 'Urgent')], 'Priority'
  • product_id Many2one → product.product
    related='order_line.product_id' string='Product' args: 'product.product'
  • receipt_reminder_email Boolean
    compute='_compute_receipt_reminder_email' args: 'Receipt Reminder Email'
  • reminder_date_before_receipt Integer
    compute='_compute_receipt_reminder_email' args: 'Days Before Receipt'
  • state Selection
    copy=False default='draft' index=True readonly=True string='Status' tracking=True args: [('draft', 'RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Locked'), ('cancel', 'Cancelled')]
  • tax_country_id Many2one → res.country
    comodel_name='res.country' compute='_compute_tax_country_id' compute_sudo=True help='Technical field to filter the available taxes depending on the fiscal country and fiscal position.'
  • tax_totals_json Char
    compute='_compute_tax_totals_json'
  • user_id Many2one → res.users
    check_company=True default=<expr> index=True string='Purchase Representative' tracking=True args: 'res.users'
Public methods (26)
  • action_create_invoice(self)
    Create the invoice associated to the PO.
  • action_rfq_send(self)
    This function opens a window to compose an email, with the edi purchase template message loaded by default
  • action_view_invoice(self, invoices=False)
    This function returns an action that display existing vendor bills of given purchase order ids. When only one found, show the vendor bill immediately.
  • button_approve(self, force=False)
  • button_cancel(self)
  • button_confirm(self)
  • button_done(self)
  • button_draft(self)
  • button_unlock(self)
  • confirm_reminder_mail(self, confirmed_date=False)
  • copy(self, default=None)
  • create(self, vals)
    @api.model
  • get_confirm_url(self, confirm_type=None)
    Create url for confirm reminder or purchase reception email for sending in mail.
  • get_localized_date_planned(self, date_planned=False)
    Returns the localized date planned in the timezone of the order's user or the company's partner or UTC if none of them are set.
  • get_order_timezone(self)
    Returns the timezone of the order's user or the company's partner or UTC if none of them are set.
  • get_update_url(self)
    Create portal url for user to update the scheduled date on purchase order lines.
  • message_post(self, **kwargs)
    @api.returns('mail.message', <expr>)
  • name_get(self)
    @api.depends('name', 'partner_ref')
  • onchange(self, values, field_name, field_onchange)
    Override onchange to NOT to update all date_planned on PO lines when date_planned on PO is updated by the change of date_planned on PO lines.
  • onchange_date_planned(self)
    @api.onchange('date_planned')
  • onchange_partner_id(self)
    @api.onchange('partner_id', 'company_id')
  • onchange_partner_id_warning(self)
    @api.onchange('partner_id')
  • print_quotation(self)
  • retrieve_dashboard(self)
    @api.model
    This function returns the values to populate the custom dashboard in the purchase order views.
  • send_reminder_preview(self)
  • write(self, vals)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (31)
  • account_analytic_id Many2one → account.analytic.account
    compute='_compute_account_analytic_id' readonly=False store=True string='Analytic Account' args: 'account.analytic.account'
  • analytic_tag_ids Many2many → account.analytic.tag
    compute='_compute_analytic_tag_ids' readonly=False store=True string='Analytic Tags' args: 'account.analytic.tag'
  • company_id Many2one → res.company
    readonly=True related='order_id.company_id' store=True string='Company' args: 'res.company'
  • currency_id Many2one
    readonly=True related='order_id.currency_id' store=True string='Currency'
  • date_order Datetime
    readonly=True related='order_id.date_order' string='Order Date'
  • date_planned Datetime
    help="Delivery date expected from vendor. This date respectively defaults to vendor pricelist lead time then today's date." index=True string='Delivery Date'
  • display_type Selection
    default=False help='Technical field for UX purpose.' args: [('line_section', 'Section'), ('line_note', 'Note')]
  • invoice_lines One2many → account.move.line
    copy=False readonly=True string='Bill Lines' args: 'account.move.line', 'purchase_line_id'
  • name Text
    required=True string='Description'
  • order_id Many2one → purchase.order
    index=True ondelete='cascade' required=True string='Order Reference' args: 'purchase.order'
  • partner_id Many2one → res.partner
    readonly=True related='order_id.partner_id' store=True string='Partner' args: 'res.partner'
  • price_subtotal Monetary
    compute='_compute_amount' store=True string='Subtotal'
  • price_tax Float
    compute='_compute_amount' store=True string='Tax'
  • price_total Monetary
    compute='_compute_amount' store=True string='Total'
  • price_unit Float
    digits='Product Price' required=True string='Unit Price'
  • product_id Many2one → product.product
    change_default=True domain=[('purchase_ok', '=', True)] string='Product' args: 'product.product'
  • product_packaging_id Many2one → product.packaging
    check_company=True domain="[('purchase', '=', True), ('product_id', '=', product_id)]" string='Packaging' args: 'product.packaging'
  • product_packaging_qty Float
    args: 'Packaging Quantity'
  • product_qty Float
    digits='Product Unit of Measure' required=True string='Quantity'
  • product_type Selection
    readonly=True related='product_id.detailed_type'
  • product_uom Many2one → uom.uom
    domain="[('category_id', '=', product_uom_category_id)]" string='Unit of Measure' args: 'uom.uom'
  • product_uom_category_id Many2one
    related='product_id.uom_id.category_id'
  • product_uom_qty Float
    compute='_compute_product_uom_qty' store=True string='Total Quantity'
  • qty_invoiced Float
    compute='_compute_qty_invoiced' digits='Product Unit of Measure' store=True string='Billed Qty'
  • qty_received Float
    compute='_compute_qty_received' compute_sudo=True digits='Product Unit of Measure' inverse='_inverse_qty_received' store=True args: 'Received Qty'
  • qty_received_manual Float
    copy=False digits='Product Unit of Measure' args: 'Manual Received Qty'
  • qty_received_method Selection
    compute='_compute_qty_received_method' help='According to product configuration, the received quantity can be automatically computed by mechanism :\n - Manual: the quantity is set manually on the line\n - Stock Moves: the quantity comes from confirmed pickings\n' store=True string='Received Qty Method' args: [('manual', 'Manual')]
  • qty_to_invoice Float
    compute='_compute_qty_invoiced' digits='Product Unit of Measure' readonly=True store=True string='To Invoice Quantity'
  • sequence Integer
    default=10 string='Sequence'
  • state Selection
    related='order_id.state' store=True
  • taxes_id Many2many → account.tax
    context={'active_test': False} string='Taxes' args: 'account.tax'
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • onchange_product_id(self)
    @api.onchange('product_id', 'company_id')
  • onchange_product_id_warning(self)
    @api.onchange('product_id')
  • write(self, values)

New fields (29)
  • account_analytic_id Many2one → account.analytic.account
    readonly=True args: 'account.analytic.account', 'Analytic Account'
  • avg_days_to_purchase Float
    digits=(16, 2) help='Amount of time between purchase approval and document creation 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 Days to Purchase'
  • category_id Many2one → product.category
    readonly=True args: 'product.category', 'Product Category'
  • commercial_partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Commercial Entity'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • country_id Many2one → res.country
    readonly=True args: 'res.country', 'Partner Country'
  • currency_id Many2one → res.currency
    readonly=True args: 'res.currency', 'Currency'
  • date_approve Datetime
    readonly=True args: 'Confirmation Date'
  • date_order Datetime
    help='Depicts the date when the Quotation should be validated and converted into a purchase order.' readonly=True args: 'Order Date'
  • delay Float
    digits=(16, 2) group_operator='avg' help='Amount of time between purchase approval and order by date.' readonly=True args: 'Days to Confirm'
  • delay_pass Float
    digits=(16, 2) group_operator='avg' help='Amount of time between date planned and order by date for each purchase order line.' readonly=True args: 'Days to Receive'
  • fiscal_position_id Many2one → account.fiscal.position
    readonly=True string='Fiscal Position' args: 'account.fiscal.position'
  • nbr_lines Integer
    readonly=True args: '# of Lines'
  • order_id Many2one → purchase.order
    readonly=True args: 'purchase.order', 'Order'
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Vendor'
  • price_average Float
    digits='Product Price' group_operator='avg' readonly=True args: 'Average Cost'
  • price_total Float
    readonly=True args: 'Total'
  • product_id Many2one → product.product
    readonly=True args: 'product.product', 'Product'
  • product_tmpl_id Many2one → product.template
    readonly=True args: 'product.template', 'Product Template'
  • product_uom Many2one → uom.uom
    required=True args: 'uom.uom', 'Reference Unit of Measure'
  • qty_billed Float
    readonly=True args: 'Qty Billed'
  • qty_ordered Float
    readonly=True args: 'Qty Ordered'
  • qty_received Float
    readonly=True args: 'Qty Received'
  • qty_to_be_billed Float
    readonly=True args: 'Qty to be Billed'
  • state Selection
    readonly=True args: [('draft', 'Draft RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status'
  • untaxed_total Float
    readonly=True args: 'Untaxed Total'
  • user_id Many2one → res.users
    readonly=True args: 'res.users', 'Purchase Representative'
  • volume Float
    readonly=True args: 'Volume'
  • weight Float
    readonly=True args: 'Gross Weight'
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_days_to_purchase.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • po_double_validation Selection
    default='one_step' help='Provide a double validation mechanism for purchases' string='Levels of Approvals' args: [('one_step', 'Confirm purchase orders in one step'), ('two_step', 'Get 2 levels of approvals to confirm a purchase order')]
  • po_double_validation_amount Monetary
    default=5000 help='Minimum amount for which a double validation is required' string='Double validation amount'
  • po_lead Float
    default=0.0 help='Margin of error for vendor lead times. When the system generates Purchase Orders for procuring products, they will be scheduled that many days earlier to cope with unexpected vendor delays.' required=True string='Purchase Lead Time'
  • po_lock Selection
    default='edit' help='Purchase Order Modification used when you want to purchase order editable after confirm' string='Purchase Order Modification' args: [('edit', 'Allow to edit purchase orders'), ('lock', 'Confirmed purchase orders are not editable')]
Public methods (0)

No public methods.

New fields (14)
  • company_currency_id Many2one → res.currency
    help='Utility field to express amount currency' readonly=True related='company_id.currency_id' string='Company Currency' args: 'res.currency'
  • default_purchase_method Selection
    default='receive' default_model='product.template' help='This default value is applied to any new product created. This can be changed in the product detail form.' string='Bill Control' args: [('purchase', 'Ordered quantities'), ('receive', 'Received quantities')]
  • group_send_reminder Boolean
    default=True help='Allow automatically send email to remind your vendor the receipt date' implied_group='purchase.group_send_reminder' args: 'Receipt Reminder'
  • group_warning_purchase Boolean
    implied_group='purchase.group_warning_purchase' args: 'Purchase Warnings'
  • lock_confirmed_po Boolean
    default=<expr> args: 'Lock Confirmed Orders'
  • module_account_3way_match Boolean
    args: '3-way matching: purchases, receptions and bills'
  • module_purchase_product_matrix Boolean
    args: 'Purchase Grid Entry'
  • module_purchase_requisition Boolean
    args: 'Purchase Agreements'
  • po_double_validation Selection
    readonly=False related='company_id.po_double_validation' string='Levels of Approvals *'
  • po_double_validation_amount Monetary
    currency_field='company_currency_id' readonly=False related='company_id.po_double_validation_amount' string='Minimum Amount'
  • po_lead Float
    readonly=False related='company_id.po_lead'
  • po_lock Selection
    readonly=False related='company_id.po_lock' string='Purchase Order Modification *'
  • po_order_approval Boolean
    default=<expr> args: 'Purchase Order Approval'
  • use_po_lead Boolean
    config_parameter='purchase.use_po_lead' help='Margin of error for vendor lead times. When the system generates Purchase Orders for reordering products,they will be scheduled that many days earlier to cope with unexpected vendor delays.' string='Security Lead Time for Purchase'
Public methods (1)
  • set_values(self)

New fields (7)
  • property_purchase_currency_id Many2one → res.currency
    company_dependent=True help='This currency will be used, instead of the default one, for purchases from the current partner' string='Supplier Currency' args: 'res.currency'
  • purchase_order_count Integer
    compute='_compute_purchase_order_count' string='Purchase Order Count'
  • purchase_warn Selection
    default='no-message' help=WARNING_HELP args: WARNING_MESSAGE, 'Purchase Order'
  • purchase_warn_msg Text
    args: 'Message for Purchase Order'
  • receipt_reminder_email Boolean
    company_dependent=True default=False help='Automatically send a confirmation email to the vendor X days before the expected receipt date, asking him to confirm the exact date.' args: 'Receipt Reminder'
  • reminder_date_before_receipt Integer
    company_dependent=True default=1 help='Number of days to send reminder email before the promised receipt date' args: 'Days Before Receipt'
  • supplier_invoice_count Integer
    compute='_compute_supplier_invoice_count' string='# Vendor Bills'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/14.0/purchase
VERSION
VERSION 1.2
CATEGORY
CATEGORYInventory/Purchase
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Olivier Dony, Thibault Delavallée, Christophe Simonis, Xavier Morel, Goffin Simon, Mohammed Shekha, Simon Lejeune, Nicolas Martinelli, Nicolas Lempereur, Stefan Rijnhart, qdp-odoo, Aaron Bohy, Jeremy Kersten, GitHub, Lucas Perais (lpe), Barad Mahendra, Yannick Tivisse, Laurent Smet, Jorge Pinna Puissant, Arnold Moyaux, wan, Julien Castiaux, Xavier-Do, jvm-odoo, Victor Feyens, Andrea Grazioso (agr-odoo), Daniel Reis, William Henrotin, Sébastien Theys, Florent de Labarre, Jason Van Malder, fw-bot, svs-odoo, Rémy Baranx (bar), Achraf (abz), David Beguin, Adrien Widart, Ivan Yelizariev, Nasreddin Boulif (bon), Touati Djamel (otd), Swapnesh Shah, Tiffany Chang (tic), IEL, Rémy Voet (ryv), Mathieu Duckerts-Antoine, jbw, Benjamin Frantzen (bfr), Kevin Baptiste, Pratima Gupta, Richard deMeester, roen-odoo, Jigar Vaghela, laa, william-andre, Paolo (pgi), David (dafr), yhu-odoo, mafo-odoo, william, Florian Vranckx, Yolann Sabaux, Florian Gilbert, Thomas Beckers, Adrien Minet, Hemali Bhimani, Jinjiu Liu, Laurent Stukkens (LTU), nda-odoo, mehjabinfarsana, Matheus Leal Viana (malv), Maximilien (malb), Maruan Aguerdouh (magm), Ravi Singh, Antoine (ande), ノウラ, hoangtiendung, lathuat1997, Maitri Patel
WEBSITE
WEBSITEhttps://www.odoo.com/page/purchase
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:14:28
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (46)
XML IDNameModelTypeStatus
assets_backend purchase assets ir.ui.view qweb Inherits web.assets_backend
assets_frontend purchase assets ir.ui.view qweb Inherits web.assets_frontend
mail_notification_confirm Purchase: Confirmation mail notification template ir.ui.view qweb Inherits mail.mail_notification_paynow
portal_my_home_menu_purchase Portal layout : purchase menu entries ir.ui.view qweb Inherits portal.portal_breadcrumbs
portal_my_home_purchase Show Purchase Orders ir.ui.view qweb Inherits portal.portal_my_home
portal_my_purchase_order Portal: My Purchase Order ir.ui.view qweb New
portal_my_purchase_order_update_date Portal: My Purchase Order Update Dates ir.ui.view qweb Inherits purchase.portal_my_purchase_order
portal_my_purchase_orders Portal: My Purchase Orders ir.ui.view qweb New
product_normal_form_view_inherit_purchase product.product.purchase.order product.product div Inherits product.product_normal_form_view
product_supplierinfo_tree_view2 product.supplierinfo.tree.view2 product.supplierinfo xpath Inherits product.product_supplierinfo_tree_view
product_template_form_view product.normal.form.inherit.stock product.template field Inherits account.product_template_form_view
purchase_order_calendar purchase.order.calendar purchase.order calendar New
purchase_order_form purchase.order.form purchase.order form New
purchase_order_graph purchase.order.graph purchase.order graph New
purchase_order_kpis_tree purchase.order.inherit.purchase.order.tree purchase.order tree New
purchase_order_line_form2 purchase.order.line.form2 purchase.order.line form New
purchase_order_line_search purchase.order.line.search purchase.order.line search New
purchase_order_line_tree purchase.order.line.tree purchase.order.line tree New
purchase_order_pivot purchase.order.pivot purchase.order pivot New
purchase_order_tree purchase.order.tree purchase.order tree New
purchase_order_view_activity purchase.order.activity purchase.order activity New
purchase_order_view_search purchase.order.select purchase.order search New
purchase_order_view_tree purchase.order.view.tree purchase.order tree New
purchase_partner_kanban_view res.partner.kanban.purchaseorder.inherit res.partner field Inherits base.res_partner_kanban_view
report_purchaseorder report_purchaseorder ir.ui.view qweb New
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb New
report_purchasequotation report_purchasequotation ir.ui.view qweb New
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb New
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits base.res_config_settings_view_form
res_partner_view_purchase_account_buttons res.partner.view.purchase.account.buttons res.partner div Inherits base.view_partner_form
res_partner_view_purchase_buttons res.partner.view.purchase.buttons res.partner div Inherits base.view_partner_form
track_po_line_qty_received_template track_po_line_qty_received_template ir.ui.view qweb New
track_po_line_template track_po_line_template ir.ui.view qweb New
view_category_property_form product.category.property.form.inherit.stock product.category field Inherits account.view_category_property_form
view_move_form_inherit_purchase account.move.inherit.purchase account.move field Inherits account.view_move_form
view_partner_property_form res.partner.purchase.property.form.inherit res.partner group Inherits base.view_partner_form
view_product_account_purchase_ok_form product.template.account.purchase.ok.form.inherit product.template field Inherits account.product_template_form_view
view_product_supplier_inherit product.template.supplier.form.inherit product.template xpath Inherits product.product_template_form_view
view_product_template_purchase_buttons_from product.template.purchase.button.inherit product.template div Inherits product.product_template_only_form_view
view_purchase_bill_union_filter purchase.bill.union.select purchase.bill.union search New
view_purchase_bill_union_tree purchase.bill.union.tree purchase.bill.union tree New
view_purchase_order_filter request.quotation.select purchase.order search New
view_purchase_order_graph product.month.graph purchase.report graph New
view_purchase_order_kanban purchase.order.kanban purchase.order kanban New
view_purchase_order_pivot product.month.pivot purchase.report pivot New
view_purchase_order_search report.purchase.order.search purchase.report search New
Models touched (14)

New fields (2)
  • purchase_id Many2one → purchase.order
    help='Auto-complete from a past purchase order.' readonly=True states={'draft': [('readonly', False)]} store=False string='Purchase Order' args: 'purchase.order'
  • purchase_vendor_bill_id Many2one → purchase.bill.union
    help='Auto-complete from a past bill / purchase order.' readonly=True states={'draft': [('readonly', False)]} store=False string='Auto-complete' args: 'purchase.bill.union'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

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

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • send_mail(self, auto_commit=False)

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)
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' string='Purchased'
Public methods (1)
  • action_view_po(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (5)
  • 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'
  • purchase_line_warn Selection
    default='no-message' help=WARNING_HELP required=True args: WARNING_MESSAGE, 'Purchase Order Line Warning'
  • purchase_line_warn_msg Text
    args: 'Message for Purchase Order Line'
  • purchase_method Selection
    default='receive' help='On ordered quantities: Control bills based on ordered quantities.\nOn received quantities: Control bills based on received quantities.' string='Control Policy' args: [('purchase', 'On ordered quantities'), ('receive', 'On received quantities')]
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' string='Purchased'
Public methods (2)
  • action_view_po(self)
  • get_import_templates(self)
    @api.model

New fields (9)
  • amount Float
    readonly=True string='Amount'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • currency_id Many2one → res.currency
    readonly=True string='Currency' args: 'res.currency'
  • date Date
    readonly=True string='Date'
  • name Char
    readonly=True string='Reference'
  • partner_id Many2one → res.partner
    readonly=True string='Vendor' args: 'res.partner'
  • purchase_order_id Many2one → purchase.order
    readonly=True string='Purchase Order' args: 'purchase.order'
  • reference Char
    readonly=True string='Source'
  • vendor_bill_id Many2one → account.move
    readonly=True string='Vendor Bill' args: 'account.move'
Public methods (2)
  • init(self)
  • name_get(self)

New fields (31)
  • amount_tax Monetary
    compute='_amount_all' readonly=True store=True string='Taxes'
  • amount_total Monetary
    compute='_amount_all' readonly=True store=True string='Total'
  • amount_untaxed Monetary
    compute='_amount_all' readonly=True store=True string='Untaxed Amount' tracking=True
  • company_id Many2one → res.company
    default=<expr> index=True required=True states=READONLY_STATES args: 'res.company', 'Company'
  • currency_id Many2one → res.currency
    default=<expr> required=True states=READONLY_STATES args: 'res.currency', 'Currency'
  • currency_rate Float
    compute='_compute_currency_rate' compute_sudo=True help='Ratio between the purchase order currency and the company currency' readonly=True store=True args: 'Currency Rate'
  • date_approve Datetime
    copy=False index=True readonly=1 args: 'Confirmation Date'
  • date_calendar_start Datetime
    compute='_compute_date_calendar_start' readonly=True store=True
  • date_order Datetime
    copy=False default=fields.Datetime.now help='Depicts the date within which the Quotation should be confirmed and converted into a purchase order.' index=True required=True states=READONLY_STATES args: 'Order Deadline'
  • date_planned Datetime
    compute='_compute_date_planned' copy=False help='Delivery date promised by vendor. This date is used to determine expected arrival of products.' index=True readonly=False store=True string='Receipt Date'
  • dest_address_id Many2one → res.partner
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" help='Put an address if you want to deliver directly from the vendor to the customer. Otherwise, keep empty to deliver to your own company.' states=READONLY_STATES string='Drop Ship Address' args: 'res.partner'
  • fiscal_position_id Many2one → account.fiscal.position
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" string='Fiscal Position' args: 'account.fiscal.position'
  • 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'
  • invoice_count Integer
    compute='_compute_invoice' copy=False default=0 store=True string='Bill Count'
  • invoice_ids Many2many → account.move
    compute='_compute_invoice' copy=False store=True string='Bills' args: 'account.move'
  • invoice_status Selection
    compute='_get_invoiced' copy=False default='no' readonly=True store=True string='Billing Status' args: [('no', 'Nothing to Bill'), ('to invoice', 'Waiting Bills'), ('invoiced', 'Fully Billed')]
  • mail_reception_confirmed Boolean
    copy=False default=False help='True if PO reception is confirmed by the vendor.' readonly=True args: 'Reception Confirmed'
  • mail_reminder_confirmed Boolean
    copy=False default=False help='True if the reminder email is confirmed by the vendor.' readonly=True args: 'Reminder Confirmed'
  • name Char
    copy=False default='New' index=True required=True args: 'Order Reference'
  • notes Text
    args: 'Terms and Conditions'
  • order_line One2many → purchase.order.line
    copy=True states={'cancel': [('readonly', True)], 'done': [('readonly', True)]} string='Order Lines' args: 'purchase.order.line', 'order_id'
  • origin Char
    copy=False help='Reference of the document that generated this purchase order request (e.g. a sales order)' args: 'Source Document'
  • partner_id Many2one → res.partner
    change_default=True domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" help='You can find a vendor by its Name, TIN, Email or Internal Reference.' required=True states=READONLY_STATES string='Vendor' tracking=True args: 'res.partner'
  • partner_ref Char
    copy=False help="Reference of the sales order or bid sent by the vendor. It's used to do the matching when you receive the products as this reference is usually written on the delivery order sent by your vendor." args: 'Vendor Reference'
  • payment_term_id Many2one → account.payment.term
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" args: 'account.payment.term', 'Payment Terms'
  • priority Selection
    default='0' index=True args: [('0', 'Normal'), ('1', 'Urgent')], 'Priority'
  • product_id Many2one → product.product
    readonly=False related='order_line.product_id' string='Product' args: 'product.product'
  • receipt_reminder_email Boolean
    readonly=False related='partner_id.receipt_reminder_email' args: 'Receipt Reminder Email'
  • reminder_date_before_receipt Integer
    readonly=False related='partner_id.reminder_date_before_receipt' args: 'Days Before Receipt'
  • state Selection
    copy=False default='draft' index=True readonly=True string='Status' tracking=True args: [('draft', 'RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Locked'), ('cancel', 'Cancelled')]
  • user_id Many2one → res.users
    check_company=True default=<expr> index=True string='Purchase Representative' tracking=True args: 'res.users'
Public methods (25)
  • action_create_invoice(self)
    Create the invoice associated to the PO.
  • action_rfq_send(self)
    This function opens a window to compose an email, with the edi purchase template message loaded by default
  • action_view_invoice(self, invoices=False)
    This function returns an action that display existing vendor bills of given purchase order ids. When only one found, show the vendor bill immediately.
  • button_approve(self, force=False)
  • button_cancel(self)
  • button_confirm(self)
  • button_done(self)
  • button_draft(self)
  • button_unlock(self)
  • confirm_reminder_mail(self, confirmed_date=False)
  • copy(self, default=None)
  • create(self, vals)
    @api.model
  • get_confirm_url(self, confirm_type=None)
    Create url for confirm reminder or purchase reception email for sending in mail.
  • get_update_url(self)
    Create portal url for user to update the scheduled date on purchase order lines.
  • message_post(self, **kwargs)
    @api.returns('mail.message', <expr>)
  • name_get(self)
    @api.depends('name', 'partner_ref')
  • onchange(self, values, field_name, field_onchange)
    Override onchange to NOT to update all date_planned on PO lines when date_planned on PO is updated by the change of date_planned on PO lines.
  • onchange_date_planned(self)
    @api.onchange('date_planned')
  • onchange_partner_id(self)
    @api.onchange('partner_id', 'company_id')
  • onchange_partner_id_warning(self)
    @api.onchange('partner_id')
  • print_quotation(self)
  • retrieve_dashboard(self)
    @api.model
    This function returns the values to populate the custom dashboard in the purchase order views.
  • send_reminder_preview(self)
  • unlink(self)
  • write(self, vals)

New fields (29)
  • account_analytic_id Many2one → account.analytic.account
    compute='_compute_account_analytic_id' readonly=False store=True string='Analytic Account' args: 'account.analytic.account'
  • analytic_tag_ids Many2many → account.analytic.tag
    compute='_compute_analytic_tag_ids' readonly=False store=True string='Analytic Tags' args: 'account.analytic.tag'
  • company_id Many2one → res.company
    readonly=True related='order_id.company_id' store=True string='Company' args: 'res.company'
  • currency_id Many2one
    readonly=True related='order_id.currency_id' store=True string='Currency'
  • date_order Datetime
    readonly=True related='order_id.date_order' string='Order Date'
  • date_planned Datetime
    help="Delivery date expected from vendor. This date respectively defaults to vendor pricelist lead time then today's date." index=True string='Delivery Date'
  • display_type Selection
    default=False help='Technical field for UX purpose.' args: [('line_section', 'Section'), ('line_note', 'Note')]
  • invoice_lines One2many → account.move.line
    copy=False readonly=True string='Bill Lines' args: 'account.move.line', 'purchase_line_id'
  • name Text
    required=True string='Description'
  • order_id Many2one → purchase.order
    index=True ondelete='cascade' required=True string='Order Reference' args: 'purchase.order'
  • partner_id Many2one → res.partner
    readonly=True related='order_id.partner_id' store=True string='Partner' args: 'res.partner'
  • price_subtotal Monetary
    compute='_compute_amount' store=True string='Subtotal'
  • price_tax Float
    compute='_compute_amount' store=True string='Tax'
  • price_total Monetary
    compute='_compute_amount' store=True string='Total'
  • price_unit Float
    digits='Product Price' required=True string='Unit Price'
  • product_id Many2one → product.product
    change_default=True domain=[('purchase_ok', '=', True)] string='Product' args: 'product.product'
  • product_qty Float
    digits='Product Unit of Measure' required=True string='Quantity'
  • product_type Selection
    readonly=True related='product_id.type'
  • product_uom Many2one → uom.uom
    domain="[('category_id', '=', product_uom_category_id)]" string='Unit of Measure' args: 'uom.uom'
  • product_uom_category_id Many2one
    related='product_id.uom_id.category_id'
  • product_uom_qty Float
    compute='_compute_product_uom_qty' store=True string='Total Quantity'
  • qty_invoiced Float
    compute='_compute_qty_invoiced' digits='Product Unit of Measure' store=True string='Billed Qty'
  • qty_received Float
    compute='_compute_qty_received' compute_sudo=True digits='Product Unit of Measure' inverse='_inverse_qty_received' store=True args: 'Received Qty'
  • qty_received_manual Float
    copy=False digits='Product Unit of Measure' args: 'Manual Received Qty'
  • qty_received_method Selection
    compute='_compute_qty_received_method' help='According to product configuration, the received quantity can be automatically computed by mechanism :\n - Manual: the quantity is set manually on the line\n - Stock Moves: the quantity comes from confirmed pickings\n' store=True string='Received Qty Method' args: [('manual', 'Manual')]
  • qty_to_invoice Float
    compute='_compute_qty_invoiced' digits='Product Unit of Measure' readonly=True store=True string='To Invoice Quantity'
  • sequence Integer
    default=10 string='Sequence'
  • state Selection
    readonly=False related='order_id.state' store=True
  • taxes_id Many2many → account.tax
    domain=['|', ('active', '=', False), ('active', '=', True)] string='Taxes' args: 'account.tax'
Public methods (5)
  • create(self, vals_list)
    @api.model_create_multi
  • onchange_product_id(self)
    @api.onchange('product_id', 'company_id')
  • onchange_product_id_warning(self)
    @api.onchange('product_id')
  • unlink(self)
  • write(self, values)

New fields (29)
  • account_analytic_id Many2one → account.analytic.account
    readonly=True args: 'account.analytic.account', 'Analytic Account'
  • avg_days_to_purchase Float
    digits=(16, 2) help='Amount of time between purchase approval and document creation 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 Days to Purchase'
  • category_id Many2one → product.category
    readonly=True args: 'product.category', 'Product Category'
  • commercial_partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Commercial Entity'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • country_id Many2one → res.country
    readonly=True args: 'res.country', 'Partner Country'
  • currency_id Many2one → res.currency
    readonly=True args: 'res.currency', 'Currency'
  • date_approve Datetime
    readonly=True args: 'Confirmation Date'
  • date_order Datetime
    help='Depicts the date when the Quotation should be validated and converted into a purchase order.' readonly=True args: 'Order Date'
  • delay Float
    digits=(16, 2) group_operator='avg' help='Amount of time between purchase approval and order by date.' readonly=True args: 'Days to Confirm'
  • delay_pass Float
    digits=(16, 2) group_operator='avg' help='Amount of time between date planned and order by date for each purchase order line.' readonly=True args: 'Days to Receive'
  • fiscal_position_id Many2one → account.fiscal.position
    readonly=True string='Fiscal Position' args: 'account.fiscal.position'
  • nbr_lines Integer
    readonly=True args: '# of Lines'
  • order_id Many2one → purchase.order
    readonly=True args: 'purchase.order', 'Order'
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Vendor'
  • price_average Float
    group_operator='avg' readonly=True args: 'Average Cost'
  • price_total Float
    readonly=True args: 'Total'
  • product_id Many2one → product.product
    readonly=True args: 'product.product', 'Product'
  • product_tmpl_id Many2one → product.template
    readonly=True args: 'product.template', 'Product Template'
  • product_uom Many2one → uom.uom
    required=True args: 'uom.uom', 'Reference Unit of Measure'
  • qty_billed Float
    readonly=True args: 'Qty Billed'
  • qty_ordered Float
    readonly=True args: 'Qty Ordered'
  • qty_received Float
    readonly=True args: 'Qty Received'
  • qty_to_be_billed Float
    readonly=True args: 'Qty to be Billed'
  • state Selection
    readonly=True args: [('draft', 'Draft RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status'
  • untaxed_total Float
    readonly=True args: 'Untaxed Total'
  • user_id Many2one → res.users
    readonly=True args: 'res.users', 'Purchase Representative'
  • volume Float
    readonly=True args: 'Volume'
  • weight Float
    readonly=True args: 'Gross Weight'
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_days_to_purchase.

New fields (4)
  • po_double_validation Selection
    default='one_step' help='Provide a double validation mechanism for purchases' string='Levels of Approvals' args: [('one_step', 'Confirm purchase orders in one step'), ('two_step', 'Get 2 levels of approvals to confirm a purchase order')]
  • po_double_validation_amount Monetary
    default=5000 help='Minimum amount for which a double validation is required' string='Double validation amount'
  • po_lead Float
    default=0.0 help='Margin of error for vendor lead times. When the system generates Purchase Orders for procuring products, they will be scheduled that many days earlier to cope with unexpected vendor delays.' required=True string='Purchase Lead Time'
  • po_lock Selection
    default='edit' help='Purchase Order Modification used when you want to purchase order editable after confirm' string='Purchase Order Modification' args: [('edit', 'Allow to edit purchase orders'), ('lock', 'Confirmed purchase orders are not editable')]
Public methods (0)

No public methods.

New fields (14)
  • company_currency_id Many2one → res.currency
    help='Utility field to express amount currency' readonly=True related='company_id.currency_id' string='Company Currency' args: 'res.currency'
  • default_purchase_method Selection
    default='receive' default_model='product.template' help='This default value is applied to any new product created. This can be changed in the product detail form.' string='Bill Control' args: [('purchase', 'Ordered quantities'), ('receive', 'Received quantities')]
  • group_send_reminder Boolean
    default=True help='Allow automatically send email to remind your vendor the receipt date' implied_group='purchase.group_send_reminder' args: 'Receipt Reminder'
  • group_warning_purchase Boolean
    implied_group='purchase.group_warning_purchase' args: 'Purchase Warnings'
  • lock_confirmed_po Boolean
    default=<expr> args: 'Lock Confirmed Orders'
  • module_account_3way_match Boolean
    args: '3-way matching: purchases, receptions and bills'
  • module_purchase_product_matrix Boolean
    args: 'Purchase Grid Entry'
  • module_purchase_requisition Boolean
    args: 'Purchase Agreements'
  • po_double_validation Selection
    readonly=False related='company_id.po_double_validation' string='Levels of Approvals *'
  • po_double_validation_amount Monetary
    currency_field='company_currency_id' readonly=False related='company_id.po_double_validation_amount' string='Minimum Amount'
  • po_lead Float
    readonly=False related='company_id.po_lead'
  • po_lock Selection
    readonly=False related='company_id.po_lock' string='Purchase Order Modification *'
  • po_order_approval Boolean
    default=<expr> args: 'Purchase Order Approval'
  • use_po_lead Boolean
    config_parameter='purchase.use_po_lead' help='Margin of error for vendor lead times. When the system generates Purchase Orders for reordering products,they will be scheduled that many days earlier to cope with unexpected vendor delays.' string='Security Lead Time for Purchase'
Public methods (1)
  • set_values(self)

New fields (7)
  • property_purchase_currency_id Many2one → res.currency
    company_dependent=True help='This currency will be used, instead of the default one, for purchases from the current partner' string='Supplier Currency' args: 'res.currency'
  • purchase_order_count Integer
    compute='_compute_purchase_order_count' string='Purchase Order Count'
  • purchase_warn Selection
    default='no-message' help=WARNING_HELP args: WARNING_MESSAGE, 'Purchase Order'
  • purchase_warn_msg Text
    args: 'Message for Purchase Order'
  • receipt_reminder_email Boolean
    company_dependent=True default=False help='Automatically send a confirmation email to the vendor X days before the expected receipt date, asking him to confirm the exact date.' args: 'Receipt Reminder'
  • reminder_date_before_receipt Integer
    company_dependent=True default=1 help='Number of days to send reminder email before the promised receipt date' args: 'Days Before Receipt'
  • supplier_invoice_count Integer
    compute='_compute_supplier_invoice_count' string='# Vendor Bills'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/13.0/purchase
VERSION
VERSION 1.2
CATEGORY
CATEGORYOperations/Purchase
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Thibault Delavallée, Josse Colpaert, Denis Ledoux, Xavier ALT, Christophe Simonis, David Monjoie, Xavier Morel, Goffin Simon, Mohammed Shekha, Simon Lejeune, Nicolas Martinelli, Nicolas Lempereur, qdp-odoo, Aaron Bohy, Pedro M. Baeza, GitHub, Damien Bouvy, Barad Mahendra, Wolfgang Taferner, Yannick Tivisse, Martin Geubelle, Odoo Online, Pierre Masereel, Laurent Smet, Jigar Patel, jem-odoo, Jorge Pinna Puissant, Alexandre Kühn, Arnold Moyaux, Adrian Torres, wan, Xavier-Do, Rishabh Jadia, Romeo Fragomeli, jvm-odoo, mgh-odoo, Carlos Dauden, Victor Feyens, Florimond Husquinet (fhu), Andrea Grazioso (agr-odoo), William Henrotin, Sébastien Theys, david, Florent de Labarre, Jason Van Malder, fw-bot, svs-odoo, Lois Rilo, Achraf (abz), Adrien Widart, Ivan Yelizariev, Nasreddin Boulif (bon), Touati Djamel (otd), Prakash Prajapati, Swapnesh Shah, IEL, Benjamin Frantzen (bfr), Arnaud Joset, Hetashree Chauhan, Kevin Baptiste, Arnaud Baes, asa-odoo, mcm-odoo, Jigar Vaghela, David (dafr), mafo-odoo, anhe-odoo, Hemali Bhimani, Jinjiu Liu, Laurent Stukkens (LTU)
WEBSITE
WEBSITEhttps://www.odoo.com/page/purchase
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:06:42
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (39)
XML IDNameModelTypeStatus
portal_my_home_menu_purchase Portal layout : purchase menu entries ir.ui.view qweb Inherits portal.portal_breadcrumbs
portal_my_home_purchase Portal My Home : purchase entry ir.ui.view qweb Inherits portal.portal_my_home
portal_my_purchase_order Portal: My Purchase Order ir.ui.view qweb New
portal_my_purchase_orders Portal: My Purchase Orders ir.ui.view qweb New
product_normal_form_view_inherit_purchase product.product.purchase.order product.product div Inherits product.product_normal_form_view
product_template_form_view product.normal.form.inherit.stock product.template field Inherits account.product_template_form_view
purchase_order_calendar purchase.order.calendar purchase.order calendar New
purchase_order_form purchase.order.form purchase.order form New
purchase_order_graph purchase.order.graph purchase.order graph New
purchase_order_line_form2 purchase.order.line.form2 purchase.order.line form New
purchase_order_line_search purchase.order.line.search purchase.order.line search New
purchase_order_line_tree purchase.order.line.tree purchase.order.line tree New
purchase_order_pivot purchase.order.pivot purchase.order pivot New
purchase_order_tree purchase.order.tree purchase.order tree New
purchase_order_view_activity purchase.order.activity purchase.order activity New
purchase_order_view_search purchase.order.select purchase.order search New
purchase_order_view_tree purchase.order.view.tree purchase.order tree New
purchase_partner_kanban_view res.partner.kanban.purchaseorder.inherit res.partner field Inherits base.res_partner_kanban_view
report_purchaseorder report_purchaseorder ir.ui.view qweb New
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb New
report_purchasequotation report_purchasequotation ir.ui.view qweb New
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb New
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits base.res_config_settings_view_form
res_partner_view_purchase_account_buttons res.partner.view.purchase.account.buttons res.partner div Inherits base.view_partner_form
res_partner_view_purchase_buttons res.partner.view.purchase.buttons res.partner div Inherits base.view_partner_form
track_po_line_template track_po_line_template ir.ui.view qweb New
view_category_property_form product.category.property.form.inherit.stock product.category field Inherits account.view_category_property_form
view_move_form_inherit_purchase account.move.inherit.purchase account.move field Inherits account.view_move_form
view_partner_property_form res.partner.purchase.property.form.inherit res.partner group Inherits base.view_partner_form
view_product_account_purchase_ok_form product.template.account.purchase.ok.form.inherit product.template field Inherits account.product_template_form_view
view_product_supplier_inherit product.template.supplier.form.inherit product.template xpath Inherits product.product_template_form_view
view_product_template_purchase_buttons_from product.template.purchase.button.inherit product.template div Inherits product.product_template_only_form_view
view_purchase_bill_union_filter purchase.bill.union.select purchase.bill.union search New
view_purchase_bill_union_tree purchase.bill.union.tree purchase.bill.union tree New
view_purchase_order_filter request.quotation.select purchase.order search New
view_purchase_order_graph product.month.graph purchase.report graph New
view_purchase_order_kanban purchase.order.kanban purchase.order kanban New
view_purchase_order_pivot product.month.pivot purchase.report pivot New
view_purchase_order_search report.purchase.order.search purchase.report search New
Models touched (13)

New fields (2)
  • purchase_id Many2one → purchase.order
    help='Auto-complete from a past purchase order.' readonly=True states={'draft': [('readonly', False)]} store=False string='Purchase Order' args: 'purchase.order'
  • purchase_vendor_bill_id Many2one → purchase.bill.union
    help='Auto-complete from a past bill / purchase order.' readonly=True states={'draft': [('readonly', False)]} store=False string='Auto-complete' args: 'purchase.bill.union'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

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

No public methods.

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)
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' string='Purchased'
Public methods (1)
  • action_view_po(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (5)
  • 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'
  • purchase_line_warn Selection
    default='no-message' help=WARNING_HELP required=True args: WARNING_MESSAGE, 'Purchase Order Line'
  • purchase_line_warn_msg Text
    args: 'Message for Purchase Order Line'
  • purchase_method Selection
    default='receive' help='On ordered quantities: Control bills based on ordered quantities.\nOn received quantities: Control bills based on received quantities.' string='Control Policy' args: [('purchase', 'On ordered quantities'), ('receive', 'On received quantities')]
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' string='Purchased'
Public methods (2)
  • action_view_po(self)
  • get_import_templates(self)
    @api.model

New fields (9)
  • amount Float
    readonly=True string='Amount'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • currency_id Many2one → res.currency
    readonly=True string='Currency' args: 'res.currency'
  • date Date
    readonly=True string='Date'
  • name Char
    readonly=True string='Reference'
  • partner_id Many2one → res.partner
    readonly=True string='Vendor' args: 'res.partner'
  • purchase_order_id Many2one → purchase.order
    readonly=True string='Purchase Order' args: 'purchase.order'
  • reference Char
    readonly=True string='Source'
  • vendor_bill_id Many2one → account.move
    readonly=True string='Vendor Bill' args: 'account.move'
Public methods (2)
  • init(self)
  • name_get(self)

New fields (25)
  • amount_tax Monetary
    compute='_amount_all' readonly=True store=True string='Taxes'
  • amount_total Monetary
    compute='_amount_all' readonly=True store=True string='Total'
  • amount_untaxed Monetary
    compute='_amount_all' readonly=True store=True string='Untaxed Amount' tracking=True
  • company_id Many2one → res.company
    default=<expr> index=True required=True states=READONLY_STATES args: 'res.company', 'Company'
  • currency_id Many2one → res.currency
    default=_default_currency_id required=True states=READONLY_STATES args: 'res.currency', 'Currency'
  • currency_rate Float
    compute='_compute_currency_rate' compute_sudo=True help='Ratio between the purchase order currency and the company currency' readonly=True store=True args: 'Currency Rate'
  • date_approve Datetime
    copy=False index=True readonly=1 args: 'Confirmation Date'
  • date_order Datetime
    copy=False default=fields.Datetime.now help='Depicts the date where the Quotation should be validated and converted into a purchase order.' index=True required=True states=READONLY_STATES args: 'Order Date'
  • date_planned Datetime
    index=True string='Receipt Date'
  • dest_address_id Many2one → res.partner
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" help='Put an address if you want to deliver directly from the vendor to the customer. Otherwise, keep empty to deliver to your own company.' states=READONLY_STATES string='Drop Ship Address' args: 'res.partner'
  • fiscal_position_id Many2one → account.fiscal.position
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" string='Fiscal Position' args: 'account.fiscal.position'
  • 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'
  • invoice_count Integer
    compute='_compute_invoice' copy=False default=0 store=True string='Bill Count'
  • invoice_ids Many2many → account.move
    compute='_compute_invoice' copy=False store=True string='Bills' args: 'account.move'
  • invoice_status Selection
    compute='_get_invoiced' copy=False default='no' readonly=True store=True string='Billing Status' args: [('no', 'Nothing to Bill'), ('to invoice', 'Waiting Bills'), ('invoiced', 'Fully Billed')]
  • name Char
    copy=False default='New' index=True required=True args: 'Order Reference'
  • notes Text
    args: 'Terms and Conditions'
  • order_line One2many → purchase.order.line
    copy=True states={'cancel': [('readonly', True)], 'done': [('readonly', True)]} string='Order Lines' args: 'purchase.order.line', 'order_id'
  • origin Char
    copy=False help='Reference of the document that generated this purchase order request (e.g. a sales order)' args: 'Source Document'
  • partner_id Many2one → res.partner
    change_default=True domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" help='You can find a vendor by its Name, TIN, Email or Internal Reference.' required=True states=READONLY_STATES string='Vendor' tracking=True args: 'res.partner'
  • partner_ref Char
    copy=False help="Reference of the sales order or bid sent by the vendor. It's used to do the matching when you receive the products as this reference is usually written on the delivery order sent by your vendor." args: 'Vendor Reference'
  • payment_term_id Many2one → account.payment.term
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" args: 'account.payment.term', 'Payment Terms'
  • product_id Many2one → product.product
    readonly=False related='order_line.product_id' string='Product' args: 'product.product'
  • state Selection
    copy=False default='draft' index=True readonly=True string='Status' tracking=True args: [('draft', 'RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Locked'), ('cancel', 'Cancelled')]
  • user_id Many2one → res.users
    check_company=True default=<expr> index=True string='Purchase Representative' tracking=True args: 'res.users'
Public methods (17)
  • action_rfq_send(self)
    This function opens a window to compose an email, with the edi purchase template message loaded by default
  • action_view_invoice(self)
    This function returns an action that display existing vendor bills of given purchase order ids. When only one found, show the vendor bill immediately.
  • button_approve(self, force=False)
  • button_cancel(self)
  • button_confirm(self)
  • button_done(self)
  • button_draft(self)
  • button_unlock(self)
  • copy(self, default=None)
  • create(self, vals)
    @api.model
  • message_post(self, **kwargs)
    @api.returns('mail.message', <expr>)
  • name_get(self)
    @api.depends('name', 'partner_ref')
  • onchange_partner_id(self)
    @api.onchange('partner_id', 'company_id')
  • onchange_partner_id_warning(self)
    @api.onchange('partner_id')
  • print_quotation(self)
  • unlink(self)
  • write(self, vals)

New fields (28)
  • account_analytic_id Many2one → account.analytic.account
    string='Analytic Account' args: 'account.analytic.account'
  • analytic_tag_ids Many2many → account.analytic.tag
    string='Analytic Tags' args: 'account.analytic.tag'
  • company_id Many2one → res.company
    readonly=True related='order_id.company_id' store=True string='Company' args: 'res.company'
  • currency_id Many2one
    readonly=True related='order_id.currency_id' store=True string='Currency'
  • date_order Datetime
    readonly=True related='order_id.date_order' string='Order Date'
  • date_planned Datetime
    index=True string='Scheduled Date'
  • display_type Selection
    default=False help='Technical field for UX purpose.' args: [('line_section', 'Section'), ('line_note', 'Note')]
  • invoice_lines One2many → account.move.line
    copy=False readonly=True string='Bill Lines' args: 'account.move.line', 'purchase_line_id'
  • name Text
    required=True string='Description'
  • order_id Many2one → purchase.order
    index=True ondelete='cascade' required=True string='Order Reference' args: 'purchase.order'
  • partner_id Many2one → res.partner
    readonly=True related='order_id.partner_id' store=True string='Partner' args: 'res.partner'
  • price_subtotal Monetary
    compute='_compute_amount' store=True string='Subtotal'
  • price_tax Float
    compute='_compute_amount' store=True string='Tax'
  • price_total Monetary
    compute='_compute_amount' store=True string='Total'
  • price_unit Float
    digits='Product Price' required=True string='Unit Price'
  • product_id Many2one → product.product
    change_default=True domain=[('purchase_ok', '=', True)] string='Product' args: 'product.product'
  • product_qty Float
    digits='Product Unit of Measure' required=True string='Quantity'
  • product_type Selection
    readonly=True related='product_id.type'
  • product_uom Many2one → uom.uom
    domain="[('category_id', '=', product_uom_category_id)]" string='Unit of Measure' args: 'uom.uom'
  • product_uom_category_id Many2one
    related='product_id.uom_id.category_id'
  • product_uom_qty Float
    compute='_compute_product_uom_qty' store=True string='Total Quantity'
  • qty_invoiced Float
    compute='_compute_qty_invoiced' digits='Product Unit of Measure' store=True string='Billed Qty'
  • qty_received Float
    compute='_compute_qty_received' compute_sudo=True digits='Product Unit of Measure' inverse='_inverse_qty_received' store=True args: 'Received Qty'
  • qty_received_manual Float
    copy=False digits='Product Unit of Measure' args: 'Manual Received Qty'
  • qty_received_method Selection
    compute='_compute_qty_received_method' help='According to product configuration, the recieved quantity can be automatically computed by mechanism :\n - Manual: the quantity is set manually on the line\n - Stock Moves: the quantity comes from confirmed pickings\n' store=True string='Received Qty Method' args: [('manual', 'Manual')]
  • sequence Integer
    default=10 string='Sequence'
  • state Selection
    readonly=False related='order_id.state' store=True
  • taxes_id Many2many → account.tax
    domain=['|', ('active', '=', False), ('active', '=', True)] string='Taxes' args: 'account.tax'
Public methods (5)
  • create(self, values)
    @api.model
  • onchange_product_id(self)
    @api.onchange('product_id')
  • onchange_product_id_warning(self)
    @api.onchange('product_id')
  • unlink(self)
  • write(self, values)

New fields (28)
  • account_analytic_id Many2one → account.analytic.account
    readonly=True args: 'account.analytic.account', 'Analytic Account'
  • category_id Many2one → product.category
    readonly=True args: 'product.category', 'Product Category'
  • commercial_partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Commercial Entity'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • country_id Many2one → res.country
    readonly=True args: 'res.country', 'Partner Country'
  • currency_id Many2one → res.currency
    readonly=True args: 'res.currency', 'Currency'
  • date_approve Datetime
    readonly=True args: 'Confirmation Date'
  • date_order Datetime
    help='Date on which this document has been created' readonly=True args: 'Order Date'
  • delay Float
    digits=(16, 2) group_operator='avg' readonly=True args: 'Days to Confirm'
  • delay_pass Float
    digits=(16, 2) group_operator='avg' readonly=True args: 'Days to Receive'
  • fiscal_position_id Many2one → account.fiscal.position
    readonly=True string='Fiscal Position' args: 'account.fiscal.position'
  • nbr_lines Integer
    readonly=True args: '# of Lines'
  • order_id Many2one → purchase.order
    readonly=True args: 'purchase.order', 'Order'
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Vendor'
  • price_average Float
    group_operator='avg' readonly=True args: 'Average Cost'
  • price_total Float
    readonly=True args: 'Total'
  • product_id Many2one → product.product
    readonly=True args: 'product.product', 'Product'
  • product_tmpl_id Many2one → product.template
    readonly=True args: 'product.template', 'Product Template'
  • product_uom Many2one → uom.uom
    required=True args: 'uom.uom', 'Reference Unit of Measure'
  • qty_billed Float
    readonly=True args: 'Qty Billed'
  • qty_ordered Float
    readonly=True args: 'Qty Ordered'
  • qty_received Float
    readonly=True args: 'Qty Received'
  • qty_to_be_billed Float
    readonly=True args: 'Qty to be Billed'
  • state Selection
    readonly=True args: [('draft', 'Draft RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Order Status'
  • untaxed_total Float
    readonly=True args: 'Untaxed Total'
  • user_id Many2one → res.users
    readonly=True args: 'res.users', 'Purchase Representative'
  • volume Float
    readonly=True args: 'Volume'
  • weight Float
    readonly=True args: 'Gross Weight'
Public methods (1)
  • init(self)

New fields (4)
  • po_double_validation Selection
    default='one_step' help='Provide a double validation mechanism for purchases' string='Levels of Approvals' args: [('one_step', 'Confirm purchase orders in one step'), ('two_step', 'Get 2 levels of approvals to confirm a purchase order')]
  • po_double_validation_amount Monetary
    default=5000 help='Minimum amount for which a double validation is required' string='Double validation amount'
  • po_lead Float
    default=0.0 help='Margin of error for vendor lead times. When the system generates Purchase Orders for procuring products, they will be scheduled that many days earlier to cope with unexpected vendor delays.' required=True string='Purchase Lead Time'
  • po_lock Selection
    default='edit' help='Purchase Order Modification used when you want to purchase order editable after confirm' string='Purchase Order Modification' args: [('edit', 'Allow to edit purchase orders'), ('lock', 'Confirmed purchase orders are not editable')]
Public methods (0)

No public methods.

New fields (13)
  • company_currency_id Many2one → res.currency
    help='Utility field to express amount currency' readonly=True related='company_id.currency_id' string='Company Currency' args: 'res.currency'
  • default_purchase_method Selection
    default='receive' default_model='product.template' help='This default value is applied to any new product created. This can be changed in the product detail form.' string='Bill Control' args: [('purchase', 'Ordered quantities'), ('receive', 'Received quantities')]
  • group_warning_purchase Boolean
    implied_group='purchase.group_warning_purchase' args: 'Purchase Warnings'
  • lock_confirmed_po Boolean
    default=<expr> args: 'Lock Confirmed Orders'
  • module_account_3way_match Boolean
    args: '3-way matching: purchases, receptions and bills'
  • module_purchase_product_matrix Boolean
    args: 'Purchase Grid Entry'
  • module_purchase_requisition Boolean
    args: 'Purchase Agreements'
  • po_double_validation Selection
    readonly=False related='company_id.po_double_validation' string='Levels of Approvals *'
  • po_double_validation_amount Monetary
    currency_field='company_currency_id' readonly=False related='company_id.po_double_validation_amount' string='Minimum Amount'
  • po_lead Float
    readonly=False related='company_id.po_lead'
  • po_lock Selection
    readonly=False related='company_id.po_lock' string='Purchase Order Modification *'
  • po_order_approval Boolean
    default=<expr> args: 'Purchase Order Approval'
  • use_po_lead Boolean
    config_parameter='purchase.use_po_lead' help='Margin of error for vendor lead times. When the system generates Purchase Orders for reordering products,they will be scheduled that many days earlier to cope with unexpected vendor delays.' string='Security Lead Time for Purchase'
Public methods (1)
  • set_values(self)

New fields (5)
  • property_purchase_currency_id Many2one → res.currency
    company_dependent=True help='This currency will be used, instead of the default one, for purchases from the current partner' string='Supplier Currency' args: 'res.currency'
  • purchase_order_count Integer
    compute='_compute_purchase_order_count' string='Purchase Order Count'
  • purchase_warn Selection
    default='no-message' help=WARNING_HELP args: WARNING_MESSAGE, 'Purchase Order'
  • purchase_warn_msg Text
    args: 'Message for Purchase Order'
  • supplier_invoice_count Integer
    compute='_compute_supplier_invoice_count' string='# Vendor Bills'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/12.0/purchase
VERSION
VERSION 1.2
CATEGORY
CATEGORYPurchases
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Fabien Pinckaers, Olivier Dony, Thibault Delavallée, Denis Ledoux, Christophe Simonis, Xavier Morel, Goffin Simon, Simon Lejeune, Nicolas Martinelli, Nicolas Lempereur, xmo-odoo, Richard Mathot, qdp-odoo, Géry Debongnie, Jeremy Kersten, GitHub, Lucas Perais (lpe), Olivier Colson, Yannick Tivisse, Alexandre Kühn, qsm-odoo, Pierre Masereel, Romain Derie, jem-odoo, RomainLibert, Christophe Monniez, Jorge Pinna Puissant, Nans Lefebvre, Toufik Ben Jaa, Arnold Moyaux, Adrian Torres, mreficent, XavierDo, Priyanka Kakadiya, Xavier-Do, Victor Feyens, Florimond Husquinet (fhu), Andrea Grazioso (agr-odoo), William Henrotin, Sébastien Theys, david, Jason Van Malder, Kinjal Mehta, Achraf (abz), David Beguin, Adrien Widart, IEL, TWA
WEBSITE
WEBSITEhttps://www.odoo.com/page/purchase
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:57:01
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - http_routing
    - digest
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (37)
XML IDNameModelTypeStatus
portal_my_home_menu_purchase Portal layout : purchase menu entries ir.ui.view qweb Inherits portal.portal_breadcrumbs
portal_my_home_purchase Portal My Home : purchase entry ir.ui.view qweb Inherits portal.portal_my_home
portal_my_purchase_order Portal: My Purchase Order ir.ui.view qweb New
portal_my_purchase_orders Portal: My Purchase Orders ir.ui.view qweb New
product_normal_form_view_inherit_purchase product.product.purchase.order product.product button Inherits product.product_normal_form_view
product_template_form_view product.normal.form.inherit.stock product.template field Inherits account.product_template_form_view
purchase_order_calendar purchase.order.calendar purchase.order calendar New
purchase_order_form purchase.order.form purchase.order form New
purchase_order_graph purchase.order.graph purchase.order graph New
purchase_order_line_form2 purchase.order.line.form2 purchase.order.line form New
purchase_order_line_search purchase.order.line.search purchase.order.line search New
purchase_order_line_tree purchase.order.line.tree purchase.order.line tree New
purchase_order_pivot purchase.order.pivot purchase.order pivot New
purchase_order_tree purchase.order.tree purchase.order tree New
purchase_partner_kanban_view res.partner.kanban.purchaseorder.inherit res.partner field Inherits base.res_partner_kanban_view
report_purchaseorder report_purchaseorder ir.ui.view qweb New
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb New
report_purchasequotation report_purchasequotation ir.ui.view qweb New
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb New
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits base.res_config_settings_view_form
res_partner_view_purchase_account_buttons res.partner.view.purchase.account.buttons res.partner button Inherits base.view_partner_form
res_partner_view_purchase_buttons res.partner.view.purchase.buttons res.partner button Inherits base.view_partner_form
track_po_line_template track_po_line_template ir.ui.view qweb New
view_category_property_form product.category.property.form.inherit.stock product.category field Inherits account.view_category_property_form
view_invoice_line_form_inherit_purchase account.invoice.line.form.inherit.purchase account.invoice.line field Inherits account.view_invoice_line_form
view_invoice_supplier_purchase_form account.invoice.supplier.purchase account.invoice field Inherits account.invoice_supplier_form
view_partner_property_form res.partner.purchase.property.form.inherit res.partner group Inherits base.view_partner_form
view_product_account_purchase_ok_form product.template.account.purchase.ok.form.inherit product.template field Inherits account.product_template_form_view
view_product_supplier_inherit product.template.supplier.form.inherit product.template xpath Inherits product.product_template_form_view
view_product_template_purchase_buttons_from product.template.purchase.button.inherit product.template button Inherits product.product_template_only_form_view
view_purchase_bill_union_filter purchase.bill.union.select purchase.bill.union search New
view_purchase_bill_union_tree purchase.bill.union.tree purchase.bill.union tree New
view_purchase_order_filter request.quotation.select purchase.order search New
view_purchase_order_graph product.month.graph purchase.report graph New
view_purchase_order_kanban purchase.order.kanban purchase.order kanban New
view_purchase_order_pivot product.month.pivot purchase.report pivot New
view_purchase_order_search report.purchase.order.search purchase.report search New
Models touched (13)

New fields (2)
  • purchase_id Many2one → purchase.order
    comodel_name='purchase.order' help='Load the vendor bill based on selected purchase order. Several PO can be selected.' readonly=True states={'draft': [('readonly', False)]} string='Add Purchase Order'
  • vendor_bill_purchase_id Many2one → purchase.bill.union
    comodel_name='purchase.bill.union' string='Auto-Complete'
Public methods (3)
  • create(self, vals)
    @api.model
  • purchase_order_change(self)
    @api.onchange('purchase_id')
  • write(self, vals)
    @api.multi

New fields (2)
  • purchase_id Many2one → purchase.order
    help='Associated Purchase Order. Filled in automatically when a PO is chosen on the vendor bill.' readonly=True related='purchase_line_id.order_id' related_sudo=False store=False string='Purchase Order' args: 'purchase.order'
  • 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)
  • 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)
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' string='Purchased'
Public methods (1)
  • action_view_po(self)
    @api.multi

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (5)
  • 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'
  • purchase_line_warn Selection
    default='no-message' help=WARNING_HELP required=True args: WARNING_MESSAGE, 'Purchase Order Line'
  • purchase_line_warn_msg Text
    args: 'Message for Purchase Order Line'
  • purchase_method Selection
    default='receive' help='On ordered quantities: Control bills based on ordered quantities.\nOn received quantities: Control bills based on received quantities.' string='Control Policy' args: [('purchase', 'On ordered quantities'), ('receive', 'On received quantities')]
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' string='Purchased'
Public methods (2)
  • action_view_po(self)
    @api.multi
  • get_import_templates(self)
    @api.model

New fields (9)
  • amount Float
    readonly=True string='Amount'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • currency_id Many2one → res.currency
    readonly=True string='Currency' args: 'res.currency'
  • date Date
    readonly=True string='Date'
  • name Char
    readonly=True string='Reference'
  • partner_id Many2one → res.partner
    readonly=True string='Vendor' args: 'res.partner'
  • purchase_order_id Many2one → purchase.order
    readonly=True string='Purchase Order' args: 'purchase.order'
  • reference Char
    readonly=True string='Source'
  • vendor_bill_id Many2one → account.invoice
    readonly=True string='Vendor Bill' args: 'account.invoice'
Public methods (2)
  • init(self)
    @api.model_cr
  • name_get(self)

New fields (24)
  • amount_tax Monetary
    compute='_amount_all' readonly=True store=True string='Taxes'
  • amount_total Monetary
    compute='_amount_all' readonly=True store=True string='Total'
  • amount_untaxed Monetary
    compute='_amount_all' readonly=True store=True string='Untaxed Amount' track_visibility='always'
  • company_id Many2one → res.company
    default=<expr> index=True required=True states=READONLY_STATES args: 'res.company', 'Company'
  • currency_id Many2one → res.currency
    default=_default_currency_id required=True states=READONLY_STATES args: 'res.currency', 'Currency'
  • date_approve Date
    copy=False index=True readonly=1 args: 'Approval Date'
  • date_order Datetime
    copy=False default=fields.Datetime.now help='Depicts the date where the Quotation should be validated and converted into a purchase order.' index=True required=True states=READONLY_STATES args: 'Order Date'
  • date_planned Datetime
    compute='_compute_date_planned' index=True store=True string='Scheduled Date'
  • dest_address_id Many2one → res.partner
    help='Put an address if you want to deliver directly from the vendor to the customer. Otherwise, keep empty to deliver to your own company.' states=READONLY_STATES string='Drop Ship Address' args: 'res.partner'
  • fiscal_position_id Many2one → account.fiscal.position
    oldname='fiscal_position' string='Fiscal Position' args: 'account.fiscal.position'
  • 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'
  • invoice_count Integer
    compute='_compute_invoice' copy=False default=0 store=True string='Bill Count'
  • invoice_ids Many2many → account.invoice
    compute='_compute_invoice' copy=False store=True string='Bills' args: 'account.invoice'
  • invoice_status Selection
    compute='_get_invoiced' copy=False default='no' readonly=True store=True string='Billing Status' args: [('no', 'Nothing to Bill'), ('to invoice', 'Waiting Bills'), ('invoiced', 'No Bill to Receive')]
  • name Char
    copy=False default='New' index=True required=True args: 'Order Reference'
  • notes Text
    args: 'Terms and Conditions'
  • order_line One2many → purchase.order.line
    copy=True states={'cancel': [('readonly', True)], 'done': [('readonly', True)]} string='Order Lines' args: 'purchase.order.line', 'order_id'
  • origin Char
    copy=False help='Reference of the document that generated this purchase order request (e.g. a sales order)' args: 'Source Document'
  • partner_id Many2one → res.partner
    change_default=True help='You can find a vendor by its Name, TIN, Email or Internal Reference.' required=True states=READONLY_STATES string='Vendor' track_visibility='always' args: 'res.partner'
  • partner_ref Char
    copy=False help="Reference of the sales order or bid sent by the vendor. It's used to do the matching when you receive the products as this reference is usually written on the delivery order sent by your vendor." args: 'Vendor Reference'
  • payment_term_id Many2one → account.payment.term
    args: 'account.payment.term', 'Payment Terms'
  • product_id Many2one → product.product
    readonly=False related='order_line.product_id' string='Product' args: 'product.product'
  • state Selection
    copy=False default='draft' index=True readonly=True string='Status' track_visibility='onchange' args: [('draft', 'RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Locked'), ('cancel', 'Cancelled')]
  • user_id Many2one → res.users
    default=<expr> index=True string='Purchase Representative' track_visibility='onchange' args: 'res.users'
Public methods (17)
  • action_rfq_send(self)
    @api.multi
    This function opens a window to compose an email, with the edi purchase template message loaded by default
  • action_set_date_planned(self)
    @api.multi
  • action_view_invoice(self)
    @api.multi
    This function returns an action that display existing vendor bills of given purchase order ids. When only one found, show the vendor bill immediately.
  • button_approve(self, force=False)
    @api.multi
  • button_cancel(self)
    @api.multi
  • button_confirm(self)
    @api.multi
  • button_done(self)
    @api.multi
  • button_draft(self)
    @api.multi
  • button_unlock(self)
    @api.multi
  • copy(self, default=None)
    @api.multi
  • create(self, vals)
    @api.model
  • message_post(self, **kwargs)
    @api.multi@api.returns('mail.message', <expr>)
  • name_get(self)
    @api.multi@api.depends('name', 'partner_ref')
  • onchange_partner_id(self)
    @api.onchange('partner_id', 'company_id')
  • onchange_partner_id_warning(self)
    @api.onchange('partner_id')
  • print_quotation(self)
    @api.multi
  • unlink(self)
    @api.multi

New fields (25)
  • account_analytic_id Many2one → account.analytic.account
    string='Analytic Account' args: 'account.analytic.account'
  • analytic_tag_ids Many2many → account.analytic.tag
    string='Analytic Tags' args: 'account.analytic.tag'
  • company_id Many2one → res.company
    readonly=True related='order_id.company_id' store=True string='Company' args: 'res.company'
  • currency_id Many2one
    readonly=True related='order_id.currency_id' store=True string='Currency'
  • date_order Datetime
    readonly=True related='order_id.date_order' string='Order Date'
  • date_planned Datetime
    index=True required=True string='Scheduled Date'
  • invoice_lines One2many → account.invoice.line
    copy=False readonly=True string='Bill Lines' args: 'account.invoice.line', 'purchase_line_id'
  • name Text
    required=True string='Description'
  • order_id Many2one → purchase.order
    index=True ondelete='cascade' required=True string='Order Reference' args: 'purchase.order'
  • partner_id Many2one → res.partner
    readonly=True related='order_id.partner_id' store=True string='Partner' args: 'res.partner'
  • price_subtotal Monetary
    compute='_compute_amount' store=True string='Subtotal'
  • price_tax Float
    compute='_compute_amount' store=True string='Tax'
  • price_total Monetary
    compute='_compute_amount' store=True string='Total'
  • price_unit Float
    digits=dp.get_precision('Product Price') required=True string='Unit Price'
  • product_id Many2one → product.product
    change_default=True domain=[('purchase_ok', '=', True)] required=True string='Product' args: 'product.product'
  • product_image Binary
    help='Non-stored related field to allow portal user to see the image of the product he has ordered' readonly=False related='product_id.image' args: 'Product Image'
  • product_qty Float
    digits=dp.get_precision('Product Unit of Measure') required=True string='Quantity'
  • product_type Selection
    readonly=True related='product_id.type'
  • product_uom Many2one → uom.uom
    required=True string='Product Unit of Measure' args: 'uom.uom'
  • product_uom_qty Float
    compute='_compute_product_uom_qty' store=True string='Total Quantity'
  • qty_invoiced Float
    compute='_compute_qty_invoiced' digits=dp.get_precision('Product Unit of Measure') store=True string='Billed Qty'
  • qty_received Float
    copy=False digits=dp.get_precision('Product Unit of Measure') string='Received Qty'
  • sequence Integer
    default=10 string='Sequence'
  • state Selection
    readonly=False related='order_id.state' store=True
  • taxes_id Many2many → account.tax
    domain=['|', ('active', '=', False), ('active', '=', True)] string='Taxes' args: 'account.tax'
Public methods (5)
  • create(self, values)
    @api.model
  • onchange_product_id(self)
    @api.onchange('product_id')
  • onchange_product_id_warning(self)
    @api.onchange('product_id')
  • unlink(self)
    @api.multi
  • write(self, values)
    @api.multi

New fields (25)
  • account_analytic_id Many2one → account.analytic.account
    readonly=True args: 'account.analytic.account', 'Analytic Account'
  • category_id Many2one → product.category
    readonly=True args: 'product.category', 'Product Category'
  • commercial_partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Commercial Entity'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • country_id Many2one → res.country
    readonly=True args: 'res.country', 'Partner Country'
  • currency_id Many2one → res.currency
    readonly=True args: 'res.currency', 'Currency'
  • date_approve Date
    readonly=True args: 'Date Approved'
  • date_order Datetime
    help='Date on which this document has been created' oldname='date' readonly=True args: 'Order Date'
  • delay Float
    digits=(16, 2) readonly=True args: 'Days to Validate'
  • delay_pass Float
    digits=(16, 2) readonly=True args: 'Days to Deliver'
  • fiscal_position_id Many2one → account.fiscal.position
    oldname='fiscal_position' readonly=True string='Fiscal Position' args: 'account.fiscal.position'
  • nbr_lines Integer
    oldname='nbr' readonly=True args: '# of Lines'
  • negociation Float
    group_operator='avg' readonly=True args: 'Purchase-Standard Price'
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Vendor'
  • price_average Float
    group_operator='avg' readonly=True args: 'Average Price'
  • price_standard Float
    group_operator='sum' readonly=True args: 'Products Value'
  • price_total Float
    readonly=True args: 'Total Price'
  • product_id Many2one → product.product
    readonly=True args: 'product.product', 'Product'
  • product_tmpl_id Many2one → product.template
    readonly=True args: 'product.template', 'Product Template'
  • product_uom Many2one → uom.uom
    required=True args: 'uom.uom', 'Reference Unit of Measure'
  • state Selection
    readonly=True args: [('draft', 'Draft RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Order Status'
  • unit_quantity Float
    oldname='quantity' readonly=True args: 'Product Quantity'
  • user_id Many2one → res.users
    readonly=True args: 'res.users', 'Purchase Representative'
  • volume Float
    readonly=True args: 'Volume'
  • weight Float
    readonly=True args: 'Gross Weight'
Public methods (1)
  • init(self)
    @api.model_cr

New fields (4)
  • po_double_validation Selection
    default='one_step' help='Provide a double validation mechanism for purchases' string='Levels of Approvals' args: [('one_step', 'Confirm purchase orders in one step'), ('two_step', 'Get 2 levels of approvals to confirm a purchase order')]
  • po_double_validation_amount Monetary
    default=5000 help='Minimum amount for which a double validation is required' string='Double validation amount'
  • po_lead Float
    default=0.0 help='Margin of error for vendor lead times. When the system generates Purchase Orders for procuring products, they will be scheduled that many days earlier to cope with unexpected vendor delays.' required=True string='Purchase Lead Time'
  • po_lock Selection
    default='edit' help='Purchase Order Modification used when you want to purchase order editable after confirm' string='Purchase Order Modification' args: [('edit', 'Allow to edit purchase orders'), ('lock', 'Confirmed purchase orders are not editable')]
Public methods (0)

No public methods.

New fields (13)
  • company_currency_id Many2one → res.currency
    help='Utility field to express amount currency' readonly=True related='company_id.currency_id' string='Company Currency' args: 'res.currency'
  • default_purchase_method Selection
    default='receive' default_model='product.template' help='This default value is applied to any new product created. This can be changed in the product detail form.' string='Bill Control' args: [('purchase', 'Ordered quantities'), ('receive', 'Delivered quantities')]
  • group_manage_vendor_price Boolean
    implied_group='purchase.group_manage_vendor_price' args: 'Vendor Pricelists'
  • group_warning_purchase Boolean
    implied_group='purchase.group_warning_purchase' args: 'Purchase Warnings'
  • lock_confirmed_po Boolean
    default=<expr> args: 'Lock Confirmed Orders'
  • module_account_3way_match Boolean
    args: '3-way matching: purchases, receptions and bills'
  • module_purchase_requisition Boolean
    args: 'Purchase Agreements'
  • po_double_validation Selection
    readonly=False related='company_id.po_double_validation' string='Levels of Approvals *'
  • po_double_validation_amount Monetary
    currency_field='company_currency_id' readonly=False related='company_id.po_double_validation_amount' string='Minimum Amount'
  • po_lead Float
    readonly=False related='company_id.po_lead'
  • po_lock Selection
    readonly=False related='company_id.po_lock' string='Purchase Order Modification *'
  • po_order_approval Boolean
    default=<expr> args: 'Purchase Order Approval'
  • use_po_lead Boolean
    config_parameter='purchase.use_po_lead' help='Margin of error for vendor lead times. When the system generates Purchase Orders for reordering products,they will be scheduled that many days earlier to cope with unexpected vendor delays.' oldname='default_new_po_lead' string='Security Lead Time for Purchase'
Public methods (1)
  • set_values(self)

New fields (5)
  • property_purchase_currency_id Many2one → res.currency
    company_dependent=True help='This currency will be used, instead of the default one, for purchases from the current partner' string='Supplier Currency' args: 'res.currency'
  • purchase_order_count Integer
    compute='_compute_purchase_order_count' string='Purchase Order Count'
  • purchase_warn Selection
    default='no-message' help=WARNING_HELP args: WARNING_MESSAGE, 'Purchase Order'
  • purchase_warn_msg Text
    args: 'Message for Purchase Order'
  • supplier_invoice_count Integer
    compute='_compute_supplier_invoice_count' string='# Vendor Bills'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/11.0/purchase
VERSION
VERSION 1.2
CATEGORY
CATEGORYPurchases
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Fabien Pinckaers, Olivier Dony, Thibault Delavallée, Denis Ledoux, Christophe Simonis, Xavier Morel, Joren Van Onder, Goffin Simon, Simon Lejeune, Nicolas Martinelli, Nicolas Lempereur, Jérome Maes, Richard Mathot, qdp-odoo, Géry Debongnie, Aaron Bohy, Jeremy Kersten, GitHub, Lucas Perais (lpe), Damien Bouvy, Olivier Colson, Yannick Tivisse, qsm-odoo, Martin Geubelle, Odoo Online, Pierre Masereel, Laurent Smet, Adrien Dieudonne, len-odoo, Jorge Pinna Puissant, Nans Lefebvre, amoyaux, Arnold Moyaux, Adrian Torres, mreficent, Florimond Husquinet (fhu), Enric Tobella
WEBSITE
WEBSITEhttps://www.odoo.com/page/purchase
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:53:42
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock_account
    - stock
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - barcodes
    - web_planner
    - account
    - analytic
    - portal
    - http_routing
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (39)
XML IDNameModelTypeStatus
portal_my_home_menu_purchase Portal layout : purchase menu entries ir.ui.view qweb Inherits portal.portal_layout
portal_my_home_purchase Portal My Home : purchase entry ir.ui.view qweb Inherits portal.portal_my_home
portal_my_purchase_order Portal: My Purchase Order ir.ui.view qweb New
portal_my_purchase_orders Portal: My Purchase Orders ir.ui.view qweb New
product_template_form_view product.normal.form.inherit.stock product.template field Inherits account.product_template_form_view
purchase_order_calendar purchase.order.calendar purchase.order calendar New
purchase_order_form purchase.order.form purchase.order form New
purchase_order_graph purchase.order.graph purchase.order graph New
purchase_order_line_form2 purchase.order.line.form2 purchase.order.line form New
purchase_order_line_search purchase.order.line.search purchase.order.line search New
purchase_order_line_tree purchase.order.line.tree purchase.order.line tree New
purchase_order_pivot purchase.order.pivot purchase.order pivot New
purchase_order_tree purchase.order.tree purchase.order tree New
purchase_partner_kanban_view res.partner.kanban.purchaseorder.inherit res.partner field Inherits base.res_partner_kanban_view
report_purchaseorder report_purchaseorder ir.ui.view qweb New
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb New
report_purchasequotation report_purchasequotation ir.ui.view qweb New
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb New
res_config_settings_view_form_account res.config.settings.view.form.inherit.purchase.account res.config.settings div Inherits account.res_config_settings_view_form
res_config_settings_view_form_purchase res.config.settings.view.form.inherit.purchase res.config.settings xpath Inherits base.res_config_settings_view_form
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_account_buttons res.partner.view.purchase.account.buttons res.partner button Inherits base.view_partner_form
res_partner_view_purchase_buttons res.partner.view.purchase.buttons res.partner button Inherits base.view_partner_form
stock_move_purchase stock.move.form stock.move xpath Inherits stock.view_move_form
track_po_line_template track_po_line_template ir.ui.view qweb New
view_category_property_form product.category.property.form.inherit.stock product.category field Inherits account.view_category_property_form
view_invoice_line_form_inherit_purchase account.invoice.line.form.inherit.purchase account.invoice.line field Inherits account.view_invoice_line_form
view_invoice_supplier_purchase_form account.invoice.supplier.purchase account.invoice field Inherits account.invoice_supplier_form
view_partner_property_form res.partner.purchase.property.form.inherit res.partner group Inherits base.view_partner_form
view_product_account_purchase_ok_form product.template.account.purchase.ok.form.inherit product.template field Inherits account.product_template_form_view
view_product_supplier_inherit product.template.supplier.form.inherit product.template page Inherits product.product_template_form_view
view_product_template_purchase_buttons_from product.template.purchase.button.inherit product.template button Inherits product.product_template_only_form_view
view_purchase_order_filter request.quotation.select purchase.order search New
view_purchase_order_graph product.month.graph purchase.report graph New
view_purchase_order_kanban purchase.order.kanban purchase.order kanban New
view_purchase_order_pivot product.month.pivot purchase.report pivot New
view_purchase_order_search report.purchase.order.search purchase.report search New
view_warehouse_inherited Stock Warehouse Inherited stock.warehouse xpath Inherits stock.view_warehouse
view_warehouse_orderpoint_purchase_form stock.warehouse.orderpoint.purchase.form stock.warehouse.orderpoint div Inherits stock.view_warehouse_orderpoint_form
Models touched (21)

New fields (1)
  • purchase_id Many2one → purchase.order
    comodel_name='purchase.order' help='Encoding help. When selected, the associated purchase order lines are added to the vendor bill. Several PO can be selected.' readonly=True states={'draft': [('readonly', False)]} string='Add Purchase Order'
Public methods (4)
  • create(self, vals)
    @api.model
  • invoice_line_move_line_get(self)
    @api.model
  • purchase_order_change(self)
    @api.onchange('purchase_id')
  • write(self, vals)
    @api.multi

New fields (2)
  • purchase_id Many2one → purchase.order
    help='Associated Purchase Order. Filled in automatically when a PO is chosen on the vendor bill.' readonly=True related='purchase_line_id.order_id' related_sudo=False store=False string='Purchase Order' args: 'purchase.order'
  • 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 (0)

No new fields.

Public methods (2)
  • mail_purchase_order_on_send(self)
    @api.multi
  • send_mail(self, auto_commit=False)
    @api.multi

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 (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_count Integer
    compute='_purchase_count' string='# Purchases'
Public methods (0)

No public methods.

New fields (6)
  • property_account_creditor_price_difference Many2one → account.account
    company_dependent=True help='This account will be used to value price difference between purchase price and cost price.' string='Price Difference Account' args: 'account.account'
  • purchase_count Integer
    compute='_purchase_count' string='# Purchases'
  • purchase_line_warn Selection
    default='no-message' help=WARNING_HELP required=True args: WARNING_MESSAGE, 'Purchase Order Line'
  • purchase_line_warn_msg Text
    args: 'Message for Purchase Order Line'
  • purchase_method Selection
    default='receive' help='On ordered quantities: control bills based on ordered quantities.\nOn received quantities: control bills based on received quantity.' string='Control Policy' args: [('purchase', 'On ordered quantities'), ('receive', 'On received quantities')]
  • route_ids Many2many
    default=<expr>
Public methods (0)

No public methods.

New fields (31)
  • amount_tax Monetary
    compute='_amount_all' readonly=True store=True string='Taxes'
  • amount_total Monetary
    compute='_amount_all' readonly=True store=True string='Total'
  • amount_untaxed Monetary
    compute='_amount_all' readonly=True store=True string='Untaxed Amount' track_visibility='always'
  • company_id Many2one → res.company
    default=<expr> index=True required=True states=READONLY_STATES args: 'res.company', 'Company'
  • create_uid Many2one → res.users
    args: 'res.users', 'Responsible'
  • currency_id Many2one → res.currency
    default=<expr> required=True states=READONLY_STATES args: 'res.currency', 'Currency'
  • date_approve Date
    copy=False index=True readonly=1 args: 'Approval Date'
  • date_order Datetime
    copy=False default=fields.Datetime.now help='Depicts the date where the Quotation should be validated and converted into a purchase order.' index=True required=True states=READONLY_STATES args: 'Order Date'
  • date_planned Datetime
    compute='_compute_date_planned' index=True store=True string='Scheduled Date'
  • 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
    help='Put an address if you want to deliver directly from the vendor to the customer. Otherwise, keep empty to deliver to your own company.' states=READONLY_STATES string='Drop Ship Address' args: 'res.partner'
  • fiscal_position_id Many2one → account.fiscal.position
    oldname='fiscal_position' string='Fiscal Position' args: 'account.fiscal.position'
  • group_id Many2one → procurement.group
    copy=False string='Procurement Group' args: 'procurement.group'
  • incoterm_id Many2one → stock.incoterms
    help='International Commercial Terms are a series of predefined commercial terms used in international transactions.' states={'done': [('readonly', True)]} args: 'stock.incoterms', 'Incoterm'
  • invoice_count Integer
    compute='_compute_invoice' copy=False default=0 store=True string='# of Bills'
  • invoice_ids Many2many → account.invoice
    compute='_compute_invoice' copy=False store=True string='Bills' args: 'account.invoice'
  • invoice_status Selection
    compute='_get_invoiced' copy=False default='no' readonly=True store=True string='Billing Status' args: [('no', 'Nothing to Bill'), ('to invoice', 'Waiting Bills'), ('invoiced', 'No Bill to Receive')]
  • is_shipped Boolean
    compute='_compute_is_shipped'
  • name Char
    copy=False default='New' index=True required=True args: 'Order Reference'
  • notes Text
    args: 'Terms and Conditions'
  • order_line One2many → purchase.order.line
    copy=True states={'cancel': [('readonly', True)], 'done': [('readonly', True)]} string='Order Lines' args: 'purchase.order.line', 'order_id'
  • origin Char
    copy=False help='Reference of the document that generated this purchase order request (e.g. a sales order)' args: 'Source Document'
  • partner_id Many2one → res.partner
    change_default=True required=True states=READONLY_STATES string='Vendor' track_visibility='always' args: 'res.partner'
  • partner_ref Char
    copy=False help="Reference of the sales order or bid sent by the vendor. It's used to do the matching when you receive the products as this reference is usually written on the delivery order sent by your vendor." args: 'Vendor Reference'
  • payment_term_id Many2one → account.payment.term
    args: 'account.payment.term', 'Payment Terms'
  • picking_count Integer
    compute='_compute_picking' compute_sudo=True default=0 store=True string='Receptions'
  • picking_ids Many2many → stock.picking
    compute='_compute_picking' compute_sudo=True 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=READONLY_STATES args: 'stock.picking.type', 'Deliver To'
  • product_id Many2one → product.product
    related='order_line.product_id' string='Product' args: 'product.product'
  • state Selection
    copy=False default='draft' index=True readonly=True string='Status' track_visibility='onchange' args: [('draft', 'RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Locked'), ('cancel', 'Cancelled')]
  • website_url Char
    compute='_website_url' help='The full URL to access the document through the website.' args: 'Website URL'
Public methods (18)
  • action_rfq_send(self)
    @api.multi
    This function opens a window to compose an email, with the edi purchase template message loaded by default
  • action_set_date_planned(self)
    @api.multi
  • action_view_invoice(self)
    @api.multi
    This function returns an action that display existing vendor bills of given purchase order ids. When only one found, show the vendor bill immediately.
  • 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
  • button_confirm(self)
    @api.multi
  • button_done(self)
    @api.multi
  • button_draft(self)
    @api.multi
  • button_unlock(self)
    @api.multi
  • copy(self, default=None)
    @api.multi
  • create(self, vals)
    @api.model
  • name_get(self)
    @api.multi@api.depends('name', 'partner_ref')
  • name_search(self, name, args=None, operator='ilike', limit=100)
    @api.model
  • onchange_partner_id(self)
    @api.onchange('partner_id', 'company_id')
  • onchange_partner_id_warning(self)
    @api.onchange('partner_id')
  • print_quotation(self)
    @api.multi
  • unlink(self)
    @api.multi

New fields (26)
  • account_analytic_id Many2one → account.analytic.account
    string='Analytic Account' args: 'account.analytic.account'
  • analytic_tag_ids Many2many → account.analytic.tag
    string='Analytic Tags' args: 'account.analytic.tag'
  • company_id Many2one → res.company
    readonly=True related='order_id.company_id' store=True string='Company' args: 'res.company'
  • currency_id Many2one
    readonly=True related='order_id.currency_id' store=True string='Currency'
  • date_order Datetime
    readonly=True related='order_id.date_order' string='Order Date'
  • date_planned Datetime
    index=True required=True string='Scheduled Date'
  • invoice_lines One2many → account.invoice.line
    copy=False readonly=True string='Bill Lines' args: 'account.invoice.line', 'purchase_line_id'
  • 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'
  • name Text
    required=True string='Description'
  • order_id Many2one → purchase.order
    index=True ondelete='cascade' required=True string='Order Reference' args: 'purchase.order'
  • orderpoint_id Many2one → stock.warehouse.orderpoint
    args: 'stock.warehouse.orderpoint', 'Orderpoint'
  • partner_id Many2one → res.partner
    readonly=True related='order_id.partner_id' store=True string='Partner' args: 'res.partner'
  • price_subtotal Monetary
    compute='_compute_amount' store=True string='Subtotal'
  • price_tax Float
    compute='_compute_amount' store=True string='Tax'
  • price_total Monetary
    compute='_compute_amount' store=True string='Total'
  • price_unit Float
    digits=dp.get_precision('Product Price') required=True string='Unit Price'
  • product_id Many2one → product.product
    change_default=True domain=[('purchase_ok', '=', True)] required=True string='Product' args: 'product.product'
  • product_image Binary
    help='Non-stored related field to allow portal user to see the image of the product he has ordered' related='product_id.image' args: 'Product Image'
  • product_qty Float
    digits=dp.get_precision('Product Unit of Measure') required=True string='Quantity'
  • product_uom Many2one → product.uom
    required=True string='Product Unit of Measure' args: 'product.uom'
  • qty_invoiced Float
    compute='_compute_qty_invoiced' digits=dp.get_precision('Product Unit of Measure') store=True string='Billed Qty'
  • qty_received Float
    compute='_compute_qty_received' compute_sudo=True digits=dp.get_precision('Product Unit of Measure') store=True string='Received Qty'
  • sequence Integer
    default=10 string='Sequence'
  • state Selection
    related='order_id.state' store=True
  • taxes_id Many2many → account.tax
    domain=['|', ('active', '=', False), ('active', '=', True)] string='Taxes' args: 'account.tax'
Public methods (5)
  • create(self, values)
    @api.model
  • onchange_product_id(self)
    @api.onchange('product_id')
  • onchange_product_id_warning(self)
    @api.onchange('product_id')
  • unlink(self)
    @api.multi
  • write(self, values)
    @api.multi

New fields (26)
  • account_analytic_id Many2one → account.analytic.account
    readonly=True args: 'account.analytic.account', 'Analytic Account'
  • category_id Many2one → product.category
    readonly=True args: 'product.category', 'Product Category'
  • commercial_partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Commercial Entity'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • country_id Many2one → res.country
    readonly=True args: 'res.country', 'Partner Country'
  • currency_id Many2one → res.currency
    readonly=True args: 'res.currency', 'Currency'
  • date_approve Date
    readonly=True args: 'Date Approved'
  • date_order Datetime
    help='Date on which this document has been created' oldname='date' readonly=True args: 'Order Date'
  • delay Float
    digits=(16, 2) readonly=True args: 'Days to Validate'
  • delay_pass Float
    digits=(16, 2) readonly=True args: 'Days to Deliver'
  • fiscal_position_id Many2one → account.fiscal.position
    oldname='fiscal_position' readonly=True string='Fiscal Position' args: 'account.fiscal.position'
  • nbr_lines Integer
    oldname='nbr' readonly=True args: '# of Lines'
  • negociation Float
    group_operator='avg' readonly=True args: 'Purchase-Standard Price'
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Vendor'
  • picking_type_id Many2one → stock.warehouse
    readonly=True args: 'stock.warehouse', 'Warehouse'
  • price_average Float
    group_operator='avg' readonly=True args: 'Average Price'
  • price_standard Float
    group_operator='sum' readonly=True args: 'Products Value'
  • price_total Float
    readonly=True args: 'Total Price'
  • product_id Many2one → product.product
    readonly=True args: 'product.product', 'Product'
  • product_tmpl_id Many2one → product.template
    readonly=True args: 'product.template', 'Product Template'
  • product_uom Many2one → product.uom
    required=True args: 'product.uom', 'Reference Unit of Measure'
  • state Selection
    readonly=True args: [('draft', 'Draft RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Order Status'
  • unit_quantity Float
    oldname='quantity' readonly=True args: 'Product Quantity'
  • user_id Many2one → res.users
    readonly=True args: 'res.users', 'Responsible'
  • volume Float
    readonly=True args: 'Volume'
  • weight Float
    readonly=True args: 'Gross Weight'
Public methods (1)
  • init(self)
    @api.model_cr

New fields (4)
  • po_double_validation Selection
    default='one_step' help='Provide a double validation mechanism for purchases' string='Levels of Approvals' args: [('one_step', 'Confirm purchase orders in one step'), ('two_step', 'Get 2 levels of approvals to confirm a purchase order')]
  • po_double_validation_amount Monetary
    default=5000 help='Minimum amount for which a double validation is required' string='Double validation amount'
  • po_lead Float
    default=0.0 help='Margin of error for vendor lead times. When the system generates Purchase Orders for procuring products, they will be scheduled that many days earlier to cope with unexpected vendor delays.' required=True string='Purchase Lead Time'
  • po_lock Selection
    default='edit' help='Purchase Order Modification used when you want to purchase order editable after confirm' string='Purchase Order Modification' args: [('edit', 'Allow to edit purchase orders'), ('lock', 'Confirmed purchase orders are not editable')]
Public methods (0)

No public methods.

New fields (2)
  • po_lead Float
    related='company_id.po_lead'
  • use_po_lead Boolean
    help='Margin of error for vendor lead times. When the system generates Purchase Orders for reordering products,they will be scheduled that many days earlier to cope with unexpected vendor delays.' oldname='default_new_po_lead' string='Security Lead Time for Purchase'
Public methods (2)
  • get_values(self)
  • set_values(self)

New fields (14)
  • company_currency_id Many2one → res.currency
    help='Utility field to express amount currency' readonly=True related='company_id.currency_id' args: 'res.currency'
  • default_purchase_method Selection
    default='receive' default_model='product.template' help='This default value is applied to any new product created. This can be changed in the product detail form.' string='Bill Control' args: [('purchase', 'Ordered quantities'), ('receive', 'Delivered quantities')]
  • group_analytic_account_for_purchases Boolean
    implied_group='purchase.group_analytic_accounting' args: 'Analytic accounting for purchases'
  • group_manage_vendor_price Boolean
    implied_group='purchase.group_manage_vendor_price' args: 'Vendor Pricelists'
  • group_warning_purchase Boolean
    implied_group='purchase.group_warning_purchase' args: 'Warnings'
  • is_installed_sale Boolean
    string='Is the Sale Module Installed'
  • lock_confirmed_po Boolean
    default=<expr> args: 'Lock Confirmed Orders'
  • module_account_3way_match Boolean
    args: '3-way matching: purchases, receptions and bills'
  • module_purchase_requisition Boolean
    args: 'Purchase Agreements'
  • module_stock_dropshipping Boolean
    args: 'Dropshipping'
  • po_double_validation Selection
    related='company_id.po_double_validation' string='Levels of Approvals *'
  • po_double_validation_amount Monetary
    currency_field='company_currency_id' related='company_id.po_double_validation_amount' string='Minimum Amount'
  • po_lock Selection
    related='company_id.po_lock' string='Purchase Order Modification *'
  • po_order_approval Boolean
    default=<expr> args: 'Order Approval'
Public methods (2)
  • get_values(self)
    @api.multi
  • set_values(self)

New fields (5)
  • property_purchase_currency_id Many2one → res.currency
    company_dependent=True help='This currency will be used, instead of the default one, for purchases from the current partner' string='Supplier Currency' args: 'res.currency'
  • purchase_order_count Integer
    compute='_purchase_invoice_count' string='# of Purchase Order'
  • purchase_warn Selection
    default='no-message' help=WARNING_HELP required=True args: WARNING_MESSAGE, 'Purchase Order'
  • purchase_warn_msg Text
    args: 'Message for Purchase Order'
  • supplier_invoice_count Integer
    compute='_purchase_invoice_count' string='# Vendor Bills'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

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 (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 (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • buy_pull_id Many2one → procurement.rule
    args: 'procurement.rule', 'Buy rule'
  • buy_to_resupply Boolean
    default=True help='When products are bought, they can be delivered to this warehouse' args: 'Purchase to resupply this warehouse'
Public methods (2)
  • create_routes(self)
    @api.multi
  • write(self, vals)
    @api.multi

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.
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/10.0/purchase
VERSION
VERSION 1.2
CATEGORY
CATEGORYPurchases
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Christophe Matthieu, Martin Trigaux, Fabien Pinckaers, Olivier Dony, Thibault Delavallée, Josse Colpaert, Denis Ledoux, Fabien Meghazi, Christophe Simonis, David Monjoie, Goffin Simon, Nicolas Martinelli, Nicolas Lempereur, Julien Legros, xmo-odoo, qdp-odoo, Aaron Bohy, Jeremy Kersten, Lucas Perais (lpe), Damien Bouvy, Yannick Tivisse, qsm-odoo, Martin Geubelle, Pierre Masereel, Denis Vermylen (dve), Tanguy Charlier, jem-odoo, Denis Vermylen, Arnold Moyaux
WEBSITE
WEBSITEhttps://www.odoo.com/page/purchase
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:50:48
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock_account
    - stock
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - web
    - bus
    - web_tour
    - report
    - procurement
    - barcodes
    - web_planner
    - account
    - analytic
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Manage goods requirement by Purchase Orders easily
==================================================

Purchase management enables you to track your vendors' price quotations and convert them into purchase orders if necessary.
Odoo has several methods of monitoring invoices and tracking the receipt of ordered goods. You can handle partial deliveries in Odoo, so you can keep track of items that are still to be delivered in your orders, and you can issue reminders automatically.

Odoo's replenishment management rules enable the system to generate draft purchase orders automatically, or you can configure it to run a lean process driven entirely by current production needs.

Dashboard / Reports for Purchase Management will include:
---------------------------------------------------------
* Request for Quotations
* Purchase Orders Waiting Approval
* Monthly Purchases by Category
* Receipt Analysis
* Purchase Analysis
    

Code Analysis

Views touched (34)
XML IDNameModelTypeStatus
procurement_order_view_form_inherit_purchase procurement.order.form.inherit.button procurement.order xpath Inherits procurement.procurement_form_view
product_template_form_view product.normal.form.inherit.stock product.template field Inherits account.product_template_form_view
purchase_order_calendar purchase.order.calendar purchase.order calendar New
purchase_order_form purchase.order.form purchase.order form New
purchase_order_graph purchase.order.graph purchase.order graph New
purchase_order_line_form2 purchase.order.line.form2 purchase.order.line form New
purchase_order_line_search purchase.order.line.search purchase.order.line search New
purchase_order_line_tree purchase.order.line.tree purchase.order.line tree New
purchase_order_pivot purchase.order.pivot purchase.order pivot New
purchase_order_tree purchase.order.tree purchase.order tree New
purchase_partner_kanban_view res.partner.kanban.purchaseorder.inherit res.partner field Inherits base.res_partner_kanban_view
report_purchaseorder report_purchaseorder ir.ui.view qweb New
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb New
report_purchasequotation report_purchasequotation ir.ui.view qweb New
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb New
res_partner_view_purchase_account_buttons res.partner.view.purchase.account.buttons res.partner div Inherits base.view_partner_form
res_partner_view_purchase_buttons res.partner.view.purchase.buttons res.partner div Inherits base.view_partner_form
stock_move_purchase stock.move.form stock.move xpath Inherits stock.view_move_form
view_account_config account settings account.config.settings separator Inherits account.view_account_config_settings
view_category_property_form product.category.property.form.inherit.stock product.category field Inherits account.view_category_property_form
view_invoice_line_form_inherit_purchase account.invoice.line.form.inherit.purchase account.invoice.line field Inherits account.view_invoice_line_form
view_invoice_supplier_purchase_form account.invoice.supplier.purchase account.invoice field Inherits account.invoice_supplier_form
view_partner_property_form res.partner.purchase.property.form.inherit res.partner group Inherits base.view_partner_form
view_procurement_form_inherit procurement.order.form.inherit procurement.order xpath Inherits procurement.procurement_form_view
view_product_account_purchase_ok_form product.template.account.purchase.ok.form.inherit product.template field Inherits account.product_template_form_view
view_product_supplier_inherit product.template.supplier.form.inherit product.template group Inherits product.product_template_form_view
view_product_template_purchase_buttons_from product.template.purchase.button.inherit product.template div Inherits product.product_template_only_form_view
view_purchase_configuration purchase.res.config.view purchase.config.settings form New
view_purchase_order_filter request.quotation.select purchase.order search New
view_purchase_order_graph product.month.graph purchase.report graph New
view_purchase_order_kanban purchase.order.kanban purchase.order kanban New
view_purchase_order_pivot product.month.pivot purchase.report pivot New
view_purchase_order_search report.purchase.order.search purchase.report search New
view_warehouse_inherited Stock Warehouse Inherited stock.warehouse xpath Inherits stock.view_warehouse
Models touched (18)

New fields (1)
  • group_analytic_account_for_purchases Boolean
    help='Allows you to specify an analytic account on purchase order lines.' implied_group='purchase.group_analytic_accounting' args: 'Analytic accounting for purchases'
Public methods (0)

No public methods.

New fields (1)
  • purchase_id Many2one → purchase.order
    help='Encoding help. When selected, the associated purchase order lines are added to the vendor bill. Several PO can be selected.' string='Add Purchase Order' args: 'purchase.order'
Public methods (4)
  • create(self, vals)
    @api.model
  • invoice_line_move_line_get(self)
    @api.model
  • purchase_order_change(self)
    @api.onchange('purchase_id')
  • write(self, vals)
    @api.multi

New fields (2)
  • purchase_id Many2one → purchase.order
    help='Associated Purchase Order. Filled in automatically when a PO is chosen on the vendor bill.' readonly=True related='purchase_line_id.order_id' related_sudo=False store=False string='Purchase Order' args: 'purchase.order'
  • 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 (0)

No new fields.

Public methods (2)
  • mail_purchase_order_on_send(self)
    @api.multi
  • send_mail(self, auto_commit=False)
    @api.multi

New fields (2)
  • purchase_id Many2one
    related='purchase_line_id.order_id' string='Purchase Order'
  • purchase_line_id Many2one → purchase.order.line
    copy=False string='Purchase Order Line' args: 'purchase.order.line'
Public methods (3)
  • make_po(self)
    @api.multi
  • open_purchase_order(self)
    @api.multi
  • propagate_cancels(self)
    @api.multi

New fields (0)

No new fields.

Public methods (0)

No public methods.

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_count Integer
    compute='_purchase_count' string='# Purchases'
Public methods (0)

No public methods.

New fields (6)
  • property_account_creditor_price_difference Many2one → account.account
    company_dependent=True help='This account will be used to value price difference between purchase price and cost price.' string='Price Difference Account' args: 'account.account'
  • purchase_count Integer
    compute='_purchase_count' string='# Purchases'
  • purchase_line_warn Selection
    default='no-message' help=WARNING_HELP required=True args: WARNING_MESSAGE, 'Purchase Order Line'
  • purchase_line_warn_msg Text
    args: 'Message for Purchase Order Line'
  • purchase_method Selection
    default='receive' help='On ordered quantities: control bills based on ordered quantities.\nOn received quantities: control bills based on received quantity.' string='Control Purchase Bills' args: [('purchase', 'On ordered quantities'), ('receive', 'On received quantities')]
  • route_ids Many2many
    default=<expr>
Public methods (0)

No public methods.

New fields (13)
  • company_currency_id Many2one → res.currency
    help='Utility field to express amount currency' readonly=True related='company_id.currency_id' args: 'res.currency'
  • company_id Many2one → res.company
    default=<expr> required=True string='Company' args: 'res.company'
  • group_costing_method Selection
    help='Allows you to compute product cost price based on average cost.' implied_group='stock_account.group_inventory_valuation' args: [(0, 'Set a fixed cost price on each product'), (1, "Use a 'Fixed', 'Real' or 'Average' price costing method")], 'Costing Methods'
  • group_manage_vendor_price Selection
    implied_group='purchase.group_manage_vendor_price' args: [(0, 'Manage vendor price on the product form'), (1, 'Allow using and importing vendor pricelists')], 'Vendor Price'
  • group_product_variant Selection
    help='Work with product variant allows you to define some variant of the same products, an ease the product management in the ecommerce for example' implied_group='product.group_product_variant' args: [(0, 'No variants on products'), (1, 'Products can have several attributes, defining variants (Example: size, color,...)')], 'Product Variants'
  • group_uom Selection
    help='Allows you to select and maintain different units of measure for products.' implied_group='product.group_uom' args: [(0, 'Products have only one unit of measure (easier)'), (1, 'Some products may be sold/puchased in different units of measure (advanced)')], 'Units of Measure'
  • group_warning_purchase Selection
    implied_group='purchase.group_warning_purchase' args: [(0, 'All the products and the customers can be used in purchase orders'), (1, 'An informative or blocking warning can be set on a product or a customer')], 'Warning'
  • module_purchase_requisition Selection
    help='Calls for tenders are used when you want to generate requests for quotations to several vendors for a given set of products.\nYou can configure per product if you directly do a Request for Quotation to one vendor or if you want a Call for Tenders to compare offers from several vendors.' args: [(0, 'Purchase propositions trigger draft purchase orders to a single supplier'), (1, 'Allow using call for tenders to get quotes from multiple suppliers (advanced)')], 'Calls for Tenders'
  • module_stock_dropshipping Selection
    help='\nCreates the dropship Route and add more complex tests\n-This installs the module stock_dropshipping.' args: [(0, 'Suppliers always deliver to your warehouse(s)'), (1, 'Allow suppliers to deliver directly to your customers')], 'Dropshipping'
  • po_double_validation Selection
    related='company_id.po_double_validation' string='Levels of Approvals *'
  • po_double_validation_amount Monetary
    currency_field='company_currency_id' related='company_id.po_double_validation_amount' string='Double validation amount *'
  • po_lead Float
    related='company_id.po_lead' string='Purchase Lead Time *'
  • po_lock Selection
    related='company_id.po_lock' string='Purchase Order Modification *'
Public methods (0)

No public methods.

New fields (30)
  • amount_tax Monetary
    compute='_amount_all' readonly=True store=True string='Taxes'
  • amount_total Monetary
    compute='_amount_all' readonly=True store=True string='Total'
  • amount_untaxed Monetary
    compute='_amount_all' readonly=True store=True string='Untaxed Amount' track_visibility='always'
  • company_id Many2one → res.company
    default=<expr> index=True required=True states=READONLY_STATES args: 'res.company', 'Company'
  • create_uid Many2one → res.users
    args: 'res.users', 'Responsible'
  • currency_id Many2one → res.currency
    default=<expr> required=True states=READONLY_STATES args: 'res.currency', 'Currency'
  • date_approve Date
    copy=False index=True readonly=1 args: 'Approval Date'
  • date_order Datetime
    copy=False default=fields.Datetime.now help='Depicts the date where the Quotation should be validated and converted into a purchase order.' index=True required=True states=READONLY_STATES args: 'Order Date'
  • date_planned Datetime
    compute='_compute_date_planned' index=True store=True string='Scheduled Date'
  • 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
    help='Put an address if you want to deliver directly from the vendor to the customer. Otherwise, keep empty to deliver to your own company.' states=READONLY_STATES string='Drop Ship Address' args: 'res.partner'
  • fiscal_position_id Many2one → account.fiscal.position
    oldname='fiscal_position' string='Fiscal Position' args: 'account.fiscal.position'
  • group_id Many2one → procurement.group
    copy=False string='Procurement Group' args: 'procurement.group'
  • incoterm_id Many2one → stock.incoterms
    help='International Commercial Terms are a series of predefined commercial terms used in international transactions.' states={'done': [('readonly', True)]} args: 'stock.incoterms', 'Incoterm'
  • invoice_count Integer
    compute='_compute_invoice' copy=False default=0 string='# of Bills'
  • invoice_ids Many2many → account.invoice
    compute='_compute_invoice' copy=False string='Bills' args: 'account.invoice'
  • invoice_status Selection
    compute='_get_invoiced' copy=False default='no' readonly=True store=True string='Billing Status' args: [('no', 'Nothing to Bill'), ('to invoice', 'Waiting Bills'), ('invoiced', 'Bills Received')]
  • is_shipped Boolean
    compute='_compute_is_shipped'
  • name Char
    copy=False default='New' index=True required=True args: 'Order Reference'
  • notes Text
    args: 'Terms and Conditions'
  • order_line One2many → purchase.order.line
    copy=True states={'cancel': [('readonly', True)], 'done': [('readonly', True)]} string='Order Lines' args: 'purchase.order.line', 'order_id'
  • origin Char
    copy=False help='Reference of the document that generated this purchase order request (e.g. a sale order or an internal procurement request)' args: 'Source Document'
  • partner_id Many2one → res.partner
    change_default=True required=True states=READONLY_STATES string='Vendor' track_visibility='always' args: 'res.partner'
  • partner_ref Char
    copy=False help="Reference of the sales order or bid sent by the vendor. It's used to do the matching when you receive the products as this reference is usually written on the delivery order sent by your vendor." args: 'Vendor Reference'
  • payment_term_id Many2one → account.payment.term
    args: 'account.payment.term', 'Payment Terms'
  • picking_count Integer
    compute='_compute_picking' default=0 string='Receptions'
  • picking_ids Many2many → stock.picking
    compute='_compute_picking' copy=False string='Receptions' args: 'stock.picking'
  • picking_type_id Many2one → stock.picking.type
    default=_default_picking_type help='This will determine picking type of incoming shipment' required=True states=READONLY_STATES args: 'stock.picking.type', 'Deliver To'
  • product_id Many2one → product.product
    related='order_line.product_id' string='Product' args: 'product.product'
  • state Selection
    copy=False default='draft' index=True readonly=True string='Status' track_visibility='onchange' args: [('draft', 'RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Locked'), ('cancel', 'Cancelled')]
Public methods (18)
  • action_rfq_send(self)
    @api.multi
    This function opens a window to compose an email, with the edi purchase template message loaded by default
  • action_set_date_planned(self)
    @api.multi
  • action_view_invoice(self)
    @api.multi
    This function returns an action that display existing vendor bills of given purchase order ids. When only one found, show the vendor bill immediately.
  • 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
  • button_confirm(self)
    @api.multi
  • button_done(self)
    @api.multi
  • button_draft(self)
    @api.multi
  • button_unlock(self)
    @api.multi
  • copy(self, default=None)
    @api.multi
  • create(self, vals)
    @api.model
  • name_get(self)
    @api.multi@api.depends('name', 'partner_ref')
  • name_search(self, name, args=None, operator='ilike', limit=100)
    @api.model
  • onchange_partner_id(self)
    @api.onchange('partner_id', 'company_id')
  • onchange_partner_id_warning(self)
    @api.onchange('partner_id')
  • print_quotation(self)
    @api.multi
  • unlink(self)
    @api.multi

New fields (24)
  • account_analytic_id Many2one → account.analytic.account
    string='Analytic Account' args: 'account.analytic.account'
  • analytic_tag_ids Many2many → account.analytic.tag
    string='Analytic Tags' args: 'account.analytic.tag'
  • company_id Many2one → res.company
    readonly=True related='order_id.company_id' store=True string='Company' args: 'res.company'
  • currency_id Many2one
    readonly=True related='order_id.currency_id' store=True string='Currency'
  • date_order Datetime
    readonly=True related='order_id.date_order' string='Order Date'
  • date_planned Datetime
    index=True required=True string='Scheduled Date'
  • invoice_lines One2many → account.invoice.line
    copy=False readonly=True string='Bill Lines' args: 'account.invoice.line', 'purchase_line_id'
  • move_ids One2many → stock.move
    copy=False ondelete='set null' readonly=True string='Reservation' args: 'stock.move', 'purchase_line_id'
  • name Text
    required=True string='Description'
  • order_id Many2one → purchase.order
    index=True ondelete='cascade' required=True string='Order Reference' args: 'purchase.order'
  • partner_id Many2one → res.partner
    readonly=True related='order_id.partner_id' store=True string='Partner' args: 'res.partner'
  • price_subtotal Monetary
    compute='_compute_amount' store=True string='Subtotal'
  • price_tax Monetary
    compute='_compute_amount' store=True string='Tax'
  • price_total Monetary
    compute='_compute_amount' store=True string='Total'
  • price_unit Float
    digits=dp.get_precision('Product Price') required=True string='Unit Price'
  • procurement_ids One2many → procurement.order
    copy=False string='Associated Procurements' args: 'procurement.order', 'purchase_line_id'
  • product_id Many2one → product.product
    change_default=True domain=[('purchase_ok', '=', True)] required=True string='Product' args: 'product.product'
  • product_qty Float
    digits=dp.get_precision('Product Unit of Measure') required=True string='Quantity'
  • product_uom Many2one → product.uom
    required=True string='Product Unit of Measure' args: 'product.uom'
  • qty_invoiced Float
    compute='_compute_qty_invoiced' digits=dp.get_precision('Product Unit of Measure') store=True string='Billed Qty'
  • qty_received Float
    compute='_compute_qty_received' digits=dp.get_precision('Product Unit of Measure') store=True string='Received Qty'
  • sequence Integer
    default=10 string='Sequence'
  • state Selection
    related='order_id.state' store=True
  • taxes_id Many2many → account.tax
    domain=['|', ('active', '=', False), ('active', '=', True)] string='Taxes' args: 'account.tax'
Public methods (5)
  • create(self, values)
    @api.model
  • onchange_product_id(self)
    @api.onchange('product_id')
  • onchange_product_id_warning(self)
    @api.onchange('product_id')
  • unlink(self)
    @api.multi
  • write(self, values)
    @api.multi

New fields (26)
  • account_analytic_id Many2one → account.analytic.account
    readonly=True args: 'account.analytic.account', 'Analytic Account'
  • category_id Many2one → product.category
    readonly=True args: 'product.category', 'Product Category'
  • commercial_partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Commercial Entity'
  • company_id Many2one → res.company
    readonly=True args: 'res.company', 'Company'
  • country_id Many2one → res.country
    readonly=True args: 'res.country', 'Partner Country'
  • currency_id Many2one → res.currency
    readonly=True args: 'res.currency', 'Currency'
  • date_approve Date
    readonly=True args: 'Date Approved'
  • date_order Datetime
    help='Date on which this document has been created' oldname='date' readonly=True args: 'Order Date'
  • delay Float
    digits=(16, 2) readonly=True args: 'Days to Validate'
  • delay_pass Float
    digits=(16, 2) readonly=True args: 'Days to Deliver'
  • fiscal_position_id Many2one → account.fiscal.position
    oldname='fiscal_position' readonly=True string='Fiscal Position' args: 'account.fiscal.position'
  • nbr_lines Integer
    oldname='nbr' readonly=True args: '# of Lines'
  • negociation Float
    group_operator='avg' readonly=True args: 'Purchase-Standard Price'
  • partner_id Many2one → res.partner
    readonly=True args: 'res.partner', 'Vendor'
  • picking_type_id Many2one → stock.warehouse
    readonly=True args: 'stock.warehouse', 'Warehouse'
  • price_average Float
    group_operator='avg' readonly=True args: 'Average Price'
  • price_standard Float
    group_operator='sum' readonly=True args: 'Products Value'
  • price_total Float
    readonly=True args: 'Total Price'
  • product_id Many2one → product.product
    readonly=True args: 'product.product', 'Product'
  • product_tmpl_id Many2one → product.template
    readonly=True args: 'product.template', 'Product Template'
  • product_uom Many2one → product.uom
    required=True args: 'product.uom', 'Reference Unit of Measure'
  • state Selection
    readonly=True args: [('draft', 'Draft RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Order Status'
  • unit_quantity Float
    oldname='quantity' readonly=True args: 'Product Quantity'
  • user_id Many2one → res.users
    readonly=True args: 'res.users', 'Responsible'
  • volume Float
    readonly=True args: 'Volume'
  • weight Float
    readonly=True args: 'Gross Weight'
Public methods (1)
  • init(self)
    @api.model_cr

New fields (4)
  • po_double_validation Selection
    default='one_step' help='Provide a double validation mechanism for purchases' string='Levels of Approvals' args: [('one_step', 'Confirm purchase orders in one step'), ('two_step', 'Get 2 levels of approvals to confirm a purchase order')]
  • po_double_validation_amount Monetary
    default=5000 help='Minimum amount for which a double validation is required' string='Double validation amount'
  • po_lead Float
    default=0.0 help='Margin of error for vendor lead times. When the system generates Purchase Orders for procuring products, they will be scheduled that many days earlier to cope with unexpected vendor delays.' required=True string='Purchase Lead Time'
  • po_lock Selection
    default='edit' help='Purchase Order Modification used when you want to purchase order editable after confirm' string='Purchase Order Modification' args: [('edit', 'Allow to edit purchase orders'), ('lock', 'Confirmed purchase orders are not editable')]
Public methods (0)

No public methods.

New fields (5)
  • property_purchase_currency_id Many2one → res.currency
    company_dependent=True help='This currency will be used, instead of the default one, for purchases from the current partner' string='Supplier Currency' args: 'res.currency'
  • purchase_order_count Integer
    compute='_purchase_invoice_count' string='# of Purchase Order'
  • purchase_warn Selection
    default='no-message' help=WARNING_HELP required=True args: WARNING_MESSAGE, 'Purchase Order'
  • purchase_warn_msg Text
    args: 'Message for Purchase Order'
  • supplier_invoice_count Integer
    compute='_purchase_invoice_count' string='# Vendor Bills'
Public methods (0)

No public methods.

New fields (1)
  • purchase_line_id Many2one → purchase.order.line
    index=True ondelete='set null' readonly=True args: 'purchase.order.line', 'Purchase Order Line'
Public methods (2)
  • copy(self, default=None)
    @api.multi
  • get_price_unit(self)
    @api.multi
    Returns the unit price to store on the quant

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)
  • buy_pull_id Many2one → procurement.rule
    args: 'procurement.rule', 'Buy rule'
  • buy_to_resupply Boolean
    default=True help='When products are bought, they can be delivered to this warehouse' args: 'Purchase to resupply this warehouse'
Public methods (2)
  • create_routes(self)
    @api.multi
  • write(self, vals)
    @api.multi
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/9.0/purchase
VERSION
VERSION 1.2
CATEGORY
CATEGORYPurchases
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Christophe Matthieu, Martin Trigaux, Fabien Pinckaers, Olivier Dony, Thibault Delavallée, Josse Colpaert, Denis Ledoux, Fabien Meghazi, Christophe Simonis, David Monjoie, Xavier Morel, Goffin Simon, Cedric Snauwaert, Simon Lejeune, Nicolas Martinelli, Nicolas Lempereur, Jérome Maes, Julien Legros, xmo-odoo, Richard Mathot, qdp-odoo, Géry Debongnie, Aaron Bohy, Damien Bouvy, Julien De Coster, Yannick Tivisse, qsm-odoo, Cédric Snauwaert, Martin Geubelle, Pierre Masereel, De Paoli Quentin, jem-odoo
WEBSITE
WEBSITEhttps://www.odoo.com/page/purchase
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:48:30
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock_account
    - stock
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - web
    - bus
    - report
    - procurement
    - barcodes
    - web_planner
    - account
    - analytic
    - web_tip
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Manage goods requirement by Purchase Orders easily
==================================================

Purchase management enables you to track your vendors' price quotations and convert them into purchase orders if necessary.
Odoo has several methods of monitoring invoices and tracking the receipt of ordered goods. You can handle partial deliveries in Odoo, so you can keep track of items that are still to be delivered in your orders, and you can issue reminders automatically.

Odoo's replenishment management rules enable the system to generate draft purchase orders automatically, or you can configure it to run a lean process driven entirely by current production needs.

Dashboard / Reports for Purchase Management will include:
---------------------------------------------------------
* Request for Quotations
* Purchase Orders Waiting Approval
* Monthly Purchases by Category
* Receipt Analysis
* Purchase Analysis
    

Code Analysis

Views touched (36)
XML IDNameModelTypeStatus
mrp_company res.company.mrp.config res.company xpath Inherits base.view_company_form
product_template_form_view product.normal.form.inherit.stock product.template field Inherits account.product_template_form_view
product_template_search_view_purchase product.template.search.purchase.form product.template filter Inherits product.product_template_search_view
purchase_order_calendar purchase.order.calendar purchase.order calendar New
purchase_order_form purchase.order.form purchase.order form New
purchase_order_graph purchase.order.graph purchase.order graph New
purchase_order_line_form2 purchase.order.line.form2 purchase.order.line form New
purchase_order_line_search purchase.order.line.search purchase.order.line search New
purchase_order_line_tree purchase.order.line.tree purchase.order.line tree New
purchase_order_pivot purchase.order.pivot purchase.order pivot New
purchase_order_tree purchase.order.tree purchase.order tree New
purchase_partner_kanban_view res.partner.kanban.purchaseorder.inherit res.partner field Inherits base.res_partner_kanban_view
report_purchaseorder report_purchaseorder ir.ui.view qweb New
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb New
report_purchasequotation report_purchasequotation ir.ui.view qweb New
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb New
res_partner_view_purchase_account_buttons res.partner.view.purchase.account.buttons res.partner div Inherits base.view_partner_form
res_partner_view_purchase_buttons res.partner.view.purchase.buttons res.partner div Inherits base.view_partner_form
stock_move_purchase stock.move.form stock.move xpath Inherits stock.view_move_form
view_account_config account settings account.config.settings separator Inherits account.view_account_config_settings
view_category_property_form product.category.property.form.inherit.stock product.category field Inherits account.view_category_property_form
view_invoice_line_form_inherit_purchase account.invoice.line.form.inherit.purchase account.invoice.line field Inherits account.view_invoice_line_form
view_invoice_supplier_purchase_form account.invoice.supplier.purchase account.invoice field Inherits account.invoice_supplier_form
view_partner_property_form res.partner.purchase.property.form.inherit res.partner group Inherits base.view_partner_form
view_picking_in_search_picking_inherit stock.picking.in.search.inherit stock.picking xpath Inherits stock.view_picking_internal_search
view_procurement_form_inherit procurement.order.form.inherit procurement.order xpath Inherits procurement.procurement_form_view
view_product_account_purchase_ok_form product.template.account.purchase.ok.form.inherit product.template field Inherits account.product_template_form_view
view_product_supplier_inherit product.template.supplier.form.inherit product.template div Inherits product.product_template_form_view
view_product_template_purchase_buttons_from product.template.purchase.button.inherit product.template div Inherits product.product_template_only_form_view
view_purchase_configuration purchase.res.config.view purchase.config.settings form New
view_purchase_order_filter request.quotation.select purchase.order search New
view_purchase_order_graph product.month.graph purchase.report graph New
view_purchase_order_kanban purchase.order.kanban purchase.order kanban New
view_purchase_order_pivot product.month.pivot purchase.report pivot New
view_purchase_order_search report.purchase.order.search purchase.report search New
view_warehouse_inherited Stock Warehouse Inherited stock.warehouse xpath Inherits stock.view_warehouse
Models touched (13)

New fields (1)
  • purchase_id Many2one → purchase.order
    help='Encoding help. When selected, the associated purchase order lines are added to the vendor bill. Several PO can be selected.' string='Add Purchase Order' args: 'purchase.order'
Public methods (2)
  • invoice_line_move_line_get(self)
    @api.model
  • purchase_order_change(self)
    @api.onchange('purchase_id')

New fields (2)
  • purchase_id Many2one → purchase.order
    help='Associated Purchase Order. Filled in automatically when a PO is chosen on the vendor bill.' readonly=True related='purchase_line_id.order_id' related_sudo=False store=False string='Purchase Order' args: 'purchase.order'
  • 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 (0)

No new fields.

Public methods (1)
  • send_mail(self, auto_commit=False)
    @api.multi

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • purchase_id Many2one
    related='purchase_line_id.order_id' string='Purchase Order'
  • purchase_line_id Many2one → purchase.order.line
    string='Purchase Order Line' args: 'purchase.order.line'
Public methods (2)
  • make_po(self)
    @api.multi
  • propagate_cancels(self)
    @api.multi

New fields (0)

No new fields.

Public methods (0)

No public methods.

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_count Integer
    compute='_purchase_count' string='# Purchases'
Public methods (0)

No public methods.

New fields (5)
  • property_account_creditor_price_difference Many2one → account.account
    company_dependent=True help='This account will be used to value price difference between purchase price and cost price.' string='Price Difference Account' args: 'account.account'
  • purchase_count Integer
    compute='_purchase_count' string='# Purchases'
  • purchase_method Selection
    default='receive' string='Control Purchase Bills' args: [('purchase', 'On ordered quantities'), ('receive', 'On received quantities')]
  • purchase_ok Boolean
    default=True args: 'Can be Purchased'
  • route_ids Many2many
    default=<expr>
Public methods (0)

No public methods.

New fields (29)
  • amount_tax Monetary
    compute='_amount_all' readonly=True store=True string='Taxes'
  • amount_total Monetary
    compute='_amount_all' readonly=True store=True string='Total'
  • amount_untaxed Monetary
    compute='_amount_all' readonly=True store=True string='Untaxed Amount' track_visibility='always'
  • company_id Many2one → res.company
    default=<expr> index=True required=True states=READONLY_STATES args: 'res.company', 'Company'
  • create_uid Many2one → res.users
    args: 'res.users', 'Responsible'
  • currency_id Many2one → res.currency
    default=<expr> required=True states=READONLY_STATES args: 'res.currency', 'Currency'
  • date_approve Date
    copy=False index=True readonly=1 args: 'Approval Date'
  • date_order Datetime
    copy=False default=fields.Datetime.now help='Depicts the date where the Quotation should be validated and converted into a purchase order.' index=True required=True states=READONLY_STATES args: 'Order Date'
  • date_planned Datetime
    compute='_compute_date_planned' index=True oldname='minimum_planned_date' required=True string='Scheduled Date'
  • 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
    help='Put an address if you want to deliver directly from the vendor to the customer. Otherwise, keep empty to deliver to your own company.' states=READONLY_STATES string='Drop Ship Address' args: 'res.partner'
  • fiscal_position_id Many2one → account.fiscal.position
    oldname='fiscal_position' string='Fiscal Position' args: 'account.fiscal.position'
  • group_id Many2one → procurement.group
    copy=False string='Procurement Group' args: 'procurement.group'
  • incoterm_id Many2one → stock.incoterms
    help='International Commercial Terms are a series of predefined commercial terms used in international transactions.' args: 'stock.incoterms', 'Incoterm'
  • invoice_count Integer
    compute='_compute_invoice' copy=False default=0 string='# of Invoices'
  • invoice_ids Many2many → account.invoice
    compute='_compute_invoice' copy=False string='Invoices' args: 'account.invoice'
  • invoice_status Selection
    compute='_get_invoiced' copy=False default='no' readonly=True store=True string='Invoice Status' args: [('no', 'Not purchased'), ('to invoice', 'Waiting Invoices'), ('invoiced', 'Invoice Received')]
  • name Char
    copy=False default='New' index=True required=True args: 'Order Reference'
  • notes Text
    args: 'Terms and Conditions'
  • order_line One2many → purchase.order.line
    copy=True states=READONLY_STATES string='Order Lines' args: 'purchase.order.line', 'order_id'
  • origin Char
    copy=False help='Reference of the document that generated this purchase order request (e.g. a sale order or an internal procurement request)' args: 'Source Document'
  • partner_id Many2one → res.partner
    change_default=True required=True states=READONLY_STATES string='Vendor' track_visibility='always' args: 'res.partner'
  • partner_ref Char
    copy=False help="Reference of the sales order or bid sent by the vendor. It's used to do the matching when you receive the products as this reference is usually written on the delivery order sent by your vendor." args: 'Vendor Reference'
  • payment_term_id Many2one → account.payment.term
    args: 'account.payment.term', 'Payment Term'
  • picking_count Integer
    compute='_compute_picking' default=0 string='Receptions'
  • picking_ids Many2many → stock.picking
    compute='_compute_picking' copy=False string='Receptions' args: 'stock.picking'
  • picking_type_id Many2one → stock.picking.type
    default=_default_picking_type help='This will determine picking type of incoming shipment' required=True states=READONLY_STATES args: 'stock.picking.type', 'Deliver To'
  • product_id Many2one → product.product
    related='order_line.product_id' string='Product' args: 'product.product'
  • state Selection
    copy=False default='draft' index=True readonly=True string='Status' track_visibility='onchange' args: [('draft', 'Draft PO'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('done', 'Done'), ('cancel', 'Cancelled')]
Public methods (16)
  • action_rfq_send(self)
    @api.multi
    This function opens a window to compose an email, with the edi purchase template message loaded by default
  • action_set_date_planned(self)
    @api.multi
  • action_view_invoice(self)
    @api.multi
    This function returns an action that display existing vendor bills of given purchase order ids. When only one found, show the vendor bill immediately.
  • 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)
    @api.multi
  • button_cancel(self)
    @api.multi
  • button_confirm(self)
    @api.multi
  • button_done(self)
    @api.multi
  • button_draft(self)
    @api.multi
  • copy(self, default=None)
    @api.multi
  • create(self, vals)
    @api.model
  • name_get(self)
    @api.multi@api.depends('name', 'partner_ref')
  • name_search(self, name, args=None, operator='ilike', limit=100)
    @api.model
  • onchange_partner_id(self)
    @api.onchange('partner_id', 'company_id')
  • print_quotation(self)
    @api.multi
  • unlink(self)
    @api.multi

New fields (22)
  • account_analytic_id Many2one → account.analytic.account
    domain=[('account_type', '=', 'normal')] string='Analytic Account' args: 'account.analytic.account'
  • company_id Many2one → res.company
    readonly=True related='order_id.company_id' store=True string='Company' args: 'res.company'
  • currency_id Many2one
    readonly=True related='order_id.currency_id' store=True string='Currency'
  • date_order Datetime
    readonly=True related='order_id.date_order' string='Order Date'
  • date_planned Datetime
    index=True required=True string='Scheduled Date'
  • invoice_lines One2many → account.invoice.line
    copy=False readonly=True string='Invoice Lines' args: 'account.invoice.line', 'purchase_line_id'
  • move_ids One2many → stock.move
    copy=False ondelete='set null' readonly=True string='Reservation' args: 'stock.move', 'purchase_line_id'
  • name Text
    required=True string='Description'
  • order_id Many2one → purchase.order
    index=True ondelete='cascade' required=True string='Order Reference' args: 'purchase.order'
  • partner_id Many2one → res.partner
    readonly=True related='order_id.partner_id' store=True string='Partner' args: 'res.partner'
  • price_subtotal Monetary
    compute='_compute_amount' store=True string='Subtotal'
  • price_tax Monetary
    compute='_compute_amount' store=True string='Tax'
  • price_total Monetary
    compute='_compute_amount' store=True string='Total'
  • price_unit Float
    digits=dp.get_precision('Product Price') required=True string='Unit Price'
  • procurement_ids One2many → procurement.order
    copy=False string='Associated Procurements' args: 'procurement.order', 'purchase_line_id'
  • product_id Many2one → product.product
    change_default=True domain=[('purchase_ok', '=', True)] required=True string='Product' args: 'product.product'
  • product_qty Float
    digits=dp.get_precision('Product Unit of Measure') required=True string='Quantity'
  • product_uom Many2one → product.uom
    required=True string='Product Unit of Measure' args: 'product.uom'
  • qty_invoiced Float
    compute='_compute_qty_invoiced' store=True string='Billed Qty'
  • qty_received Float
    compute='_compute_qty_received' store=True string='Received Qty'
  • state Selection
    related='order_id.state' stored=True
  • taxes_id Many2many → account.tax
    domain=['|', ('active', '=', False), ('active', '=', True)] string='Taxes' args: 'account.tax'
Public methods (2)
  • onchange_product_id(self)
    @api.onchange('product_id')
  • unlink(self)
    @api.multi

New fields (3)
  • po_double_validation Selection
    default='one_step' help='Provide a double validation mechanism for purchases' string='Levels of Approvals' args: [('one_step', 'Confirm purchase orders in one step'), ('two_step', 'Get 2 levels of approvals to confirm a purchase order')]
  • po_double_validation_amount Monetary
    default=5000 help='Minimum amount for which a double validation is required' string='Double validation amount'
  • po_lead Float
    default=1.0 help='Margin of error for vendor lead times. When the system generates Purchase Orders for procuring products, they will be scheduled that many days earlier to cope with unexpected vendor delays.' required=True string='Purchase Lead Time'
Public methods (0)

No public methods.

New fields (3)
  • property_purchase_currency_id Many2one → res.currency
    company_dependent=True help='This currency will be used, instead of the default one, for purchases from the current partner' string='Supplier Currency' args: 'res.currency'
  • purchase_order_count Integer
    compute='_purchase_invoice_count' string='# of Purchase Order'
  • supplier_invoice_count Integer
    compute='_purchase_invoice_count' string='# Vendor Bills'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/8.0/purchase
VERSION
VERSION 1.1
CATEGORY
CATEGORYPurchase Management
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOpenERP SA
MAINTAINERS
MAINTAINERSOpenERP SA
COMMITTERS
COMMITTERSRaphael Collet, Randhir Mayatra (OpenERP), Odoo Translation Bot, Turkesh Patel (Open ERP), Christophe Matthieu, Martin Trigaux, Ajay Chauhan (OpenERP), Foram Katharotiya (OpenERP), Fabien Pinckaers, Antony Lesuisse, Olivier Dony, Thibault Delavallée, Vo Minh Thu, Josse Colpaert, Launchpad Translations on behalf of openerp, Quentin (OpenERP), Denis Ledoux, Fabien Meghazi, niv-openerp, Christophe Simonis, David Monjoie, Xavier Morel, Joren Van Onder, Goffin Simon, Bhumi Thakkar (Open ERP), Cedric Snauwaert, Simon Lejeune, Vishmita, Nicolas Martinelli, Ravish (Open ERP), Amit Bhavsar (Open ERP), Paramjit Singh Sahota, Nicolas Lempereur, Anand Patel (OpenERP), Richard Mathot, qdp-odoo, Géry Debongnie, Darshan Kalola (OpenERP Trainee), jke-openerp, Aaron Bohy, Vishmita Jadeja (openerp), Bharat R. Devnani (OpenERP), Richard Mathot (OpenERP), ged-odoo, openerp-sle, Jeremy Kersten, Gery Debongnie, Randhir Mayatra rma-openerp, sgo@tinyerp.com, GitHub, Mansi Kariya (OpenERP Trainee), Darshan Kalola (OpenERP), Darshan Kalola, Jitendra Prajapati (OpenERP), Damien Bouvy, Yogesh Parekh (OpenERP), Sunil Sharma (OpenERP), Pooja Zankhariya (OpenERP), Sanjay Gohel (OpenERP), Jacques-Etienne Baudoux
WEBSITE
WEBSITEhttps://www.odoo.com/page/purchase
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:45:39
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock_account
    - stock
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - web
    - report
    - procurement
    - board
    - web_kanban_gauge
    - web_kanban_sparkline
    - account
    - analytic
    - edi
    - email_template
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Manage goods requirement by Purchase Orders easily
==================================================

Purchase management enables you to track your suppliers' price quotations and convert them into purchase orders if necessary.
OpenERP has several methods of monitoring invoices and tracking the receipt of ordered goods. You can handle partial deliveries in OpenERP, so you can keep track of items that are still to be delivered in your orders, and you can issue reminders automatically.

OpenERP’s replenishment management rules enable the system to generate draft purchase orders automatically, or you can configure it to run a lean process driven entirely by current production needs.

Dashboard / Reports for Purchase Management will include:
---------------------------------------------------------
* Request for Quotations
* Purchase Orders Waiting Approval
* Monthly Purchases by Category
* Receipt Analysis
* Purchase Analysis
    

Code Analysis

Views touched (35)
XML IDNameModelTypeStatus
mrp_company res.company.mrp.config res.company xpath Inherits base.view_company_form
product_template_search_view_purchase product.template.search.purchase.form product.template filter Inherits product.product_template_search_view
purchase_order_2_stock_picking Purchase Picking Inherited purchase.order xpath Inherits purchase.purchase_order_form
purchase_order_calendar purchase.order.calendar purchase.order calendar New
purchase_order_form purchase.order.form purchase.order form New
purchase_order_graph purchase.order.graph purchase.order graph New
purchase_order_line_form purchase.order.line.form purchase.order.line form New
purchase_order_line_form2 purchase.order.line.form2 purchase.order.line form New
purchase_order_line_search purchase.order.line.search purchase.order.line search New
purchase_order_line_tree purchase.order.line.tree purchase.order.line tree New
purchase_order_tree purchase.order.tree purchase.order tree New
purchase_partner_kanban_view res.partner.kanban.purchaseorder.inherit res.partner field Inherits base.res_partner_kanban_view
report_purchaseorder report_purchaseorder ir.ui.view qweb New
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb New
report_purchasequotation report_purchasequotation ir.ui.view qweb New
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb New
res_partner_view_purchase_account_buttons res.partner.view.purchase.account.buttons res.partner xpath Inherits base.view_partner_form
res_partner_view_purchase_buttons res.partner.view.purchase.buttons res.partner xpath Inherits base.view_partner_form
stock_move_purchase stock.move.form stock.move xpath Inherits stock.view_move_form
view_account_config account settings account.config.settings separator Inherits account.view_account_config_settings
view_partner_property_form res.partner.purchase.property.form.inherit res.partner field Inherits base.view_partner_form
view_picking_in_search_picking_inherit stock.picking.in.search.inherit stock.picking xpath Inherits stock.view_picking_internal_search
view_procurement_form_inherit procurement.order.form.inherit procurement.order xpath Inherits procurement.procurement_form_view
view_product_account_purchase_ok_form product.template.account.purchase.ok.form.inherit product.template field Inherits account.product_template_form_view
view_product_normal_purchase_buttons_from product.product.purchase.button.inherit product.product xpath Inherits product.product_normal_form_view
view_product_supplier_inherit product.template.supplier.form.inherit product.template div Inherits product.product_template_form_view
view_product_template_purchase_buttons_from product.template.purchase.button.inherit product.template xpath Inherits product.product_template_only_form_view
view_purchase_configuration purchase settings purchase.config.settings form New
view_purchase_line_invoice Create invoices purchase.order.line_invoice form New
view_purchase_order_filter purchase.order.list.select purchase.order search New
view_purchase_order_graph product.month.graph purchase.report graph New
view_purchase_order_group Merger Purchase Orders purchase.order.group form New
view_purchase_order_search report.purchase.order.search purchase.report search New
view_request_for_quotation_filter request.quotation.select purchase.order search New
view_warehouse_inherited Stock Warehouse Inherited stock.warehouse xpath Inherits stock.view_warehouse
Models touched (0)

No models found for this module.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/7.0/purchase
VERSION
VERSION 1.1
CATEGORY
CATEGORYPurchase Management
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOpenERP SA
MAINTAINERS
MAINTAINERSOpenERP SA
COMMITTERS
COMMITTERSRaphael Collet, Jagdish Panchal (Open ERP), Twinkle Christian (OpenERP), Cecile Tonglet, Rucha (Open ERP), Atul Patel (OpenERP), Jalpesh Patel (OpenERP), Randhir Mayatra (OpenERP), Stephane Wirtel, Odoo Translation Bot, Turkesh Patel (Open ERP), Numerigraphe - Lionel Sausin, Christophe Matthieu, Pinakin Nayi (OpenERP), Benoit Guillot, DBR (OpenERP), Harry (OpenERP), Antonin Bourguignon, ajay javiya (OpenERP), Martin Trigaux, Ajay Chauhan (OpenERP), Foram Katharotiya (OpenERP), Bhumika (OpenERP), Purnendu Singh (OpenERP), Saurang Suthar (OpenERP), Fabien Pinckaers, Antony Lesuisse, Bharat Devnani (OpenERP), Meera Trambadia (OpenERP), Saurang Suthar, Olivier Dony, Rajesh Prajapati (OpenERP), Twinkle (OpenERP), Divyesh Makwana (Open ERP), Tejas Tank, Thibault Delavallée, Vo Minh Thu, Hardik, Arnaud Pineux, pso (OpenERP), Sbh (Openerp), Amit Patel (OpenERP), Launchpad Translations on behalf of openerp, vta vta@openerp.com, Quentin (OpenERP), Kuldeep Joshi (OpenERP), Nimesh (Open ERP), Denis Ledoux, Mayur Maheshwari (OpenERP), Jigar Amin - OpenERP, Sanjay Gohel (Open ERP), Alexis de Lattre, help, Fabien Meghazi, Xavier ALT, Christophe Simonis, David Monjoie, Dharti Ratani (OpenERP), Goffin Simon, Khushboo Bhatt (Open ERP), Bhumi Thakkar (Open ERP), Cedric Snauwaert, Ravish Murari (OpenERP), Amit Patel, Frédéric van der Essen, Gilles Major, Vijaykumar Baladaniya, Nicolas Martinelli, Jigar Amin, Ravish (Open ERP), Amit (OpenERP), JoshuaJan, RGA(OpenERP), Kersten Jeremy, Anand Patel (OpenERP), qdp-odoo, sebastien beau
WEBSITE
WEBSITEhttp://www.openerp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:43:09
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock
    - product
    - base
    - process
    - web
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - account
    - analytic
    - board
    - edi
    - email_template
    - procurement
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Manage goods requirement by Purchase Orders easily
==================================================

Purchase management enables you to track your suppliers' price quotations and convert them into purchase orders if necessary.
OpenERP has several methods of monitoring invoices and tracking the receipt of ordered goods. You can handle partial deliveries in OpenERP, so you can keep track of items that are still to be delivered in your orders, and you can issue reminders automatically.

OpenERP’s replenishment management rules enable the system to generate draft purchase orders automatically, or you can configure it to run a lean process driven entirely by current production needs.

Dashboard / Reports for Purchase Management will include:
---------------------------------------------------------
* Request for Quotations
* Purchase Orders Waiting Approval 
* Monthly Purchases by Category
* Receptions Analysis
* Purchase Analysis
    

Code Analysis

Views touched (36)
XML IDNameModelTypeStatus
board_purchase_form board.purchase.form board.board form New
mrp_company res.company.mrp.config res.company xpath Inherits base.view_company_form
product_product_normal_form_procurement_help_view product.normal.form.procurement.help.inherit product.product group Inherits procurement.product_form_view_procurement_button
product_search_form_view_purchase product.search.purchase.form product.product filter Inherits product.product_search_form_view
purchase_order_2_stock_picking Purchase Picking Inherited purchase.order xpath Inherits purchase.purchase_order_form
purchase_order_calendar purchase.order.calendar purchase.order calendar New
purchase_order_form purchase.order.form purchase.order form New
purchase_order_graph purchase.order.graph purchase.order graph New
purchase_order_line_form purchase.order.line.form purchase.order.line form New
purchase_order_line_form2 purchase.order.line.form2 purchase.order.line form New
purchase_order_line_search purchase.order.line.search purchase.order.line search New
purchase_order_line_tree purchase.order.line.tree purchase.order.line tree New
purchase_order_tree purchase.order.tree purchase.order tree New
purchase_partner_kanban_view res.partner.kanban.purchaseorder.inherit res.partner field Inherits base.res_partner_kanban_view
res_partner_view_purchase_buttons res.partner.view.purchase.buttons res.partner xpath Inherits base.view_partner_form
stock_move_purchase stock.move.form stock.move xpath Inherits stock.view_move_form
stock_picking_in_inherit_purchase Incoming Picking Inherited stock.picking.in xpath Inherits stock.view_picking_form
view_account_config account settings account.config.settings separator Inherits account.view_account_config_settings
view_partner_property_form res.partner.purchase.property.form.inherit res.partner field Inherits base.view_partner_form
view_picking_in_search_picking_inherit stock.picking.in.search.inherit stock.picking.in xpath Inherits stock.view_picking_in_search
view_procurement_form_inherit procurement.order.form.inherit procurement.order xpath Inherits procurement.procurement_form_view
view_product_account_purchase_ok_form product.account.purchase.ok.form.inherit product.product xpath Inherits account.product_normal_form_view
view_product_supplier_inherit product.normal.supplier.form.inherit product.product div Inherits product.product_normal_form_view
view_purchase_configuration purchase settings purchase.config.settings form New
view_purchase_line_invoice Create invoices purchase.order.line_invoice form New
view_purchase_order_by_user_graph purchase.order.by.user.graph purchase.report graph New
view_purchase_order_filter purchase.order.list.select purchase.order search New
view_purchase_order_graph product.month.graph purchase.report graph New
view_purchase_order_group Merger Purchase Orders purchase.order.group form New
view_purchase_order_monthly_categ_graph purchase.order.monthly.categ.graph purchase.report graph New
view_purchase_order_monthly_categ_tree purchase.order.monthly.categ.tree purchase.report tree New
view_purchase_order_qty_amount_graph purchase.order.qty.amount.graph purchase.report graph New
view_purchase_order_search report.purchase.order.search purchase.report search New
view_purchase_order_tree purchase.order.tree purchase.report tree New
view_request_for_quotation_filter request.quotation.select purchase.order search New
view_template_purchase_ok_form product.template.purchase.ok.form.inherit product.template field Inherits product.product_template_form_view
Models touched (0)

No models found for this module.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/6.1/purchase
VERSION
VERSION 1.1
CATEGORY
CATEGORYPurchase Management
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOpenERP SA
MAINTAINERS
MAINTAINERSOpenERP SA
COMMITTERS
COMMITTERSRaphael Collet, Rucha (Open ERP), Stephane Wirtel, Turkesh Patel (Open ERP), Numerigraphe - Lionel Sausin, Benoit Guillot, DBR (OpenERP), Harry (OpenERP), Fabien Pinckaers, Antony Lesuisse, Bharat Devnani (OpenERP), Olivier Dony, Divyesh Makwana (Open ERP), Vo Minh Thu, Launchpad Translations on behalf of openerp, Quentin (OpenERP), Kuldeep Joshi (OpenERP), Mayur Maheshwari (OpenERP), Alexis de Lattre, vro, olt@tinyerp.com, niv-openerp, Xavier ALT, Christophe Simonis, Ujjvala Collins (OpenERP), Xavier Morel, Minh Tran, Amit Bhavsar (Open ERP), Rifakat, Thibault Francois, Raphaël Valyi, sebastien beau, Vaibhav (OpenERP), Carlos Vásquez, Bogdan Stanciu, ksa (Open ERP), Els Van Vossel, Israel Fermin Montilla, Rifakat Haradwala (Open ERP), mayur maheshwari (Open ERP), Hardik Ansodariy (OpenERP), ssu, rch-openerp, aag (OpenERP), ron@tinyerp.com, qdp-launchpad@tinyerp.com, ksa (OpenERP), psi (Open ERP), Tejas (OpenERP), Amit Parmar (OpenERP), RavishchanraMurari (Open ERP), Kirti Savalia (OpenERP), Hemendra Paregi (Open ERP), Dhara (OpenERP), Atik Agewan (OpenERP), philubert@gmail.com, rpa (Open ERP), Ariel Figueroa, msh-openerp, sus
WEBSITE
WEBSITEhttp://www.openerp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:41:35
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - stock
    - product
    - base
    - process
    - decimal_precision
    - account
    - base_setup
    - analytic
    - board
    - edi
    - email_template
    - mail
    - base_tools
    - procurement
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Purchase module is for generating a purchase order for purchase of goods from a supplier.
=========================================================================================

A supplier invoice is created for the particular purchase order.

Dashboard for purchase management that includes:
    * Current Purchase Orders
    * Draft Purchase Orders
    * Graph for quantity and amount per month

    

Code Analysis

Views touched (28)
XML IDNameModelTypeStatus
board_purchase_form board.purchase.form board.board form New
mrp_company res.company.mrp.config res.company page Inherits base.view_company_form
purchase_order_calendar purchase.order.calendar purchase.order calendar New
purchase_order_form purchase.order.form purchase.order form New
purchase_order_graph purchase.order.graph purchase.order graph New
purchase_order_line_form purchase.order.line.form purchase.order.line form New
purchase_order_line_form2 purchase.order.line.form2 purchase.order.line form New
purchase_order_line_search purchase.order.line.search purchase.order.line search New
purchase_order_line_tree purchase.order.line.tree purchase.order.line tree New
purchase_order_tree purchase.order.tree purchase.order tree New
stock_move_purchase stock.move.form stock.move xpath Inherits stock.view_move_form
stock_picking_in_inherit_purchase Incoming Picking Inherited stock.picking field Inherits stock.view_picking_in_form
stock_picking_inherit_purchase Picking list stock.picking field Inherits stock.view_picking_form
view_partner_property_form res.partner.purchase.property.form.inherit res.partner page Inherits base.view_partner_form
view_picking_in_search_picking_to_invoice stock.picking.in.search stock.picking search New
view_procurement_form_inherit procurement.order.form.inherit procurement.order xpath Inherits procurement.procurement_form_view
view_purchase_config Invoicing Control on Purchases purchase.config.wizard data Inherits base.res_config_view_base
view_purchase_line_invoice Create invoices purchase.order.line_invoice form New
view_purchase_order_by_user_graph purchase.order.by.user.graph purchase.report graph New
view_purchase_order_filter purchase.order.list.select purchase.order search New
view_purchase_order_graph product.month.graph purchase.report graph New
view_purchase_order_group Merger Purchase Orders purchase.order.group form New
view_purchase_order_monthly_categ_graph purchase.order.monthly.categ.graph purchase.report graph New
view_purchase_order_monthly_categ_tree purchase.order.monthly.categ.tree purchase.report tree New
view_purchase_order_qty_amount_graph purchase.order.qty.amount.graph purchase.report graph New
view_purchase_order_search report.purchase.order.search purchase.report search New
view_purchase_order_tree purchase.order.tree purchase.report tree New
view_request_for_quotation_filter request.quotation.select purchase.order search New
Models touched (0)

No models found for this module.