TIP: You can type at any time to perform a new search.

Security findings

Repository
odoo/odoo · module folder
Module version
1.2
Category
Supply Chain/Purchase
Folder size
9.46 MB
License
LGPL-3
Application
Yes
Auto-installable
No
Website
https://www.odoo.com/app/purchase
Last tracking update
2026-10-05 12:14:53
Authors
Odoo S.A.
Maintainers
Odoo S.A.
Committers
Xavier Morel, Raphael Collet, Thibault Delavallée, odoo, Odoo Translation Bot, Christophe Matthieu, Aaron Bohy, Géry Debongnie, Jorge Pinna Puissant, Arnold Moyaux, Julien Castiaux, Victor Feyens, Adrien Dieudonné, William Henrotin, Sébastien Theys, Julien Mougenot, svs-odoo, David Beguin, Brice bib Bartoletti, Tiffany Chang (tic), Gorash, abd-msyukyu-odoo, Romain Estievenart, william-andre, John Laterre (jol), luvi, bve-odoo, Victor Piryns (pivi), amdi-odoo, Levi Siuzdak (sile), Dylan Kiss (dyki), Chong Wang (cwg), Odoo, Brieuc-brd, Paweł Fertyk, Arnaud Sibille, omra-odoo, guva-odoo, Quentin Wolfs, yosa-odoo, kcv-odoo, Louis Gobert, Harsh Shah, hatr-odoo, aamo-odoo, Victorien (viso), thle-odoo, Patricia Daloze (pda), Xavier Luyckx (xlu), guce, Stéphane Diez, dhha-odoo, Claire (clbr), Rocío Vega, gteboul, Abdo Mongy, Léo Gizard, roto-odoo, pkgu-odoo, Mohammad Abdulmoneim (abdu), djameltouati, Pierre Pulinckx, Michaël Mattiello, Allesio, ppat-odoo, Shrey Mehta, Carmine, pish-odoo, Mahdi Alijani (malj), plha-odoo, Krzysztof Magusiak (krma), Ajit Singh, joseph, Maeva De Keyser (MDEK), utma-odoo, Ester Andreetto, bhna-odoo, K Theja (kthe@odoo.com), MAGREMENT, Lulu Grimalkin (lugr), rare-odoo, Yassien Ghoniem, Lancelot Semal, Mongy (abmn), Laurent Smet (LAS), Julien Launois (jula), Martin Doyen, Waleed Elgamal, steji, Ayush Modi, Saurabh, Nisarg (nipl), Felipe Garcia Suez, Ai Lin Zuccarello (aizu), Mohamed Barakat, rugot-odoo, assk-odoo, jodh-odoo, Atovange, Zachary (zavan), sako-odoo, tpma-odoo, Youssef (abyo), smjo-odoo, Kadam Darji, Julien Carion, ELCO, Moamen(msho), Khaj-odoo, chpa-odoo, hapt-odoo, Krishna Patel, Sanket Tank(stan), Antonio Pimentel, Karim Gamaleldin, jeanschoenlaub, claireclan, modm-odoo, Julien Coppin (jucop), Stef Ossé, Julien Piron, Jean Schoenlaub, Corentin Deruyck, pusu-odoo, japat-odoo
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
l10n_din5008_purchase, mis_builder_demo, project_purchase, purchase_alternative, purchase_edi_ubl_bis3, purchase_product_matrix, purchase_requisition, purchase_stock, sale_purchase
Description

Code Analysis info_outline

Views touched (62)
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_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_purchase_tree_view product.product.purchase.list product.product list Inherits product.product_product_tree_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_purchase_tree_view product.template.purchase.list product.template list Inherits product.product_template_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.purchase product.product search Inherits product.product_view_search_catalog
product_view_search_catalog_inherit product.view.search.catalog.inherit.purchase product.product search Inherits product.product_view_search_catalog
purchase_bill_line_match_search purchase.bill.line.match.search purchase.bill.line.match search New
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_list_invoice purchase.order.line.list.invoice purchase.order.line list 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_line_view_form_invoice purchase.order.line.view.form.invoice purchase.order.line form 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_category_property_form product.category.property.form.inherit.purchase product.category form Inherits account.view_category_property_form
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_list_invoice purchase.bill.union.list.invoice purchase.bill.union list 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 (21)

