OCA/l10n-italy

View on GitHub

Showing 820 of 1,161 total issues

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

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

    @api.multi
    def action_paid(self):
        for pt in self:
            wf_service = netsvc.LocalService("workflow")
            wf_service.trg_validate(self.env.uid, self._name, pt.id, 'paid',
Severity: Major
Found in l10n_it_withholding_tax/models/withholding_tax.py and 1 other location - About 2 hrs to fix
l10n_it_withholding_tax/models/withholding_tax.py on lines 328..334

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

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 partner.country_id:
            vals['cedente_sede_Nazione'] = partner.country_id.code
        elif partner_vat:
            vals['cedente_sede_Nazione'] = partner_vat[:2]
        else:
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 3 other locations - About 2 hrs to fix
l10n_it_invoices_data_communication/models/communication.py on lines 277..282
l10n_it_invoices_data_communication/models/communication.py on lines 352..357
l10n_it_invoices_data_communication/models/communication.py on lines 373..378

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

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 partner.country_id:
            vals['cedente_IdFiscaleIVA_IdPaese'] = partner.country_id.code
        elif partner_vat:
            vals['cedente_IdFiscaleIVA_IdPaese'] = partner_vat[:2]
        else:
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 3 other locations - About 2 hrs to fix
l10n_it_invoices_data_communication/models/communication.py on lines 298..303
l10n_it_invoices_data_communication/models/communication.py on lines 352..357
l10n_it_invoices_data_communication/models/communication.py on lines 373..378

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

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 action_set_to_draft(self):
        for pt in self:
            wf_service = netsvc.LocalService("workflow")
            wf_service.trg_validate(self.env.uid, self._name, pt.id, 'cancel',
Severity: Major
Found in l10n_it_withholding_tax/models/withholding_tax.py and 1 other location - About 2 hrs to fix
l10n_it_withholding_tax/models/withholding_tax.py on lines 320..326

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

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 partner.country_id:
            vals['cessionario_sede_Nazione'] = partner.country_id.code
        elif partner_vat:
            vals['cessionario_sede_Nazione'] = partner_vat[:2]
        else:
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 3 other locations - About 2 hrs to fix
l10n_it_invoices_data_communication/models/communication.py on lines 277..282
l10n_it_invoices_data_communication/models/communication.py on lines 298..303
l10n_it_invoices_data_communication/models/communication.py on lines 352..357

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

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 partner.country_id:
            vals['cessionario_IdFiscaleIVA_IdPaese'] = partner.country_id.code
        elif partner_vat:
            vals['cessionario_IdFiscaleIVA_IdPaese'] = partner_vat[:2]
        else:
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 3 other locations - About 2 hrs to fix
l10n_it_invoices_data_communication/models/communication.py on lines 277..282
l10n_it_invoices_data_communication/models/communication.py on lines 298..303
l10n_it_invoices_data_communication/models/communication.py on lines 373..378

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

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

X509IssuerSerialType._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'X509SerialNumber'), pyxb.binding.datatypes.integer, scope=X509IssuerSerialType, location=pyxb.utils.utility.Location('http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd', 200, 4)))
Severity: Major
Found in l10n_it_fatturapa/bindings/_ds.py and 27 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/_ds.py on lines 1414..1414
l10n_it_fatturapa/bindings/_ds.py on lines 1479..1479
l10n_it_fatturapa/bindings/_ds.py on lines 1481..1481
l10n_it_fatturapa/bindings/_ds.py on lines 1748..1748
l10n_it_fatturapa/bindings/_ds.py on lines 1750..1750
l10n_it_fatturapa/bindings/_ds.py on lines 1752..1752
l10n_it_fatturapa/bindings/_ds.py on lines 1754..1754
l10n_it_fatturapa/bindings/_ds.py on lines 1878..1878
l10n_it_fatturapa/bindings/_ds.py on lines 1910..1910
l10n_it_fatturapa/bindings/_ds.py on lines 1912..1912
l10n_it_fatturapa/bindings/_ds.py on lines 1981..1981
l10n_it_fatturapa/bindings/binding.py on lines 4673..4673
l10n_it_fatturapa/bindings/binding.py on lines 4802..4802
l10n_it_fatturapa/bindings/binding.py on lines 4863..4863
l10n_it_fatturapa/bindings/binding.py on lines 4865..4865
l10n_it_fatturapa/bindings/binding.py on lines 4871..4871
l10n_it_fatturapa/bindings/binding.py on lines 5272..5272
l10n_it_fatturapa/bindings/binding.py on lines 5418..5418
l10n_it_fatturapa/bindings/binding.py on lines 6088..6088
l10n_it_fatturapa/bindings/binding.py on lines 6158..6158
l10n_it_fatturapa/bindings/binding.py on lines 6162..6162
l10n_it_fatturapa/bindings/binding.py on lines 6188..6188
l10n_it_fatturapa/bindings/binding.py on lines 6192..6192
l10n_it_fatturapa/bindings/binding.py on lines 6771..6771
l10n_it_fatturapa/bindings/binding.py on lines 6861..6861
l10n_it_fatturapa/bindings/binding.py on lines 6863..6863
l10n_it_fatturapa/bindings/binding.py on lines 7147..7147

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

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

