Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Products Expiration Date
Entity: stock.move.line
Compute Method: _compute_expiration_date
| Inputs | Method | Outputs |
|---|---|---|
|
for move_line in self: - if move_line.lot_id.expiration_date: - move_line.expiration_date = move_line.lot_id.expiration_date + if lot_id := move_line.quant_id.lot_id or move_line.lot_id: + move_line.expiration_date = lot_id.expiration_date elif move_line.picking_type_use_create_lots: if move_line.product_id.use_expiration_date: if not move_line.expiration_date: from_date = move_line.picking_id.scheduled_date or fields.Datetime.today() move_line.expiration_date = from_date + datetime.timedelta(days=move_line.product_id.expiration_time) else: move_line.expiration_date = False |
|
