Showing 341 of 1,161 total issues
Function create
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create(self, cr, uid, vals, *args, **kwargs):
Function create
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create(self, cr, uid, vals, *args, **kwargs):
Function write
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def write(self, cr, uid, ids, vals, context=None):
Function setDettaglioLinea
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def setDettaglioLinea(
Function _get_tax_code_amount
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_tax_code_amount(self, cr, uid, tax_code_id, period_id, context):
Function _RecordIB
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _RecordIB(
Function onchange_interest
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def onchange_interest(self, cr, uid, ids, interest, context=None):
Function on_change_partner_id
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def on_change_partner_id(self, cr, uid, ids, partner_id, context=None):
Function on_change_vat_account_id
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def on_change_vat_account_id(
Function onchange_company_id
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def onchange_company_id(self, cr, uid, ids, company_id, context=None):
Function _get_current_statement
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_current_statement(self, cr, uid, ids, name, context=None):
Function create_rdl
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_rdl(countme, bank_id, rd_id, date_maturity, partner_id,
Function _compute_split_payments
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _compute_split_payments(self):
for invoice in self:
payment_line_ids = invoice.move_line_id_payment_get()
move_line_pool = self.env['account.move.line']
for payment_line in move_line_pool.browse(payment_line_ids):
- 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 _get_tax_comunicazione_dati_iva
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _get_tax_comunicazione_dati_iva(self):
self.ensure_one()
tax_grouped = {}
tot_imponibile = 0
tot_imposta = 0
- 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 check_errors
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def check_errors(self):
for comunicazione in self:
errors = []
if comunicazione.dati_trasmissione == 'DTE':
errors += comunicazione._check_errors_dte()
- 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 export
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def export(self):
comunicazione_ids = self._context.get('active_ids')
if not comunicazione_ids:
raise UserError(
- 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 _setRea
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _setRea(self, CedentePrestatore, company):
if company.fatturapa_rea_office and company.fatturapa_rea_number:
CedentePrestatore.IscrizioneREA = IscrizioneREAType(
Ufficio=(
- 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 check_invoice_amount
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def check_invoice_amount(self, invoice, FatturaElettronicaBody):
if (
FatturaElettronicaBody.DatiGenerali.DatiGeneraliDocumento.
ScontoMaggiorazione and
FatturaElettronicaBody.DatiGenerali.DatiGeneraliDocumento.
- 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 _compute_amount
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _compute_amount(self):
super(AccountInvoice, self)._compute_amount()
if self.efatt_rounding != 0:
self.amount_total += self.efatt_rounding
amount_total_company_signed = self.amount_total
- 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 is_tax_stamp_applicable
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def is_tax_stamp_applicable(self):
stamp_product_id = self.env.user.with_context(
lang=self.partner_id.lang).company_id.tax_stamp_product_id
if not stamp_product_id:
raise exceptions.Warning(
- 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"