stock
This page combines editorial guidance with evidence extracted from the selected official branch. Always test the flow with your own permissions and configuration.
Purpose
The Stock Module provides the fundamental concepts required for managing stock. This includes keeping track of where the stock is, how much is available, and checking and correcting stock levels. It also allows stock to be moved from one place to another, and delivered to and from customers and suppliers.
The analysis found 15 Python files, 84 XML files, 84 views, 172 actions, 19 menus, and 5 reports.
Functional user guide
Who should use it
This module is relevant to people responsible for stock processes, company configuration, and result review. Administrators should participate whenever dependencies, permissions, or sequences are introduced.
What you will be able to do
After configuration, you will be able to identify the records added by stock, execute actions in the correct state, produce its reports, and understand the information shared with other modules.
Requirements and preparation
Before activation, verify company, currency, users, and groups. Install and configure required dependencies first. When real data exists, rehearse activation and upgrades on a restored copy.
Activate dependencies first, review company configuration, and rehearse the complete workflow before production use.
Required dependencies
company— must be installed and configured before testing this module.currency— must be installed and configured before testing this module.ir— must be installed and configured before testing this module.party— must be installed and configured before testing this module.product— must be installed and configured before testing this module.res— must be installed and configured before testing this module.
Optional integrations
- —
Recommended initial configuration
- Activate the module and sign in again to load menus and permissions.
- Review new company configuration options and defaults.
- Assign groups to test users using least privilege.
- Create small, verifiable master data before bulk imports.
- Run one complete scenario from draft to final state and inspect related records.
Module objects and concepts
- ir.cron: groups 1 model(s), including
ir.cron. These records form the information users inspect or modify during the process. - party.address: groups 1 model(s), including
party.address. These records form the information users inspect or modify during the process. - party.contact_mechanism: groups 1 model(s), including
party.contact_mechanism. These records form the information users inspect or modify during the process. - party.erase: groups 1 model(s), including
party.erase. These records form the information users inspect or modify during the process. - party.party: groups 2 model(s), including
party.party,party.party.location. These records form the information users inspect or modify during the process. - party.party-delivered_to-stock: groups 1 model(s), including
party.party-delivered_to-stock.location. These records form the information users inspect or modify during the process. - party.replace: groups 1 model(s), including
party.replace. These records form the information users inspect or modify during the process. - product.by_location: groups 1 model(s), including
product.by_location.context. These records form the information users inspect or modify during the process. - product.cost_price: groups 1 model(s), including
product.cost_price.revision. These records form the information users inspect or modify during the process. - product.modify_cost_price: groups 2 model(s), including
product.modify_cost_price,product.modify_cost_price.start. These records form the information users inspect or modify during the process. - product.product: groups 1 model(s), including
product.product. These records form the information users inspect or modify during the process. - product.recompute_cost_price: groups 2 model(s), including
product.recompute_cost_price,product.recompute_cost_price.start. These records form the information users inspect or modify during the process. - product.template: groups 1 model(s), including
product.template. These records form the information users inspect or modify during the process. - res.user: groups 1 model(s), including
res.user. These records form the information users inspect or modify during the process. - stock.configuration: groups 3 model(s), including
stock.configuration,stock.configuration.location,stock.configuration.sequence. These records form the information users inspect or modify during the process. - stock.inventory: groups 5 model(s), including
stock.inventory,stock.inventory.count,stock.inventory.count.quantity,stock.inventory.count.search,stock.inventory.line. These records form the information users inspect or modify during the process. - stock.location: groups 3 model(s), including
stock.location,stock.location.lead_time,stock.location.waste. These records form the information users inspect or modify during the process. - stock.move: groups 1 model(s), including
stock.move. These records form the information users inspect or modify during the process. - stock.period: groups 2 model(s), including
stock.period,stock.period.cache. These records form the information users inspect or modify during the process. - stock.product_quantities_warehouse: groups 5 model(s), including
stock.product_quantities_warehouse,stock.product_quantities_warehouse.context,stock.product_quantities_warehouse.move,stock.product_quantities_warehouse.move.open,stock.product_quantities_warehouse.open. These records form the information users inspect or modify during the process. - stock.products_by_locations: groups 2 model(s), including
stock.products_by_locations,stock.products_by_locations.context. These records form the information users inspect or modify during the process. - stock.reporting: groups 8 model(s), including
stock.reporting.margin.category,stock.reporting.margin.category.time_series,stock.reporting.margin.category.tree,stock.reporting.margin.context,stock.reporting.margin.main. These records form the information users inspect or modify during the process. - stock.shipment: groups 12 model(s), including
stock.shipment.assign,stock.shipment.assign.partial,stock.shipment.in,stock.shipment.in.restocking_list,stock.shipment.in.return. These records form the information users inspect or modify during the process.
Typical workflow
- Select the correct company and date before creating a document.
- Complete master data before lines or details.
- Use form buttons for state changes; saving is not the same as validating or posting.
- Review warnings, totals, related documents, and traceability.
- Generate the report and compare it with the record before delivery.
Actions, states, and wizards
assign_wizard— action or transition that starts assign wizard. Check permissions, current state, and related records before running it.cancel— action or transition that starts cancel. Check permissions, current state, and related records before running it.close— action or transition that starts close. Check permissions, current state, and related records before running it.complete_lines— action or transition that starts complete lines. Check permissions, current state, and related records before running it.confirm— action or transition that starts confirm. Check permissions, current state, and related records before running it.do— action or transition that starts do. Check permissions, current state, and related records before running it.do_count— action or transition that starts do count. Check permissions, current state, and related records before running it.done— action or transition that starts done. Check permissions, current state, and related records before running it.draft— action or transition that starts draft. Check permissions, current state, and related records before running it.pack— action or transition that starts pack. Check permissions, current state, and related records before running it.pick— action or transition that starts pick. Check permissions, current state, and related records before running it.receive— action or transition that starts receive. Check permissions, current state, and related records before running it.ship— action or transition that starts ship. Check permissions, current state, and related records before running it.wait— action or transition that starts wait. Check permissions, current state, and related records before running it.assigned— action or transition that starts assigned. Check permissions, current state, and related records before running it.cancelled— action or transition that starts cancelled. Check permissions, current state, and related records before running it.closed— action or transition that starts closed. Check permissions, current state, and related records before running it.packed— action or transition that starts packed. Check permissions, current state, and related records before running it.picked— action or transition that starts picked. Check permissions, current state, and related records before running it.received— action or transition that starts received. Check permissions, current state, and related records before running it.shipped— action or transition that starts shipped. Check permissions, current state, and related records before running it.waiting— action or transition that starts waiting. Check permissions, current state, and related records before running it.product.recompute_cost_price— wizard that collects data and performs product › recompute cost price. Check permissions, current state, and related records before running it.product.recompute_cost_price.start— wizard that collects data and performs product › recompute cost price › start. Check permissions, current state, and related records before running it.stock.inventory.count— wizard that collects data and performs stock › inventory › count. Check permissions, current state, and related records before running it.stock.product_quantities_warehouse.move.open— wizard that collects data and performs stock › product quantities warehouse › move › open. Check permissions, current state, and related records before running it.stock.product_quantities_warehouse.open— wizard that collects data and performs stock › product quantities warehouse › open. Check permissions, current state, and related records before running it.stock.shipment.assign— wizard that collects data and performs stock › shipment › assign. Check permissions, current state, and related records before running it.
Controls before production
- Define who creates, reviews, confirms, cancels, and reads.
- Test closed periods, unauthorized users, and incomplete data.
- Verify numbering, currency, rounding, and time zone where applicable.
- Document error correction without direct database edits.
- Include its tables and files in backup and restore procedures.
Troubleshooting
- If a menu is missing, verify activation, module-list update, groups, and a new login session.
- If a field rejects a value, inspect its domain, company, state, and configured dependencies.
- If a button is hidden or disabled, check permissions and valid transitions; never change state with SQL.
- If results differ, reproduce a minimal case and compare related records before and after.
- Keep the full traceback, version, active modules, and minimal data needed to diagnose an error.
Developer guide
Architecture and extension points
The package contains 78 Python classes and declares or extends 58 models. It uses Boolean, Char, Date, Float, Function, Integer, Many2Many, Many2One, MultiValue, Numeric, One2Many, Reference, Selection, TimeDelta. Developers should first determine whether a class creates a model or uses PoolMeta to extend one, preserve super() calls, and avoid duplicating dependency rules.
Registered or extended models
ir.cronparty.addressparty.contact_mechanismparty.eraseparty.partyparty.party-delivered_to-stock.locationparty.party.locationparty.replaceproduct.by_location.contextproduct.cost_price.revisionproduct.modify_cost_priceproduct.modify_cost_price.startproduct.productproduct.recompute_cost_priceproduct.recompute_cost_price.startproduct.templateres.userstock.configurationstock.configuration.locationstock.configuration.sequencestock.inventorystock.inventory.countstock.inventory.count.quantitystock.inventory.count.searchstock.inventory.linestock.locationstock.location.lead_timestock.location.wastestock.movestock.periodstock.period.cachestock.product_quantities_warehousestock.product_quantities_warehouse.contextstock.product_quantities_warehouse.movestock.product_quantities_warehouse.move.openstock.product_quantities_warehouse.openstock.products_by_locationsstock.products_by_locations.contextstock.reporting.margin.categorystock.reporting.margin.category.time_seriesstock.reporting.margin.category.treestock.reporting.margin.contextstock.reporting.margin.mainstock.reporting.margin.main.time_seriesstock.reporting.margin.productstock.reporting.margin.product.time_seriesstock.shipment.assignstock.shipment.assign.partialstock.shipment.instock.shipment.in.restocking_liststock.shipment.in.returnstock.shipment.internalstock.shipment.internal.reportstock.shipment.outstock.shipment.out.delivery_notestock.shipment.out.picking_liststock.shipment.out.returnstock.shipment.out.return.restocking_list
Field types used
BooleanCharDateFloatFunctionIntegerMany2ManyMany2OneMultiValueNumericOne2ManyReferenceSelectionTimeDelta
Detected classes and public methods
Classes: Abstract, AbstractTimeseries, Address, Assign, AssignError, AssignPartial, Cache, Category, CategoryMixin, CategoryTimeseries, CategoryTree, Configuration, ConfigurationLocation, ConfigurationSequence, ContactMechanism, Context, CostPriceRevision, Count, CountQuantity, CountSearch, Cron, CustomerReturnRestockingList, DeliveryNote, Erase, InteralShipmentReport, Inventory, InventoryCountWarning, InventoryFutureWarning, InventoryLine, InventoryValidationError, Location, LocationLeadTime, LocationValidationError, Main, MainTimeseries, ModifyCostPrice, ModifyCostPriceStart, Move, MoveFutureWarning, MoveOriginWarning, MoveValidationError, OpenProductQuantitiesByWarehouse, OpenProductQuantitiesByWarehouseMove, Party, PartyDeliveredToWarehouse, PartyLocation, Period, PeriodCloseError, PickingList, Product, ProductByLocationContext, ProductCostPriceError, ProductMixin, ProductQuantitiesByWarehouse, ProductQuantitiesByWarehouseContext, ProductQuantitiesByWarehouseMove, ProductStockWarning, ProductTimeseries, ProductsByLocations, ProductsByLocationsContext, RecomputeCostPrice, RecomputeCostPriceStart, Replace, ShipmentAssignMixin, ShipmentCheckQuantity, ShipmentCheckQuantityWarning, ShipmentIn, ShipmentInReturn, ShipmentInternal, ShipmentMixin, ShipmentOut, ShipmentOutReturn, ShipmentReport, StockMixin, SupplierRestockingList, Template, User, WarehouseWasteLocation
Methods: address_get(), apply_up_to(), assign(), assign_cron(), assign_force(), assign_ignore(), assign_moves(), assign_reset(), assign_try(), assign_wizard(), cancel(), cancel_move(), check_cost_price(), check_erase_company(), check_inactive(), check_origin(), check_origin_types(), check_period_closed(), check_quantity(), check_type_for_moves(), check_xml_record(), close(), complete_lines(), compute_quantities(), compute_quantities_query(), confirm(), copy(), create(), create_inventory_moves(), create_values4complete(), decorator(), default(), default_company(), default_cost_price(), default_customer_location(), default_date(), default_expected_quantity(), default_flat_childs(), default_forecast_date(), default_from_date(), default_include_lost(), default_left(), default_partial(), default_period(), default_planned_date(), default_quantity(), default_right(), default_search(), default_shipment_internal_transit(), default_start(), default_state(), default_stock_skip_warehouse(), default_supplier_location(), default_to_date(), default_type(), default_unit_price_updated(), default_warehouse(), delete(), do(), do_count(), do_open_(), done(), draft(), execute(), fields_to_replace(), find_moves(), from_warehouse(), get_cache(), get_context(), get_cost_price(), get_cost_value(), get_cumulative_quantity(), get_currency(), get_default_warehouse(), get_delay(), get_document(), get_documents(), get_domain(), get_empty_locations(), get_for_product(), get_incoming_moves(), get_inventory_moves(), get_inventory_states(), get_lead_time(), get_line_domain(), get_line_values(), get_margin(), get_move(), get_name(), get_origin(), get_origins(), get_outgoing_moves(), get_partially_assigned(), get_product(), get_product_locations(), get_product_types(), get_quantity(), get_quantity_uom(), get_rec_name(), get_revision()
Code map
Detected 15 Python files, 84 XML files, and 0 explicit access files. XML connects models to views, menus, actions, and reports; access CSV files establish initial permissions.
__init__.pyconfiguration.pyconfiguration.xmldoc/conf.pyexceptions.pyinventory.pyinventory.xmlir.pylocation.pylocation.xmlmessage.xmlmove.pymove.xmlparty.pyparty.xmlperiod.pyperiod.xmlproduct.pyproduct.xmlres.pyres.xmlsetup.pyshipment.pyshipment.xmlstock.xmlstock_reporting_margin.pystock_reporting_margin.xmlview/configuration_form.xmlview/inventory_count_quantity_form.xmlview/inventory_count_search_form.xmlview/inventory_form.xmlview/inventory_line_form.xmlview/inventory_line_list_simple.xmlview/inventory_line_tree.xmlview/inventory_tree.xmlview/location_form.xmlview/location_lead_time_form.xmlview/location_lead_time_list.xmlview/location_list.xmlview/location_quantity_form.xmlview/location_quantity_tree.xmlview/location_tree.xmlview/move_form.xmlview/move_list_shipment.xmlview/move_list_shipment_in.xmlview/move_tree.xmlview/move_tree_simple.xmlview/party_address_form.xmlview/party_address_tree.xmlview/party_contact_mechanism_form.xml
Test plan
- Activation on an empty database and upgrade from the previous revision.
- Create, update, copy, and delete according to state and access rights.
- Every button, transition, and wizard with valid and invalid scenarios.
- Applicable multi-company rules, translations, time zones, and currencies.
- Combined installation with required and optional dependencies.
- Backup and restore of records, attachments, and generated reports.
Compatibility and upgrades
Keep server and modules on series 7.0. Before upgrading, compare tryton.cfg, __register__ migrations, state changes, XML IDs, and permissions. A successful build does not replace a rehearsed migration or functional data reconciliation.
Official documentation evidence
Topics found: Configuration · Design · Inventory · Wizards · Inventory Count · Location · Warehouse · Location Lead Time · Move · Assign Concept · Period · Period Cache · Product · Product Quantity · Recompute Cost Price · Modify Cost Price · Product Quantities by Warehouse · Product Quantities by Warehouse Move · Cost Price Revision · Shipment · Supplier Shipment · Reports · Supplier Return Shipment · Customer Shipment · Customer Return Shipment · Internal Shipment · Assign Shipment · Stock Module · API Reference · Stock Quantities · Setup · Setting up stock locations · Setting initial stock levels · Usage · Using stock periods · Viewing stock levels · Checking and correcting stock levels · Sending and receiving deliveries · From Suppliers · To Suppliers
-
- doc/design/configuration.rst: The Stock Configuration contains settings that are used to configure the behaviour and default values for stock related activities, including the sequences used to generate
Shipment <concept-stock.shipment>numbers.
- doc/design/configuration.rst: The Stock Configuration contains settings that are used to configure the behaviour and default values for stock related activities, including the sequences used to generate
-
- doc/design/index.rst: The stock module introduces or extends the following concepts.
-
- doc/design/inventory.rst: The Inventory concept is used to help check and correct the amount of stock stored in a
Location <model-stock.location>.
- doc/design/inventory.rst: The Inventory concept is used to help check and correct the amount of stock stored in a
-
- doc/design/location.rst: A location represents the place where stock is stored. This may be a physical location, such as a shelf, or a virtual location such as the location used for products that have gone missing.
-
- doc/design/move.rst: In Tryton a stock Move represents the transfer of a given amount of a
Product <concept-product>between two differentStock Locations <model-stock.location>. Often stock moves will be grouped together into aShipment <concept-stock.shipment>.
- doc/design/move.rst: In Tryton a stock Move represents the transfer of a given amount of a
-
- doc/design/period.rst: In Tryton a stock Period is used to group together the all stock moves that happened up to a specific date and that were also done after the date of any previous stock Period.
-
- doc/design/product.rst: When the Stock Module is activated, products gain some extra properties. These include a product's stock and forecast quantities, which show its current and predicted future stock situation, and the cost value of its stock.
-
- doc/design/shipment.rst: In Tryton the concept of a Shipment is used to help organise and manage groups of related
Stock Moves <model-stock.move>. There are different types of shipment which are used for different purposes. Some of these types of shipment may also be split up into stages. In each stage stock is moved to or from an intermediateLocation <model-stock.location>. Each stage's moves form a subset of the shipment's total moves.
- doc/design/shipment.rst: In Tryton the concept of a Shipment is used to help organise and manage groups of related
-
- doc/index.rst: The Stock Module provides the fundamental concepts required for managing stock. This includes keeping track of where the stock is, how much is available, and checking and correcting stock levels. It also allows stock to be moved from one place to another, and delivered to and from customers and suppliers.
-
- doc/reference.rst: This mixin_ provides some common methods that are useful when creating classes that provide quantity fields.