Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Partner Prospect
Entity: res.partner
Compute Method: _compute_prospect
| Inputs | Method | Outputs |
|---|---|---|
|
+ for partner in self: + sale_ids = ( + partner.commercial_partner_id.sale_order_ids + + partner.commercial_partner_id.mapped("child_ids.sale_order_ids") + ) + invoice_ids = ( + partner.commercial_partner_id.invoice_ids + + partner.commercial_partner_id.mapped("child_ids.invoice_ids") + ) + partner.prospect = not sale_ids.filtered( + lambda r: r.state not in ("draft", "sent", "cancel") + ) and not invoice_ids.filtered( + lambda r: r.move_type in ("out_invoice", "out_refund") + ) |
|
