OCA/l10n-italy

View on GitHub

Showing 820 of 1,161 total issues

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

            if len(fyc_ids) > 1:
                raise osv.except_osv(_('Error'), _('There is already a fiscal year closing with this name.'))
Severity: Major
Found in account_fiscal_year_closing/fyc.py and 3 other locations - About 30 mins to fix
l10n_it_withholding_tax/wizard/create_wt_statement.py on lines 20..22
account_fiscal_year_closing/fyc.py on lines 432..433
account_fiscal_year_closing/fyc.py on lines 437..438

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

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

            if len(fyc_ids) > 1:
                raise osv.except_osv(_('Error'), _('There is already a fiscal year closing for the fiscal year to open.'))
Severity: Major
Found in account_fiscal_year_closing/fyc.py and 3 other locations - About 30 mins to fix
l10n_it_withholding_tax/wizard/create_wt_statement.py on lines 20..22
account_fiscal_year_closing/fyc.py on lines 427..428
account_fiscal_year_closing/fyc.py on lines 432..433

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

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

        if len(active_ids) > 1:
            raise orm.except_orm(_('Warning!'),
                                 _('You can choose Only ONE move.'))
Severity: Major
Found in l10n_it_withholding_tax/wizard/create_wt_statement.py and 3 other locations - About 30 mins to fix
account_fiscal_year_closing/fyc.py on lines 427..428
account_fiscal_year_closing/fyc.py on lines 432..433
account_fiscal_year_closing/fyc.py on lines 437..438

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

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

            " 14" + str(self._progressivo).rjust(7, '0') + " " * 12 +
Severity: Minor
Found in l10n_it_ricevute_bancarie/wizard/wizard_riba_file_export.py and 1 other location - About 30 mins to fix
l10n_it_ricevute_bancarie/wizard/wizard_riba_file_export.py on lines 167..168

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

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

            result['views'] = [(res and res[1] or False, 'form')]
Severity: Minor
Found in l10n_it_ddt/models/sale.py and 1 other location - About 30 mins to fix
l10n_it_ricevute_bancarie/wizard/wizard_riba_issue.py on lines 137..137

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

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

        return " 70" + str(self._progressivo).rjust(
            7, '0') + " " * 110 + "\r\n"
Severity: Minor
Found in l10n_it_ricevute_bancarie/wizard/wizard_riba_file_export.py and 1 other location - About 30 mins to fix
l10n_it_ricevute_bancarie/wizard/wizard_riba_file_export.py on lines 112..112

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

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

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

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

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

Refactorings

Further Reading

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

GiorniTerminePagamentoType._CF_maxInclusive = pyxb.binding.facets.CF_maxInclusive(value_datatype=GiorniTerminePagamentoType, value=pyxb.binding.datatypes.integer(999))
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 9 other locations - About 30 mins to fix
l10n_it_fatturapa/bindings/binding.py on lines 310..310
l10n_it_fatturapa/bindings/binding.py on lines 311..311
l10n_it_fatturapa/bindings/binding.py on lines 995..995
l10n_it_fatturapa/bindings/binding.py on lines 996..996
l10n_it_fatturapa/bindings/binding.py on lines 1010..1010
l10n_it_fatturapa/bindings/binding.py on lines 1011..1011
l10n_it_fatturapa/bindings/binding.py on lines 1025..1025
l10n_it_fatturapa/bindings/binding.py on lines 1026..1026
l10n_it_fatturapa/bindings/binding.py on lines 1082..1082

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

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 operation == 'net_loss_and_profit':
            move = fyc.net_loss_and_profit_move_id
            pool.get('account_fiscal_year_closing.fyc').write(cr, uid, fyc.id, { 'net_loss_and_profit_move_id': None })
Severity: Major
Found in account_fiscal_year_closing/wizard/wizard_run.py and 3 other locations - About 30 mins to fix
account_fiscal_year_closing/wizard/wizard_run.py on lines 573..575
account_fiscal_year_closing/wizard/wizard_run.py on lines 579..581
account_fiscal_year_closing/wizard/wizard_run.py on lines 582..584

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

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

        self.assertEqual(
            invoice.fatturapa_payments[0].payment_methods[0].payment_bank.bank.name,
            'Banca generica')
