osbzr/gooderp_addons

View on GitHub

Showing 391 of 2,652 total issues

Consider simplifying this complex logical expression.
Open

        if ( !(/(SELECT|INPUT|TEXTAREA)/i).test(target.tagName) ) {
            // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
            // initMouseEvent is deprecated.
            ev = document.createEvent(window.MouseEvent ? 'MouseEvents' : 'Event');
            ev.initEvent('click', true, true);
Severity: Major
Found in backend_theme/static/lib/js/iscroll-probe.5.2.0.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

                    if bom_line:
                        assembly = self.env['wh.assembly'].create({
                            'bom_id': bom_line.bom_id.id,
                            'goods_qty': 0,
                        })
    Severity: Major
    Found in scm/models/stock_request.py - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

              if 'staff_id' in init_values and record.staff_id:
                  return 'staff_hire.mt_applicant_hired'
              elif 'stage_id' in init_values and record.stage_id and record.stage_id.sequence <= 1:
                  return 'staff_hire.mt_applicant_new'
              elif 'stage_id' in init_values and record.stage_id and record.stage_id.sequence > 1:
      Severity: Major
      Found in staff_hire/models/staff_hire.py - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                if context.get('line_ids'):
                    for move_line_dict in move_obj.resolve_2many_commands('line_ids', context.get('line_ids')):
                        data['name'] = data.get('name') or move_line_dict.get('name')
                        total += move_line_dict.get('debit', 0.0) - \
                            move_line_dict.get('credit', 0.0)
        Severity: Major
        Found in finance/models/finance.py - About 40 mins to fix

          Function create has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def create(self, cr, uid, ids, data, context=None):
          Severity: Minor
          Found in report_docx/report/report_docx.py - About 35 mins to fix

            Function create_source_docx has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def create_source_docx(self, cr, uid, ids, report, context=None):
            Severity: Minor
            Found in report_docx/report/report_docx.py - About 35 mins to fix

              Function _get_invoice_vals has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def _get_invoice_vals(self, partner_id, category_id, date, amount, tax_amount):
              Severity: Minor
              Found in sell/models/sell_delivery.py - About 35 mins to fix

                Function picture has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def picture(ctx, data, width=None, height=None, align=None):
                Severity: Minor
                Found in report_docx/report/report_helper.py - About 35 mins to fix

                  Function create_money_order_get_voucher has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def create_money_order_get_voucher(self, line_ids, source_ids, partner, name, note):
                  Severity: Minor
                  Found in money/models/money_order.py - About 35 mins to fix

                    Function get_docx_data has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def get_docx_data(self, cr, uid, ids, report, context):
                    Severity: Minor
                    Found in report_docx/report/report_docx.py - About 35 mins to fix

                      Function scrollToElement has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          scrollToElement: function (el, time, offsetX, offsetY, easing) {
                      Severity: Minor
                      Found in backend_theme/static/lib/js/iscroll-probe.5.2.0.js - About 35 mins to fix

                        Function get_suggested_cost_by_warehouse has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def get_suggested_cost_by_warehouse(
                        Severity: Minor
                        Found in warehouse/models/goods.py - About 35 mins to fix

                          Function scan_barcode_inventory_operation has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def scan_barcode_inventory_operation(self, move, att, conversion, goods, val):
                          Severity: Minor
                          Found in warehouse/models/warehouse_move.py - About 35 mins to fix

                            Function create_credit_line has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def create_credit_line(self, voucher, name, account, credit, auxiliary_id):
                            Severity: Minor
                            Found in staff_wages/models/staff_wages.py - About 35 mins to fix

                              Function scan_barcode_each_model_operation has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def scan_barcode_each_model_operation(self, model_name, order_id, att, goods, conversion):
                              Severity: Minor
                              Found in warehouse/models/warehouse_move.py - About 35 mins to fix

                                Function create has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    def create(self, cr, uid, ids, data, context=None):
                                Severity: Minor
                                Found in money/report/supplier_statements.py - About 35 mins to fix

                                  Function scan_barcode_move_in_out_operation has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      def scan_barcode_move_in_out_operation(self, move, att, conversion, goods, val):
                                  Severity: Minor
                                  Found in warehouse/models/warehouse_move.py - About 35 mins to fix

                                    Function customer_statement_report has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        def customer_statement_report(self, cr, uid, ids, report_id, context=None):
                                    Severity: Minor
                                    Found in money/report/supplier_statements.py - About 35 mins to fix

                                      Function create_matching has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          def create_matching(self, line_in_id, line_out_id, qty, uos_qty, expiration_date):
                                      Severity: Minor
                                      Found in warehouse/models/move_matching.py - About 35 mins to fix

                                        Function create_money_order_pay_voucher has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            def create_money_order_pay_voucher(self, line_ids, source_ids, partner, name, note):
                                        Severity: Minor
                                        Found in money/models/money_order.py - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language