Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: MRP Subcontracting
Entity: stock.move
Compute Method: _compute_show_subcontracting_details_visible
| Inputs | Method | Outputs |
|---|---|---|
|
""" Compute if the action button in order to see moves raw is visible """
self.show_subcontracting_details_visible = False
for move in self:
if not move.is_subcontract:
continue
- if not move.picked or float_is_zero(move.quantity, precision_rounding=move.product_uom.rounding):
+ if not move.move_line_ids or move.product_uom.is_zero(move.quantity):
continue
- productions = move._get_subcontract_production()
- if not productions or (productions[:1].consumption == 'strict' and not productions[:1]._has_tracked_component()):
+ productions = move._get_subcontract_production().filtered(lambda m: m.state != 'cancel')
+ if not productions:
continue
move.show_subcontracting_details_visible = True
|
|