Severity: Minor
Found in l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py and 1 other location - About 30 mins to fix
l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py on lines 552..554

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

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

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

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

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

Refactorings

Further Reading

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

RiferimentoFaseType._CF_maxInclusive = pyxb.binding.facets.CF_maxInclusive(value_datatype=RiferimentoFaseType, value=pyxb.binding.datatypes.integer(999))
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 9 other locations - About 30 mins to fix
l10n_it_fatturapa/bindings/binding.py on lines 310..310
l10n_it_fatturapa/bindings/binding.py on lines 311..311
l10n_it_fatturapa/bindings/binding.py on lines 995..995
l10n_it_fatturapa/bindings/binding.py on lines 1010..1010
l10n_it_fatturapa/bindings/binding.py on lines 1011..1011
l10n_it_fatturapa/bindings/binding.py on lines 1025..1025
l10n_it_fatturapa/bindings/binding.py on lines 1026..1026
l10n_it_fatturapa/bindings/binding.py on lines 1082..1082
l10n_it_fatturapa/bindings/binding.py on lines 1083..1083

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

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

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

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

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

Refactorings

Further Reading

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

RiferimentoNumeroLineaType._CF_minInclusive = pyxb.binding.facets.CF_minInclusive(value_datatype=RiferimentoNumeroLineaType, value=pyxb.binding.datatypes.integer(1))
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 9 other locations - About 30 mins to fix
l10n_it_fatturapa/bindings/binding.py on lines 311..311
l10n_it_fatturapa/bindings/binding.py on lines 995..995
l10n_it_fatturapa/bindings/binding.py on lines 996..996
l10n_it_fatturapa/bindings/binding.py on lines 1010..1010
l10n_it_fatturapa/bindings/binding.py on lines 1011..1011
l10n_it_fatturapa/bindings/binding.py on lines 1025..1025
l10n_it_fatturapa/bindings/binding.py on lines 1026..1026
l10n_it_fatturapa/bindings/binding.py on lines 1082..1082
l10n_it_fatturapa/bindings/binding.py on lines 1083..1083

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

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

        if operation == 'loss_and_profit':
            move = fyc.loss_and_profit_move_id
            pool.get('account_fiscal_year_closing.fyc').write(cr, uid, fyc.id, { 'loss_and_profit_move_id': None })
Severity: Major
Found in account_fiscal_year_closing/wizard/wizard_run.py and 3 other locations - About 30 mins to fix
account_fiscal_year_closing/wizard/wizard_run.py on lines 576..578
account_fiscal_year_closing/wizard/wizard_run.py on lines 579..581
account_fiscal_year_closing/wizard/wizard_run.py on lines 582..584

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

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

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

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

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

Refactorings

Further Reading

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

NumeroLineaType._CF_minInclusive = pyxb.binding.facets.CF_minInclusive(value_datatype=NumeroLineaType, value=pyxb.binding.datatypes.integer(1))
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 9 other locations - About 30 mins to fix
l10n_it_fatturapa/bindings/binding.py on lines 310..310
l10n_it_fatturapa/bindings/binding.py on lines 311..311
l10n_it_fatturapa/bindings/binding.py on lines 995..995
l10n_it_fatturapa/bindings/binding.py on lines 996..996
l10n_it_fatturapa/bindings/binding.py on lines 1010..1010
l10n_it_fatturapa/bindings/binding.py on lines 1011..1011
l10n_it_fatturapa/bindings/binding.py on lines 1026..1026
l10n_it_fatturapa/bindings/binding.py on lines 1082..1082
l10n_it_fatturapa/bindings/binding.py on lines 1083..1083

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

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

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

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

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

Refactorings

Further Reading

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

