Showing 165 of 421 total issues
Avoid too many return
statements within this function. Open
return {
Avoid too many return
statements within this function. Open
return Cef240
Avoid too many return
statements within this function. Open
return -1
Avoid too many return
statements within this function. Open
return nosso_numero
Avoid too many return
statements within this function. Open
return nova_ie == inscr_est_ints
Avoid too many return
statements within this function. Open
return Santander240
Avoid too many return
statements within this function. Open
return super(AccountInvoice, self)._return_pdf_invoice(doc)
Avoid too many return
statements within this function. Open
return -1
Avoid too many return
statements within this function. Open
return santander
Avoid too many return
statements within this function. Open
return itau
Avoid too many return
statements within this function. Open
return Itau240
Avoid too many return
statements within this function. Open
return rule_points
Avoid too many return
statements within this function. Open
return Sicredi240
Function send_letter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def send_letter(self):
self.valida_carta_correcao_eletronica()
tz = pytz.timezone(self.env.user.partner_id.tz) or pytz.utc
dt_evento = datetime.utcnow()
- 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 _filter_rules
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _filter_rules(self, fpos_id, type_tax, partner, product, state):
rule_obj = self.env['account.fiscal.position.tax.rule']
domain = [('fiscal_position_id', '=', fpos_id),
('domain', '=', type_tax)]
rules = rule_obj.search(domain)
- 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 _prepare_eletronic_invoice_values
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _prepare_eletronic_invoice_values(self):
res = super(InvoiceEletronic, self)._prepare_eletronic_invoice_values()
if self.model == '009':
tz = pytz.timezone(self.env.user.partner_id.tz) or pytz.utc
dt_emissao = datetime.strptime(self.data_emissao, DTFT)
- 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 _find_attachment_ids_email
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _find_attachment_ids_email(self):
atts = super(InvoiceEletronic, self)._find_attachment_ids_email()
if self.model not in ('55'):
return atts
- 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 action_invoice_draft
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def action_invoice_draft(self):
for item in self:
docs = self.env['invoice.eletronic'].search(
[('invoice_id', '=', item.id)])
for doc in docs:
- 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 action_get_status
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def action_get_status(self):
cert = self.company_id.with_context({'bin_size': False}).nfe_a1_file
cert_pfx = base64.decodestring(cert)
certificado = Certificado(cert_pfx, self.company_id.nfe_a1_password)
consulta = {
- 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 action_number
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def action_number(self):
for invoice in self:
if invoice.is_eletronic:
if not invoice.document_serie_id.internal_sequence_id.id:
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"