OCA/l10n-italy

View on GitHub

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):
Severity: Minor
Found in l10n_it_withholding_tax/models/voucher.py - About 35 mins to fix

    Function create has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def create(self, cr, uid, vals, *args, **kwargs):
    Severity: Minor
    Found in l10n_it_withholding_tax/models/voucher.py - About 35 mins to fix

      Function write has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def write(self, cr, uid, ids, vals, context=None):
      Severity: Minor
      Found in l10n_it_withholding_tax/models/voucher.py - About 35 mins to fix

        Function setDettaglioLinea has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def setDettaglioLinea(
        Severity: Minor
        Found in l10n_it_fatturapa_out_wt/wizard/wizard_export_fatturapa.py - About 35 mins to fix

          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):
          Severity: Minor
          Found in account_vat_period_end_statement/models/account.py - About 35 mins to fix

            Function _RecordIB has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def _RecordIB(
            Severity: Minor
            Found in l10n_it_ricevute_bancarie/wizard/wizard_riba_file_export.py - About 35 mins to fix

              Function onchange_interest has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def onchange_interest(self, cr, uid, ids, interest, context=None):
              Severity: Minor
              Found in account_vat_period_end_statement/models/account.py - About 35 mins to fix

                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):
                Severity: Minor
                Found in account_vat_period_end_statement/models/account.py - About 35 mins to fix

                  Function on_change_vat_account_id has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def on_change_vat_account_id(
                  Severity: Minor
                  Found in account_vat_period_end_statement/models/account.py - About 35 mins to fix

                    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):
                    Severity: Minor
                    Found in l10n_it_fatturapa/models/company.py - About 35 mins to fix

                      Function _get_current_statement has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def _get_current_statement(self, cr, uid, ids, name, context=None):
                      Severity: Minor
                      Found in l10n_it_withholding_tax_payment/models/withholding_tax.py - About 35 mins to fix

                        Function create_rdl has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                def create_rdl(countme, bank_id, rd_id, date_maturity, partner_id,
                        Severity: Minor
                        Found in l10n_it_ricevute_bancarie/wizard/wizard_riba_issue.py - About 35 mins to fix

                          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):
                          Severity: Minor
                          Found in l10n_it_split_payment/models/account.py - About 35 mins to fix

                          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
                          Severity: Minor
                          Found in l10n_it_invoices_data_communication/models/account_invoice.py - About 35 mins to fix

                          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()
                          Severity: Minor
                          Found in l10n_it_invoices_data_communication/models/communication.py - About 35 mins to fix

                          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(
                          Severity: Minor
                          Found in l10n_it_invoices_data_communication/wizard/export_file.py - About 35 mins to fix

                          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=(
                          Severity: Minor
                          Found in l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py - About 35 mins to fix

                          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.
                          Severity: Minor
                          Found in l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py - About 35 mins to fix

                          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
                          Severity: Minor
                          Found in l10n_it_fatturapa_in/models/account.py - About 35 mins to fix

                          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(
                          Severity: Minor
                          Found in l10n_it_account_stamp/models/invoice.py - About 35 mins to fix

                          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

                          Severity
                          Category
                          Status
                          Source
                          Language