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.warehouse.orderpoint
Compute Method: _compute_unwanted_replenish
| Inputs | Method | Outputs |
|---|---|---|
|
for orderpoint in self: - if not orderpoint.product_id or orderpoint.product_uom.is_zero(orderpoint.qty_to_order) or orderpoint.product_uom.compare(orderpoint.product_max_qty, 0) == -1: + if not orderpoint.product_id or orderpoint.uom_id.is_zero(orderpoint.qty_to_order) or orderpoint.uom_id.compare(orderpoint.product_max_qty, 0) == -1: orderpoint.unwanted_replenish = False else: after_replenish_qty = orderpoint.product_id.with_context(company_id=orderpoint.company_id.id, location=orderpoint.location_id.id).virtual_available + orderpoint.qty_to_order - orderpoint.unwanted_replenish = orderpoint.product_uom.compare(after_replenish_qty, orderpoint.product_max_qty) > 0 + orderpoint.unwanted_replenish = orderpoint.uom_id.compare(after_replenish_qty, orderpoint.product_max_qty) > 0 |
|