X509IssuerSerialType._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'X509IssuerName'), pyxb.binding.datatypes.string, scope=X509IssuerSerialType, location=pyxb.utils.utility.Location('http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd', 199, 4)))
Severity: Major
Found in l10n_it_fatturapa/bindings/_ds.py and 27 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/_ds.py on lines 1414..1414
l10n_it_fatturapa/bindings/_ds.py on lines 1479..1479
l10n_it_fatturapa/bindings/_ds.py on lines 1481..1481
l10n_it_fatturapa/bindings/_ds.py on lines 1748..1748
l10n_it_fatturapa/bindings/_ds.py on lines 1750..1750
l10n_it_fatturapa/bindings/_ds.py on lines 1752..1752
l10n_it_fatturapa/bindings/_ds.py on lines 1754..1754
l10n_it_fatturapa/bindings/_ds.py on lines 1880..1880
l10n_it_fatturapa/bindings/_ds.py on lines 1910..1910
l10n_it_fatturapa/bindings/_ds.py on lines 1912..1912
l10n_it_fatturapa/bindings/_ds.py on lines 1981..1981
l10n_it_fatturapa/bindings/binding.py on lines 4673..4673
l10n_it_fatturapa/bindings/binding.py on lines 4802..4802
l10n_it_fatturapa/bindings/binding.py on lines 4863..4863
l10n_it_fatturapa/bindings/binding.py on lines 4865..4865
l10n_it_fatturapa/bindings/binding.py on lines 4871..4871
l10n_it_fatturapa/bindings/binding.py on lines 5272..5272
l10n_it_fatturapa/bindings/binding.py on lines 5418..5418
l10n_it_fatturapa/bindings/binding.py on lines 6088..6088
l10n_it_fatturapa/bindings/binding.py on lines 6158..6158
l10n_it_fatturapa/bindings/binding.py on lines 6162..6162
l10n_it_fatturapa/bindings/binding.py on lines 6188..6188
l10n_it_fatturapa/bindings/binding.py on lines 6192..6192
l10n_it_fatturapa/bindings/binding.py on lines 6771..6771
l10n_it_fatturapa/bindings/binding.py on lines 6861..6861
l10n_it_fatturapa/bindings/binding.py on lines 6863..6863
l10n_it_fatturapa/bindings/binding.py on lines 7147..7147

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

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

