core/static/src/js/core.js
File core.js
has 391 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
odoo.define('core.core', function (require) {
"use strict";
var ListView = require('web.ListView');
var common = require('web.list_common');
var form_relational = require('web.form_relational');
Function draw_rows
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
draw_rows: function ($tbody, rows) {
var self = this,
i, j, value, $row, $cell, $header,
nbr_measures = this.active_measures.length,
length = rows[0].values.length,
Function on_invalid
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
on_invalid: function() {
var warnings = _(this.fields).chain()
.filter(function (f) {return !f.is_valid(); })
.map(function (f) {
var field_list = ''
Function render_value
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render_value: function() {
var $pdf_viewer = this.$('.o_form_pdf_controls').children().add(this.$('.o_pdfview_iframe')),
$select_upload_el = this.$('.o_select_file_button').first(),
$iFrame = this.$('.o_pdfview_iframe'),
value = this.get('value'),
Function pad_table_to
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
pad_table_to: function (count) {
count -=3; /* 表格预留空行太多很难看 */
if (this.records.length >= count ||
_(this.columns).any(function (column) { return column.meta; })) {
return;
Function change_color
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
change_color: function (rows, $cell, i, j, nbr_measures,field_index) {