<commit_before><?php

class CRM_Odoosync_Form_Report_OdooSyncQueue extends CRM_Report_Form {

  protected $_addressField = FALSE;

  protected $_emailField = FALSE;

  protected $_summary = NULL;

  protected $_customGroupExtends = array();
  protected $_customGroupGroupBy = FALSE; 
  
  function __construct() {
    $this->_groupFilter = FALSE;
    $this->_tagFilter = FALSE;
    parent::__construct();
  }

  function preProcess() {
    $this->assign('reportTitle', ts('Odoo Sync Queue'));
    parent::preProcess();
  }

  function postProcess() {

    $this->beginPostProcess();

    // get the acl clauses built before we assemble the query
    $sql = "SELECT entity, `status`, COUNT(*) AS `total` FROM `civicrm_odoo_entity` GROUP BY `entity`, `status`;";

    $rows = array();
    $this->buildRows($sql, $rows);

    $this->formatDisplay($rows);
    $this->doTemplateAssignment($rows);
    $this->endPostProcess($rows);
  }
  
  function modifyColumnHeaders() {
    // use this method to modify $this->_columnHeaders
    $this->_columnHeaders['entity'] = 'entity';
    $this->_columnHeaders['status'] = 'status';
    $this->_columnHeaders['total'] = 'total';
  }

  function alterDisplay(&$rows) {<commit_msg>added title to columns<commit_after><?php

class CRM_Odoosync_Form_Report_OdooSyncQueue extends CRM_Report_Form {

  protected $_addressField = FALSE;

  protected $_emailField = FALSE;

  protected $_summary = NULL;

  protected $_customGroupExtends = array();
  protected $_customGroupGroupBy = FALSE; 
  
  function __construct() {
    $this->_groupFilter = FALSE;
    $this->_tagFilter = FALSE;
    parent::__construct();
  }

  function preProcess() {
    $this->assign('reportTitle', ts('Odoo Sync Queue'));
    parent::preProcess();
  }

  function postProcess() {

    $this->beginPostProcess();

    // get the acl clauses built before we assemble the query
    $sql = "SELECT entity, `status`, COUNT(*) AS `total` FROM `civicrm_odoo_entity` GROUP BY `entity`, `status`;";

    $rows = array();
    $this->buildRows($sql, $rows);

    $this->formatDisplay($rows);
    $this->doTemplateAssignment($rows);
    $this->endPostProcess($rows);
  }
  
  function modifyColumnHeaders() {
    // use this method to modify $this->_columnHeaders
    $this->_columnHeaders['entity'] = array('title' => 'entity');
    $this->_columnHeaders['status'] = array('title' =>'status');
    $this->_columnHeaders['total'] = array('title' =>'total');
  }

  function alterDisplay(&$rows) {
{'fraction_non_alphanumeric': 0.15174628663187475, 'fraction_numerical': 0.0, 'mean_word_length': 4.170124481327801, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '812161', 'n_tokens_mistral': 783, 'n_tokens_neox': 748, 'n_words': 172}