Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Lead Generation

Entity: crm.iap.lead.mining.request

Compute Method: _compute_tooltip

View 17.0 View 19.0
Inputs Method Outputs
  • lead_number
  • contact_number
for record in self:
            company_credits = CREDIT_PER_COMPANY * record.lead_number
            contact_credits = CREDIT_PER_CONTACT * record.contact_number
            total_contact_credits = contact_credits * record.lead_number
-             record.lead_contacts_credits = _("Up to %d additional credits will be consumed to identify %d contacts per company.", contact_credits*company_credits, record.contact_number)
-             record.lead_credits = _('%d credits will be consumed to find %d companies.', company_credits, record.lead_number)
+             record.lead_contacts_credits = _(
+                 "Up to %(credit_count)d additional credits will be consumed to identify %(contact_count)d contacts per company.",
+                 credit_count=contact_credits * company_credits,
+                 contact_count=record.contact_number,
+             )
+             record.lead_credits = _(
+                 "%(credit_count)d credits will be consumed to find %(company_count)d companies.",
+                 credit_count=company_credits,
+                 company_count=record.lead_number,
+             )
            record.lead_total_credits = _("This makes a total of %d credits for this request.", total_contact_credits + company_credits)
  • lead_contacts_credits
  • lead_credits
  • lead_total_credits

Back to entity