TIP: You can type at any time to perform a new search.
Purchase
purchase · odoo/odoo
🛠 Migration considerations
purchase.bill.union— Model 'purchase.bill.union' has `_auto = False` and its init() (re)creates a SQL VIEW: the standard reporting-model pattern, but its raw SQL isn't checked by the ORM - verify it against renamed/removed tables and columns in the target version. migration-sql-view
Found by automated static analysis: patterns worth a look before/after upgrading this module to a newer Odoo version.
- 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 ID | Name | Model | Type | Status |
|---|---|---|---|---|
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) | Handler | Auth | Type | Methods | Flags |
|---|---|---|---|---|---|
/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_countIntegercompute='_compute_purchase_order_count' args: 'Purchase Order Count'
-
action_view_purchase_orders(self)
New fields (1)
-
business_domainSelectionondelete={'purchase_order': 'cascade'}selection_add=[('purchase_order', 'Purchase Order')]
No public methods.
New fields (6)
-
is_purchase_matchedBooleancompute='_compute_is_purchase_matched' -
purchase_idMany2one → purchase.orderhelp='Auto-complete from a past purchase order.'readonly=Falsestore=Falsestring='Purchase Order' args: 'purchase.order' -
purchase_order_countIntegercompute='_compute_origin_po_count'string='Purchase Order Count' -
purchase_order_nameCharcompute='_compute_purchase_order_name' -
purchase_vendor_bill_idMany2one → purchase.bill.unionhelp='Auto-complete from a previous bill, refund, or purchase order.'readonly=Falsestore=Falsestring='Auto-complete' args: 'purchase.bill.union' -
purchase_warning_textTextcompute='_compute_purchase_warning_text'help='Internal warning for the partner or the products as set by the user.' args: 'Purchase Warning'
-
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_downpaymentBoolean -
purchase_line_idMany2one → purchase.order.linecopy=Falseindex='btree_not_null'ondelete='set null' args: 'purchase.order.line', 'Purchase Order Line' -
purchase_line_warn_msgTextcompute='_compute_purchase_line_warn_msg' -
purchase_order_idMany2one → purchase.orderreadonly=Truerelated='purchase_line_id.order_id' args: 'purchase.order', 'Purchase Order'
No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (2)
-
partner_idMany2one → res.partnercomodel_name='res.partner' -
purchase_order_idMany2one → purchase.ordercomodel_name='purchase.order'
-
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_orderBooleancompute='_compute_is_in_purchase_order'search='_search_is_in_purchase_order' -
purchased_product_qtyFloatcompute='_compute_purchased_product_qty'digits='Product Unit'string='Purchased'
-
action_view_po(self)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (3)
-
purchase_line_warn_msgTextargs: 'Message for Purchase Order Line' -
purchase_methodSelectioncompute='_compute_purchase_method'help='On ordered quantities: Control bills based on ordered quantities.\nOn received quantities: Control bills based on received quantities.'precompute=Truereadonly=Falsestore=Truestring='Control Policy' args: [('purchase', 'On ordered quantities'), ('receive', 'On received quantities')] -
purchased_product_qtyFloatcompute='_compute_purchased_product_qty'digits='Product Unit'string='Purchased'
-
action_view_po(self) -
get_import_templates(self)@api.model
New fields (20)
-
account_move_idMany2one → account.movecomodel_name='account.move'readonly=True -
aml_idMany2one → account.move.linecomodel_name='account.move.line'readonly=True -
billed_amount_untaxedMonetarycompute='_compute_amount_untaxed_fields'currency_field='currency_id' -
company_idMany2one → res.companycomodel_name='res.company'readonly=True -
currency_idMany2one → res.currencycomodel_name='res.currency'readonly=True -
line_amount_untaxedMonetaryreadonly=True -
line_qtyFloatreadonly=True -
line_uom_idMany2one → uom.uomcomodel_name='uom.uom'readonly=True -
partner_idMany2one → res.partnercomodel_name='res.partner'readonly=True -
pol_idMany2one → purchase.order.linecomodel_name='purchase.order.line'readonly=True -
product_idMany2one → product.productcomodel_name='product.product'readonly=True -
product_uom_idMany2one → uom.uomcomodel_name='uom.uom'related='product_id.uom_id' -
product_uom_priceFloatcompute='_compute_product_uom_price'inverse='_inverse_product_uom_price'readonly=False -
product_uom_qtyFloatcompute='_compute_product_uom_qty'inverse='_inverse_product_uom_qty'readonly=False -
purchase_amount_untaxedMonetarycompute='_compute_amount_untaxed_fields'currency_field='currency_id' -
purchase_order_idMany2one → purchase.ordercomodel_name='purchase.order'readonly=True -
qty_invoicedFloatreadonly=True -
qty_to_invoiceFloatreadonly=True args: 'Qty to invoice' -
referenceCharcompute='_compute_reference' -
stateCharreadonly=True
-
action_add_to_po(self) -
action_match_lines(self) -
action_open_line(self)
New fields (9)
-
amountFloatreadonly=Truestring='Amount' -
company_idMany2one → res.companyreadonly=True args: 'res.company', 'Company' -
currency_idMany2one → res.currencyreadonly=Truestring='Currency' args: 'res.currency' -
dateDatereadonly=Truestring='Date' -
nameCharreadonly=Truestring='Reference' -
partner_idMany2one → res.partnerreadonly=Truestring='Vendor' args: 'res.partner' -
purchase_order_idMany2one → purchase.orderreadonly=Truestring='Purchase Order' args: 'purchase.order' -
referenceCharreadonly=Truestring='Source' -
vendor_bill_idMany2one → account.movereadonly=Truestring='Vendor Bill' args: 'account.move'
-
init(self)
New fields (44)
-
acknowledgedBooleancopy=Falsehelp='It indicates that the vendor has acknowledged the receipt of the purchase order.'tracking=True args: 'Acknowledged' -
amount_taxMonetarycompute='_amount_all'readonly=Truestore=Truestring='Taxes' -
amount_totalMonetarycompute='_amount_all'readonly=Truestore=Truestring='Total' -
amount_total_ccMonetarycompute='_amount_all'currency_field='company_currency_id'readonly=Truestore=Truestring='Total in currency' -
amount_untaxedMonetarycompute='_amount_all'readonly=Truestore=Truestring='Untaxed Amount'tracking=True -
company_currency_idMany2onerelated='company_id.currency_id'string='Company Currency' -
company_idMany2one → res.companydefault=<expr>index=Truerequired=True args: 'res.company', 'Company' -
company_price_includeSelectionrelated='company_id.account_price_include' -
country_codeCharrelated='company_id.account_fiscal_country_id.code'string='Country code' -
currency_idMany2one → res.currencycompute='_compute_currency_id'precompute=Truereadonly=Falserequired=Truestore=True args: 'res.currency', 'Currency' -
currency_rateFloatcompute='_compute_currency_rate'digits=0precompute=Truestore=Truestring='Currency Rate' -
date_approveDatetimecopy=Falseindex=Truereadonly=True args: 'Confirmation Date' -
date_calendar_startDatetimecompute='_compute_date_calendar_start'readonly=Truestore=True -
date_orderDatetimecopy=Falsedefault=fields.Datetime.nowhelp='Depicts the date within which the Quotation should be confirmed and converted into a purchase order.'index=Truerequired=True args: 'Order Deadline' -
date_plannedDatetimecompute='_compute_date_planned'copy=Falsehelp='Delivery date promised by vendor. This date is used to determine expected arrival of products.'index=Truereadonly=Falsestore=Truestring='Expected Arrival' -
dest_address_idMany2one → res.partnercheck_company=Truehelp='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_idsMany2many → purchase.ordercomodel_name='purchase.order'compute='_compute_duplicated_order_ids' -
fiscal_position_idMany2one → account.fiscal.positiondomain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]"string='Fiscal Position' args: 'account.fiscal.position' -
incoterm_idMany2one → account.incotermshelp='International Commercial Terms are a series of predefined commercial terms used in international transactions.' args: 'account.incoterms', 'Incoterm' -
invoice_countIntegercompute='_compute_invoice'copy=Falsedefault=0store=Truestring='Bill Count' -
invoice_idsMany2many → account.movecompute='_compute_invoice'copy=Falsestore=Truestring='Bills' args: 'account.move' -
invoice_statusSelectioncompute='_get_invoiced'copy=Falsedefault='no'readonly=Truestore=Truestring='Billing Status' args: [('no', 'Nothing to Bill'), ('to invoice', 'Waiting Bills'), ('invoiced', 'Fully Billed')] -
is_lateBooleansearch='_search_is_late'store=False args: 'Is Late' -
lock_confirmed_poSelectionrelated='company_id.po_lock' -
lockedBooleancopy=Falsedefault=Falsehelp='Locked Purchase Orders cannot be modified.'tracking=True -
nameCharcopy=Falsedefault=<expr>index='trigram'required=True args: 'Order Reference' -
noteHtmlargs: 'Terms and Conditions' -
order_lineOne2many → purchase.order.linecopy=Truestring='Order Lines' args: 'purchase.order.line', 'order_id' -
originCharcopy=Falsehelp='Reference of the document that generated this purchase order request (e.g. a sales order)' args: 'Source' -
partner_bill_countIntegerrelated='partner_id.supplier_invoice_count' -
partner_idMany2one → res.partnerchange_default=Truecheck_company=Truehelp='You can find a vendor by its Name, TIN, Email or Internal Reference.'index=Truerequired=Truestring='Vendor'tracking=True args: 'res.partner' -
partner_refCharcopy=Falsehelp="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_idMany2one → account.payment.termdomain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" args: 'account.payment.term', 'Payment Terms' -
prioritySelectiondefault='0'index=True args: [('0', 'Normal'), ('1', 'Urgent')], 'Priority' -
product_idMany2one → product.productrelated='order_line.product_id'string='Product' args: 'product.product' -
purchase_warning_textTextcompute='_compute_purchase_warning_text'help='Internal warning for the partner or the products as set by the user.' args: 'Purchase Warning' -
receipt_reminder_emailBooleancompute='_compute_receipt_reminder_email'readonly=Falsestore=True args: 'Receipt Reminder Email' -
reminder_date_before_receiptIntegercompute='_compute_receipt_reminder_email'readonly=Falsestore=True args: 'Days Before Receipt' -
show_comparisonBooleancompute='_compute_show_comparison' args: 'Show Comparison' -
stateSelectioncopy=Falsedefault='draft'index=Truereadonly=Truestring='Status'tracking=True args: [('draft', 'RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('cancel', 'Cancelled')] -
tax_calculation_rounding_methodSelectionreadonly=Truerelated='company_id.tax_calculation_rounding_method'string='Tax calculation rounding method' -
tax_country_idMany2one → res.countrycomodel_name='res.country'compute='_compute_tax_country_id'compute_sudo=Truehelp='Technical field to filter the available taxes depending on the fiscal country and fiscal position.' -
tax_totalsBinarycompute='_compute_tax_totals'exportable=False -
user_idMany2one → res.userscheck_company=Truedefault=<expr>index=Truestring='Buyer'tracking=True args: 'res.users'
-
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.modelThis function returns the values to populate the custom dashboard in the purchase order views. -
send_reminder_preview(self)
New fields (43)
-
allowed_uom_idsMany2many → uom.uomcompute='_compute_allowed_uom_ids' args: 'uom.uom' -
amount_to_invoice_at_dateFloatcompute='_compute_amount_to_invoice_at_date'string='Amount' -
company_idMany2one → res.companyreadonly=Truerelated='order_id.company_id'store=Truestring='Company' args: 'res.company' -
currency_idMany2onerelated='order_id.currency_id'string='Currency' -
date_approveDatetimereadonly=Truerelated='order_id.date_approve'string='Confirmation Date' -
date_orderDatetimereadonly=Truerelated='order_id.date_order'string='Order Date' -
date_plannedDatetimecompute='_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=Truereadonly=Falsestore=Truestring='Expected Arrival' -
discountFloatcompute='_compute_price_unit_and_date_planned_and_name'digits='Discount'readonly=Falsestore=Truestring='Discount (%)' -
display_typeSelectiondefault=Falsehelp='Technical field for UX purpose.' args: [('line_section', 'Section'), ('line_subsection', 'Subsection'), ('line_note', 'Note')] -
invoice_linesOne2many → account.move.linecopy=Falsereadonly=Truestring='Bill Lines' args: 'account.move.line', 'purchase_line_id' -
is_downpaymentBoolean -
nameTextcompute='_compute_price_unit_and_date_planned_and_name'readonly=Falserequired=Truestore=Truestring='Description' -
order_idMany2one → purchase.orderindex=Trueondelete='cascade'required=Truestring='Order Reference' args: 'purchase.order' -
parent_idMany2one → purchase.order.linecompute='_compute_parent_id'string='Parent Section Line' args: 'purchase.order.line' -
partner_idMany2one → res.partnerindex='btree_not_null'readonly=Truerelated='order_id.partner_id'store=Truestring='Partner' args: 'res.partner' -
price_subtotalMonetarycompute='_compute_amount'store=Truestring='Subtotal' -
price_taxFloatcompute='_compute_amount'store=Truestring='Tax' -
price_totalMonetarycompute='_compute_amount'store=Truestring='Total' -
price_unitFloataggregator='avg'compute='_compute_price_unit_and_date_planned_and_name'min_display_digits='Product Price'readonly=Falserequired=Truestore=Truestring='Unit Price' -
price_unit_discountedFloatcompute='_compute_price_unit_discounted' args: 'Unit Price (Discounted)' -
price_unit_product_uomFloatcompute='_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_idMany2one → product.productchange_default=Truedomain=[('purchase_ok', '=', True)]index='btree_not_null'ondelete='restrict'string='Product' args: 'product.product' -
product_no_variant_attribute_value_idsMany2many → product.template.attribute.valueondelete='restrict'string='Product attribute values that do not create variants' args: 'product.template.attribute.value' -
product_qtyFloatdigits='Product Unit'required=Truestring='Quantity' -
product_template_attribute_value_idsMany2manyreadonly=Truerelated='product_id.product_template_attribute_value_ids' -
product_typeSelectionreadonly=Truerelated='product_id.type' -
product_uom_idMany2one → uom.uomdomain="[('id', 'in', allowed_uom_ids)]"ondelete='restrict'string='Unit' args: 'uom.uom' -
product_uom_qtyFloatcompute='_compute_product_uom_qty'store=Truestring='Total Quantity' -
purchase_line_warn_msgTextcompute='_compute_purchase_line_warn_msg' -
qty_invoicedFloatcompute='_compute_qty_invoiced'digits='Product Unit'store=Truestring='Billed Qty' -
qty_invoiced_at_dateFloatcompute='_compute_qty_invoiced_at_date'digits='Product Unit'string='Billed' -
qty_receivedFloatcompute='_compute_qty_received'compute_sudo=Truedigits='Product Unit'inverse='_inverse_qty_received'store=True args: 'Received Qty' -
qty_received_at_dateFloatcompute='_compute_qty_received_at_date'digits='Product Unit'string='Received' -
qty_received_manualFloatcopy=Falsedigits='Product Unit' args: 'Manual Received Qty' -
qty_received_methodSelectioncompute='_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=Truestring='Received Qty Method' args: [('manual', 'Manual')] -
qty_to_invoiceFloatcompute='_compute_qty_invoiced'digits='Product Unit'readonly=Truestore=Truestring='To Invoice Quantity' -
selected_seller_idMany2one → product.supplierinfocompute='_compute_selected_seller_id'help='Technical field to get the vendor pricelist used to generate this line' args: 'product.supplierinfo' -
sequenceIntegerdefault=10string='Sequence' -
stateSelectionrelated='order_id.state' -
tax_calculation_rounding_methodSelectionreadonly=Truerelated='company_id.tax_calculation_rounding_method'string='Tax calculation rounding method' -
tax_idsMany2many → account.taxcontext={'active_test': False, 'hide_original_tax_ids': True}string='Taxes' args: 'account.tax' -
technical_price_unitFloathelp='Technical field for price computation' -
translated_product_nameTextcompute='_compute_translated_product_name'
-
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_idMany2one → product.categoryreadonly=True args: 'product.category', 'Product Category' -
commercial_partner_idMany2one → res.partnerreadonly=True args: 'res.partner', 'Commercial Entity' -
company_idMany2one → res.companyreadonly=True args: 'res.company', 'Company' -
country_idMany2one → res.countryreadonly=True args: 'res.country', 'Partner Country' -
currency_idMany2one → res.currencyreadonly=True args: 'res.currency', 'Currency' -
date_approveDatetimereadonly=True args: 'Confirmation Date' -
date_orderDatetimereadonly=True args: 'Order Date' -
delayFloataggregator='avg'digits=(16, 2)help='Amount of time between purchase approval and order by date.'readonly=True args: 'Days to Confirm' -
delay_passFloataggregator='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_idMany2one → account.fiscal.positionreadonly=Truestring='Fiscal Position' args: 'account.fiscal.position' -
nbr_linesIntegerreadonly=True args: '# of Lines' -
order_idMany2one → purchase.orderreadonly=True args: 'purchase.order', 'Order' -
partner_idMany2one → res.partnerreadonly=True args: 'res.partner', 'Vendor' -
price_averageMonetaryaggregator='avg'readonly=True args: 'Average Cost' -
price_totalMonetaryreadonly=True args: 'Total' -
product_idMany2one → product.productreadonly=True args: 'product.product', 'Product' -
product_tmpl_idMany2one → product.templatereadonly=True args: 'product.template', 'Product Template' -
product_uom_idMany2one → uom.uomreadonly=True args: 'uom.uom', 'Reference Unit of Measure' -
qty_billedFloatreadonly=True args: 'Qty Billed' -
qty_orderedFloatreadonly=True args: 'Qty Ordered' -
qty_receivedFloatreadonly=True args: 'Qty Received' -
qty_to_be_billedFloatreadonly=True args: 'Qty to be Billed' -
stateSelectionreadonly=True args: [('draft', 'Draft RFQ'), ('sent', 'RFQ Sent'), ('to approve', 'To Approve'), ('purchase', 'Purchase Order'), ('cancel', 'Cancelled')], 'Status' -
untaxed_totalMonetaryreadonly=True args: 'Untaxed Total' -
user_idMany2one → res.usersreadonly=True args: 'res.users', 'Buyer' -
volumeFloatreadonly=True args: 'Volume' -
weightFloatreadonly=True args: 'Gross Weight'
No public methods.
New fields (3)
-
po_double_validationSelectiondefault='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_amountMonetarydefault=5000help='Minimum amount for which a double validation is required'string='Double validation amount' -
po_lockSelectiondefault='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')]
No public methods.
New fields (11)
-
company_currency_idMany2one → res.currencyreadonly=Truerelated='company_id.currency_id'string='Company Currency' args: 'res.currency' -
group_send_reminderBooleandefault=Truehelp='Allow automatically send email to remind your vendor the receipt date'implied_group='purchase.group_send_reminder' args: 'Receipt Reminder' -
group_warning_purchaseBooleanimplied_group='purchase.group_warning_purchase' args: 'Purchase Warnings' -
lock_confirmed_poBooleandefault=<expr> args: 'Lock Confirmed Orders' -
module_account_3way_matchBooleanargs: '3-way matching: purchases, receptions and bills' -
module_purchase_product_matrixBooleanargs: 'Purchase Grid Entry' -
module_purchase_requisitionBooleanargs: 'Purchase Agreements' -
po_double_validationSelectionreadonly=Falserelated='company_id.po_double_validation'string='Levels of Approvals *' -
po_double_validation_amountMonetarycurrency_field='company_currency_id'readonly=Falserelated='company_id.po_double_validation_amount'string='Minimum Amount' -
po_lockSelectionreadonly=Falserelated='company_id.po_lock'string='Purchase Order Modification *' -
po_order_approvalBooleandefault=<expr> args: 'Purchase Order Approval'
-
set_values(self)
New fields (6)
-
buyer_idMany2one → res.usersstring='Buyer' args: 'res.users' -
property_purchase_currency_idMany2one → res.currencycompany_dependent=Truehelp='This currency will be used for purchases from the current partner'string='Supplier Currency' args: 'res.currency' -
purchase_order_countIntegercompute='_compute_purchase_order_count'groups='purchase.group_purchase_user'string='Purchase Order Count' -
purchase_warn_msgTextargs: 'Message for Purchase Order' -
receipt_reminder_emailBooleancompany_dependent=Truehelp='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_receiptIntegercompany_dependent=Truehelp='Number of days to send reminder email before the promised receipt date' args: 'Days Before Receipt'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…