Repository
OCA/stock-logistics-request · module folder · Try on Runboat
Module version
1.0.2
Category
Stock
Folder size
0.27 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/stock-logistics-request
Last tracking update
2026-08-07 08:43:06
Authors
Odoo Community Association (OCA), Tecnativa
Maintainers
Odoo Community Association (OCA), Tecnativa
Committers
Carlos Lopez, Carlos Roca, Weblate, OCA-git-bot, oca-ci, Joan Sisquella
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
sale_stock_return_request
Description
This module allows to return stock from a location to either suppliers,
customers or internal locations reverting the corresponding pickings.

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
report_stock_return_request report_stock_return_request ir.ui.view qweb New
report_stock_return_request_document report_stock_return_request_document ir.ui.view qweb New
stock_move_lines_to_return stock_move_lines_to_return ir.ui.view qweb New
stock_return_request_line_suggest_lot Suggested Lots for this Return Request Line suggest.return.request.lot form New
view_stock_return_request_form stock.return.request form New
view_stock_return_request_tree stock.return.request list New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (6)

New fields (1)
  • qty_returnable Float
    compute='_compute_qty_returnable' digits='Product Unit of Measure' string='Returnable Quantity'
Public methods (0)

No public methods.

New fields (1)
  • stock_return_request_id Many2one → stock.return.request
    comodel_name='stock.return.request'
Public methods (0)

No public methods.

New fields (14)
  • from_date Date
    string='Search moves up to this date'
  • line_ids One2many → stock.return.request.line
    comodel_name='stock.return.request.line' copy=True inverse_name='request_id' string='Stock Return'
  • name Char
    copy=False default=<expr> readonly=True required=True args: 'Reference'
  • note Text
    help='They will be visible on the report' string='Comments'
  • partner_id Many2one → res.partner
    comodel_name='res.partner'
  • picking_types Many2many → stock.picking.type
    comodel_name='stock.picking.type' help='Restrict operation types to search for' string='Operation types'
  • return_from_location Many2one → stock.location
    comodel_name='stock.location' domain='[("usage", "=", "internal")]' help='Return from this location' required=True string='Return from'
  • return_order Selection
    default='date desc, id desc' help='The returns will be performed searching moves in the given order.' required=True selection=[('date desc, id desc', 'Newer first'), ('date asc, id desc', 'Older first')]
  • return_to_location Many2one → stock.location
    comodel_name='stock.location' domain='[("usage", "=", "internal")]' help='Return to this location' required=True string='Return to'
  • return_type Selection
    help='Supplier - Search for incoming moves from this supplier\nCustomer - Search for outgoing moves to this customer\nInternal - Search for outgoing moves to this location.' required=True selection=[('supplier', 'Return to Supplier'), ('customer', 'Return from Customer'), ('internal', 'Return to Internal location')]
  • returned_picking_ids One2many → stock.picking
    comodel_name='stock.picking' copy=False inverse_name='stock_return_request_id' readonly=True string='Returned Pickings'
  • show_to_refund Boolean
    compute='_compute_show_to_refund' help='Whether to show it or not depending on the availability ofthe stock_account module (so a bridge module is not necessary)'
  • state Selection
    copy=False default='draft' readonly=True selection=[('draft', 'Open'), ('confirmed', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')] tracking=True
  • to_refund Boolean
Public methods (8)
  • action_cancel(self)
    Cancel request and the associated pickings. We can set it to draft again.
  • action_cancel_to_draft(self)
    Set to draft again
  • action_confirm(self)
    Get moves and then try to reserve quantities. Fail if the quantites can't be assigned
  • action_validate(self)
  • action_view_pickings(self)
    Display returned pickings
  • create(self, vals_list)
    @api.model_create_multi
  • do_print_return_request(self)
  • onchange_locations(self)
    @api.onchange('return_type', 'partner_id')
    UI helpers to determine locations

New fields (8)
  • lot_id Many2one → stock.lot
    comodel_name='stock.lot' domain="[('product_id', '=', product_id)]" string='Lot / Serial'
  • max_quantity Float
    compute='_compute_max_quantity' digits='Product Unit of Measure' string='Maximum available quantity'
  • product_id Many2one → product.product
    comodel_name='product.product' domain=[('is_storable', '=', True)] required=True string='Product'
  • product_uom_id Many2one → uom.uom
    comodel_name='uom.uom' readonly=True related='product_id.uom_id'
  • quantity Float
    digits='Product Unit of Measure' required=True string='Quantiy to return'
  • request_id Many2one → stock.return.request
    comodel_name='stock.return.request' ondelete='cascade' readonly=True required=True string='Return Request'
  • returnable_move_ids Many2many → stock.move
    comodel_name='stock.move' copy=False readonly=True string='Returnable Move Lines'
  • tracking Selection
    readonly=True related='product_id.tracking'
Public methods (2)
  • action_lot_suggestion(self)
  • create(self, vals_list)
    @api.model_create_multi

New fields (3)
  • lot_suggestion_mode Selection
    default='sum' selection=[('sum', 'Total by lot'), ('detail', 'Total by move')]
  • request_line_id Many2one → stock.return.request.line
    comodel_name='stock.return.request.line' ondelete='cascade' readonly=True required=True
  • suggested_lot_id Many2one → suggest.return.request.lot.line
    args: 'suggest.return.request.lot.line'
Public methods (1)
  • action_confirm(self)

New fields (4)
  • lot_id Many2one → stock.lot
    comodel_name='stock.lot'
  • lot_suggestion_mode Selection
    selection=[('sum', 'Total by lot'), ('detail', 'Total by move')]
  • name Char
  • wizard_id Many2one → suggest.return.request.lot
    comodel_name='suggest.return.request.lot' ondelete='cascade'
Public methods (0)

No public methods.

Status
Open migration PR — not merged yet for this version
CI status
checks failing
Open since
78 days ago
Last activity
20 days ago
Repository
OCA/stock-logistics-request
Pull request
[19.0][MIG] stock_return_request: Migration to 19.0 (#95)