osbzr/gooderp_addons

View on GitHub
scm/models/stock_request.py

Summary

Maintainability
F
4 days
Test Coverage

Function stock_query has a Cognitive Complexity of 107 (exceeds 5 allowed). Consider refactoring.
Open

    def stock_query(self):
        ''' 点击 查询库存 按钮 生成补货申请行
                                    每行一个商品一个属性的 数量,补货数量
         '''
        goods = self.env['goods'].search([('no_stock', '=', False)])
Severity: Minor
Found in scm/models/stock_request.py - About 2 days 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 stock_request_done has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
Open

    def stock_request_done(self):
        if self.state == 'done':
            raise UserError(u'请不要重复确认')
        todo_buy_lines = []  # 待生成购货订单
        todo_produce_lines = []  # 待生成组装单
Severity: Minor
Found in scm/models/stock_request.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

File stock_request.py has 295 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

from odoo import tools
import odoo.addons.decimal_precision as dp
from odoo import models, fields, api
Severity: Minor
Found in scm/models/stock_request.py - About 3 hrs to fix

    Consider simplifying this complex logical expression.
    Open

                if good.attribute_ids:  # 商品存在属性
                    for attribute in good.attribute_ids:
                        qty = attribute in attribute_dict and attribute_dict[attribute] or 0
                        to_sell_qty = attribute in to_sell_dict and to_sell_dict[attribute] or 0
                        to_delivery_qty = attribute in to_delivery_dict and to_delivery_dict[
    Severity: Critical
    Found in scm/models/stock_request.py - About 2 hrs to fix

      Avoid deeply nested control flow statements.
      Open

                              if wh_move_line.attribute_id:  # 商品存在属性
                                  if not to_delivery_dict.has_key(wh_move_line.attribute_id):
                                      to_delivery_dict.update(
                                          {wh_move_line.attribute_id: wh_move_line.goods_qty})
                                  else:
      Severity: Major
      Found in scm/models/stock_request.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if is_buy:
                                    todo_buy_lines.append(request_line_ids)
                                else:
                                    todo_produce_lines.append(request_line_ids)
        
        
        Severity: Major
        Found in scm/models/stock_request.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if bom_line:
                                      is_buy = False
                                  else:
                                      is_buy = True
          
          
          Severity: Major
          Found in scm/models/stock_request.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if wh_move_line.attribute_id:  # 商品存在属性
                                        if wh_move_line.attribute_id not in attribute_dict:
                                            attribute_dict.update(
                                                {wh_move_line.attribute_id: wh_move_line.qty_remaining})
                                        else:
            Severity: Major
            Found in scm/models/stock_request.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if wh_move_line.attribute_id:  # 商品存在属性
                                          if not to_receipt_dict.has_key(wh_move_line.attribute_id):
                                              to_receipt_dict.update(
                                                  {wh_move_line.attribute_id: wh_move_line.goods_qty})
                                          else:
              Severity: Major
              Found in scm/models/stock_request.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        for line_in in assembly.line_in_ids:
                                            line_in.attribute_id = line.attribute_id
                
                
                Severity: Major
                Found in scm/models/stock_request.py - About 45 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

                    Line too long (100 > 79 characters)
                    Open

                                                    to_receipt_dict[wh_move_line.attribute_id] += wh_move_line.goods_qty
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (88 > 79 characters)
                    Open

                                                        {wh_move_line.attribute_id: wh_move_line.goods_qty})
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (82 > 79 characters)
                    Open

                                            request_line_ids = self.env['stock.request.line'].create({
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (100 > 79 characters)
                    Open

                                    buy_order = self.env['buy.order'].with_context(warehouse_dest_type='stock').create({
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (92 > 79 characters)
                    Open

                                                        {wh_move_line.attribute_id: wh_move_line.qty_remaining})
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (80 > 79 characters)
                    Open

                                                                           ('type', '=', 'parent')])
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (89 > 79 characters)
                    Open

                                        to_delivery_qty = attribute in to_delivery_dict and to_delivery_dict[
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (107 > 79 characters)
                    Open

                                            bom_line = self.env['wh.bom.line'].search([('goods_id', '=', line_out.goods_id.id),
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (82 > 79 characters)
                    Open

                                                                                       ('bom_id.type',
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (101 > 79 characters)
                    Open

                                                                                       ('order_id.state', '=', 'draft')])
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (83 > 79 characters)
                    Open

                                        if wh_move_line.warehouse_dest_id.type == 'stock':  # 目的库位为库存库位
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (94 > 79 characters)
                    Open

                                sell_order_lines = self.env['sell.order.line'].search([('goods_id', '=', good.id),
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (119 > 79 characters)
                    Open

                                                'supplier_id': line_out.goods_id.supplier_id and line_out.goods_id.supplier_id.id or False,
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (108 > 79 characters)
                    Open

                                                    % (line.supplier_id.name, line.goods_id.name, line.attribute_id.name or ''))
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (84 > 79 characters)
                    Open

                                                                               ('type', '=', 'parent')])
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (109 > 79 characters)
                    Open

                                                                                    ('attribute_id', '=', line.attribute_id.id)])
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    .has_key() is deprecated, use 'in'
                    Open

                                                if not to_receipt_dict.has_key(wh_move_line.attribute_id):
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    The {}.has_key() method is removed in Python 3: use the 'in' operator.

                    Okay: if "alph" in d:\n    print d["alph"]
                    W601: assert d.has_key('alph')

                    Line too long (99 > 79 characters)
                    Open

                                                                                     ('order_id.state', '=', 'draft')])
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (92 > 79 characters)
                    Open

                                                                                       ('type', '=', 'parent')])
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (81 > 79 characters)
                    Open

                                                                                    ('goods_id', '=',
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (86 > 79 characters)
                    Open

                                                if not to_receipt_dict.has_key(wh_move_line.attribute_id):
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (83 > 79 characters)
                    Open

                                                                                     line.goods_id.id),
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (87 > 79 characters)
                    Open

                                                if not to_delivery_dict.has_key(wh_move_line.attribute_id):
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    .has_key() is deprecated, use 'in'
                    Open

                                        if not to_buy_dict.has_key(line.attribute_id):
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    The {}.has_key() method is removed in Python 3: use the 'in' operator.

                    Okay: if "alph" in d:\n    print d["alph"]
                    W601: assert d.has_key('alph')

                    Line too long (82 > 79 characters)
                    Open

                                bom_line = self.env['wh.bom.line'].search([('goods_id', '=', good.id),
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (88 > 79 characters)
                    Open

                                        qty = attribute in attribute_dict and attribute_dict[attribute] or 0
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (93 > 79 characters)
                    Open

                                                'supplier_id': good.supplier_id and good.supplier_id.id or False,
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (82 > 79 characters)
                    Open

                                                                                    ('order_id.state',
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (92 > 79 characters)
                    Open

                                buy_order_lines = self.env['buy.order.line'].search([('goods_id', '=', good.id),
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (89 > 79 characters)
                    Open

                                        to_buy_qty = attribute in to_buy_dict and to_buy_dict[attribute] or 0
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (114 > 79 characters)
                    Open

                                buy_order_line = self.env['buy.order.line'].search([('order_id.partner_id', '=', line.supplier_id.id),
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    .has_key() is deprecated, use 'in'
                    Open

                                                if not to_delivery_dict.has_key(wh_move_line.attribute_id):
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    The {}.has_key() method is removed in Python 3: use the 'in' operator.

                    Okay: if "alph" in d:\n    print d["alph"]
                    W601: assert d.has_key('alph')

                    Line too long (101 > 79 characters)
                    Open

                                                    to_delivery_dict[wh_move_line.attribute_id] += wh_move_line.goods_qty
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (85 > 79 characters)
                    Open

                                                                                        '=', 'assembly'),
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (103 > 79 characters)
                    Open

                                                    attribute_dict[wh_move_line.attribute_id] += wh_move_line.qty_remaining
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (88 > 79 characters)
                    Open

                                                        {wh_move_line.attribute_id: wh_move_line.goods_qty})
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (92 > 79 characters)
                    Open

                                        to_sell_qty = attribute in to_sell_dict and to_sell_dict[attribute] or 0
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (86 > 79 characters)
                    Open

                                        to_receipt_qty = attribute in to_receipt_dict and to_receipt_dict[
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (80 > 79 characters)
                    Open

                                'attribute_id': line.attribute_id and line.attribute_id.id or False,
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (104 > 79 characters)
                    Open

                                                'attribute_id': line_out.attribute_id and line_out.attribute_id.id or False,
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (95 > 79 characters)
                    Open

                                buy_order = self.env['buy.order'].search([('partner_id', '=', line.supplier_id.id),
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    .has_key() is deprecated, use 'in'
                    Open

                                        if not to_sell_dict.has_key(line.attribute_id):
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    The {}.has_key() method is removed in Python 3: use the 'in' operator.

                    Okay: if "alph" in d:\n    print d["alph"]
                    W601: assert d.has_key('alph')

                    Line too long (89 > 79 characters)
                    Open

                                            'supplier_id': good.supplier_id and good.supplier_id.id or False,
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    Line too long (95 > 79 characters)
                    Open

                                    bom_line = self.env['wh.bom.line'].search([('goods_id', '=', line.goods_id.id),
                    Severity: Minor
                    Found in scm/models/stock_request.py by pep8

                    Limit all lines to a maximum of 79 characters.

                    There are still many devices around that are limited to 80 character
                    lines; plus, limiting windows to 80 characters makes it possible to
                    have several windows side-by-side.  The default wrapping on such
                    devices looks ugly.  Therefore, please limit all lines to a maximum
                    of 79 characters. For flowing long blocks of text (docstrings or
                    comments), limiting the length to 72 characters is recommended.
                    
                    Reports error E501.

                    There are no issues that match your filters.

                    Category
                    Status