Showing 2,652 of 2,652 total issues
File iscroll-probe.5.2.0.js
has 1676 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! iScroll v5.2.0 ~ (c) 2008-2016 Matteo Spinelli ~ http://cubiq.org/license */
(function (window, document, Math) {
var rAF = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
File production.py
has 1371 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
from odoo.osv import osv
from utils import inherits, inherits_after, \
create_name, safe_division, create_origin
File money_order.py
has 1098 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2016 开阖软件(<http://osbzr.com>).
Function button_checkout
has a Cognitive Complexity of 123 (exceeds 5 allowed). Consider refactoring. Open
def button_checkout(self):
''' 月末结账:结账 按钮 '''
for balance in self:
if balance.period_id:
if balance.period_id.is_closed:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File trial_balance.py
has 942 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
from odoo import models, fields, api
from odoo.exceptions import UserError
from math import fabs
import copy
File finance.py
has 889 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
import calendar
from datetime import datetime
import odoo.addons.decimal_precision as dp
from odoo import api, fields, models
Function stock_query
has a Cognitive Complexity of 107 (exceeds 5 allowed). Consider refactoring. Open
def stock_query(self):
''' 点击 查询库存 按钮 生成补货申请行
每行一个商品一个属性的 数量,补货数量
'''
goods = self.env['goods'].search([('no_stock', '=', False)])
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File asset.py
has 657 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
from datetime import datetime
import odoo.addons.decimal_precision as dp
File buy_order.py
has 653 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2016 开阖软件(<http://www.osbzr.com>).
File sell_order.py
has 607 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
from odoo import fields, models, api
import odoo.addons.decimal_precision as dp
from odoo.exceptions import UserError
File sell_delivery.py
has 586 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
from odoo import fields, models, api
import odoo.addons.decimal_precision as dp
import datetime
Function stock_request_done
has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring. Open
def stock_request_done(self):
if self.state == 'done':
raise UserError(u'请不要重复确认')
todo_buy_lines = [] # 待生成购货订单
todo_produce_lines = [] # 待生成组装单
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function Plugin
has 220 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Plugin (el, options) {
// To avoid scope issues, use 'base' instead of 'this'
// to reference this class from internal events and functions.
var base = this;
Function utils
has 213 lines of code (exceeds 25 allowed). Consider refactoring. Open
var utils = (function () {
var me = {};
var _elementStyle = document.createElement('div').style;
var _vendor = (function () {
File buy_receipt.py
has 512 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
from odoo import fields, models, api
import odoo.addons.decimal_precision as dp
from odoo.exceptions import UserError
File staff_wages.py
has 486 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
from odoo import fields, models, api
from odoo.exceptions import UserError
READONLY_STATES = {
Function from_data_excel
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
def from_data_excel(self, fields, rows_file_address):
rows, file_address = rows_file_address
if file_address:
bk = xlrd.open_workbook(misc.file_open(
file_address).name, formatting_info=True)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function recreate_voucher_name
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
def recreate_voucher_name(self, period_id):
# 取重排凭证设置
# 是否重置凭证号
context = dict(self.env.context or {})
context['call_module'] = "checkout_wizard"
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function money_order_done
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
def money_order_done(self):
'''对收付款单的审核按钮'''
for order in self:
if order.state == 'done':
raise UserError(u'请不要重复确认')
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File wave.py
has 438 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
from odoo import api, fields, models
from odoo.exceptions import UserError