Trust-Code/odoo-brasil

View on GitHub

Showing 421 of 421 total issues

Avoid too many return statements within this function.
Open

            return Itau240
Severity: Major
Found in br_cnab/febraban/cnab_240/cnab_240.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return Cnab240
    Severity: Major
    Found in br_cnab/febraban/cnab_240/cnab_240.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return rule_points
      Severity: Major
      Found in br_account/models/account_fiscal_position.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return nova_ie == inscr_est_ints
        Severity: Major
        Found in br_base/tools/fiscal.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return santander
          Severity: Major
          Found in br_cnab/wizard/wizard_import_cnab.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                        return Santander240
            Severity: Major
            Found in br_cnab/febraban/cnab_240/cnab_240.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                              return -1
              Severity: Major
              Found in br_account/models/account_fiscal_position.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return int(nosso_numero[10:])
                Severity: Major
                Found in br_cnab/wizard/wizard_import_cnab.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return {
                  Severity: Major
                  Found in br_nfse/models/account_invoice.py - About 30 mins to fix

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

                            price = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
                    Severity: Major
                    Found in br_point_sale/models/pos_order.py and 6 other locations - About 30 mins to fix
                    br_account/models/account_invoice.py on lines 337..338
                    br_account/models/account_invoice.py on lines 390..390
                    br_account/models/account_invoice_line.py on lines 68..68
                    br_point_sale/models/pos_order.py on lines 287..287
                    br_purchase/models/purchase.py on lines 79..79
                    br_sale/models/sale.py on lines 84..84

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

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

                                price = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
                    Severity: Major
                    Found in br_point_sale/models/pos_order.py and 6 other locations - About 30 mins to fix
                    br_account/models/account_invoice.py on lines 337..338
                    br_account/models/account_invoice.py on lines 390..390
                    br_account/models/account_invoice_line.py on lines 68..68
                    br_point_sale/models/pos_order.py on lines 216..216
                    br_purchase/models/purchase.py on lines 79..79
                    br_sale/models/sale.py on lines 84..84

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

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

                            price = self.price_unit * (1 - (self.discount or 0.0) / 100.0)
                    Severity: Major
                    Found in br_account/models/account_invoice_line.py and 6 other locations - About 30 mins to fix
                    br_account/models/account_invoice.py on lines 337..338
                    br_account/models/account_invoice.py on lines 390..390
                    br_point_sale/models/pos_order.py on lines 216..216
                    br_point_sale/models/pos_order.py on lines 287..287
                    br_purchase/models/purchase.py on lines 79..79
                    br_sale/models/sale.py on lines 84..84

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

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

                                price = line.price_unit * (1 - (
                                    line.discount or 0.0) / 100.0)
                    Severity: Major
                    Found in br_account/models/account_invoice.py and 6 other locations - About 30 mins to fix
                    br_account/models/account_invoice.py on lines 390..390
                    br_account/models/account_invoice_line.py on lines 68..68
                    br_point_sale/models/pos_order.py on lines 216..216
                    br_point_sale/models/pos_order.py on lines 287..287
                    br_purchase/models/purchase.py on lines 79..79
                    br_sale/models/sale.py on lines 84..84

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

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

                                price_unit = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
                    Severity: Major
                    Found in br_account/models/account_invoice.py and 6 other locations - About 30 mins to fix
                    br_account/models/account_invoice.py on lines 337..338
                    br_account/models/account_invoice_line.py on lines 68..68
                    br_point_sale/models/pos_order.py on lines 216..216
                    br_point_sale/models/pos_order.py on lines 287..287
                    br_purchase/models/purchase.py on lines 79..79
                    br_sale/models/sale.py on lines 84..84

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

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

                                price = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
                    Severity: Major
                    Found in br_sale/models/sale.py and 6 other locations - About 30 mins to fix
                    br_account/models/account_invoice.py on lines 337..338
                    br_account/models/account_invoice.py on lines 390..390
                    br_account/models/account_invoice_line.py on lines 68..68
                    br_point_sale/models/pos_order.py on lines 216..216
                    br_point_sale/models/pos_order.py on lines 287..287
                    br_purchase/models/purchase.py on lines 79..79

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

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

                                price = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
                    Severity: Major
                    Found in br_purchase/models/purchase.py and 6 other locations - About 30 mins to fix
                    br_account/models/account_invoice.py on lines 337..338
                    br_account/models/account_invoice.py on lines 390..390
                    br_account/models/account_invoice_line.py on lines 68..68
                    br_point_sale/models/pos_order.py on lines 216..216
                    br_point_sale/models/pos_order.py on lines 287..287
                    br_sale/models/sale.py on lines 84..84

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

                    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

                        cr_categ = fields.Selection([('estagiario', u'Estagiário'),
                                                     ('junior', u'Júnior'),
                                                     ('pleno', 'Pleno'),
                                                     ('senior', u'Sênior')],
                    Severity: Minor
                    Found in br_hr/model/hr_employee.py and 1 other location - About 30 mins to fix
                    br_boleto/models/payment_order.py on lines 84..85

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

                    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

                            return '0' if (resto == 1 or resto == 0) else 11 - resto
                    Severity: Minor
                    Found in br_cnab/febraban/cnab_240/bancos/sicredi.py and 1 other location - About 30 mins to fix
                    br_cnab/febraban/cnab_240/bancos/sicoob.py on lines 50..50

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

                    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 self.fiscal_position_id and self.fiscal_position_id.account_id:
                                res['account_id'] = self.fiscal_position_id.account_id.id
                    Severity: Major
                    Found in br_sale/models/sale.py and 3 other locations - About 30 mins to fix
                    br_purchase/models/purchase.py on lines 32..33
                    br_purchase/models/purchase.py on lines 34..35
                    br_sale/models/sale.py on lines 35..36

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

                    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 self.fiscal_position_id and self.fiscal_position_id.journal_id:
                                res['journal_id'] = self.fiscal_position_id.journal_id.id
                    Severity: Major
                    Found in br_sale/models/sale.py and 3 other locations - About 30 mins to fix
                    br_purchase/models/purchase.py on lines 32..33
                    br_purchase/models/purchase.py on lines 34..35
                    br_sale/models/sale.py on lines 33..34

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 32.

                    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