GiorniTerminePagamentoType._CF_minInclusive = pyxb.binding.facets.CF_minInclusive(value_datatype=GiorniTerminePagamentoType, value=pyxb.binding.datatypes.integer(0))
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 9 other locations - About 30 mins to fix
l10n_it_fatturapa/bindings/binding.py on lines 310..310
l10n_it_fatturapa/bindings/binding.py on lines 311..311
l10n_it_fatturapa/bindings/binding.py on lines 995..995
l10n_it_fatturapa/bindings/binding.py on lines 996..996
l10n_it_fatturapa/bindings/binding.py on lines 1010..1010
l10n_it_fatturapa/bindings/binding.py on lines 1011..1011
l10n_it_fatturapa/bindings/binding.py on lines 1025..1025
l10n_it_fatturapa/bindings/binding.py on lines 1026..1026
l10n_it_fatturapa/bindings/binding.py on lines 1083..1083

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

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

        self.assertEquals(invoice.invoice_line[0].quantity,
                          self.ddt.line_ids[0].product_uom_qty)
Severity: Minor
Found in l10n_it_ddt/tests/test_ddt.py and 1 other location - About 30 mins to fix
l10n_it_ddt/tests/test_ddt.py on lines 116..117

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

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

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

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

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

Refactorings

Further Reading

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

NumeroColliType._CF_minInclusive = pyxb.binding.facets.CF_minInclusive(value_datatype=NumeroColliType, value=pyxb.binding.datatypes.integer(1))
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 9 other locations - About 30 mins to fix
l10n_it_fatturapa/bindings/binding.py on lines 310..310
l10n_it_fatturapa/bindings/binding.py on lines 311..311
l10n_it_fatturapa/bindings/binding.py on lines 995..995
l10n_it_fatturapa/bindings/binding.py on lines 996..996
l10n_it_fatturapa/bindings/binding.py on lines 1011..1011
l10n_it_fatturapa/bindings/binding.py on lines 1025..1025
l10n_it_fatturapa/bindings/binding.py on lines 1026..1026
l10n_it_fatturapa/bindings/binding.py on lines 1082..1082
l10n_it_fatturapa/bindings/binding.py on lines 1083..1083

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

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 operation == 'open':
            move = fyc.opening_move_id
            pool.get('account_fiscal_year_closing.fyc').write(cr, uid, fyc.id, { 'opening_move_id': None })
Severity: Major
Found in account_fiscal_year_closing/wizard/wizard_run.py and 3 other locations - About 30 mins to fix
account_fiscal_year_closing/wizard/wizard_run.py on lines 573..575
account_fiscal_year_closing/wizard/wizard_run.py on lines 576..578
account_fiscal_year_closing/wizard/wizard_run.py on lines 579..581

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

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

    @api.multi
    def riba_paid(self):
        self.state = 'paid'
        self.date_paid = fields.Date.context_today(self)
Severity: Minor
Found in l10n_it_ricevute_bancarie/models/riba.py and 1 other location - About 30 mins to fix
l10n_it_ricevute_bancarie/models/riba.py on lines 177..180

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

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 operation == 'close':
            move = fyc.closing_move_id
            pool.get('account_fiscal_year_closing.fyc').write(cr, uid, fyc.id, { 'closing_move_id': None })
Severity: Major
Found in account_fiscal_year_closing/wizard/wizard_run.py and 3 other locations - About 30 mins to fix
account_fiscal_year_closing/wizard/wizard_run.py on lines 573..575
account_fiscal_year_closing/wizard/wizard_run.py on lines 576..578
account_fiscal_year_closing/wizard/wizard_run.py on lines 582..584

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

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

            if len(fyc_ids) > 1:
                raise osv.except_osv(_('Error'), _('There is already a fiscal year closing for the fiscal year to close.'))
Severity: Major
Found in account_fiscal_year_closing/fyc.py and 3 other locations - About 30 mins to fix
l10n_it_withholding_tax/wizard/create_wt_statement.py on lines 20..22
account_fiscal_year_closing/fyc.py on lines 427..428
account_fiscal_year_closing/fyc.py on lines 437..438

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

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