Exemple #1
0
 def value_to_html(self, value, options):
     if options.get('format_decimalized_number'):
         return tools.format_decimalized_number(
             value, options.get('precision_digits', 1))
     return pycompat.to_text(self.user_lang().format(
         '%d', value,
         grouping=True).replace(r'-', '-\N{ZERO WIDTH NO-BREAK SPACE}'))
Exemple #2
0
 def _prepare_statistics_email_values(self):
     self.ensure_one()
     values = super(MassMailing, self)._prepare_statistics_email_values()
     if not self.user_id:
         return values
     values['kpi_data'][1]['kpi_col1'] = {
         'value': tools.format_decimalized_number(self.crm_lead_count, decimal=0),
         'col_subtitle': _('LEADS'),
     }
     values['kpi_data'][1]['kpi_name'] = 'lead'
     return values
Exemple #3
0
 def _prepare_statistics_email_values(self):
     self.ensure_one()
     values = super(MassMailing, self)._prepare_statistics_email_values()
     if not self.user_id:
         return values
     if not self.env['crm.lead'].check_access_rights('read',
                                                     raise_exception=False):
         return values
     values['kpi_data'][1]['kpi_col1'] = {
         'value':
         tools.format_decimalized_number(self.crm_lead_count, decimal=0),
         'col_subtitle':
         _('LEADS'),
     }
     values['kpi_data'][1]['kpi_name'] = 'lead'
     return values