OCA/l10n-italy

View on GitHub

Showing 1,161 of 1,161 total issues

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

        if 'CONSEGNA: ' in subject:
            att_name = subject.replace('CONSEGNA: ', '')
            fatturapa_attachment_out = attachment_out_model \
                .search([('datas_fname', '=', att_name)])
            if len(fatturapa_attachment_out) == 1:
Severity: Major
Found in l10n_it_fatturapa_pec/models/mail_thread.py and 1 other location - About 2 hrs to fix
l10n_it_fatturapa_pec/models/mail_thread.py on lines 164..169

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

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

class NaturaType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'NaturaType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 600..606
l10n_it_fatturapa/bindings/binding.py on lines 888..894

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

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

class Art73Type (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'Art73Type')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 600..606
l10n_it_fatturapa/bindings/binding.py on lines 888..894

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

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

class FormatoTrasmissioneType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'FormatoTrasmissioneType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 600..606
l10n_it_fatturapa/bindings/binding.py on lines 888..894

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

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

class SocioUnicoType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'SocioUnicoType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 600..606
l10n_it_fatturapa/bindings/binding.py on lines 888..894

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

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

class RegimeFiscaleType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'RegimeFiscaleType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 600..606
l10n_it_fatturapa/bindings/binding.py on lines 888..894

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

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

class TipoScontoMaggiorazioneType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'TipoScontoMaggiorazioneType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 600..606
l10n_it_fatturapa/bindings/binding.py on lines 888..894

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

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

class CondizioniPagamentoType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'CondizioniPagamentoType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 600..606
l10n_it_fatturapa/bindings/binding.py on lines 888..894

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

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

class TipoCessionePrestazioneType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'TipoCessionePrestazioneType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 888..894

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

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 tax.ref_tax_code_id:
                if self.exist(
                    cr, uid, 'ref_tax_code_id', tax.ref_tax_code_id.id,
                    tax.id, context=context
                ):
Severity: Major
Found in l10n_it_account/models/account_tax.py and 3 other locations - About 2 hrs to fix
l10n_it_account/models/account_tax.py on lines 235..243
l10n_it_account/models/account_tax.py on lines 244..252
l10n_it_account/models/account_tax.py on lines 253..261

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

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

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

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

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

Refactorings

Further Reading

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

        if 'ACCETTAZIONE: ' in subject:
            att_name = subject.replace('ACCETTAZIONE: ', '')
            fatturapa_attachment_out = attachment_out_model \
                .search([('datas_fname', '=', att_name)])
            if len(fatturapa_attachment_out) == 1:
Severity: Major
Found in l10n_it_fatturapa_pec/models/mail_thread.py and 1 other location - About 2 hrs to fix
l10n_it_fatturapa_pec/models/mail_thread.py on lines 158..163

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

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

class TipoDocumentoType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'TipoDocumentoType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 600..606
l10n_it_fatturapa/bindings/binding.py on lines 888..894

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

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

class RitenutaType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'RitenutaType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 600..606
l10n_it_fatturapa/bindings/binding.py on lines 888..894

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

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

class BolloVirtualeType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'BolloVirtualeType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 600..606

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

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

class CausalePagamentoType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'CausalePagamentoType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 282..288
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 600..606
l10n_it_fatturapa/bindings/binding.py on lines 888..894

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

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

class TipoRitenutaType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):

    """An atomic simple type."""

    _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'TipoRitenutaType')
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 17 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/binding.py on lines 121..127
l10n_it_fatturapa/bindings/binding.py on lines 138..144
l10n_it_fatturapa/bindings/binding.py on lines 179..185
l10n_it_fatturapa/bindings/binding.py on lines 196..202
l10n_it_fatturapa/bindings/binding.py on lines 212..218
l10n_it_fatturapa/bindings/binding.py on lines 249..255
l10n_it_fatturapa/bindings/binding.py on lines 318..324
l10n_it_fatturapa/bindings/binding.py on lines 335..341
l10n_it_fatturapa/bindings/binding.py on lines 368..374
l10n_it_fatturapa/bindings/binding.py on lines 388..394
l10n_it_fatturapa/bindings/binding.py on lines 454..460
l10n_it_fatturapa/bindings/binding.py on lines 470..476
l10n_it_fatturapa/bindings/binding.py on lines 490..496
l10n_it_fatturapa/bindings/binding.py on lines 570..576
l10n_it_fatturapa/bindings/binding.py on lines 585..591
l10n_it_fatturapa/bindings/binding.py on lines 600..606
l10n_it_fatturapa/bindings/binding.py on lines 888..894

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

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 tax.tax_code_id:
                if self.exist(
                    cr, uid, 'tax_code_id', tax.tax_code_id.id, tax.id,
                    context=context
                ):
Severity: Major
Found in l10n_it_account/models/account_tax.py and 3 other locations - About 2 hrs to fix
l10n_it_account/models/account_tax.py on lines 235..243
l10n_it_account/models/account_tax.py on lines 253..261
l10n_it_account/models/account_tax.py on lines 262..270

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

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

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

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

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

Refactorings

Further Reading

Function invoiceCreate has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    def invoiceCreate(
        self, fatt, fatturapa_attachment, FatturaBody, partner_id
    ):
        partner_model = self.env['res.partner']
        invoice_model = self.env['account.invoice']
Severity: Minor
Found in l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py - About 2 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function _build_codes_dict has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    def _build_codes_dict(self, tax_code, res=None):
        # TODO context
        if res is None:
            res = {}
        tax_model = self.env['account.tax']
Severity: Minor
Found in l10n_it_account/models/account_tax.py - About 2 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function exportFatturaPA has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    def exportFatturaPA(self):
        invoice_obj = self.env['account.invoice']
        invoices_by_partner = self.group_invoices_by_partner()
        attachments = self.env['fatturapa.attachment.out']
        for partner_id in invoices_by_partner:
Severity: Minor
Found in l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py - About 2 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Severity
Category
Status
Source
Language