Repository
odoo/odoo · module folder
Module version
1.2
Category
Supply Chain/Purchase
Folder size
9.09 MB
License
LGPL-3
Application
Yes
Auto-installable
No
Website
https://www.odoo.com/app/purchase
Last tracking update
2026-08-20 10:12:45
Authors
Odoo S.A.
Maintainers
Odoo S.A.
Committers
Xavier Morel, Raphael Collet, Thibault Delavallée, Florent Xicluna, Atul Patel, Odoo Translation Bot, Joren Van Onder, Aaron Bohy, Géry Debongnie, 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, Rémy Voet (ryv), Tiffany Chang (tic), Gorash, Mathieu Duckerts-Antoine, JF Aubert, John Laterre (jol), Ruben Gomes, luvi, Valentin Chevalier, Renaud Thiry, Julien Banken, bve-odoo, Louis Wicket (wil), alsh-odoo, Adrien Widart (awt), Maximilien (malb), Victor Piryns (pivi), Thomas Becquevort (thbe), Gauthier Wala (gawa), Djamel Touati, clesgow, Levi Siuzdak (sile), Dylan Kiss (dyki), Odoo, Simon Goffaux (sigo), Graeme Gellatly, Arnaud Sibille, kdeb@odoo.com, Nicolas Viseur (vin), guva-odoo, Walid (wasa), Paul Stroobant, lase@odoo.com, jorv-odoo, suth-odoo, reka-odoo, yosa-odoo, kcv-odoo, Louis Gobert, nihp-odoo, mano-odoo, Harsh Shah, hatr-odoo, Hussein Ebrahim(hyhe), aamo-odoo, Victorien (viso), thle-odoo, Patricia Daloze (pda), guce, Stéphane Diez, dhha-odoo, Rocío Vega, gteboul, Léo Gizard, Antoine Dupuis, Julien Schwanen, Maira Salazar (srma), Arthur Nanson, Ricardo Gomes Rodrigues, aizu-odoo, roto-odoo, David Van Droogenbroeck (DROD), elhayyany, pkgu-odoo, Mohammad Abdulmoneim (abdu), djameltouati, khsr-odoo, Pierre Pulinckx, Anton Romanova (roan), Michaël Mattiello, AnhBT, Corentin Heinix (cohe), ppat-odoo, zel-odoo, Shrey Mehta, Carmine, pish-odoo, Mahdi Alijani (malj), chha-odoo, plha-odoo, Krzysztof Magusiak (krma), Ajit Singh, Maksym Yankin, joseph, Maeva De Keyser (MDEK), utma-odoo, Hadi El Yakhni, Ester Andreetto, bhra-odoo, bhna-odoo, MAGREMENT, temo-odoo, Lulu Grimalkin (lugr), rare-odoo, igbe, Lancelot Semal, Laurent Smet (LAS), adip-odoo, Martin Doyen, Waleed Elgamal, steji, Ayush Modi, lrizzi1, Elliot ELCO, Felipe Garcia Suez, srap-odoo, saurabh, Romain (roto), Zachary (zavan), sako-odoo, Youssef (abyo), smjo-odoo, soza-odoo, Jaishyam (JRBR), msho-odoo, chpa-odoo, hapt-odoo, jeanschoenlaub, modm-odoo, Abhishek Yadav
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
account_payment_purchase, account_payment_term_extension, edi_purchase_oca, fieldservice_purchase, fleet_vehicle_purchase, l10n_din5008_purchase, maintenance_request_purchase, mis_builder_demo, mrp_subcontracting_purchase_link, product_main_seller, product_supplier_code_purchase, project_purchase, purchase_advance_payment, purchase_allowed_product, purchase_analytic, purchase_create_bill_button, purchase_default_terms_conditions, purchase_deposit, purchase_edi_ubl_bis3, purchase_force_invoiced, purchase_invoice_method, purchase_last_price_info, purchase_line_reassign, purchase_no_rfq, purchase_order_general_discount, purchase_order_line_description, purchase_order_line_menu, purchase_order_line_price_unit_digits, purchase_order_report_hide_tax, purchase_order_supplierinfo_update, purchase_order_type, purchase_order_ubl, purchase_order_weight_volume, purchase_product_matrix, purchase_product_template_tags, purchase_requisition, purchase_rfq_number, purchase_sale_inter_company, purchase_security, purchase_stock, purchase_tag, purchase_tier_validation, purchase_uom_discrete, purchase_variant_configurator, sale_purchase, spreadsheet_dashboard_purchase_oca, srm
Description

Code Analysis

Views touched (55)
XML IDNameModelTypeStatus
account_analytic_account_view_form_purchase account.analytic.account.form.purchase account.analytic.account form 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 form Inherits product.product_normal_form_view
product_product_supplierinfo_tree_view2 product.supplierinfo.list.view2.product product.supplierinfo list Inherits purchase.product_supplierinfo_tree_view2
product_supplierinfo_tree_view2 product.supplierinfo.list.view2 product.supplierinfo list Inherits product.product_supplierinfo_tree_view
product_template_search_view_purchase product.template.search.purchase product.template search Inherits product.product_template_search_view
product_view_kanban_catalog_purchase_only product.view.kanban.catalog.purchase product.product kanban Inherits product.product_view_kanban_catalog
product_view_search_catalog product.view.search.catalog.inherit.purchase product.product search 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 kanban 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 form Inherits base.res_config_settings_view_form
res_partner_view_purchase_buttons res.partner.view.purchase.buttons res.partner form 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 form Inherits account.view_move_form
view_partner_property_form res.partner.purchase.property.form.inherit res.partner form Inherits base.view_partner_form
view_product_product_supplier_inherit product.product.form product.product form Inherits product.product_normal_form_view
view_product_supplier_inherit product.template.supplier.form.inherit product.template form Inherits product.product_template_form_view
view_product_template_purchase_buttons_from product.template.purchase.button.inherit product.template form 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
HTTP endpoints (5)
Route(s)HandlerAuthTypeMethodsFlags
/my/purchase/<int:order_id> CustomerPortal.portal_my_purchase_order public http ALL website
/my/purchase/<int:order_id>/download_edi CustomerPortal.portal_my_purchase_order_download_edi public http ALL website
/my/purchase/<int:order_id>/update CustomerPortal.portal_my_purchase_order_update_dates public jsonrpc ALL website
/my/purchase, /my/purchase/page/<int:page> CustomerPortal.portal_my_purchase_orders user http ALL website
/my/rfq, /my/rfq/page/<int:page> CustomerPortal.portal_my_requests_for_quotation user http ALL website
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.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…