OCA/l10n-italy

View on GitHub

Showing 820 of 1,161 total issues

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

SignatureMethod = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'SignatureMethod'), SignatureMethodType, location=pyxb.utils.utility.Location('http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd', 84, 2))
Severity: Major
Found in l10n_it_fatturapa/bindings/_ds.py and 21 other locations - About 1 hr to fix
l10n_it_fatturapa/bindings/_ds.py on lines 1103..1103
l10n_it_fatturapa/bindings/_ds.py on lines 1106..1106
l10n_it_fatturapa/bindings/_ds.py on lines 1109..1109
l10n_it_fatturapa/bindings/_ds.py on lines 1112..1112
l10n_it_fatturapa/bindings/_ds.py on lines 1118..1118
l10n_it_fatturapa/bindings/_ds.py on lines 1121..1121
l10n_it_fatturapa/bindings/_ds.py on lines 1124..1124
l10n_it_fatturapa/bindings/_ds.py on lines 1127..1127
l10n_it_fatturapa/bindings/_ds.py on lines 1130..1130
l10n_it_fatturapa/bindings/_ds.py on lines 1133..1133
l10n_it_fatturapa/bindings/_ds.py on lines 1136..1136
l10n_it_fatturapa/bindings/_ds.py on lines 1139..1139
l10n_it_fatturapa/bindings/_ds.py on lines 1142..1142
l10n_it_fatturapa/bindings/_ds.py on lines 1145..1145
l10n_it_fatturapa/bindings/_ds.py on lines 1148..1148
l10n_it_fatturapa/bindings/_ds.py on lines 1151..1151
l10n_it_fatturapa/bindings/_ds.py on lines 1154..1154
l10n_it_fatturapa/bindings/_ds.py on lines 1157..1157
l10n_it_fatturapa/bindings/_ds.py on lines 1160..1160
l10n_it_fatturapa/bindings/_ds.py on lines 1163..1163
l10n_it_fatturapa/bindings/_ds.py on lines 1166..1166

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

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

KeyInfo = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'KeyInfo'), KeyInfoType, location=pyxb.utils.utility.Location('http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd', 144, 0))
Severity: Major
Found in l10n_it_fatturapa/bindings/_ds.py and 21 other locations - About 1 hr to fix
l10n_it_fatturapa/bindings/_ds.py on lines 1103..1103
l10n_it_fatturapa/bindings/_ds.py on lines 1106..1106
l10n_it_fatturapa/bindings/_ds.py on lines 1109..1109
l10n_it_fatturapa/bindings/_ds.py on lines 1112..1112
l10n_it_fatturapa/bindings/_ds.py on lines 1115..1115
l10n_it_fatturapa/bindings/_ds.py on lines 1118..1118
l10n_it_fatturapa/bindings/_ds.py on lines 1121..1121
l10n_it_fatturapa/bindings/_ds.py on lines 1124..1124
l10n_it_fatturapa/bindings/_ds.py on lines 1127..1127
l10n_it_fatturapa/bindings/_ds.py on lines 1130..1130
l10n_it_fatturapa/bindings/_ds.py on lines 1136..1136
l10n_it_fatturapa/bindings/_ds.py on lines 1139..1139
l10n_it_fatturapa/bindings/_ds.py on lines 1142..1142
l10n_it_fatturapa/bindings/_ds.py on lines 1145..1145
l10n_it_fatturapa/bindings/_ds.py on lines 1148..1148
l10n_it_fatturapa/bindings/_ds.py on lines 1151..1151
l10n_it_fatturapa/bindings/_ds.py on lines 1154..1154
l10n_it_fatturapa/bindings/_ds.py on lines 1157..1157
l10n_it_fatturapa/bindings/_ds.py on lines 1160..1160
l10n_it_fatturapa/bindings/_ds.py on lines 1163..1163
l10n_it_fatturapa/bindings/_ds.py on lines 1166..1166

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

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

