Gustavosdo/summum

View on GitHub

Showing 266 of 438 total issues

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

    def formata_descricao(self):
        if self.descricao:
            return u"<p title='%s'>%s...</p>" % (self.descricao, self.descricao[:35])
        return '-'
Severity: Minor
Found in estagio/contas_pagar/models/conta_pagar.py and 1 other location - About 55 mins to fix
estagio/contas_receber/models/conta_receber.py on lines 157..160

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

    def date_tag(self, days=0, weeks=0):
        """ 
        Retorna a data corrente no formato padrão do sistema.
        Parâmetros aceitos: days, weeks
        Uso: {{date_tag[0, 0]}}
Severity: Minor
Found in estagio/text_tag/tags.py and 1 other location - About 55 mins to fix
estagio/text_tag/tags.py on lines 40..47

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

    def time_tag(self, minutes=0, hours=0):
        """ 
        Retorna o horário corrente.
        Parâmetros aceitos: minutes, hours
        Uso: {{time_tag}}
Severity: Minor
Found in estagio/text_tag/tags.py and 1 other location - About 55 mins to fix
estagio/text_tag/tags.py on lines 31..38

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

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

    var masks = ['(00) 00000-0000', '(00) 0000-00009'],
        maskBehavior = function(val, e, field, options) {
        return val.length > 14 ? masks[0] : masks[1];
    };
Severity: Minor
Found in estagio/pessoal/static/js/mascaras_campos.js and 1 other location - About 55 mins to fix
estagio/banco/static/js/formata_campos_banco.js on lines 12..15

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

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

    var masks = ['(00) 00000-0000', '(00) 0000-00009'],
        maskBehavior = function(val, e, field, options) {
        return val.length > 14 ? masks[0] : masks[1];
    };
