OCA/l10n-italy

View on GitHub
l10n_it_invoices_data_communication/models/communication.py

Summary

Maintainability
F
1 mo
Test Coverage

File communication.py has 2209 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-


from openerp import api, fields, models, _
from openerp.exceptions import ValidationError
Severity: Major
Found in l10n_it_invoices_data_communication/models/communication.py - About 6 days to fix

    Function _check_errors_dtr has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
    Open

        def _check_errors_dtr(self):
            self.ensure_one()
            comunicazione = self
            errors = []
            # ----- Conta il limite di partner e fatture
    Severity: Minor
    Found in l10n_it_invoices_data_communication/models/communication.py - About 1 day 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 _check_errors_dte has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
    Open

        def _check_errors_dte(self):
            self.ensure_one()
            comunicazione = self
            errors = []
            # ----- Conta il limite di partner e fatture
    Severity: Minor
    Found in l10n_it_invoices_data_communication/models/communication.py - About 1 day 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

    ComunicazioneDatiIva has 40 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class ComunicazioneDatiIva(models.Model):
        _name = 'comunicazione.dati.iva'
        _description = 'Invoices data communication'
        _rec_name = 'identificativo'
    
    
    Severity: Minor
    Found in l10n_it_invoices_data_communication/models/communication.py - About 5 hrs to fix

      Function split_communication has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
      Open

          def split_communication(self):
              self.ensure_one()
              if self.dati_trasmissione == 'DTE':
                  if not self.check_fatture_emesse_partners():
                      fatture_emesse = self.mapped(
      Severity: Minor
      Found in l10n_it_invoices_data_communication/models/communication.py - About 3 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 _export_xml_get_dtr has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
      Open

          def _export_xml_get_dtr(self):
              # ----- 3 - DTR
              x_3_dtr = etree.Element(
                  etree.QName("DTR"))
              # -----     2.1 - Cessionario Committente DTR
      Severity: Minor
      Found in l10n_it_invoices_data_communication/models/communication.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 _export_xml_get_dtr has 56 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def _export_xml_get_dtr(self):
              # ----- 3 - DTR
              x_3_dtr = etree.Element(
                  etree.QName("DTR"))
              # -----     2.1 - Cessionario Committente DTR
      Severity: Major
      Found in l10n_it_invoices_data_communication/models/communication.py - About 2 hrs to fix

        Function _export_xml_get_dte has 56 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def _export_xml_get_dte(self):
                # ----- 2 - DTE
                x_2_dte = etree.Element(
                    etree.QName("DTE"))
                # -----     2.1 - Cedente Prestatore DTE
        Severity: Major
        Found in l10n_it_invoices_data_communication/models/communication.py - About 2 hrs to fix

          Consider simplifying this complex logical expression.
          Open

                      if fattura.partner_id:
                          fattura.cedente_IdFiscaleIVA_IdPaese = \
                              fattura.partner_id.country_id.code or ''
                          fattura.cedente_IdFiscaleIVA_IdCodice = \
                              fattura.partner_id.vat[2:] if fattura.partner_id.vat \
          Severity: Critical
          Found in l10n_it_invoices_data_communication/models/communication.py - About 2 hrs to fix

            Function _export_xml_get_dte has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                def _export_xml_get_dte(self):
                    # ----- 2 - DTE
                    x_2_dte = etree.Element(
                        etree.QName("DTE"))
                    # -----     2.1 - Cedente Prestatore DTE
            Severity: Minor
            Found in l10n_it_invoices_data_communication/models/communication.py - About 1 hr 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 _prepare_cedente_partner_id has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
            Open

                def _prepare_cedente_partner_id(self, partner, vals=None):
                    vals = {}
                    # ----- Get vat
                    partner_vat = partner.commercial_partner_id.vat or ''
                    if partner.country_id:
            Severity: Minor
            Found in l10n_it_invoices_data_communication/models/communication.py - About 1 hr 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 _prepare_cessionario_partner_id has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
            Open

                def _prepare_cessionario_partner_id(self, partner, vals=None):
                    vals = {}
                    # ----- Get vat
                    partner_vat = partner.commercial_partner_id.vat or ''
                    if partner.country_id:
            Severity: Minor
            Found in l10n_it_invoices_data_communication/models/communication.py - About 1 hr 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 onchange_invoice_id has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
            Open

                def onchange_invoice_id(self):
                    for fattura in self:
                        if fattura.invoice_id:
                            fattura.dati_fattura_TipoDocumento = \
                                fattura.invoice_id.fiscal_document_type_id and \
            Severity: Minor
            Found in l10n_it_invoices_data_communication/models/communication.py - About 1 hr 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 _normalizza_dati_partner has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

                def _normalizza_dati_partner(self, partner, vals):
                    # Paesi Esteri :
                    # - Rimuovo CAP/provincia che potrebbero dare problemi nella
                    #   validazione
                    # Paesi UE :
            Severity: Minor
            Found in l10n_it_invoices_data_communication/models/communication.py - About 1 hr 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 onchange_partner_id has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

                def onchange_partner_id(self):
                    for fattura in self:
                        if fattura.partner_id:
                            fattura.cedente_IdFiscaleIVA_IdPaese = \
                                fattura.partner_id.country_id.code or ''
            Severity: Minor
            Found in l10n_it_invoices_data_communication/models/communication.py - About 1 hr 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 check_errors has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                def check_errors(self):
                    for comunicazione in self:
                        errors = []
                        if comunicazione.dati_trasmissione == 'DTE':
                            errors += comunicazione._check_errors_dte()
            Severity: Minor
            Found in l10n_it_invoices_data_communication/models/communication.py - About 35 mins 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

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

                    if self.dati_trasmissione == 'DTE':
                        if not self.check_fatture_emesse_partners():
                            fatture_emesse = self.mapped(
                                'fatture_emesse_ids.fatture_emesse_body_ids.invoice_id')
                            cessionari = fatture_emesse.mapped('partner_id')
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 5 days to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 655..716

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

            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

                    elif self.dati_trasmissione == 'DTR':
                        if not self.check_fatture_ricevute_partners():
                            fatture_ricevute = self.mapped(
                                'fatture_ricevute_ids.fatture_ricevute_body_ids.'
                                'invoice_id')
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 5 days to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 594..653

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

            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 tax in invoice.dati_fattura_iva_ids:
                                # -----             2.2.3.2 - Dati Riepilogo
                                x_3_2_3_2_riepilogo = etree.SubElement(
                                    x_3_2_3_dati_fattura_body_dte,
                                    etree.QName("DatiRiepilogo"))
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 2 days to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 1619..1665

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

            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 tax in invoice.dati_fattura_iva_ids:
                                # -----             2.2.3.2 - Dati Riepilogo
                                x_2_2_3_2_riepilogo = etree.SubElement(
                                    x_2_2_3_dati_fattura_body_dte,
                                    etree.QName("DatiRiepilogo"))
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 2 days to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 2034..2080

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

            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 ComunicazioneDatiIvaFattureEmesseIva(models.Model):
                _name = 'comunicazione.dati.iva.fatture.emesse.iva'
                _description = 'Invoices data communication - Customer invoices VAT'
            
                fattura_emessa_body_id = fields.Many2one(
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 1 day to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 2533..2559

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

            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 ComunicazioneDatiIvaFattureRicevuteIva(models.Model):
                _name = 'comunicazione.dati.iva.fatture.ricevute.iva'
                _description = 'Invoices data communication - Supplier bills VAT'
            
                fattura_ricevuta_body_id = fields.Many2one(
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 1 day to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 2312..2338

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

            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.onchange('partner_cedente_id')
                def onchange_partner_cedente_id(self):
                    for comunicazione in self:
                        if comunicazione.partner_cedente_id:
                            vals = self._prepare_cedente_partner_id(
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 1 day to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 321..346

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

            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
                @api.onchange('partner_cessionario_id')
                def onchange_partner_cessionario_id(self):
                    for comunicazione in self:
                        if comunicazione.partner_cessionario_id:
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 1 day to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 247..271

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

            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 _get_fatture_ricevute_domain(self):
                    self.ensure_one()
                    domain = [('comunicazione_dati_iva_escludi', '=', True)]
                    no_journal_ids = self.env['account.journal'].search(domain).ids
                    domain = [('type', 'in', ['in_invoice', 'in_refund']),
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 1 day to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 493..508

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

            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 _get_fatture_emesse_domain(self):
                    self.ensure_one()
                    domain = [('comunicazione_dati_iva_escludi', '=', True)]
                    no_journal_ids = self.env['account.journal'].search(domain).ids
                    domain = [('type', 'in', ['out_invoice', 'out_refund']),
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 1 day to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 564..578

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

            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 partner_invoice.cessionario_IdFiscaleIVA_IdPaese and \
                                partner_invoice.cessionario_IdFiscaleIVA_IdCodice:
                            # -----             2.2.1.1 - Id Fiscale IVA
                            x_2_2_1_1_id_fiscale_iva = etree.SubElement(
                                x_2_2_1_identificativi_fiscali,
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 5 hrs to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 1835..1852

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

            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 partner_invoice.cedente_IdFiscaleIVA_IdPaese and \
                                partner_invoice.cedente_IdFiscaleIVA_IdCodice:
                            # -----             2.2.1.1 - Id Fiscale IVA
                            x_3_2_1_1_id_fiscale_iva = etree.SubElement(
                                x_3_2_1_identificativi_fiscali,
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 5 hrs to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 1424..1441

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

            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 compute_fatture_ricevute(self):
                    self.ensure_one()
                    fatture_ricevute = self._get_fatture_ricevute()
                    if fatture_ricevute:
                        self.partner_cessionario_id = \
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 4 hrs to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 478..491

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

            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 compute_fatture_emesse(self):
                    self.ensure_one()
                    fatture_emesse = self._get_fatture_emesse()
                    if fatture_emesse:
                        # Cedente
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 4 hrs to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 551..562

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

            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 any([invoices_partner.cessionario_so_Indirizzo,
                                invoices_partner.cessionario_so_NumeroCivico,
                                invoices_partner.cessionario_so_Cap,
                                invoices_partner.cessionario_so_Comune,
                                invoices_partner.cessionario_so_Provincia,
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 4 hrs to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 1134..1148

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

            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 any([invoices_partner.cedente_so_Indirizzo,
                                invoices_partner.cedente_so_NumeroCivico,
                                invoices_partner.cedente_so_Cap,
                                invoices_partner.cedente_so_Comune,
                                invoices_partner.cedente_so_Provincia,
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 4 hrs to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 924..939

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

            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

                @api.depends('fatture_emesse_body_ids.totale_imponibile',
                             'fatture_emesse_body_ids.totale_iva')
                def _compute_total(self):
                    for line in self:
                        totale_imponibile = 0
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 3 other locations - About 3 hrs to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 2268..2278
            l10n_it_invoices_data_communication/models/communication.py on lines 2422..2432
            l10n_it_invoices_data_communication/models/communication.py on lines 2467..2477

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

            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

                @api.depends('fatture_ricevute_body_ids.totale_imponibile',
                             'fatture_ricevute_body_ids.totale_iva')
                def _compute_total(self):
                    for line in self:
                        totale_imponibile = 0
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 3 other locations - About 3 hrs to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 2224..2234
            l10n_it_invoices_data_communication/models/communication.py on lines 2268..2278
            l10n_it_invoices_data_communication/models/communication.py on lines 2467..2477

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

            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

                @api.depends('dati_fattura_iva_ids.ImponibileImporto',
                             'dati_fattura_iva_ids.Imposta')
                def _compute_total(self):
                    for ft in self:
                        totale_imponibile = 0
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 3 other locations - About 3 hrs to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 2224..2234
            l10n_it_invoices_data_communication/models/communication.py on lines 2422..2432
            l10n_it_invoices_data_communication/models/communication.py on lines 2467..2477

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

            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

                @api.depends('dati_fattura_iva_ids.ImponibileImporto',
                             'dati_fattura_iva_ids.Imposta')
                def _compute_total(self):
                    for ft in self:
                        totale_imponibile = 0
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 3 other locations - About 3 hrs to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 2224..2234
            l10n_it_invoices_data_communication/models/communication.py on lines 2268..2278
            l10n_it_invoices_data_communication/models/communication.py on lines 2422..2432

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

            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 any([invoices_partner.cedente_rf_IdFiscaleIVA_IdPaese,
                                invoices_partner.cedente_rf_IdFiscaleIVA_IdCodice,
                                invoices_partner.cedente_rf_Denominazione,
                                invoices_partner.cedente_rf_Nome,
                                invoices_partner.cedente_rf_Cognome,
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 3 hrs to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 941..954

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

            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 any([invoices_partner.cessionario_rf_IdFiscaleIVA_IdPaese,
                                invoices_partner.cessionario_rf_IdFiscaleIVA_IdCodice,
                                invoices_partner.cessionario_rf_Denominazione,
                                invoices_partner.cessionario_rf_Nome,
                                invoices_partner.cessionario_rf_Cognome,
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 3 hrs to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 1150..1162

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

            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 line in comunicazione.fatture_emesse_ids:
                        partner_limit += 1
                        invoices_limit = len(line.fatture_emesse_body_ids)
                        if invoices_limit > 1000:
                            errors += [
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 2 hrs to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 982..988

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

            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 line in comunicazione.fatture_ricevute_ids:
                        partner_limit += 1
                        invoices_limit = len(line.fatture_ricevute_body_ids)
                        if invoices_limit > 1000:
                            errors += [
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 2 hrs to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 770..776

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

            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['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 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['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 2 locations. Consider refactoring.
            Open

                        if invoices_partner.cedente_sede_Cap and \
                                not re.match(
                                    '[0-9]{5}', invoices_partner.cedente_sede_Cap):
                            errors.append(_(
                                u'ZIP %s of seller %s is not 5 characters'
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 2 hrs to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 956..963

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

            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 invoices_partner.cessionario_sede_Cap and \
                                not re.match(
                                    '[0-9]{5}', invoices_partner.cessionario_sede_Cap):
                            errors.append(_(
                                u'ZIP %s of assignee %s is not 5 numeric characters'
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 2 hrs to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 1164..1171

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

            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

                    vals['cedente_sede_Indirizzo'] = '{} {}'.format(
                        encode_for_export(partner.street or '', 60),
                        encode_for_export(partner.street2 or '', 60)).strip()
            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 365..367

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

            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

                    vals['cessionario_sede_Indirizzo'] = '{} {}'.format(
                        encode_for_export(partner.street or '', 60),
                        encode_for_export(partner.street2 or '', 60)).strip()
            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 290..292

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

            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 all([invoices_partner.cedente_sede_Indirizzo,
                                    invoices_partner.cedente_sede_Comune,
                                    invoices_partner.cedente_sede_Nazione, ]):
                            errors.append(_(
                                u'Address, city, country of %s are mandatory'
            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 917..922

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

            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 all([invoices_partner.cessionario_sede_Indirizzo,
                                    invoices_partner.cessionario_sede_Comune,
                                    invoices_partner.cessionario_sede_Nazione, ]):
                            errors.append(_(
                                u'Address, city, country of %s are mandatory'
            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 1127..1132

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

            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 check_fatture_emesse_body(self):
                    for line in self.fatture_emesse_ids:
                        invoices_limit = len(line.fatture_emesse_body_ids)
                        if invoices_limit > 1000:
                            return False
            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 751..756

            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

                def check_fatture_ricevute_body(self):
                    for line in self.fatture_ricevute_ids:
                        invoices_limit = len(line.fatture_ricevute_body_ids)
                        if invoices_limit > 1000:
                            return False
            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 739..744

            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

                        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

                        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

            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

                def _get_fatture_emesse(self):
                    self.ensure_one()
                    domain = self._get_fatture_emesse_domain()
                    return self.env['account.invoice'].search(domain)
            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 580..583

            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

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

                def _get_fatture_ricevute(self):
                    self.ensure_one()
                    domain = self._get_fatture_ricevute_domain()
                    return self.env['account.invoice'].search(domain)
            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 510..513

            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

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

                        if not check_normalized_string(
                            invoices_partner.cessionario_so_NumeroCivico
                        ):
                            errors.append(_(
                                u'Remove empty characters around street number of '
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                            invoices_partner.cedente_sede_Comune
                        ):
                            errors.append(_(
                                u'Remove empty characters around city of seller '
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                            invoices_partner.cedente_so_NumeroCivico
                        ):
                            errors.append(_(
                                u'Remove empty characters around street number of '
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                            invoices_partner.cessionario_so_Indirizzo
                        ):
                            errors.append(_(
                                u'Remove empty characters around address of permanent '
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                            invoices_partner.cedente_sede_Indirizzo
                        ):
                            errors.append(_(
                                u'Remove empty characters around headquarters address of '
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(invoices_partner.cedente_so_Comune):
                            errors.append(_(
                                u'Remove empty characters around city of permanent '
                                u'establishment %s'
                            ) % invoices_partner.partner_id.display_name)
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                            invoices_partner.cessionario_Denominazione
                        ):
                            errors.append(_(
                                u'Remove empty characters around denomination of assignee '
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                            invoices_partner.cessionario_rf_Cognome
                        ):
                            errors.append(_(
                                u'Remove empty characters around surname of fiscal '
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(invoices_partner.cedente_Cognome):
                            errors.append(_(
                                u'Remove empty characters around surname of seller '
                                u'%s'
                            ) % invoices_partner.partner_id.display_name)
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                            invoices_partner.cedente_so_Indirizzo
                        ):
                            errors.append(_(
                                u'Remove empty characters around address of permanent '
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(invoices_partner.cessionario_Nome):
                            errors.append(_(
                                u'Remove empty characters around name of assignee '
                                u'%s'
                            ) % invoices_partner.partner_id.display_name)
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                            invoices_partner.cessionario_sede_NumeroCivico
                        ):
                            errors.append(_(
                                u'Remove empty characters around street number of assignee'
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                            invoices_partner.cedente_Denominazione
                        ):
                            errors.append(_(
                                u'Remove empty characters around denomination of seller '
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                            invoices_partner.cedente_sede_NumeroCivico
                        ):
                            errors.append(_(
                                u'Remove empty characters around street number of seller '
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(invoices_partner.cedente_rf_Nome):
                            errors.append(_(
                                u'Remove empty characters around name of fiscal '
                                u'representative %s'
                            ) % invoices_partner.partner_id.display_name)
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                            invoices_partner.cessionario_rf_Nome
                        ):
                            errors.append(_(
                                u'Remove empty characters around name of fiscal '
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                            invoices_partner.cedente_rf_Cognome
                        ):
                            errors.append(_(
                                u'Remove empty characters around surname of fiscal '
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                                invoices_partner.cessionario_rf_Denominazione):
                            errors.append(_(
                                u'Remove empty characters around denomination of fiscal '
                                u'representative %s'
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                            invoices_partner.cessionario_Cognome
                        ):
                            errors.append(_(
                                u'Remove empty characters around surname of assignee '
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                            invoices_partner.cessionario_sede_Comune
                        ):
                            errors.append(_(
                                u'Remove empty characters around city of assignee '
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                            invoices_partner.cessionario_sede_Indirizzo
                        ):
                            errors.append(_(
                                u'Remove empty characters around headquarters address of '
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                            invoices_partner.cessionario_so_Comune
                        ):
                            errors.append(_(
                                u'Remove empty characters around city of permanent '
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(
                                invoices_partner.cedente_rf_Denominazione):
                            errors.append(_(
                                u'Remove empty characters around denomination of fiscal '
                                u'representative %s'
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1052..1056
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                        if not check_normalized_string(invoices_partner.cedente_Nome):
                            errors.append(_(
                                u'Remove empty characters around name of seller '
                                u'%s'
                            ) % invoices_partner.partner_id.display_name)
            Severity: Major
            Found in l10n_it_invoices_data_communication/models/communication.py and 23 other locations - About 55 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 829..835
            l10n_it_invoices_data_communication/models/communication.py on lines 836..840
            l10n_it_invoices_data_communication/models/communication.py on lines 841..847
            l10n_it_invoices_data_communication/models/communication.py on lines 848..854
            l10n_it_invoices_data_communication/models/communication.py on lines 855..861
            l10n_it_invoices_data_communication/models/communication.py on lines 862..868
            l10n_it_invoices_data_communication/models/communication.py on lines 869..875
            l10n_it_invoices_data_communication/models/communication.py on lines 876..882
            l10n_it_invoices_data_communication/models/communication.py on lines 883..889
            l10n_it_invoices_data_communication/models/communication.py on lines 890..895
            l10n_it_invoices_data_communication/models/communication.py on lines 896..902
            l10n_it_invoices_data_communication/models/communication.py on lines 903..909
            l10n_it_invoices_data_communication/models/communication.py on lines 1045..1051
            l10n_it_invoices_data_communication/models/communication.py on lines 1057..1061
            l10n_it_invoices_data_communication/models/communication.py on lines 1062..1068
            l10n_it_invoices_data_communication/models/communication.py on lines 1069..1075
            l10n_it_invoices_data_communication/models/communication.py on lines 1076..1082
            l10n_it_invoices_data_communication/models/communication.py on lines 1083..1089
            l10n_it_invoices_data_communication/models/communication.py on lines 1090..1096
            l10n_it_invoices_data_communication/models/communication.py on lines 1097..1101
            l10n_it_invoices_data_communication/models/communication.py on lines 1102..1107
            l10n_it_invoices_data_communication/models/communication.py on lines 1108..1112
            l10n_it_invoices_data_communication/models/communication.py on lines 1113..1119

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 37.

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

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

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

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

            Refactorings

            Further Reading

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

                            if not invoice.dati_fattura_DataRegistrazione:
                                errors.append(
                                    _(u'No registration date for supplier bill %s') % (
                                        invoice.invoice_id.number))
            Severity: Minor
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 35 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 1181..1184

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

            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.dati_fattura_Numero:
                                errors.append(
                                    _(u'No invoice number for supplier bill %s') % (
                                        invoice.invoice_id.number))
            Severity: Minor
            Found in l10n_it_invoices_data_communication/models/communication.py and 1 other location - About 35 mins to fix
            l10n_it_invoices_data_communication/models/communication.py on lines 1185..1188

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

            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

            There are no issues that match your filters.

            Category
            Status