Signature = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Signature'), SignatureType, location=pyxb.utils.utility.Location('http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd', 43, 0))
Severity: Major
Found in l10n_it_fatturapa/bindings/_ds.py and 21 other locations - About 1 hr to fix
l10n_it_fatturapa/bindings/_ds.py on lines 1106..1106
l10n_it_fatturapa/bindings/_ds.py on lines 1109..1109
l10n_it_fatturapa/bindings/_ds.py on lines 1112..1112
l10n_it_fatturapa/bindings/_ds.py on lines 1115..1115
l10n_it_fatturapa/bindings/_ds.py on lines 1118..1118
l10n_it_fatturapa/bindings/_ds.py on lines 1121..1121
l10n_it_fatturapa/bindings/_ds.py on lines 1124..1124
l10n_it_fatturapa/bindings/_ds.py on lines 1127..1127
l10n_it_fatturapa/bindings/_ds.py on lines 1130..1130
l10n_it_fatturapa/bindings/_ds.py on lines 1133..1133
l10n_it_fatturapa/bindings/_ds.py on lines 1136..1136
l10n_it_fatturapa/bindings/_ds.py on lines 1139..1139
l10n_it_fatturapa/bindings/_ds.py on lines 1142..1142
l10n_it_fatturapa/bindings/_ds.py on lines 1145..1145
l10n_it_fatturapa/bindings/_ds.py on lines 1148..1148
l10n_it_fatturapa/bindings/_ds.py on lines 1151..1151
l10n_it_fatturapa/bindings/_ds.py on lines 1154..1154
l10n_it_fatturapa/bindings/_ds.py on lines 1157..1157
l10n_it_fatturapa/bindings/_ds.py on lines 1160..1160
l10n_it_fatturapa/bindings/_ds.py on lines 1163..1163
l10n_it_fatturapa/bindings/_ds.py on lines 1166..1166

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

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

        arrotondamenti_passivi_account_id = self.env['account.account'].\
            search([('user_type', '=', self.env.ref(
Severity: Major
Found in l10n_it_fatturapa_in/tests/fatturapa_common.py and 1 other location - About 1 hr to fix
l10n_it_fatturapa_in/tests/fatturapa_common.py on lines 206..207

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

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

class ResPartner(models.Model):
    _inherit = 'res.partner'

    out_fiscal_document_type = fields.Many2one(
        'fiscal.document.type', string="Fiscal Document Type",)
Severity: Major
Found in l10n_it_fiscal_document_type/models/res_partner.py and 1 other location - About 1 hr to fix
l10n_it_fiscal_payment_term/models/account.py on lines 28..34

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

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

Manifest = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Manifest'), ManifestType, location=pyxb.utils.utility.Location('http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd', 253, 0))
Severity: Major
Found in l10n_it_fatturapa/bindings/_ds.py and 21 other locations - About 1 hr to fix
l10n_it_fatturapa/bindings/_ds.py on lines 1103..1103
l10n_it_fatturapa/bindings/_ds.py on lines 1106..1106
l10n_it_fatturapa/bindings/_ds.py on lines 1109..1109
l10n_it_fatturapa/bindings/_ds.py on lines 1112..1112
l10n_it_fatturapa/bindings/_ds.py on lines 1115..1115
l10n_it_fatturapa/bindings/_ds.py on lines 1118..1118
l10n_it_fatturapa/bindings/_ds.py on lines 1121..1121
l10n_it_fatturapa/bindings/_ds.py on lines 1124..1124
l10n_it_fatturapa/bindings/_ds.py on lines 1127..1127
l10n_it_fatturapa/bindings/_ds.py on lines 1130..1130
l10n_it_fatturapa/bindings/_ds.py on lines 1133..1133
l10n_it_fatturapa/bindings/_ds.py on lines 1136..1136
l10n_it_fatturapa/bindings/_ds.py on lines 1139..1139
l10n_it_fatturapa/bindings/_ds.py on lines 1142..1142
l10n_it_fatturapa/bindings/_ds.py on lines 1145..1145
l10n_it_fatturapa/bindings/_ds.py on lines 1148..1148
l10n_it_fatturapa/bindings/_ds.py on lines 1151..1151
l10n_it_fatturapa/bindings/_ds.py on lines 1157..1157
l10n_it_fatturapa/bindings/_ds.py on lines 1160..1160
l10n_it_fatturapa/bindings/_ds.py on lines 1163..1163
l10n_it_fatturapa/bindings/_ds.py on lines 1166..1166

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

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

        accumulatore = self._RecordIB(
            intestazione[0], intestazione[1], intestazione[4], intestazione[5],
            intestazione[6])
Severity: Major
Found in l10n_it_ricevute_bancarie/wizard/wizard_riba_file_export.py and 1 other location - About 1 hr to fix
l10n_it_ricevute_bancarie/wizard/wizard_riba_file_export.py on lines 193..195

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

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

            " 30" + str(self._progressivo).rjust(7, '0') +
            nome_debitore.ljust(60)[0:60] +
Severity: Major
Found in l10n_it_ricevute_bancarie/wizard/wizard_riba_file_export.py and 1 other location - About 1 hr to fix
l10n_it_ricevute_bancarie/wizard/wizard_riba_file_export.py on lines 146..147

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

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 not partner.lastname or not partner.firstname:
                raise UserError(
                    _("Partner %s must have name and surname.") %
                    partner.name)
Severity: Major
Found in l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py and 1 other location - About 1 hr to fix
l10n_it_fatturapa_export_zip/wizard/export_fatturapa.py on lines 32..35

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

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 not journal_ids:
            journal_ids = self.pool.get('account.journal').search(cr, uid, [
                            ('company_id', '=', False),
                            ('name', 'ilike', 'General'),
Severity: Major
Found in account_fiscal_year_closing/fyc.py and 1 other location - About 1 hr to fix
account_fiscal_year_closing/fyc.py on lines 276..279

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

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 not invoice.fiscal_document_type_id:
            dt = self._get_document_fiscal_type(
                invoice.type, invoice.partner_id, invoice.fiscal_position,
                invoice.journal_id)
            if dt:
Severity: Major
Found in l10n_it_fiscal_document_type/models/account_invoice.py and 1 other location - About 1 hr to fix
l10n_it_fiscal_document_type/models/account_invoice.py on lines 36..41

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

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 not att.datas or not att.datas_fname:
                raise UserError(
                    _("Attachment %s does not have XML file")
                    % att.display_name)
Severity: Major
Found in l10n_it_fatturapa_export_zip/wizard/export_fatturapa.py and 1 other location - About 1 hr to fix
l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py on lines 386..389

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

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

                if not invoice.dati_fattura_iva_ids:
                    errors.append(_(
                        u'No VAT data defined for invoice %s of partner %s'
                    ) % (
                        invoice.invoice_id.number,
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 1 hr to fix
l10n_it_invoices_data_communication/models/communication.py on lines 966..972

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

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

            " 40" + str(self._progressivo).rjust(7, '0') +
            indirizzo_debitore.ljust(30)[0:30] +
Severity: Major
Found in l10n_it_ricevute_bancarie/wizard/wizard_riba_file_export.py and 1 other location - About 1 hr to fix
l10n_it_ricevute_bancarie/wizard/wizard_riba_file_export.py on lines 135..136

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

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 not invoices_partner.cedente_IdFiscaleIVA_IdPaese and \
                    invoices_partner.cedente_IdFiscaleIVA_IdCodice:
                errors.append(_(
                    u'Define a country ID for seller %s'
                ) % invoices_partner.partner_id.display_name)
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 1 hr to fix
l10n_it_invoices_data_communication/models/communication.py on lines 911..915

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

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 not journal_ids:
            journal_ids = self.pool.get('account.journal').search(cr, uid, [
                            ('company_id', '=', False),
                            ('code', '=', 'GRAL'),
Severity: Major
Found in account_fiscal_year_closing/fyc.py and 1 other location - About 1 hr to fix
account_fiscal_year_closing/fyc.py on lines 286..289

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 40.

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

    def _set_document_fiscal_type(self):
        dt = self._get_document_fiscal_type(
            self.type, self.partner_id, self.fiscal_position,
            self.journal_id)
        if dt:
Severity: Major
Found in l10n_it_fiscal_document_type/models/account_invoice.py and 1 other location - About 1 hr to fix
l10n_it_fiscal_document_type/models/account_invoice.py on lines 46..51

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

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 not invoices_partner.cessionario_IdFiscaleIVA_IdPaese and \
                    invoices_partner.cessionario_IdFiscaleIVA_IdCodice:
                errors.append(_(
                    u'Define a country ID for assignee %s'
                ) % invoices_partner.partner_id.display_name)
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 1 hr to fix
l10n_it_invoices_data_communication/models/communication.py on lines 1121..1125

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

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

            for invoice in invoices_partner.fatture_emesse_body_ids:
                if not invoice.dati_fattura_iva_ids:
                    errors.append(_(
                        u'No VAT data defined for invoice %s of partner %s'
                    ) % (
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 1 hr to fix
l10n_it_invoices_data_communication/models/communication.py on lines 1175..1180

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

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

                            for boe_move_line in bill_of_entry.move_id.line_id:
                                if boe_move_line.account_id.id == bill_of_entry.account_id.id:
                                    reconcile_ids.append(boe_move_line.id)
Severity: Major
Found in l10n_it_bill_of_entry/account_invoice.py and 1 other location - About 1 hr to fix
l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py on lines 206..211

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

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