DatiDocumentiCorrelatiType._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, 'Data'), pyxb.binding.datatypes.date, scope=DatiDocumentiCorrelatiType, location=pyxb.utils.utility.Location('https://www.fatturapa.gov.it/export/fatturazione/sdi/fatturapa/v1.3/Schema_del_file_xml_FatturaPA_versione_1.2.1.xsd', 475, 6)))
Severity: Major
Found in l10n_it_fatturapa/bindings/binding.py and 27 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/_ds.py on lines 1414..1414
l10n_it_fatturapa/bindings/_ds.py on lines 1479..1479
l10n_it_fatturapa/bindings/_ds.py on lines 1481..1481
l10n_it_fatturapa/bindings/_ds.py on lines 1748..1748
l10n_it_fatturapa/bindings/_ds.py on lines 1750..1750
l10n_it_fatturapa/bindings/_ds.py on lines 1752..1752
l10n_it_fatturapa/bindings/_ds.py on lines 1754..1754
l10n_it_fatturapa/bindings/_ds.py on lines 1878..1878
l10n_it_fatturapa/bindings/_ds.py on lines 1880..1880
l10n_it_fatturapa/bindings/_ds.py on lines 1910..1910
l10n_it_fatturapa/bindings/_ds.py on lines 1912..1912
l10n_it_fatturapa/bindings/_ds.py on lines 1981..1981
l10n_it_fatturapa/bindings/binding.py on lines 4802..4802
l10n_it_fatturapa/bindings/binding.py on lines 4863..4863
l10n_it_fatturapa/bindings/binding.py on lines 4865..4865
l10n_it_fatturapa/bindings/binding.py on lines 4871..4871
l10n_it_fatturapa/bindings/binding.py on lines 5272..5272
l10n_it_fatturapa/bindings/binding.py on lines 5418..5418
l10n_it_fatturapa/bindings/binding.py on lines 6088..6088
l10n_it_fatturapa/bindings/binding.py on lines 6158..6158
l10n_it_fatturapa/bindings/binding.py on lines 6162..6162
l10n_it_fatturapa/bindings/binding.py on lines 6188..6188
l10n_it_fatturapa/bindings/binding.py on lines 6192..6192
l10n_it_fatturapa/bindings/binding.py on lines 6771..6771
l10n_it_fatturapa/bindings/binding.py on lines 6861..6861
l10n_it_fatturapa/bindings/binding.py on lines 6863..6863
l10n_it_fatturapa/bindings/binding.py on lines 7147..7147

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

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

X509DataType._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'X509CRL'), pyxb.binding.datatypes.base64Binary, scope=X509DataType, location=pyxb.utils.utility.Location('http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd', 191, 6)))
Severity: Major
Found in l10n_it_fatturapa/bindings/_ds.py and 27 other locations - About 2 hrs to fix
l10n_it_fatturapa/bindings/_ds.py on lines 1414..1414
l10n_it_fatturapa/bindings/_ds.py on lines 1479..1479
l10n_it_fatturapa/bindings/_ds.py on lines 1481..1481
l10n_it_fatturapa/bindings/_ds.py on lines 1748..1748
l10n_it_fatturapa/bindings/_ds.py on lines 1750..1750
l10n_it_fatturapa/bindings/_ds.py on lines 1752..1752
l10n_it_fatturapa/bindings/_ds.py on lines 1878..1878
l10n_it_fatturapa/bindings/_ds.py on lines 1880..1880
l10n_it_fatturapa/bindings/_ds.py on lines 1910..1910
l10n_it_fatturapa/bindings/_ds.py on lines 1912..1912
l10n_it_fatturapa/bindings/_ds.py on lines 1981..1981
l10n_it_fatturapa/bindings/binding.py on lines 4673..4673
l10n_it_fatturapa/bindings/binding.py on lines 4802..4802
l10n_it_fatturapa/bindings/binding.py on lines 4863..4863
l10n_it_fatturapa/bindings/binding.py on lines 4865..4865
l10n_it_fatturapa/bindings/binding.py on lines 4871..4871
l10n_it_fatturapa/bindings/binding.py on lines 5272..5272
l10n_it_fatturapa/bindings/binding.py on lines 5418..5418
l10n_it_fatturapa/bindings/binding.py on lines 6088..6088
l10n_it_fatturapa/bindings/binding.py on lines 6158..6158
l10n_it_fatturapa/bindings/binding.py on lines 6162..6162
l10n_it_fatturapa/bindings/binding.py on lines 6188..6188
l10n_it_fatturapa/bindings/binding.py on lines 6192..6192
l10n_it_fatturapa/bindings/binding.py on lines 6771..6771
l10n_it_fatturapa/bindings/binding.py on lines 6861..6861
l10n_it_fatturapa/bindings/binding.py on lines 6863..6863
l10n_it_fatturapa/bindings/binding.py on lines 7147..7147

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

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