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

    def _get_move(self, move_ids):
        move_list = self.pool.get(
            'account.move.line').browse(self.cr, self.uid, move_ids)
        return move_list
Severity: Minor
Found in l10n_it_central_journal/central_journal.py and 1 other location - About 45 mins to fix
l10n_it_vat_registries/vat_registry.py on lines 79..82

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 35.

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 countries:
                    country_id = countries[0].id
                else:
                    raise UserError(
                        _("Country Code %s not found in system.") % CountryCode
Severity: Minor
Found in l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py and 1 other location - About 45 mins to fix
l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py on lines 887..891

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 35.

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 docType_record:
                docType_id = docType_record[0].id
            else:
                raise UserError(
                    _("Document type %s not handled.")
Severity: Minor
Found in l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py and 1 other location - About 45 mins to fix
l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py on lines 181..185

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 35.

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

    def _get_move(self, move_ids):
        move_list = self.pool.get(
            'account.move').browse(self.cr, self.uid, move_ids)
        return move_list
Severity: Minor
Found in l10n_it_vat_registries/vat_registry.py and 1 other location - About 45 mins to fix
l10n_it_central_journal/central_journal.py on lines 24..27

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 35.

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

    company_id = fields.Many2one(
        'res.company', 'Company', required=True,
        default=lambda self: self.env['res.company']._company_default_get(
Severity: Minor
Found in l10n_it_vat_registries/account_tax_registry.py and 1 other location - About 45 mins to fix
l10n_it_ricevute_bancarie/models/riba_config.py on lines 51..53

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 35.

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

        'company_id': fields.many2one(
            'res.company', 'Company', required=True,
            default=lambda self: self.env['res.company']._company_default_get(
Severity: Minor
Found in l10n_it_ricevute_bancarie/models/riba_config.py and 1 other location - About 45 mins to fix
l10n_it_vat_registries/account_tax_registry.py on lines 27..29

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 35.

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

        'authority_partner_id': fields.many2one(
            'res.partner', 'Tax Authority Partner',
            states={
                'confirmed': [('readonly', True)],
                'paid': [('readonly', True)],
Severity: Minor
Found in account_vat_period_end_statement/models/account.py and 1 other location - About 45 mins to fix
account_vat_period_end_statement/models/account.py on lines 351..356

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 35.

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

        'payment_term_id': fields.many2one(
            'account.payment.term', 'Payment Term',
            states={
                'confirmed': [
                    ('readonly', True)], 'paid': [('readonly', True)],
Severity: Minor
Found in account_vat_period_end_statement/models/account.py and 1 other location - About 45 mins to fix
account_vat_period_end_statement/models/account.py on lines 308..313

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 35.

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

Consider simplifying this complex logical expression.
Open

                    if (
                        line.origin and (
                            picking.name == line.origin or
                            picking.origin == line.origin
                        ) and picking.ddt_ids and
Severity: Major
Found in l10n_it_fatturapa_out_ddt/wizard/wizard_export_fatturapa.py - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

            if (not wizard.unsolved_journal_id or
                    not wizard.effects_account_id or
                    not wizard.riba_bank_account_id or
                    not wizard.overdue_effects_account_id or
                    not wizard.bank_account_id or
    Severity: Major
    Found in l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py - About 40 mins to fix

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

          def _get_accreditation_account_id(self, cr, uid, context=None):
              return self.pool.get(
                  'riba.configuration'
              ).get_default_value_by_list(
                  cr, uid, 'accreditation_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 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
      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_account_id(self, cr, uid, context=None):
              return self.pool.get(
                  'riba.configuration'
              ).get_default_value_by_list_line(
                  cr, uid, 'bank_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 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_accreditation_journal_id(self, cr, uid, context=None):
              return self.pool.get(
                  'riba.configuration'
              ).get_default_value_by_list(
                  cr, uid, 'accreditation_journal_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 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
      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

      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_estero.py and 1 other location - About 40 mins to fix
      l10n_it_sepa_bonifici/wizard/export_sepa_cbi.py on lines 244..246

      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),
                                      ('date', '<', fyc.closing_fiscalyear_id.date_start),
      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 160..162

      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_riba_bank_account_id(self, cr, uid, context=None):
              return self.pool.get(
                  'riba.configuration'
              ).get_default_value_by_list_line(
                  cr, uid, 'accreditation_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 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 = 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 230..232

      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 line.product_id == self.product1:
                      self.assertTrue(line.product_uom_qty in [1, 2])
      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 154..155

      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 Intermediary:
                          Intermediary_id = self.getPartnerBase(
                              Intermediary.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 1438..1442

      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_account_id(self, cr, uid, context=None):
              return self.pool.get(
                  'riba.configuration'
              ).get_default_value_by_list(
                  cr, uid, 'bank_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 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
      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

      Severity
      Category
      Status
      Source
      Language