Severity: Minor
Found in estagio/banco/static/js/formata_campos_banco.js and 1 other location - About 55 mins to fix
estagio/pessoal/static/js/mascaras_campos.js on lines 14..17

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

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

        {
          title: "Menu de navegação",
          content: "Ao lado esquerdo da página, haverá sempre o menu de navegação do sistema. O mesmo exibirá todas as páginas dos módulos nos quais o usuário autenticado possui permissão para acesso.",
          target: "left-nav",
          placement: "right",
Severity: Minor
Found in estagio/static/js/hopscotch.main.js and 1 other location - About 50 mins to fix
estagio/static/js/hopscotch.main.js on lines 62..71

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

        {
          title: "Opções de exportação",
          content: "Lista de opções com os formatos nos quais é possível exportar os dados.<br>Por fim, basta clicar no botão 'Enviar', ao lado, para iniciar o download do arquivo.",
          target: "#id_file_format",
          placement: "bottom",
Severity: Minor
Found in estagio/static/js/hopscotch.main.js and 1 other location - About 50 mins to fix
estagio/static/js/hopscotch.main.js on lines 23..32

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

    class Meta(object):
        verbose_name = _(u"Funcionário")
        verbose_name_plural = _(u"Funcionários")
        permissions = ((u"pode_exportar_funcionario", _(u"Exportar Funcionários")),)
Severity: Major
Found in estagio/pessoal/models.py and 11 other locations - About 50 mins to fix
estagio/contas_pagar/models/conta_pagar.py on lines 71..74
estagio/contas_pagar/models/parcela_conta_pagar.py on lines 33..36
estagio/contas_receber/models/conta_receber.py on lines 71..74
estagio/contas_receber/models/parcela_conta_receber.py on lines 33..36
estagio/caixa/models.py on lines 160..163
estagio/compra/models.py on lines 36..39
estagio/pessoal/models.py on lines 105..108
estagio/pessoal/models.py on lines 159..162
estagio/pessoal/models.py on lines 186..189
estagio/venda/models.py on lines 43..46
estagio/venda/models.py on lines 231..234

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

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

    juros = models.DecimalField(max_digits=7, decimal_places=4, blank=True, null=True, verbose_name=_(u"Taxa de juros (%)"), help_text=_(u"Juros que serão calculados diariamente."))
Severity: Major
Found in estagio/parametros_financeiros/models.py and 3 other locations - About 50 mins to fix
estagio/compra/models.py on lines 27..27
estagio/configuracoes/models.py on lines 55..61
estagio/venda/models.py on lines 33..33

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

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

    perc_valor_minimo_recebimento = models.DecimalField(
        max_digits=20, 
        decimal_places=0, 
        blank=True, 
        null=True,
Severity: Major
Found in estagio/configuracoes/models.py and 3 other locations - About 50 mins to fix
estagio/compra/models.py on lines 27..27
estagio/parametros_financeiros/models.py on lines 70..70
estagio/venda/models.py on lines 33..33

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

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

    desconto = models.DecimalField(max_digits=20, decimal_places=0, blank=True, null=True, verbose_name=_(u"Desconto (%)"), help_text=_(u"Desconto sob o valor total da compra."))
Severity: Major
Found in estagio/compra/models.py and 3 other locations - About 50 mins to fix
estagio/configuracoes/models.py on lines 55..61
estagio/parametros_financeiros/models.py on lines 70..70
estagio/venda/models.py on lines 33..33

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

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

    class Meta(object):
        verbose_name = _(u"Cliente")
        verbose_name_plural = _(u"Clientes")
        permissions = ((u"pode_exportar_cliente", _(u"Exportar Clientes")),)
Severity: Major
Found in estagio/pessoal/models.py and 11 other locations - About 50 mins to fix
estagio/contas_pagar/models/conta_pagar.py on lines 71..74
estagio/contas_pagar/models/parcela_conta_pagar.py on lines 33..36
estagio/contas_receber/models/conta_receber.py on lines 71..74
estagio/contas_receber/models/parcela_conta_receber.py on lines 33..36
estagio/caixa/models.py on lines 160..163
estagio/compra/models.py on lines 36..39
estagio/pessoal/models.py on lines 159..162
estagio/pessoal/models.py on lines 186..189
estagio/pessoal/models.py on lines 202..205
estagio/venda/models.py on lines 43..46
estagio/venda/models.py on lines 231..234

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

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

    class Meta(object):
        verbose_name = _(u"Conta a Receber")
        verbose_name_plural = _(u"Contas a Receber")
        permissions = ((u"pode_exportar_contasreceber", _(u"Exportar Contas a Receber")),)
Severity: Major
Found in estagio/contas_receber/models/conta_receber.py and 11 other locations - About 50 mins to fix
estagio/contas_pagar/models/conta_pagar.py on lines 71..74
estagio/contas_pagar/models/parcela_conta_pagar.py on lines 33..36
estagio/contas_receber/models/parcela_conta_receber.py on lines 33..36
estagio/caixa/models.py on lines 160..163
estagio/compra/models.py on lines 36..39
estagio/pessoal/models.py on lines 105..108
estagio/pessoal/models.py on lines 159..162
estagio/pessoal/models.py on lines 186..189
estagio/pessoal/models.py on lines 202..205
estagio/venda/models.py on lines 43..46
estagio/venda/models.py on lines 231..234

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

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

    class Meta(object):
        verbose_name = _(u"Parcela de Conta a Pagar")
        verbose_name_plural = _(u"Parcelas de Contas a Pagar")
        permissions = ((u"pode_exportar_parcelascontaspagar", _(u"Exportar Parcelas de Contas a Pagar")),)
Severity: Major
Found in estagio/contas_pagar/models/parcela_conta_pagar.py and 11 other locations - About 50 mins to fix
estagio/contas_pagar/models/conta_pagar.py on lines 71..74
estagio/contas_receber/models/conta_receber.py on lines 71..74
estagio/contas_receber/models/parcela_conta_receber.py on lines 33..36
estagio/caixa/models.py on lines 160..163
estagio/compra/models.py on lines 36..39
estagio/pessoal/models.py on lines 105..108
estagio/pessoal/models.py on lines 159..162
estagio/pessoal/models.py on lines 186..189
estagio/pessoal/models.py on lines 202..205
estagio/venda/models.py on lines 43..46
estagio/venda/models.py on lines 231..234

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

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

    class Meta(object):
        verbose_name = _(u"Venda")
        verbose_name_plural = _(u"Vendas")
        permissions = ((u"pode_exportar_venda", _(u"Exportar Vendas")),)
Severity: Major
Found in estagio/venda/models.py and 11 other locations - About 50 mins to fix
estagio/contas_pagar/models/conta_pagar.py on lines 71..74
estagio/contas_pagar/models/parcela_conta_pagar.py on lines 33..36
estagio/contas_receber/models/conta_receber.py on lines 71..74
estagio/contas_receber/models/parcela_conta_receber.py on lines 33..36
estagio/caixa/models.py on lines 160..163
estagio/compra/models.py on lines 36..39
estagio/pessoal/models.py on lines 105..108
estagio/pessoal/models.py on lines 159..162
estagio/pessoal/models.py on lines 186..189
estagio/pessoal/models.py on lines 202..205
estagio/venda/models.py on lines 231..234

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

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

    class Meta(object):
        verbose_name = _(u"Cargo")
        verbose_name_plural = _(u"Cargos")
        permissions = ((u"pode_exportar_cargo", _(u"Exportar Cargos")),)
Severity: Major
Found in estagio/pessoal/models.py and 11 other locations - About 50 mins to fix
estagio/contas_pagar/models/conta_pagar.py on lines 71..74
estagio/contas_pagar/models/parcela_conta_pagar.py on lines 33..36
estagio/contas_receber/models/conta_receber.py on lines 71..74
estagio/contas_receber/models/parcela_conta_receber.py on lines 33..36
estagio/caixa/models.py on lines 160..163
estagio/compra/models.py on lines 36..39
estagio/pessoal/models.py on lines 105..108
estagio/pessoal/models.py on lines 159..162
estagio/pessoal/models.py on lines 202..205
estagio/venda/models.py on lines 43..46
estagio/venda/models.py on lines 231..234

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

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

    desconto = models.DecimalField(max_digits=20, decimal_places=0, blank=True, null=True, verbose_name=_(u"Desconto (%)"), help_text=_(u"Desconto sob o valor total da venda."))
Severity: Major
Found in estagio/venda/models.py and 3 other locations - About 50 mins to fix
estagio/compra/models.py on lines 27..27
estagio/configuracoes/models.py on lines 55..61
estagio/parametros_financeiros/models.py on lines 70..70

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

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

    class Meta(object):
        verbose_name = _(u"Movimento de Caixa")
        verbose_name_plural = _(u"Movimentos de Caixas")
        permissions = ((u"pode_exportar_movimentoscaixa", _(u"Exportar Movimentos de Caixas")),)
Severity: Major
Found in estagio/caixa/models.py and 11 other locations - About 50 mins to fix
estagio/contas_pagar/models/conta_pagar.py on lines 71..74
estagio/contas_pagar/models/parcela_conta_pagar.py on lines 33..36
estagio/contas_receber/models/conta_receber.py on lines 71..74
estagio/contas_receber/models/parcela_conta_receber.py on lines 33..36
estagio/compra/models.py on lines 36..39
estagio/pessoal/models.py on lines 105..108
estagio/pessoal/models.py on lines 159..162
estagio/pessoal/models.py on lines 186..189
estagio/pessoal/models.py on lines 202..205
estagio/venda/models.py on lines 43..46
estagio/venda/models.py on lines 231..234

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

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

    class Meta(object):
        verbose_name = _(u"Entrega")
        verbose_name_plural = _(u"Entregas")
        permissions = ((u"pode_exportar_entregavenda", _(u"Exportar Entregas")),)
Severity: Major
Found in estagio/venda/models.py and 11 other locations - About 50 mins to fix
estagio/contas_pagar/models/conta_pagar.py on lines 71..74
estagio/contas_pagar/models/parcela_conta_pagar.py on lines 33..36
estagio/contas_receber/models/conta_receber.py on lines 71..74
estagio/contas_receber/models/parcela_conta_receber.py on lines 33..36
estagio/caixa/models.py on lines 160..163
estagio/compra/models.py on lines 36..39
estagio/pessoal/models.py on lines 105..108
estagio/pessoal/models.py on lines 159..162
estagio/pessoal/models.py on lines 186..189
estagio/pessoal/models.py on lines 202..205
estagio/venda/models.py on lines 43..46

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

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

    class Meta(object):
        verbose_name = _(u"Parcela de Conta a Receber")
        verbose_name_plural = _(u"Parcelas de Contas a Receber")
        permissions = ((u"pode_exportar_parcelascontasreceber", _(u"Exportar Parcelas de Contas a Receber")),)
Severity: Major
Found in estagio/contas_receber/models/parcela_conta_receber.py and 11 other locations - About 50 mins to fix
estagio/contas_pagar/models/conta_pagar.py on lines 71..74
estagio/contas_pagar/models/parcela_conta_pagar.py on lines 33..36
estagio/contas_receber/models/conta_receber.py on lines 71..74
estagio/caixa/models.py on lines 160..163
estagio/compra/models.py on lines 36..39
estagio/pessoal/models.py on lines 105..108
estagio/pessoal/models.py on lines 159..162
estagio/pessoal/models.py on lines 186..189
estagio/pessoal/models.py on lines 202..205
estagio/venda/models.py on lines 43..46
estagio/venda/models.py on lines 231..234

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

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language