odoo-13.0/addons/web/static/src/js/fields/field_utils.js
/**
 * Returns a string indicating the number of records in the relation.
 *
 * @param {Object} value a valid element from a BasicModel, that represents a
 *   list of values
 * @returns {string}
 */
Returns a string indicating the number of records in the relation.
@param {Object} value a valid element from a BasicModel, that represents a
list of values
@returns {string}
Returns a string indicating the number of records in the relation . @param { Object } value a valid element from a BasicModel that represents a list of values @returns { string }
function formatX2Many(value) {
    if (value.data.length === 0) {
        return _t('No records');
    } else if (value.data.length === 1) {
        return _t('1 record');
    } else {
        return value.data.length + _t(' records');
    }
}
function formatX2Many ( value ) { if ( value . data . length === 0 ) { return _t ( 'No records' ) ; } else if ( value . data . length === 1 ) { return _t ( '1 record' ) ; } else { return value . data . length + _t ( ' records' ) ; } }
Returns a string indicating the number of records in the relation.
Returns a string indicating the number of records in the relation .