New fields (0)

No new fields.

Public methods (0)

No public methods.

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 (8)
  • display_auto_complete_field Boolean
    compute='_compute_display_auto_complete' groups='purchase.group_purchase_user'
  • 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_matched_ratio Float
    compute='_compute_is_purchase_matched' string='Purchase Matched Ratio'
  • 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 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 (5)
  • 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_matching_issue_msg Char
    compute='_compute_purchase_matching_issue_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 (1)
  • purchase_order_line_ids Many2many → purchase.order.line
    column1='account_tax_id' column2='purchase_order_line_id' comodel_name='purchase.order.line' copy=False readonly=True relation='account_tax_purchase_order_line_rel'
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 (4)
  • property_account_billed_not_received_active Boolean
    related='property_account_billed_not_received_id.active' string='Billed Not Received Account Active'
  • property_account_billed_not_received_id Many2one → account.account
    check_company=True company_dependent=True help='Account holding the accrued value of the goods billed but not received yet. With perpetual valuation, it counterbalances the stock valuation account at closing.' ondelete='restrict' args: 'account.account', 'Billed Not Received Account'
  • property_account_bills_to_receive_active Boolean
    related='property_account_bills_to_receive_id.active' string='Bills to Receive Account Active'
  • property_account_bills_to_receive_id Many2one → account.account
    check_company=True company_dependent=True help='Account holding the accrued value of the goods received but not billed yet. With perpetual valuation, it counterbalances the stock valuation account at closing.' ondelete='restrict' args: 'account.account', 'Bills to Receive Account'
Public methods (0)

No public methods.

New fields (2)
  • purchased_product_qty Float
    compute='_compute_purchased_product_qty' digits='Product Unit' string='Purchased'
  • sold_by_vendor_id Many2one → res.partner
    search='_search_sold_by_vendor' store=False string='Vendor' args: 'res.partner'
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 (26)
  • 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
  • date Date
    readonly=True
  • description Char
    readonly=True
  • display_matching_tag Boolean
    compute='_compute_display_matching_tag'
  • line_amount_untaxed Monetary
    readonly=True
  • line_qty Float
    readonly=True
  • line_uom_id Many2one → uom.uom
    comodel_name='uom.uom' readonly=True
  • matching_id Integer
    readonly=True string='Matching'
  • 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
  • product_uom_qty_to_invoice Float
    compute='_compute_product_uom_qty_to_invoice'
  • 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'
  • qty_to_invoice_raw Float
    help='Difference between demand and quantity but not affected by invoice policy' readonly=True args: 'Qty not invoiced'
  • reference Char
    readonly=True
  • state Char
    readonly=True
