OCA/l10n-italy

View on GitHub

Showing 820 of 1,161 total issues

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

            if not check_normalized_string(
                invoices_partner.cessionario_Denominazione
            ):
                errors.append(_(
                    u'Remove empty characters around denomination 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 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
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_Comune
            ):
                errors.append(_(
                    u'Remove empty characters around city 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 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_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 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_Nome):
                errors.append(_(
                    u'Remove empty characters around name of seller '
                    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 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 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_Comune
            ):
                errors.append(_(
                    u'Remove empty characters around city 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 1069..1075
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_Cognome):
                errors.append(_(
                    u'Remove empty characters around surname of seller '
                    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 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 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_Comune
            ):
                errors.append(_(
                    u'Remove empty characters around city 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 855..861
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_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 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_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 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 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 9 locations. Consider refactoring.
Open

            if not (fyc.nlp_journal_id and fyc.nlp_journal_id.id):
                raise osv.except_osv(_('UserError'), _("The Net L&P journal must be defined"))
Severity: Major
Found in account_fiscal_year_closing/wizard/wizard_run.py and 8 other locations - About 55 mins to fix
account_fiscal_year_closing/wizard/wizard_run.py on lines 309..310
account_fiscal_year_closing/wizard/wizard_run.py on lines 311..312
account_fiscal_year_closing/wizard/wizard_run.py on lines 344..345
account_fiscal_year_closing/wizard/wizard_run.py on lines 354..355
account_fiscal_year_closing/wizard/wizard_run.py on lines 373..374
account_fiscal_year_closing/wizard/wizard_run.py on lines 375..376
account_fiscal_year_closing/wizard/wizard_run.py on lines 508..509
account_fiscal_year_closing/wizard/wizard_run.py on lines 510..511

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

            if not (fyc.lp_period_id and fyc.lp_period_id.id):
                raise osv.except_osv(_('UserError'), _("The L&P period must be defined"))
Severity: Major
Found in account_fiscal_year_closing/wizard/wizard_run.py and 8 other locations - About 55 mins to fix
account_fiscal_year_closing/wizard/wizard_run.py on lines 311..312
account_fiscal_year_closing/wizard/wizard_run.py on lines 344..345
account_fiscal_year_closing/wizard/wizard_run.py on lines 346..347
account_fiscal_year_closing/wizard/wizard_run.py on lines 354..355
account_fiscal_year_closing/wizard/wizard_run.py on lines 373..374
account_fiscal_year_closing/wizard/wizard_run.py on lines 375..376
account_fiscal_year_closing/wizard/wizard_run.py on lines 508..509
account_fiscal_year_closing/wizard/wizard_run.py on lines 510..511

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

            if not (fyc.loss_and_profit_move_id and fyc.loss_and_profit_move_id.id):
                raise osv.except_osv(_('UserError'), _("The L&P move must exist before creating the closing one"))
Severity: Major
Found in account_fiscal_year_closing/wizard/wizard_run.py and 8 other locations - About 55 mins to fix
account_fiscal_year_closing/wizard/wizard_run.py on lines 309..310
account_fiscal_year_closing/wizard/wizard_run.py on lines 311..312
account_fiscal_year_closing/wizard/wizard_run.py on lines 344..345
account_fiscal_year_closing/wizard/wizard_run.py on lines 346..347
account_fiscal_year_closing/wizard/wizard_run.py on lines 373..374
account_fiscal_year_closing/wizard/wizard_run.py on lines 375..376
account_fiscal_year_closing/wizard/wizard_run.py on lines 508..509
account_fiscal_year_closing/wizard/wizard_run.py on lines 510..511

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

        self.env['ddt.from.pickings'].with_context({
            'active_ids': self.so3.picking_ids.ids
Severity: Major
Found in l10n_it_fatturapa_out_ddt/tests/test_fatturapa_ddt.py and 2 other locations - About 55 mins to fix
l10n_it_fatturapa_out_ddt/tests/test_fatturapa_ddt.py on lines 64..65
l10n_it_fatturapa_out_ddt/tests/test_fatturapa_ddt.py on lines 67..68

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

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

            move_line_ids = move_line_obj.search(cr, uid, [
                ('date', '>=', wizard.date_move_line_from),
                ('date', '<=', wizard.date_move_line_to),
                ('move_id.state', 'in', target_type)
Severity: Minor
Found in l10n_it_central_journal/wizard/print_giornale.py and 1 other location - About 55 mins to fix
l10n_it_central_journal/wizard/print_giornale.py on lines 112..115

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

        inv_line3 = self.inv_line_model.create({
            'invoice_id': invoice3.id,
            'name': 'service',
            'account_id': self.env.ref('account.o_income').id,
            'quantity': 1,
Severity: Major
Found in l10n_it_split_payment/tests/test_splitpayment.py and 2 other locations - About 55 mins to fix
l10n_it_split_payment/tests/test_splitpayment.py on lines 59..64
l10n_it_split_payment/tests/test_splitpayment.py on lines 95..100

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

            if not (fyc.lp_journal_id and fyc.lp_journal_id.id):
                raise osv.except_osv(_('UserError'), _("The L&P journal must be defined"))
Severity: Major
Found in account_fiscal_year_closing/wizard/wizard_run.py and 8 other locations - About 55 mins to fix
account_fiscal_year_closing/wizard/wizard_run.py on lines 309..310
account_fiscal_year_closing/wizard/wizard_run.py on lines 344..345
account_fiscal_year_closing/wizard/wizard_run.py on lines 346..347
account_fiscal_year_closing/wizard/wizard_run.py on lines 354..355
account_fiscal_year_closing/wizard/wizard_run.py on lines 373..374
account_fiscal_year_closing/wizard/wizard_run.py on lines 375..376
account_fiscal_year_closing/wizard/wizard_run.py on lines 508..509
account_fiscal_year_closing/wizard/wizard_run.py on lines 510..511

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

            if not (fyc.c_journal_id and fyc.c_journal_id.id):
                raise osv.except_osv(_('UserError'), _("The closing journal must be defined"))
Severity: Major
Found in account_fiscal_year_closing/wizard/wizard_run.py and 8 other locations - About 55 mins to fix
account_fiscal_year_closing/wizard/wizard_run.py on lines 309..310
account_fiscal_year_closing/wizard/wizard_run.py on lines 311..312
account_fiscal_year_closing/wizard/wizard_run.py on lines 344..345
account_fiscal_year_closing/wizard/wizard_run.py on lines 346..347
account_fiscal_year_closing/wizard/wizard_run.py on lines 354..355
account_fiscal_year_closing/wizard/wizard_run.py on lines 373..374
account_fiscal_year_closing/wizard/wizard_run.py on lines 508..509
account_fiscal_year_closing/wizard/wizard_run.py on lines 510..511

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

        self.env['ddt.from.pickings'].with_context({
            'active_ids': self.so2.picking_ids.ids
Severity: Major
Found in l10n_it_fatturapa_out_ddt/tests/test_fatturapa_ddt.py and 2 other locations - About 55 mins to fix
l10n_it_fatturapa_out_ddt/tests/test_fatturapa_ddt.py on lines 64..65
l10n_it_fatturapa_out_ddt/tests/test_fatturapa_ddt.py on lines 125..126

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

            if not (fyc.c_period_id and fyc.c_period_id.id):
                raise osv.except_osv(_('UserError'), _("The closing period must be defined"))
Severity: Major
Found in account_fiscal_year_closing/wizard/wizard_run.py and 8 other locations - About 55 mins to fix
account_fiscal_year_closing/wizard/wizard_run.py on lines 309..310
account_fiscal_year_closing/wizard/wizard_run.py on lines 311..312
account_fiscal_year_closing/wizard/wizard_run.py on lines 344..345
account_fiscal_year_closing/wizard/wizard_run.py on lines 346..347
account_fiscal_year_closing/wizard/wizard_run.py on lines 354..355
account_fiscal_year_closing/wizard/wizard_run.py on lines 375..376
account_fiscal_year_closing/wizard/wizard_run.py on lines 508..509
account_fiscal_year_closing/wizard/wizard_run.py on lines 510..511

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

            if not (fyc.o_journal_id and fyc.o_journal_id.id):
                raise osv.except_osv(_('UserError'), _("The opening journal must be defined"))
Severity: Major
Found in account_fiscal_year_closing/wizard/wizard_run.py and 8 other locations - About 55 mins to fix
account_fiscal_year_closing/wizard/wizard_run.py on lines 309..310
account_fiscal_year_closing/wizard/wizard_run.py on lines 311..312
account_fiscal_year_closing/wizard/wizard_run.py on lines 344..345
account_fiscal_year_closing/wizard/wizard_run.py on lines 346..347
account_fiscal_year_closing/wizard/wizard_run.py on lines 354..355
account_fiscal_year_closing/wizard/wizard_run.py on lines 373..374
account_fiscal_year_closing/wizard/wizard_run.py on lines 375..376
account_fiscal_year_closing/wizard/wizard_run.py on lines 508..509

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