OCA/l10n-italy

View on GitHub

Showing 820 of 1,161 total issues

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

        'previous_credit_vat_account_id': fields.many2one(
            'account.account', 'Previous Credits VAT',
            help='Credit VAT from previous periods',
            states={
                'confirmed': [('readonly', True)],
Severity: Major
Found in account_vat_period_end_statement/models/account.py and 1 other location - About 1 hr to fix
account_vat_period_end_statement/models/account.py on lines 283..289

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

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_vat_account_id': fields.many2one(
            'account.account', 'Tax Authority VAT Account', required=True,
            states={
                'confirmed': [('readonly', True)],
                'paid': [('readonly', True)],
Severity: Major
Found in account_vat_period_end_statement/models/account.py and 1 other location - About 1 hr to fix
account_vat_period_end_statement/models/account.py on lines 330..335

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

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 4 locations. Consider refactoring.
Open

            elif (ct.notes == 'AGP' and
                    (not dtcostvar or not ct.var_date or
                        dtcostvar < ct.var_date)):
Severity: Major
Found in l10n_it_fiscalcode/wizard/compute_fc.py and 3 other locations - About 1 hr to fix
l10n_it_fiscalcode/wizard/compute_fc.py on lines 120..122
l10n_it_fiscalcode/wizard/compute_fc.py on lines 129..131
l10n_it_fiscalcode/wizard/compute_fc.py on lines 138..140

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

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

        'journal_id': fields.many2one(
            'account.journal', 'Journal', required=True,
            states={
                'confirmed': [('readonly', True)],
                'paid': [('readonly', True)],
Severity: Major
Found in account_vat_period_end_statement/models/account.py and 1 other location - About 1 hr to fix
account_vat_period_end_statement/models/account.py on lines 314..319

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

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

        'previous_debit_vat_account_id': fields.many2one(
            'account.account', 'Previous Debits VAT',
            help='Debit VAT from previous periods',
            states={
                'confirmed': [('readonly', True)],
Severity: Major
Found in account_vat_period_end_statement/models/account.py and 1 other location - About 1 hr to fix
account_vat_period_end_statement/models/account.py on lines 266..272

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

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 24 locations. Consider refactoring.
Open

            if not check_normalized_string(
                invoices_partner.cessionario_so_Indirizzo
            ):
                errors.append(_(
                    u'Remove empty characters around address of permanent '
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
l10n_it_invoices_data_communication/models/communication.py on lines 829..835
l10n_it_invoices_data_communication/models/communication.py on lines 836..840
l10n_it_invoices_data_communication/models/communication.py on lines 841..847
l10n_it_invoices_data_communication/models/communication.py on lines 848..854
l10n_it_invoices_data_communication/models/communication.py on lines 855..861
l10n_it_invoices_data_communication/models/communication.py on lines 862..868
l10n_it_invoices_data_communication/models/communication.py on lines 876..882
l10n_it_invoices_data_communication/models/communication.py on lines 883..889
l10n_it_invoices_data_communication/models/communication.py on lines 890..895
l10n_it_invoices_data_communication/models/communication.py on lines 896..902
l10n_it_invoices_data_communication/models/communication.py on lines 903..909
l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

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

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 24 locations. Consider refactoring.
Open

            if not check_normalized_string(invoices_partner.cedente_rf_Nome):
                errors.append(_(
                    u'Remove empty characters around name of fiscal '
                    u'representative %s'
                ) % invoices_partner.partner_id.display_name)
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
l10n_it_invoices_data_communication/models/communication.py on lines 829..835
l10n_it_invoices_data_communication/models/communication.py on lines 836..840
l10n_it_invoices_data_communication/models/communication.py on lines 841..847
l10n_it_invoices_data_communication/models/communication.py on lines 848..854
l10n_it_invoices_data_communication/models/communication.py on lines 855..861
l10n_it_invoices_data_communication/models/communication.py on lines 862..868
l10n_it_invoices_data_communication/models/communication.py on lines 869..875
l10n_it_invoices_data_communication/models/communication.py on lines 876..882
l10n_it_invoices_data_communication/models/communication.py on lines 883..889
l10n_it_invoices_data_communication/models/communication.py on lines 890..895
l10n_it_invoices_data_communication/models/communication.py on lines 896..902
l10n_it_invoices_data_communication/models/communication.py on lines 903..909
l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

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

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 24 locations. Consider refactoring.
Open

            if not check_normalized_string(
                invoices_partner.cessionario_sede_Indirizzo
            ):
                errors.append(_(
                    u'Remove empty characters around headquarters address of '
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
l10n_it_invoices_data_communication/models/communication.py on lines 829..835
l10n_it_invoices_data_communication/models/communication.py on lines 836..840
l10n_it_invoices_data_communication/models/communication.py on lines 841..847
l10n_it_invoices_data_communication/models/communication.py on lines 855..861
l10n_it_invoices_data_communication/models/communication.py on lines 862..868
l10n_it_invoices_data_communication/models/communication.py on lines 869..875
l10n_it_invoices_data_communication/models/communication.py on lines 876..882
l10n_it_invoices_data_communication/models/communication.py on lines 883..889
l10n_it_invoices_data_communication/models/communication.py on lines 890..895
l10n_it_invoices_data_communication/models/communication.py on lines 896..902
l10n_it_invoices_data_communication/models/communication.py on lines 903..909
l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

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

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 24 locations. Consider refactoring.
Open

            if not check_normalized_string(
                invoices_partner.cessionario_sede_NumeroCivico
            ):
                errors.append(_(
                    u'Remove empty characters around street number of assignee'
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
l10n_it_invoices_data_communication/models/communication.py on lines 829..835
l10n_it_invoices_data_communication/models/communication.py on lines 836..840
l10n_it_invoices_data_communication/models/communication.py on lines 841..847
l10n_it_invoices_data_communication/models/communication.py on lines 848..854
l10n_it_invoices_data_communication/models/communication.py on lines 862..868
l10n_it_invoices_data_communication/models/communication.py on lines 869..875
l10n_it_invoices_data_communication/models/communication.py on lines 876..882
l10n_it_invoices_data_communication/models/communication.py on lines 883..889
l10n_it_invoices_data_communication/models/communication.py on lines 890..895
l10n_it_invoices_data_communication/models/communication.py on lines 896..902
l10n_it_invoices_data_communication/models/communication.py on lines 903..909
l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

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

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 24 locations. Consider refactoring.
Open

            if not check_normalized_string(
                invoices_partner.cedente_so_Indirizzo
            ):
                errors.append(_(
                    u'Remove empty characters around address of permanent '
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
l10n_it_invoices_data_communication/models/communication.py on lines 829..835
l10n_it_invoices_data_communication/models/communication.py on lines 836..840
l10n_it_invoices_data_communication/models/communication.py on lines 841..847
l10n_it_invoices_data_communication/models/communication.py on lines 848..854
l10n_it_invoices_data_communication/models/communication.py on lines 855..861
l10n_it_invoices_data_communication/models/communication.py on lines 862..868
l10n_it_invoices_data_communication/models/communication.py on lines 869..875
l10n_it_invoices_data_communication/models/communication.py on lines 876..882
l10n_it_invoices_data_communication/models/communication.py on lines 883..889
l10n_it_invoices_data_communication/models/communication.py on lines 890..895
l10n_it_invoices_data_communication/models/communication.py on lines 896..902
l10n_it_invoices_data_communication/models/communication.py on lines 903..909
l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

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

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 24 locations. Consider refactoring.
Open

            if not check_normalized_string(invoices_partner.cessionario_Nome):
                errors.append(_(
                    u'Remove empty characters around name of assignee '
                    u'%s'
                ) % invoices_partner.partner_id.display_name)
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
l10n_it_invoices_data_communication/models/communication.py on lines 829..835
l10n_it_invoices_data_communication/models/communication.py on lines 841..847
l10n_it_invoices_data_communication/models/communication.py on lines 848..854
l10n_it_invoices_data_communication/models/communication.py on lines 855..861
l10n_it_invoices_data_communication/models/communication.py on lines 862..868
l10n_it_invoices_data_communication/models/communication.py on lines 869..875
l10n_it_invoices_data_communication/models/communication.py on lines 876..882
l10n_it_invoices_data_communication/models/communication.py on lines 883..889
l10n_it_invoices_data_communication/models/communication.py on lines 890..895
l10n_it_invoices_data_communication/models/communication.py on lines 896..902
l10n_it_invoices_data_communication/models/communication.py on lines 903..909
l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

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

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 24 locations. Consider refactoring.
Open

            if not check_normalized_string(
                invoices_partner.cessionario_Cognome
            ):
                errors.append(_(
                    u'Remove empty characters around surname of assignee '
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
l10n_it_invoices_data_communication/models/communication.py on lines 829..835
l10n_it_invoices_data_communication/models/communication.py on lines 836..840
l10n_it_invoices_data_communication/models/communication.py on lines 848..854
l10n_it_invoices_data_communication/models/communication.py on lines 855..861
l10n_it_invoices_data_communication/models/communication.py on lines 862..868
l10n_it_invoices_data_communication/models/communication.py on lines 869..875
l10n_it_invoices_data_communication/models/communication.py on lines 876..882
l10n_it_invoices_data_communication/models/communication.py on lines 883..889
l10n_it_invoices_data_communication/models/communication.py on lines 890..895
l10n_it_invoices_data_communication/models/communication.py on lines 896..902
l10n_it_invoices_data_communication/models/communication.py on lines 903..909
l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

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

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 24 locations. Consider refactoring.
Open

            if not check_normalized_string(
                invoices_partner.cedente_sede_NumeroCivico
            ):
                errors.append(_(
                    u'Remove empty characters around street number of seller '
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
l10n_it_invoices_data_communication/models/communication.py on lines 829..835
l10n_it_invoices_data_communication/models/communication.py on lines 836..840
l10n_it_invoices_data_communication/models/communication.py on lines 841..847
l10n_it_invoices_data_communication/models/communication.py on lines 848..854
l10n_it_invoices_data_communication/models/communication.py on lines 855..861
l10n_it_invoices_data_communication/models/communication.py on lines 862..868
l10n_it_invoices_data_communication/models/communication.py on lines 869..875
l10n_it_invoices_data_communication/models/communication.py on lines 876..882
l10n_it_invoices_data_communication/models/communication.py on lines 883..889
l10n_it_invoices_data_communication/models/communication.py on lines 890..895
l10n_it_invoices_data_communication/models/communication.py on lines 896..902
l10n_it_invoices_data_communication/models/communication.py on lines 903..909
l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

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

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 24 locations. Consider refactoring.
Open

            if not check_normalized_string(
                    invoices_partner.cedente_rf_Denominazione):
                errors.append(_(
                    u'Remove empty characters around denomination of fiscal '
                    u'representative %s'
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
l10n_it_invoices_data_communication/models/communication.py on lines 829..835
l10n_it_invoices_data_communication/models/communication.py on lines 836..840
l10n_it_invoices_data_communication/models/communication.py on lines 841..847
l10n_it_invoices_data_communication/models/communication.py on lines 848..854
l10n_it_invoices_data_communication/models/communication.py on lines 855..861
l10n_it_invoices_data_communication/models/communication.py on lines 862..868
l10n_it_invoices_data_communication/models/communication.py on lines 869..875
l10n_it_invoices_data_communication/models/communication.py on lines 876..882
l10n_it_invoices_data_communication/models/communication.py on lines 883..889
l10n_it_invoices_data_communication/models/communication.py on lines 890..895
l10n_it_invoices_data_communication/models/communication.py on lines 896..902
l10n_it_invoices_data_communication/models/communication.py on lines 903..909
l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

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

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 24 locations. Consider refactoring.
Open

            if not check_normalized_string(invoices_partner.cedente_so_Comune):
                errors.append(_(
                    u'Remove empty characters around city of permanent '
                    u'establishment %s'
                ) % invoices_partner.partner_id.display_name)
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
l10n_it_invoices_data_communication/models/communication.py on lines 829..835
l10n_it_invoices_data_communication/models/communication.py on lines 836..840
l10n_it_invoices_data_communication/models/communication.py on lines 841..847
l10n_it_invoices_data_communication/models/communication.py on lines 848..854
l10n_it_invoices_data_communication/models/communication.py on lines 855..861
l10n_it_invoices_data_communication/models/communication.py on lines 862..868
l10n_it_invoices_data_communication/models/communication.py on lines 869..875
l10n_it_invoices_data_communication/models/communication.py on lines 876..882
l10n_it_invoices_data_communication/models/communication.py on lines 883..889
l10n_it_invoices_data_communication/models/communication.py on lines 890..895
l10n_it_invoices_data_communication/models/communication.py on lines 896..902
l10n_it_invoices_data_communication/models/communication.py on lines 903..909
l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

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

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 24 locations. Consider refactoring.
Open

            if not check_normalized_string(
                invoices_partner.cessionario_so_NumeroCivico
            ):
                errors.append(_(
                    u'Remove empty characters around street number of '
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
l10n_it_invoices_data_communication/models/communication.py on lines 829..835
l10n_it_invoices_data_communication/models/communication.py on lines 836..840
l10n_it_invoices_data_communication/models/communication.py on lines 841..847
l10n_it_invoices_data_communication/models/communication.py on lines 848..854
l10n_it_invoices_data_communication/models/communication.py on lines 855..861
l10n_it_invoices_data_communication/models/communication.py on lines 862..868
l10n_it_invoices_data_communication/models/communication.py on lines 869..875
l10n_it_invoices_data_communication/models/communication.py on lines 883..889
l10n_it_invoices_data_communication/models/communication.py on lines 890..895
l10n_it_invoices_data_communication/models/communication.py on lines 896..902
l10n_it_invoices_data_communication/models/communication.py on lines 903..909
l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

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

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 24 locations. Consider refactoring.
Open

            if not check_normalized_string(
                invoices_partner.cessionario_rf_Nome
            ):
                errors.append(_(
                    u'Remove empty characters around name of fiscal '
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
l10n_it_invoices_data_communication/models/communication.py on lines 829..835
l10n_it_invoices_data_communication/models/communication.py on lines 836..840
l10n_it_invoices_data_communication/models/communication.py on lines 841..847
l10n_it_invoices_data_communication/models/communication.py on lines 848..854
l10n_it_invoices_data_communication/models/communication.py on lines 855..861
l10n_it_invoices_data_communication/models/communication.py on lines 862..868
l10n_it_invoices_data_communication/models/communication.py on lines 869..875
l10n_it_invoices_data_communication/models/communication.py on lines 876..882
l10n_it_invoices_data_communication/models/communication.py on lines 883..889
l10n_it_invoices_data_communication/models/communication.py on lines 890..895
l10n_it_invoices_data_communication/models/communication.py on lines 903..909
l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

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

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 24 locations. Consider refactoring.
Open

            if not check_normalized_string(
                invoices_partner.cedente_Denominazione
            ):
                errors.append(_(
                    u'Remove empty characters around denomination of seller '
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
l10n_it_invoices_data_communication/models/communication.py on lines 829..835
l10n_it_invoices_data_communication/models/communication.py on lines 836..840
l10n_it_invoices_data_communication/models/communication.py on lines 841..847
l10n_it_invoices_data_communication/models/communication.py on lines 848..854
l10n_it_invoices_data_communication/models/communication.py on lines 855..861
l10n_it_invoices_data_communication/models/communication.py on lines 862..868
l10n_it_invoices_data_communication/models/communication.py on lines 869..875
l10n_it_invoices_data_communication/models/communication.py on lines 876..882
l10n_it_invoices_data_communication/models/communication.py on lines 883..889
l10n_it_invoices_data_communication/models/communication.py on lines 890..895
l10n_it_invoices_data_communication/models/communication.py on lines 896..902
l10n_it_invoices_data_communication/models/communication.py on lines 903..909
l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

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

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 24 locations. Consider refactoring.
Open

            if not check_normalized_string(
                invoices_partner.cedente_sede_Indirizzo
            ):
                errors.append(_(
                    u'Remove empty characters around headquarters address of '
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
l10n_it_invoices_data_communication/models/communication.py on lines 829..835
l10n_it_invoices_data_communication/models/communication.py on lines 836..840
l10n_it_invoices_data_communication/models/communication.py on lines 841..847
l10n_it_invoices_data_communication/models/communication.py on lines 848..854
l10n_it_invoices_data_communication/models/communication.py on lines 855..861
l10n_it_invoices_data_communication/models/communication.py on lines 862..868
l10n_it_invoices_data_communication/models/communication.py on lines 869..875
l10n_it_invoices_data_communication/models/communication.py on lines 876..882
l10n_it_invoices_data_communication/models/communication.py on lines 883..889
l10n_it_invoices_data_communication/models/communication.py on lines 890..895
l10n_it_invoices_data_communication/models/communication.py on lines 896..902
l10n_it_invoices_data_communication/models/communication.py on lines 903..909
l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

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

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 24 locations. Consider refactoring.
Open

            if not check_normalized_string(
                invoices_partner.cedente_rf_Cognome
            ):
                errors.append(_(
                    u'Remove empty characters around surname of fiscal '
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
l10n_it_invoices_data_communication/models/communication.py on lines 829..835
l10n_it_invoices_data_communication/models/communication.py on lines 836..840
l10n_it_invoices_data_communication/models/communication.py on lines 841..847
l10n_it_invoices_data_communication/models/communication.py on lines 848..854
l10n_it_invoices_data_communication/models/communication.py on lines 855..861
l10n_it_invoices_data_communication/models/communication.py on lines 862..868
l10n_it_invoices_data_communication/models/communication.py on lines 869..875
l10n_it_invoices_data_communication/models/communication.py on lines 876..882
l10n_it_invoices_data_communication/models/communication.py on lines 883..889
l10n_it_invoices_data_communication/models/communication.py on lines 890..895
l10n_it_invoices_data_communication/models/communication.py on lines 896..902
l10n_it_invoices_data_communication/models/communication.py on lines 903..909
l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112

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

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