Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Inventory
Entity: stock.move
Compute Method: _compute_reservation_date
| Inputs | Method | Outputs |
|---|---|---|
|
for move in self:
if move.picking_type_id.reservation_method == 'by_date' and move.state in ['draft', 'confirmed', 'waiting', 'partially_available']:
days = move.picking_type_id.reservation_days_before
if move.priority == '1':
days = move.picking_type_id.reservation_days_before_priority
move.reservation_date = fields.Date.to_date(move.date) - timedelta(days=days)
+ elif move.picking_type_id.reservation_method == 'manual':
+ move.reservation_date = False
|
|
