OCA/l10n-italy

View on GitHub

Showing 1,161 of 1,161 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            if line.product_id == self.product2:
                self.assertTrue(line.product_uom_qty in [2, 3])
Severity: Minor
Found in l10n_it_ddt/tests/test_ddt.py and 1 other location - About 40 mins to fix
l10n_it_ddt/tests/test_ddt.py on lines 152..153

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                if TaxRappresentative:
                    tax_partner_id = self.getPartnerBase(
                        TaxRappresentative.DatiAnagrafici, supplier=False)
                    invoice.write(
                        {
Severity: Minor
Found in l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py and 1 other location - About 40 mins to fix
l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py on lines 1446..1450

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

    def _get_overdue_effects_account_id(self, cr, uid, context=None):
        return self.pool.get(
            'riba.configuration'
        ).get_default_value_by_list_line(
            cr, uid, 'overdue_effects_account_id', context=context)
Severity: Major
Found in l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py and 9 other locations - About 40 mins to fix
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 31..35
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 37..41
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 43..47
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 49..53
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 30..34
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 36..40
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 51..55
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 63..67
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 69..73

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

    def _get_bank_expense_account_id(self, cr, uid, context=None):
        return self.pool.get(
            'riba.configuration'
        ).get_default_value_by_list(
            cr, uid, 'bank_expense_account_id', context=context)
Severity: Major
Found in l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py and 9 other locations - About 40 mins to fix
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 31..35
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 37..41
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 43..47
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 30..34
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 36..40
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 51..55
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 57..61
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 63..67
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 69..73

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

    def _get_bank_expense_account_id(self, cr, uid, context=None):
        return self.pool.get(
            'riba.configuration'
        ).get_default_value_by_list_line(
            cr, uid, 'protest_charge_account_id', context=context)
Severity: Major
Found in l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py and 9 other locations - About 40 mins to fix
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 31..35
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 37..41
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 43..47
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 49..53
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 30..34
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 36..40
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 51..55
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 57..61
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 63..67

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            if pain_flavor in pain_03_to_05:
                nb_of_transactions_2_4.text = str(transactions_count_2_4)
                control_sum_2_5.text = '%.2f' % amount_control_sum_2_5
Severity: Minor
Found in l10n_it_sepa_bonifici/wizard/export_sepa_cbi.py and 1 other location - About 40 mins to fix
l10n_it_sepa_bonifici/wizard/export_sepa_cbi_estero.py on lines 340..342

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        account_move_ids = pool.get('account.move').search(cr, uid, [
                                ('period_id', 'in', period_ids),
                                ('state', '!=', 'draft'),
Severity: Minor
Found in account_fiscal_year_closing/wizard/wizard_run.py and 1 other location - About 40 mins to fix
account_fiscal_year_closing/wizard/wizard_run.py on lines 199..201

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

    def _get_effects_account_id(self, cr, uid, context=None):
        return self.pool.get(
            'riba.configuration'
        ).get_default_value_by_list_line(
            cr, uid, 'acceptance_account_id', context=context)
Severity: Major
Found in l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py and 9 other locations - About 40 mins to fix
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 31..35
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 37..41
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 43..47
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 49..53
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 30..34
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 51..55
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 57..61
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 63..67
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 69..73

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        account_move_ids.extend(pool.get('account.move').search(cr, uid, [
                                ('period_id', 'in', period_ids),
                                ('date', '>', fyc.closing_fiscalyear_id.date_stop),
Severity: Minor
Found in account_fiscal_year_closing/wizard/wizard_run.py and 1 other location - About 40 mins to fix
account_fiscal_year_closing/wizard/wizard_run.py on lines 154..156

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

    def _get_unsolved_journal_id(self, cr, uid, context=None):
        return self.pool.get(
            'riba.configuration'
        ).get_default_value_by_list_line(
            cr, uid, 'unsolved_journal_id', context=context)
Severity: Major
Found in l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py and 9 other locations - About 40 mins to fix
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 31..35
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 37..41
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 43..47
l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py on lines 49..53
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 36..40
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 51..55
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 57..61
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 63..67
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 69..73

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

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

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

        def onchange_bank_id(self, cr, uid, ids, bank_id, context=None):
    Severity: Minor
    Found in l10n_it_abicab/abicab.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_triple_discount/wizard/wizard_export_fatturapa.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_account/models/account_tax.py - About 35 mins to fix

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

              def create_opening_move(self, cr, uid, operation, fyc, context):
          Severity: Minor
          Found in account_fiscal_year_closing/wizard/wizard_run.py - About 35 mins to fix

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

                def _make_invoice(self, cr, uid, order, lines, context=None):
            Severity: Minor
            Found in l10n_it_ddt/models/sale.py - About 35 mins to fix

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

                  def _get_account_mappings(self, cr, uid, fyc, mapping, context):
              Severity: Minor
              Found in account_fiscal_year_closing/fyc.py - About 35 mins to fix

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

                    def _print_report(self, cr, uid, ids, data, context=None):
                Severity: Minor
                Found in l10n_it_prima_nota_cassa/wizard/wizard_print_prima_nota_cassa.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_account_stamp/models/company.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_out_sale/models/company.py - About 35 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language