Public methods (4)
  • action_add_to_po(self)
  • action_match_lines(self)
  • action_open_line(self)
  • action_unmatch_lines(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 (0)

No public methods.

New fields (49)
  • 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
  • bill_matched_ratio Float
    compute='_compute_bill_matched_ratio' string='Bill Matched Ratio'
  • 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: 'Order 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='Expected delivery date of goods by the vendor based on the latest information' 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'
  • document_tax_mode Selection
    compute='_compute_document_tax_mode' precompute=True readonly=False required=True selection=[('tax_excluded', 'Tax Excl.'), ('tax_included', 'Tax Incl.')] store=True
  • 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
    compute='_compute_incoterm_id' help='International Commercial Terms are a series of predefined commercial terms used in international transactions.' readonly=False store=True args: 'account.incoterms', 'Incoterm'
  • incoterm_location Char
    compute='_compute_incoterm_location' readonly=False store=True string='Incoterm Location'
  • 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'
  • receipt_status Selection
    compute='_compute_receipt_status' store=True string='Receipt Status' args: [('pending', 'Not Received'), ('partial', 'Partially Received'), ('full', 'Fully Received')]
  • 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'
  • show_receive_button Boolean
    compute='_compute_show_receive_button'
  • 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 Json
    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 (32)
  • 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_receive(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_reset_date_order(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')
  • 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 (51)
  • accrual_move_ids Many2many → account.move
    column1='order_line_id' column2='move_id' comodel_name='account.move' copy=False help="Accrual entries generated for this line, so it isn't accrued again while one is still standing (posted, not yet reversed or cancelled)." relation='purchase_order_line_accrual_move_rel' string='Accrual Entries'
  • 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'
  • bill_to_receive Boolean
    search='_search_bill_to_receive' store=False string='Bill to Receive'
  • company_id Many2one → res.company
    index=True 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 Deadline'
  • 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
    aggregator='avg' 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')]
  • document_tax_mode Selection
    related='order_id.document_tax_mode'
  • invoice_lines One2many → account.move.line
    copy=False readonly=True string='Bill Lines' args: 'account.move.line', 'purchase_line_id'
  • is_downpayment Boolean
  • label Text
    compute='_compute_label' inverse='_inverse_label' string='Label'
  • matched_invoice_count Integer
    compute='_compute_matched_invoice_count' string='Matched Invoices Count'
  • name Text
    compute='_compute_price_unit_and_date_planned_and_name' readonly=False store=True string='Description'
  • non_deductible_tax Float
    compute='_compute_amount' store=True
  • 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'
  • prepaid_expense Boolean
    search='_search_prepaid_expense' store=False string='Prepaid Expense'
  • price_subtotal Monetary
    compute='_compute_amount' store=True string='Subtotal'
  • price_subtotal_to_invoice Monetary
    compute='_compute_price_subtotal_to_invoice' string='To Invoice'
  • 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
    aggregator='avg' compute='_compute_price_unit_product_uom' help="The Price of one unit of the product's Unit of Measure" min_display_digits='Product Price' store=True 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_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'
  • qty_to_invoice_raw Float
    compute='_compute_qty_to_invoice_raw' digits='Product Unit' help="Ordered quantity not invoiced. This may or may not include quantities that won't be invoiced, depending on the product's Control Policy." store=True string='Not Invoiced 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
    column1='purchase_order_line_id' column2='account_tax_id' comodel_name='account.tax' context={'active_test': False, 'hide_original_tax_ids': True} relation='account_tax_purchase_order_line_rel' string='Taxes'
  • technical_price_unit Float
    compute='_compute_price_unit_and_date_planned_and_name' help='Technical field for price computation' readonly=False store=True
  • uom_id Many2one → uom.uom
    domain="[('id', 'in', allowed_uom_ids)]" ondelete='restrict' string='Unit' args: 'uom.uom'
Public methods (6)
  • action_add_from_catalog(self)
  • action_open_invoices(self)
  • action_open_order(self)
  • create(self, vals_list)
    @api.model_create_multi
  • 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 Deadline'
  • 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'
  • 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'
  • uom_id Many2one → uom.uom
    readonly=True args: 'uom.uom', 'Reference Unit of Measure'
  • 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)
  • action_open_purchase_order(self)

New fields (5)
  • account_billed_not_received_id Many2one → account.account
    check_company=True string='Billed Not Received Account' args: 'account.account'
  • account_bills_to_receive_id Many2one → account.account
    check_company=True string='Bills to Receive Account' args: 'account.account'
  • 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 (12)
  • 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_alternative Boolean
    args: 'Purchase Alternative'
  • 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 (0)

No new fields.

Public methods (0)

No public methods.

New fields (8)
  • 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_incoterm_id Many2one → account.incoterms
    comodel_name='account.incoterms' help='International Commercial Terms are a series of predefined commercial terms used in international transactions.' string='Vendor Incoterm'
  • purchase_incoterm_location Char
    args: 'Vendor Incoterm Location'
  • 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 (1)
  • write(self, vals)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…