Skip to main content
The stock_request_direction module simplifies stock requests by allowing users to specify a direction (to or from a warehouse) instead of manually selecting inventory locations, streamlining the request process.

Overview

Module Name: stock_request_direction
Version: 18.0.1.0.0
License: LGPL-3
Dependencies: stock_request
Author: Open Source Integrators, OCA
Maintainers: @max3903
Development Status: Beta
This module enables users to request stock transfers using simple directional choices (to/from warehouse) instead of having to understand and navigate the complex location hierarchy.

Key Features

Simplified Location Selection

  • Choose direction: To Warehouse or From Warehouse
  • System determines appropriate inventory location automatically
  • No need to understand location structure
  • Warehouse team can adjust routing after submission

Directional Modes

Request products to be transferred into your warehouse.Use Cases:
  • Receiving from suppliers
  • Transfers from other locations to warehouse
  • Incoming stock for storage
System Behavior:
  • Destination location: Warehouse stock location
  • Source location: Determined by procurement rules
Request products to be transferred out of your warehouse.Use Cases:
  • Sending to customers
  • Transfers from warehouse to other locations
  • Outgoing stock for projects or operations
System Behavior:
  • Source location: Warehouse stock location
  • Destination location: Specified by user or procurement

Warehouse Team Review

  • Requests submitted in directional mode
  • Warehouse team reviews and defines precise route
  • Can adjust locations before final processing
  • Ensures optimal routing and compliance

Installation

1

Install Stock Request

Ensure stock_request module is installed.
2

Install Direction Module

Navigate to Apps, search for “Stock Requests Direction”, and click Install.
3

Configure Settings

Go to Stock Requests > Settings to configure directional options.

Configuration

System Settings

Configure directional request settings:
1

Navigate to Settings

Go to Settings > Inventory or Stock Requests > Settings.
2

Enable Direction Mode

Enable directional request features:
  • Default direction behavior
  • Warehouse selection rules
  • Location mapping configuration
3

Configure Warehouses

Set up default locations for each warehouse:
  • Default stock location
  • Input location
  • Output location

Warehouse Configuration

Ensure warehouses are properly configured:
Inventory > Configuration > Warehouses
└── Select Warehouse
    ├── Stock Location: Main warehouse location
    ├── Input Location: Receiving area
    └── Output Location: Shipping area

Usage

Creating a Directional Stock Request

1

Navigate to Requests

Go to Stock Requests > Stock Requests and click Create.
2

Fill Basic Information

Enter:
  • Product: Select product to request
  • Quantity: Amount needed
  • Expected Date: When needed
3

Select Direction

Choose direction:
  • Direction: To Warehouse or From Warehouse
  • Warehouse: Select target warehouse
4

Submit Request

Click Submit or Confirm depending on workflow:
  • Submit: Sends to warehouse team for review
  • Confirm: Processes immediately (if permitted)

Request to Warehouse

Scenario: Requesting materials to be brought into the warehouse.
1

Create Request

Open new stock request.
2

Configure

  • Product: Select item
  • Quantity: Amount needed
  • Direction: To Warehouse
  • Warehouse: Select warehouse
3

Submit

Submit for warehouse team review.
4

Warehouse Review

Warehouse team:
  • Reviews request
  • Confirms routing
  • Processes transfer

Request from Warehouse

Scenario: Requesting materials to be sent from the warehouse.
1

Create Request

Open new stock request.
2

Configure

  • Product: Select item
  • Quantity: Amount needed
  • Direction: From Warehouse
  • Warehouse: Select source warehouse
  • Destination: Specify where to send (if not automatic)
3

Submit

Submit for processing.
4

Warehouse Process

Warehouse team:
  • Validates availability
  • Confirms destination
  • Creates transfer

Data Models

Stock Request (Extended)

Adds directional fields:
class StockRequest(models.Model):
    _inherit = 'stock.request'
    
    direction = fields.Selection([
        ('to', 'To Warehouse'),
        ('from', 'From Warehouse'),
    ], string='Direction',
       help='Direction of stock movement')
    
    warehouse_id = fields.Many2one(
        'stock.warehouse',
        string='Warehouse',
        help='Warehouse for directional transfer'
    )

Stock Request Order (Extended)

Adds order-level direction:
class StockRequestOrder(models.Model):
    _inherit = 'stock.request.order'
    
    direction = fields.Selection([
        ('to', 'To Warehouse'),
        ('from', 'From Warehouse'),
    ], string='Direction')
    
    warehouse_id = fields.Many2one(
        'stock.warehouse',
        string='Warehouse'
    )

Onchange Logic

@api.onchange('direction', 'warehouse_id')
def _onchange_direction(self):
    """Auto-set location based on direction and warehouse"""
    if self.direction == 'to' and self.warehouse_id:
        # Set location to warehouse input or stock location
        self.location_id = self.warehouse_id.lot_stock_id
    elif self.direction == 'from' and self.warehouse_id:
        # Set source from warehouse stock location
        self.location_id = self.warehouse_id.lot_stock_id

Views

Stock Request Form View

Enhanced with direction fields:
<group name="direction_group" string="Direction">
    <field name="direction" required="1"/>
    <field name="warehouse_id" required="1"/>
</group>

<!-- Location field made optional/hidden in directional mode -->
<field name="location_id" 
       attrs="{'invisible': [('direction', '!=', False)]}"/>

Stock Request Order Form View

