Fix most flake8 errors

review8771002
This commit is contained in:
Cédric Krier committed 2014-12-02 12:56:04 +01:00
1 parent 486006e8ff
commit 994bd8a103
11 files changed
+29 -27

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of this
#repository contains the full copyright notices and license terms.
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.pool import Pool
from .location import *
+3 -3
View File
@@ -1,7 +1,7 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.model import ModelView, ModelSQL, ModelSingleton, fields
from trytond.pyson import Eval, Get
from trytond.pyson import Eval
__all__ = ['Configuration']
+2 -2
View File
@@ -1,5 +1,5 @@
#This file is part of Tryton. The COPYRIGHT file at the top level
#of this repository contains the full copyright notices and license terms.
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from sql import Null
from trytond.model import Workflow, ModelView, ModelSQL, fields
+2 -2
View File
@@ -1,5 +1,5 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import datetime
from decimal import Decimal
from trytond.model import ModelView, ModelSQL, fields
+4 -3
View File
@@ -1,5 +1,5 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import datetime
import operator
from decimal import Decimal
@@ -224,7 +224,8 @@ class Move(Workflow, ModelSQL, ModelView):
'readonly': Not(Equal(Eval('state'), 'draft')),
},
depends=['unit_price_required', 'state'])
unit_price_required = fields.Function(fields.Boolean('Unit Price Required'),
unit_price_required = fields.Function(
fields.Boolean('Unit Price Required'),
'on_change_with_unit_price_required')
@classmethod
+3 -3
View File
@@ -1,8 +1,8 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from itertools import chain
from trytond.model import Workflow, ModelView, ModelSQL, fields
from trytond.pyson import Equal, Eval, If, In, Get
from trytond.pyson import Equal, Eval, If, In
from trytond.transaction import Transaction
from trytond.pool import Pool
from trytond.tools import grouped_slice
+2 -2
View File
@@ -1,5 +1,5 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import datetime
from decimal import Decimal
+2 -2
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from setuptools import setup
import re
+5 -4
View File
@@ -1,5 +1,5 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import operator
import itertools
import datetime
@@ -12,7 +12,7 @@ from trytond.model import Workflow, ModelView, ModelSQL, fields
from trytond.modules.company import CompanyReport
from trytond.wizard import Wizard, StateTransition, StateView, Button
from trytond import backend
from trytond.pyson import Eval, Not, Equal, If, Or, And, Bool, In, Get, Id
from trytond.pyson import Eval, Not, Equal, If, Or, And, Bool, In, Id
from trytond.transaction import Transaction
from trytond.pool import Pool, PoolMeta
from trytond.tools import reduce_ids, grouped_slice
@@ -1033,6 +1033,7 @@ class ShipmentOut(Workflow, ModelSQL, ModelView):
def get_origins(self, name):
return ', '.join(set(itertools.ifilter(None,
(m.origin_name for m in self.moves))))
@classmethod
@ModelView.button
@Workflow.transition('draft')
@@ -1160,7 +1161,7 @@ class ShipmentOut(Workflow, ModelSQL, ModelView):
if to_create:
Move.save(to_create)
#Re-read the shipment and remove exceeding quantities
# Re-read the shipment and remove exceeding quantities
for move in shipment.outgoing_moves:
if move.state == 'cancel':
continue
+2 -2
View File
@@ -1,5 +1,5 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from .test_stock import suite
+2 -2
View File
@@ -1,5 +1,5 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import unittest
import doctest
import datetime