TIP: You can type at any time to perform a new search.
Purchase Stock
purchase_stock · odoo/odoo
🛠 Migration considerations
vendor.delay.report— Model 'vendor.delay.report' 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
- 3.34 MB
- License
- LGPL-3
- Application
- No
- Auto-installable
- Yes
- Website
- None
- Last tracking update
- 2026-08-21 04:11:31
- Authors
- Odoo S.A.
- Maintainers
- Odoo S.A.
- Committers
- Xavier Morel, Raphael Collet, Thibault Delavallée, Odoo Translation Bot, Laurent Smet, Jorge Pinna Puissant, Arnold Moyaux, Julien Castiaux, Victor Feyens, Andrea Grazioso (agr-odoo), William Henrotin, Anh Thao Pham (pta), svs-odoo, Prakash Prajapati, Rémy Voet (ryv), Tiffany Chang (tic), Gorash, Mathieu Duckerts-Antoine, william-andre, JF Aubert, David (dafr), John Laterre (jol), Aurelien van Delft (avd), Mathieu Walravens, luvi, Elias Regopoulos, Habib (ayh), Louis Wicket (wil), alsh-odoo, Adrien Widart (awt), Victor Piryns (pivi), Djamel Touati, Pieter Claeys (clpi), clesgow, Dylan Kiss (dyki), Odoo, Martin Maes, Paweł Fertyk, Sarah Bellefroid, kdeb@odoo.com, Walid (wasa), lase@odoo.com, Quentin Wolfs, Ethan Vincent, Cyril Dutrieux (cydu), kcv-odoo, nihp-odoo, Chrysanthe (chgo), mano-odoo, Stéphane Diez, kawkb, dhha-odoo, Léo Gizard, Hesham Saleh, Julien Schwanen, David Van Droogenbroeck (DROD), pkgu-odoo, Mohammad Abdulmoneim (abdu), djameltouati, Shrey Mehta, MaximeNoirhomme, plha-odoo, Krzysztof Magusiak (krma), Omar (OSAH), krip-odoo, joseph, Guillaume V, bhna-odoo, Junqi, agbr-odoo, Lulu Grimalkin (lugr), rare-odoo, sawer, Lancelot Semal, adip-odoo, steji, Ayush Modi, Amr Elkhatieb, Robert Smith (rosm), daiduongnguyen-odoo, srap-odoo, Zachary (zavan), tpma-odoo, msho-odoo, lase, Do Anh Duy, hapt-odoo, Youssef, jeanschoenlaub, Abhishek Yadav
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- account_payment_purchase_stock, ddmrp, delivery_purchase, despatch_advice_import, intrastat_product, l10n_in_purchase_stock, l10n_ro_stock_price_difference, mrp_multi_level, pms_purchase, procurement_purchase_no_grouping, purchase_auto_bill_on_receipt, purchase_delivery_split_date, purchase_landed_cost, purchase_mrp, purchase_order_approved, purchase_order_import, purchase_order_line_sequence, purchase_order_owner, purchase_partner_incoterm, purchase_reception_status, purchase_repair, purchase_report_shipping_address, purchase_request, purchase_requisition_stock, purchase_stock_date_done_revaluation, purchase_stock_price_unit_sync, sale_purchase_stock, spreadsheet_dashboard_purchase_stock_oca, stock_landed_costs, stock_picking_return_refund_option, stock_request_purchase, supplier_calendar, test_main_flows, tms_purchase
- Description
Code Analysis ⓘ
Views touched (27)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
exception_on_po |
exception_on_po | ir.ui.view | qweb | New |
product_supplierinfo_replenishment_tree_view |
product.supplierinfo.replenishment.list.view | product.supplierinfo | list | Inherits product.product_supplierinfo_tree_view |
product_view_kanban_catalog_purchase_only |
product.view.kanban.catalog.purchase_stock | product.product | kanban | Inherits purchase.product_view_kanban_catalog_purchase_only |
product_view_search_catalog |
purchase.view.search.catalog.inherit.purchase_stock | product.product | search | Inherits purchase.product_view_search_catalog |
purchase_help_message_template |
purchase_help_message_template | ir.ui.view | qweb | Inherits stock.help_message_template |
purchase_order_line_view_form_inherit |
purchase.order.line.form.inherit | purchase.order.line | form | Inherits purchase.purchase_order_line_form2 |
purchase_order_view_form_inherit |
purchase.order.form.inherit | purchase.order | form | Inherits purchase.purchase_order_form |
purchase_order_view_tree_inherit |
purchase.order.list.inherit | purchase.order | list | Inherits purchase.purchase_order_view_tree |
purchase_report_stock_rule |
purchase_report_stock_rule | ir.ui.view | qweb | Inherits stock.report_stock_rule |
purchase_report_view_search |
purchase.report.search.stock | purchase.report | search | Inherits purchase.view_purchase_order_search |
report_purchaseorder_document |
report_purchaseorder_document | ir.ui.view | qweb | Inherits purchase.report_purchaseorder_document |
report_purchasequotation_document |
report_purchasequotation_document | ir.ui.view | qweb | Inherits purchase.report_purchasequotation_document |
res_config_settings_view_form_purchase |
res.config.settings.view.form.inherit.purchase | res.config.settings | form | Inherits purchase.res_config_settings_view_form_purchase |
res_config_settings_view_form_stock |
res.config.settings.view.form.inherit.purchase.stock | res.config.settings | form | Inherits stock.res_config_settings_view_form |
res_partner_view_purchase_buttons_inherit |
res.partner.purchase.stock.form.inherit | res.partner | form | Inherits purchase.view_partner_property_form |
stock_move_purchase |
stock.move.form | stock.move | form | Inherits stock.view_move_form |
stock_production_lot_view_form |
stock.production.lot.view.form | stock.lot | form | Inherits stock.view_production_lot_form |
stock_reference_purchase_view_form |
stock.reference.purchase | stock.reference | form | Inherits stock.stock_reference_form_view |
vendor_delay_report_filter |
vendor.delay.report.search | vendor.delay.report | search | New |
vendor_delay_report_view_graph |
vendor.delay.report.view.graph | vendor.delay.report | graph | New |
view_picking_form |
purchase.stock.view.picking.form | stock.picking | form | Inherits stock.view_picking_form |
view_product_replenish_form_inherit_stock |
product.replenish.form.inherit.stock | product.replenish | form | Inherits stock.view_product_replenish |
view_stock_replenishment_info_stock_purchase_inherit |
stock.replenishment.information.purchase.stock.inherit | stock.replenishment.info | Inherits stock.view_stock_replenishment_info | |
view_stock_rule_form_stock_inherit_purchase_stock |
stock.rule.form.stock.inherit.purchase_stock | stock.rule | form | Inherits stock.view_stock_rule_form |
view_warehouse_inherited |
Stock Warehouse Inherited | stock.warehouse | Inherits stock.view_warehouse | |
view_warehouse_orderpoint_tree_editable_inherited_mrp |
stock.warehouse.orderpoint.list.editable.inherit.mrp | stock.warehouse.orderpoint | list | Inherits stock.view_warehouse_orderpoint_tree_editable |
warehouse_orderpoint_search_inherit |
stock.warehouse.orderpoint.search.inherit | stock.warehouse.orderpoint | search | Inherits stock.stock_reorder_report_search |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (28)
New fields (0)
No new fields.
Public methods (1)-
button_draft(self)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (4)
-
monthly_demandFloatcompute='_compute_monthly_demand' -
purchase_order_line_idsOne2many → purchase.order.linestring='PO Lines' args: 'purchase.order.line', 'product_id' -
suggest_estimated_priceFloatcompute='_compute_suggest_estimated_price' -
suggested_qtyIntegercompute='_compute_suggested_quantity'search='_search_product_with_suggested_quantity'
-
get_total_routes(self)
New fields (0)
No new fields.
Public methods (2)-
action_stock_replenishment_info(self) -
default_get(self, fields)@api.model
New fields (2)
-
last_purchase_dateDatecompute='_compute_last_purchase_date' args: 'Last Purchase' -
show_set_supplier_buttonBooleancompute='_compute_show_set_supplier_button' args: 'Show Set Supplier Button'
-
action_set_supplier(self)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (11)
-
default_location_dest_id_usageSelectionhelp='Technical field used to display the Drop Ship Address'readonly=Truerelated='picking_type_id.default_location_dest_id.usage'string='Destination Location Type' -
dest_address_idMany2one → res.partnercompute='_compute_dest_address_id'readonly=Falsestore=True args: 'res.partner' -
effective_dateDatetimecompute='_compute_effective_date'copy=Falsehelp='Completion date of the first receipt order.'store=True args: 'Arrival' -
incoming_picking_countIntegercompute='_compute_incoming_picking_count' args: 'Incoming Shipment count' -
incoterm_locationCharstring='Incoterm Location' -
is_shippedBooleancompute='_compute_is_shipped' -
on_time_rateFloatcompute_sudo=Falserelated='partner_id.on_time_rate' -
picking_idsMany2many → stock.pickingcompute='_compute_picking_ids'copy=Falsestore=Truestring='Receptions' args: 'stock.picking' -
picking_type_idMany2one → stock.picking.typedefault=_default_picking_typedomain="['|', ('warehouse_id', '=', False), ('warehouse_id.company_id', '=', company_id)]"help='This will determine operation type of incoming shipment'required=True args: 'stock.picking.type', 'Deliver To' -
receipt_statusSelectioncompute='_compute_receipt_status'help='Red: Late\n Orange: To process today\n Green: On time'store=Truestring='Receipt Status' args: [('pending', 'Not Received'), ('partial', 'Partially Received'), ('full', 'Fully Received')] -
reference_idsMany2many → stock.referencecopy=Falsestring='References' args: 'stock.reference', 'stock_reference_purchase_rel', 'purchase_id', 'reference_id'
-
action_add_from_catalog(self) -
action_purchase_order_suggest(self)Adds suggested products to PO, removing products with no suggested_qty, and collapsing existing po_lines into at most 1 orderline. Saves suggestion params (eg. number_of_days) to partner table. -
action_view_picking(self) -
button_approve(self, force=False) -
button_cancel(self) -
retrieve_dashboard(self)@api.model -
write(self, vals)
New fields (9)
-
forecasted_issueBooleancompute='_compute_forecasted_issue' -
is_storableBooleanrelated='product_id.is_storable' -
location_final_idMany2one → stock.locationargs: 'stock.location', 'Location from procurement' -
move_dest_idsMany2many → stock.moveargs: 'stock.move', 'stock_move_created_purchase_line_rel', 'created_purchase_line_id', 'move_id', 'Downstream moves alt' -
move_idsOne2many → stock.movecopy=Falsereadonly=Truestring='Reservation' args: 'stock.move', 'purchase_line_id' -
orderpoint_idMany2one → stock.warehouse.orderpointcopy=Falseindex='btree_not_null'ondelete='set null' args: 'stock.warehouse.orderpoint', 'Orderpoint' -
product_description_variantsCharargs: 'Custom Description' -
propagate_cancelBooleandefault=True args: 'Propagate cancellation' -
qty_received_methodSelectionondelete={'stock_moves': _ondelete_stock_moves}selection_add=[('stock_moves', 'Stock Moves')]
-
action_product_forecast_report(self) -
create(self, vals_list)@api.model_create_multi -
unlink(self) -
write(self, vals)
New fields (3)
-
days_to_arrivalFloataggregator='avg'digits=(16, 2)readonly=True args: 'Effective Days To Arrival' -
effective_dateDatetimestring='Effective Date' -
picking_type_idMany2one → stock.warehousereadonly=True args: 'stock.warehouse', 'Warehouse'
No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (1)
-
days_to_purchaseFloathelp='Days needed to confirm a PO, define when a PO should be validated'string='Days to Purchase'
No public methods.
New fields (3)
-
days_to_purchaseFloatreadonly=Falserelated='company_id.days_to_purchase' -
is_installed_saleBooleanstring='Is the Sale Module Installed' -
module_stock_dropshippingBooleanargs: 'Dropshipping'
-
get_values(self)@api.model
New fields (7)
-
group_onSelectiondefault='default'required=Truestring='Week Day' args: [('default', 'Expected Date'), ('1', 'Monday'), ('2', 'Tuesday'), ('3', 'Wednesday'), ('4', 'Thursday'), ('5', 'Friday'), ('6', 'Saturday'), ('7', 'Sunday')] -
group_rfqSelectiondefault='default'help='Define if RFQ should be grouped together based on expected arrival, except for dropship operations.\n On Order: Replenishment needs will be grouped together except for MTO.\n Daily: Replenishment needs will be grouped if the expected arrival is the same day\n Weekly: Replenishment needs will be grouped if the expected arrival is the same week or week day\n Always: Replenishment needs will always be grouped.'required=Truestring='Group RFQ' args: [('default', 'On Order'), ('day', 'Daily'), ('week', 'Weekly'), ('all', 'Always')] -
on_time_rateFloatcompute='_compute_on_time_rate'help='Over the past x days; the number of products received on time divided by the number of ordered products.x is either the System Parameter purchase_stock.on_time_delivery_days or the default 365' args: 'On-Time Delivery Rate' -
purchase_line_idsOne2many → purchase.order.linestring='Purchase Lines' args: 'purchase.order.line', 'partner_id' -
suggest_based_onChardefault='30_days' -
suggest_daysIntegerdefault=7 -
suggest_percentIntegerdefault=100
No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (2)
-
purchase_order_countIntegercompute='_compute_purchase_order_ids' args: 'Purchase order count' -
purchase_order_idsMany2many → purchase.ordercompute='_compute_purchase_order_ids'readonly=Truestore=Falsestring='Purchase Orders' args: 'purchase.order'
-
action_view_po(self)
New fields (2)
-
created_purchase_line_idsMany2many → purchase.order.linecopy=False args: 'purchase.order.line', 'stock_move_created_purchase_line_rel', 'move_id', 'created_purchase_line_id', 'Created Purchase Order Lines' -
purchase_line_idMany2one → purchase.order.lineindex='btree_not_null'ondelete='set null'readonly=True args: 'purchase.order.line', 'Purchase Order Line'
No public methods.
New fields (3)
-
days_to_arriveDatetimecompute='_compute_effective_date'copy=Falsesearch='_search_days_to_arrive' -
delay_passDatetimecompute='_compute_date_order'copy=Falseindex=Truesearch='_search_delay_pass' -
purchase_idMany2one → purchase.orderreadonly=Truerelated='move_ids.purchase_line_id.order_id'string='Purchase Orders' args: 'purchase.order'
No public methods.
New fields (1)
-
purchase_idsMany2many → purchase.ordercopy=Falsestring='Purchases' args: 'purchase.order', 'stock_reference_purchase_rel', 'reference_id', 'purchase_id'
No public methods.
New fields (2)
-
show_vendorBooleancompute='_compute_show_vendor' -
supplier_idMany2one → product.supplierinfostring='Vendor' args: 'product.supplierinfo'
No public methods.
New fields (3)
-
show_vendor_tabBooleancompute='_compute_show_vendor_tab' -
supplierinfo_idMany2onerelated='orderpoint_id.supplier_id' -
supplierinfo_idsMany2many → product.supplierinfocompute='_compute_supplierinfo_ids'store=True args: 'product.supplierinfo'
No public methods.
New fields (0)
No new fields.
Public methods (1)-
select_route(self)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (1)
-
actionSelectionondelete={'buy': 'cascade'}selection_add=[('buy', 'Buy')]
-
run(self, procurements, raise_user_error=True)@api.model
New fields (2)
-
buy_pull_idMany2one → stock.rulecopy=False args: 'stock.rule', 'Buy rule' -
buy_to_resupplyBooleancompute='_compute_buy_to_resupply'default=Truehelp='When products are bought, they can be delivered to this warehouse'inverse='_inverse_buy_to_resupply' args: 'Buy to Resupply'
-
get_rules_dict(self)
New fields (6)
-
available_vendorMany2one → res.partnerhelp="Any vendor on the product's pricelist"search='_search_available_vendor'store=Falsestring='Available Vendor' args: 'res.partner' -
effective_vendor_idMany2one → res.partnercompute='_compute_effective_vendor_id'help='Either the vendor set directly or the one computed to be used by this replenishment'search='_search_effective_vendor_id'store=False args: 'res.partner' -
show_supplierBooleancompute='_compute_show_supplier' args: 'Show supplier column' -
supplier_idMany2one → product.supplierinfocheck_company=Truedomain="['|', ('product_id', '=', product_id), '&', ('product_id', '=', False), ('product_tmpl_id', '=', product_tmpl_id)]"inverse='_inverse_supplier_id'string='Vendor Pricelist' args: 'product.supplierinfo' -
supplier_id_placeholderCharcompute='_compute_supplier_id_placeholder' -
vendor_idsOne2manyrelated='product_id.seller_ids'string='Vendors'
-
action_view_purchase(self)This function returns an action that display existing purchase orders of given orderpoint.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (7)
-
category_idMany2one → product.categoryreadonly=True args: 'product.category', 'Product Category' -
dateDatetimereadonly=True args: 'Effective Date' -
on_time_rateFloatreadonly=True args: 'On-Time Delivery Rate' -
partner_idMany2one → res.partnerreadonly=True args: 'res.partner', 'Vendor' -
product_idMany2one → product.productreadonly=True args: 'product.product', 'Product' -
qty_on_timeFloatreadonly=True args: 'On-Time Quantity' -
qty_totalFloatreadonly=True args: 'Total Quantity'
-
init(self)
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…