Order-level direction configuration:
<group name="direction_group">
    <field name="direction"/>
    <field name="warehouse_id"/>
</group>
Direction set at order level applies to all request lines.

Configuration Settings View

Added settings in configuration:
<group name="stock_request_direction" 
       string="Stock Request Direction">
    <field name="default_direction"/>
    <field name="require_warehouse_review"/>
    <field name="auto_route_directional_requests"/>
</group>

Use Cases

Department Requests

Scenario: Department heads need materials but don’t know warehouse layout. Solution:
  1. Department head creates request
  2. Selects “From Warehouse”
  3. Chooses nearest warehouse
  4. Warehouse team determines optimal picking location
  5. Transfer created and fulfilled
Benefit: Requesters don’t need warehouse training.

Project Material Requests

Scenario: Project site needs materials from central warehouse. Solution:
  1. Site manager requests materials
  2. Direction: “From Warehouse”
  3. Warehouse: Central Warehouse
  4. Warehouse team validates and ships
Benefit: Simplified request process for field personnel.

Incoming Stock Requests

Scenario: Coordinating incoming deliveries. Solution:
  1. Purchasing requests receipt capacity
  2. Direction: “To Warehouse”
  3. Warehouse: Receiving Warehouse
  4. Warehouse team plans dock space and processing
Benefit: Advance notice for receiving operations.

Best Practices

User Training

Simplify Training: Train end users only on directional concepts, not location hierarchy.
Direction Selection: Provide clear guidelines on when to use “To” vs “From” direction.

Warehouse Team Workflow

Review Queue: Establish routine for reviewing directional requests and setting optimal routes.
Communication: Set up notifications for warehouse team when directional requests submitted.

System Configuration

Default Locations: Configure sensible default locations for each warehouse to minimize manual routing.
Access Control: Limit direct location selection to warehouse staff, enforce directional mode for other users.

Integration with Other Modules

Stock Request Submit

Combine with submission workflow:
1

User Creates Request

User creates directional request.
2

Submit for Review

Request submitted to supervisor.
3

Supervisor Approval

Supervisor reviews and approves.
4

Warehouse Routing

Warehouse team sets specific locations.
5

Confirmation

Request confirmed and transfer created.

Stock Request Tier Validation

Directional requests in approval workflow:
  1. User submits directional request
  2. Goes through tier validation
  3. After approval, warehouse team routes
  4. Finally confirmed and processed

Troubleshooting

Direction Field Not Visible

Problem: Direction field doesn’t appear in stock request form. Solutions:
  1. Verify module is installed and updated
  2. Refresh browser cache
  3. Check user group permissions
  4. Verify form view loaded correctly

Wrong Location Selected

Problem: System selects unexpected location based on direction. Solutions:
  1. Review warehouse configuration
  2. Check default location settings
  3. Verify procurement rules
  4. Ensure warehouse locations properly defined

Cannot Submit Directional Request

Problem: Submit/Confirm button not working. Solutions:
  1. Verify direction and warehouse fields filled
  2. Check required fields completed
  3. Review user permissions
  4. Check for validation errors

Advanced Features

Multi-Warehouse Scenarios

For companies with multiple warehouses:
# Configure warehouse priorities
warehouse.priority = 10

# Set up inter-warehouse rules
route = env['stock.route'].create({
    'name': 'Warehouse A to Warehouse B',
    'sequence': 10,
})

Custom Direction Logic

Extend direction behavior:
class StockRequest(models.Model):
    _inherit = 'stock.request'
    
    @api.onchange('direction', 'warehouse_id')
    def _onchange_direction(self):
        super()._onchange_direction()
        # Add custom logic
        if self.direction == 'to' and self.warehouse_id:
            # Custom routing for 'to warehouse' requests
            self.route_id = self._get_custom_route()

Integration with External Systems

API for directional requests:
# Create directional request via API
request = env['stock.request'].create({
    'product_id': product.id,
    'product_qty': 100,
    'direction': 'from',
    'warehouse_id': warehouse.id,
    'expected_date': fields.Datetime.now(),
})

request.action_submit()  # or action_confirm()

Comparison: Standard vs Directional

AspectStandard RequestDirectional Request
Location SelectionManual, specific location requiredAutomatic, based on direction
User KnowledgeMust understand location hierarchyOnly needs to know direction
FlexibilityFull control over source/destinationWarehouse team adjusts routing
Use CaseExperienced warehouse usersGeneral users, departments
Review ProcessOptionalRecommended for routing

Migration Guide

Migrating from Standard Requests

To transition existing requests:
1

Install Module

Install stock_request_direction module.
2

Configure Warehouses

Set up warehouse default locations.
3

Train Users

Train users on directional concept.
4

Update Workflows

Adjust request workflows to include direction.
5

Gradual Rollout

Allow both methods during transition period.

Coexistence

Standard and directional request modes can coexist. Users can choose location directly or use direction based on their needs and permissions.

Stock Request Core

Base stock request functionality

Stock Request Submit

Add submission workflow to directional requests

Stock Request Tier Validation

Multi-tier approval for directional requests

Contributors

This module was developed by:
  • Open Source Integrators: Primary development
    • Maxime Chambreuil
    • Steve Campbell
    • Freni Patel
  • Ecosoft: Enhancements and improvements
    • Pimolnat Suntian
    • Kitti U.
  • APSL-Nagarro: Additional features
    • Antoni Marroig

Build docs developers (and LLMs) love