osbzr/gooderp_addons

View on GitHub
sell/models/sell_delivery.py

Summary

Maintainability
F
3 days
Test Coverage

File sell_delivery.py has 586 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

from odoo import fields, models, api
import odoo.addons.decimal_precision as dp
import datetime
Severity: Major
Found in sell/models/sell_delivery.py - About 1 day to fix

    Function sell_delivery_draft has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
    Open

        def sell_delivery_draft(self):
            '''反审核销售发货单/退货单,更新本单的收款状态/退款状态,并删除生成的结算单、收款单及凭证'''
            if self.state == 'draft':
                raise UserError(u'请不要重复撤销')
            # 查找产生的收款单
    Severity: Minor
    Found in sell/models/sell_delivery.py - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function sell_delivery_done has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

        def sell_delivery_done(self):
            '''审核销售发货单/退货单,更新本单的收款状态/退款状态,并生成结算单和收款单'''
            for record in self:
                record._wrong_delivery_done()
                # 库存不足 生成零的
    Severity: Minor
    Found in sell/models/sell_delivery.py - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function sell_to_return has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

        def sell_to_return(self):
            '''销售发货单转化为销售退货单'''
            return_goods = {}
    
            return_order_draft = self.search([
    Severity: Minor
    Found in sell/models/sell_delivery.py - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    SellDelivery has 21 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class SellDelivery(models.Model):
        _name = 'sell.delivery'
        _inherits = {'wh.move': 'sell_move_id'}
        _inherit = ['mail.thread']
        _description = u'销售发货单'
    Severity: Minor
    Found in sell/models/sell_delivery.py - About 2 hrs to fix

      Function onchange_partner_id has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

          def onchange_partner_id(self):
              '''选择客户带出其默认地址信息'''
              if self.partner_id:
                  self.contact = self.partner_id.contact
                  self.mobile = self.partner_id.mobile
      Severity: Minor
      Found in sell/models/sell_delivery.py - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function _wrong_delivery_done has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

          def _wrong_delivery_done(self):
              '''审核时不合法的给出报错'''
              if self.state == 'done':
                  raise UserError(u'请不要重复发货')
              for line in self.line_in_ids:
      Severity: Minor
      Found in sell/models/sell_delivery.py - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function _get_sell_money_state has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          def _get_sell_money_state(self):
              '''返回收款状态'''
              if not self.is_return:
                  if self.invoice_id.reconciled == 0:
                      self.money_state = u'未收款'
      Severity: Minor
      Found in sell/models/sell_delivery.py - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function create_voucher has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          def create_voucher(self):
              '''
              销售发货单、退货单审核时生成会计凭证
              借:主营业务成本(核算分类上会计科目)
              贷:库存商品(商品分类上会计科目)
      Severity: Minor
      Found in sell/models/sell_delivery.py - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function onchange_warehouse_id has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

          def onchange_warehouse_id(self):
              '''当订单行的仓库变化时,带出定价策略中的折扣率'''
              if self.warehouse_id and self.goods_id:
                  partner_id = self.env.context.get('default_partner')
                  partner = self.env['partner'].browse(
      Severity: Minor
      Found in sell/models/sell_delivery.py - About 55 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function _line_qty_write has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

          def _line_qty_write(self):
              if self.order_id:
                  for line in self.line_in_ids:
                      if self.order_id.type == 'return':
                          line.sell_line_id.quantity_out += line.goods_qty
      Severity: Minor
      Found in sell/models/sell_delivery.py - About 55 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function _create_voucher_line has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def _create_voucher_line(self, account_id, debit, credit, voucher, goods_id, goods_qty):
      Severity: Minor
      Found in sell/models/sell_delivery.py - About 45 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 onchange_goods_id has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def onchange_goods_id(self):
                  '''当订单行的商品变化时,带出商品上的零售价,以及公司的销项税'''
                  self.ensure_one()
                  is_return = self.env.context.get('default_is_return')
                  if self.goods_id:
          Severity: Minor
          Found in sell/models/sell_delivery.py - About 35 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function auto_reconcile_sell_order has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def auto_reconcile_sell_order(self):
                  ''' 预收款与结算单自动核销 '''
                  all_delivery_amount = 0
                  for delivery in self.order_id.delivery_ids:
                      all_delivery_amount += delivery.amount
          Severity: Minor
          Found in sell/models/sell_delivery.py - About 35 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function _sell_amount_to_invoice has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              def _sell_amount_to_invoice(self):
                  '''销售费用产生结算单'''
                  invoice_id = False
                  if sum(cost_line.amount for cost_line in self.cost_line_ids) > 0:
                      for line in self.cost_line_ids:
          Severity: Minor
          Found in sell/models/sell_delivery.py - About 25 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Line too long (85 > 79 characters)
          Open

              address_id = fields.Many2one('partner.address', u'联系人地址', states=READONLY_STATES,
          Severity: Minor
          Found in sell/models/sell_delivery.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 (116 > 79 characters)
          Open

                      if self.partner_id.child_ids and not any([child.is_default_add for child in self.partner_id.child_ids]):
          Severity: Minor
          Found in sell/models/sell_delivery.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 (98 > 79 characters)
          Open

                          line.tax_rate = line.goods_id.get_tax_rate(line.goods_id, self.partner_id, 'sell')
          Severity: Minor
          Found in sell/models/sell_delivery.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 (117 > 79 characters)
          Open

                  if float_compare(self.receipt, self.amount + self.partner_cost, precision_digits=decimal_amount.digits) == 1:
          Severity: Minor
          Found in sell/models/sell_delivery.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

                                                        'this_reconcile': order.to_reconcile,
          Severity: Minor
          Found in sell/models/sell_delivery.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 (90 > 79 characters)
          Open

                                                    0, cost, voucher, line.goods_id, line.goods_qty)
          Severity: Minor
          Found in sell/models/sell_delivery.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

                      self._create_voucher_line(self.sell_move_id.finance_category_id.account_id,
          Severity: Minor
          Found in sell/models/sell_delivery.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

                      if invoice.to_reconcile == 0 and invoice.reconciled == invoice.amount:
          Severity: Minor
          Found in sell/models/sell_delivery.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

                                                                       ('type', '=', 'get'),
          Severity: Minor
          Found in sell/models/sell_delivery.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

                                                                                ('partner_id', '=',
          Severity: Minor
          Found in sell/models/sell_delivery.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 (105 > 79 characters)
          Open

                  voucher = self.env['voucher'].create({'date': self.date, 'ref': '%s,%s' % (self._name, self.id)})
          Severity: Minor
          Found in sell/models/sell_delivery.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 (97 > 79 characters)
          Open

                                                                       ('sell_id', '=', self.order_id.id)])
          Severity: Minor
          Found in sell/models/sell_delivery.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.

          At least two spaces before inline comment
          Open

                          line.money_id.money_order_draft() # 反审核收款单
          Severity: Minor
          Found in sell/models/sell_delivery.py by pep8

          Separate inline comments by at least two spaces.

          An inline comment is a comment on the same line as a statement.
          Inline comments should be separated by at least two spaces from the
          statement. They should start with a # and a single space.
          
          Each line of a block comment starts with a # and a single space
          (unless it is indented text inside the comment).
          
          Okay: x = x + 1  # Increment x
          Okay: x = x + 1    # Increment x
          Okay: # Block comment
          E261: x = x + 1 # Increment x
          E262: x = x + 1  #Increment x
          E262: x = x + 1  #  Increment x
          E265: #Block comment
          E266: ### Block comment

          Line too long (105 > 79 characters)
          Open

                          line.sell_line_id.write({'quantity_out':line.sell_line_id.quantity_out + line.goods_qty})
          Severity: Minor
          Found in sell/models/sell_delivery.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

              def _create_voucher_line(self, account_id, debit, credit, voucher, goods_id, goods_qty):
          Severity: Minor
          Found in sell/models/sell_delivery.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 (98 > 79 characters)
          Open

                              ((self.type == 'out' and not is_return) or (self.type == 'in' and is_return)):
          Severity: Minor
          Found in sell/models/sell_delivery.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

                                      line.partner_id, line.category_id, self.date, line.amount + line.tax, line.tax)
          Severity: Minor
          Found in sell/models/sell_delivery.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

                          if float_compare(amount - self.receipt + self.partner_id.receivable, self.partner_id.credit_limit,
          Severity: Minor
          Found in sell/models/sell_delivery.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.

          Missing whitespace after ':'
          Open

                          line.sell_line_id.write({'quantity_out':line.sell_line_id.quantity_out + line.goods_qty})
          Severity: Minor
          Found in sell/models/sell_delivery.py by pep8

          Each comma, semicolon or colon should be followed by whitespace.

          Okay: [a, b]
          Okay: (3,)
          Okay: a[1:4]
          Okay: a[:4]
          Okay: a[1:]
          Okay: a[1:4:2]
          E231: ['a','b']
          E231: foo(bar,baz)
          E231: [{'a':'b'}]

          Line too long (101 > 79 characters)
          Open

                      adv_pay_orders = self.env['money.order'].search([('partner_id', '=', self.partner_id.id),
          Severity: Minor
          Found in sell/models/sell_delivery.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

                                                                       ('state', '=', 'done'),
          Severity: Minor
          Found in sell/models/sell_delivery.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_reconcile',
          Severity: Minor
          Found in sell/models/sell_delivery.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

                                                                                 '!=', 0),
          Severity: Minor
          Found in sell/models/sell_delivery.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

                                                                                ('name', 'in', receive_source_name)])
          Severity: Minor
          Found in sell/models/sell_delivery.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

                                                        'to_reconcile': order.to_reconcile,
          Severity: Minor
          Found in sell/models/sell_delivery.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.

          Inline comment should start with '# '
          Open

                              'cost': line.cost,#退货取不到成本
          Severity: Minor
          Found in sell/models/sell_delivery.py by pep8

          Separate inline comments by at least two spaces.

          An inline comment is a comment on the same line as a statement.
          Inline comments should be separated by at least two spaces from the
          statement. They should start with a # and a single space.
          
          Each line of a block comment starts with a # and a single space
          (unless it is indented text inside the comment).
          
          Okay: x = x + 1  # Increment x
          Okay: x = x + 1    # Increment x
          Okay: # Block comment
          E261: x = x + 1 # Increment x
          E262: x = x + 1  #Increment x
          E262: x = x + 1  #  Increment x
          E265: #Block comment
          E266: ### Block comment

          Line too long (98 > 79 characters)
          Open

                  if self.order_id.received_amount and self.order_id.received_amount == all_delivery_amount:
          Severity: Minor
          Found in sell/models/sell_delivery.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

                                  amount, self.partner_id.receivable, self.receipt, self.partner_id.credit_limit))
          Severity: Minor
          Found in sell/models/sell_delivery.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

              def _get_invoice_vals(self, partner_id, category_id, date, amount, tax_amount):
          Severity: Minor
          Found in sell/models/sell_delivery.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.

          Missing whitespace after ':'
          Open

                              'tax_rate':line.tax_rate,
          Severity: Minor
          Found in sell/models/sell_delivery.py by pep8

          Each comma, semicolon or colon should be followed by whitespace.

          Okay: [a, b]
          Okay: (3,)
          Okay: a[1:4]
          Okay: a[:4]
          Okay: a[1:]
          Okay: a[1:4:2]
          E231: ['a','b']
          E231: foo(bar,baz)
          E231: [{'a':'b'}]

          Line too long (106 > 79 characters)
          Open

                      receive_source_orders = self.env['money.invoice'].search([('category_id.type', '=', 'income'),
          Severity: Minor
          Found in sell/models/sell_delivery.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.

          At least two spaces before inline comment
          Open

                              'cost': line.cost,#退货取不到成本
          Severity: Minor
          Found in sell/models/sell_delivery.py by pep8

          Separate inline comments by at least two spaces.

          An inline comment is a comment on the same line as a statement.
          Inline comments should be separated by at least two spaces from the
          statement. They should start with a # and a single space.
          
          Each line of a block comment starts with a # and a single space
          (unless it is indented text inside the comment).
          
          Okay: x = x + 1  # Increment x
          Okay: x = x + 1    # Increment x
          Okay: # Block comment
          E261: x = x + 1 # Increment x
          E262: x = x + 1  #Increment x
          E262: x = x + 1  #  Increment x
          E265: #Block comment
          E266: ### Block comment

          Line too long (91 > 79 characters)
          Open

                                                                                 self.partner_id.id),
          Severity: Minor
          Found in sell/models/sell_delivery.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