fix pep8 W503
parent
d0f1e0e067
commit
3f6bf8eaea
|
@ -34,8 +34,9 @@ class CompanyLDAPGroupMapping(orm.Model):
|
|||
operators = []
|
||||
members = inspect.getmembers(
|
||||
users_ldap_groups_operators,
|
||||
lambda cls: inspect.isclass(cls)
|
||||
and cls != users_ldap_groups_operators.LDAPOperator)
|
||||
lambda cls:
|
||||
inspect.isclass(cls) and
|
||||
cls != users_ldap_groups_operators.LDAPOperator)
|
||||
for name, operator in members:
|
||||
operators.append((name, name))
|
||||
return tuple(operators)
|
||||
|
|
|
@ -96,8 +96,9 @@ class CleanupPurgeWizardColumn(orm.TransientModel):
|
|||
columns = list(set([
|
||||
column for model_pool in model_pools
|
||||
for column in model_pool._columns
|
||||
if not (isinstance(model_pool._columns[column], fields.function)
|
||||
and not model_pool._columns[column].store)
|
||||
if not (isinstance(model_pool._columns[column],
|
||||
fields.function) and
|
||||
not model_pool._columns[column].store)
|
||||
]))
|
||||
columns += orm.MAGIC_COLUMNS
|
||||
columns += self.blacklist.get(model_pools[0]._table, [])
|
||||
|
|
|
@ -110,9 +110,9 @@ class CleanupPurgeWizardTable(orm.TransientModel):
|
|||
known_tables += [
|
||||
column._sql_names(model_pool)[0]
|
||||
for column in model_pool._columns.values()
|
||||
if column._type == 'many2many'
|
||||
# unstored function fields of type m2m don't have _rel
|
||||
and hasattr(column, '_rel')
|
||||
if (column._type == 'many2many' and
|
||||
hasattr(column, '_rel')) # unstored function fields of
|
||||
# type m2m don't have _rel
|
||||
]
|
||||
|
||||
# Cannot pass table names as a psycopg argument
|
||||
|
|
|
@ -31,8 +31,9 @@ class IrModelFields(orm.Model):
|
|||
count=False):
|
||||
model_domain = []
|
||||
for domain in args:
|
||||
if (len(domain) > 2 and domain[0] == 'model_id'
|
||||
and isinstance(domain[2], basestring)):
|
||||
if (len(domain) > 2 and
|
||||
domain[0] == 'model_id' and
|
||||
isinstance(domain[2], basestring)):
|
||||
model_domain += [
|
||||
('model_id', 'in', map(int, domain[2][1:-1].split(',')))
|
||||
]
|
||||
|
|
|
@ -93,8 +93,8 @@ class MassObject(orm.Model):
|
|||
'model': src_obj,
|
||||
'key2': 'client_action_multi',
|
||||
'value': (
|
||||
"ir.actions.act_window,"
|
||||
+ str(vals['ref_ir_act_window'])),
|
||||
"ir.actions.act_window," +
|
||||
str(vals['ref_ir_act_window'])),
|
||||
'object': True,
|
||||
},
|
||||
context)
|
||||
|
|
|
@ -67,8 +67,8 @@ class MassEditingWizard(orm.TransientModel):
|
|||
etree.SubElement(xml_group, 'field', {
|
||||
'name': field.name, 'colspan': '4', 'nolabel': '1',
|
||||
'attrs': (
|
||||
"{'invisible':[('selection__"
|
||||
+ field.name + "','=','remove_m2m')]}")})
|
||||
"{'invisible':[('selection__" +
|
||||
field.name + "','=','remove_m2m')]}")})
|
||||
elif field.ttype == "one2many":
|
||||
all_fields["selection__" + field.name] = {
|
||||
'type': 'selection',
|
||||
|
@ -82,8 +82,8 @@ class MassEditingWizard(orm.TransientModel):
|
|||
etree.SubElement(xml_group, 'field', {
|
||||
'name': field.name, 'colspan': '4', 'nolabel': '1',
|
||||
'attrs': (
|
||||
"{'invisible':[('selection__"
|
||||
+ field.name + "','=','remove_o2m')]}")})
|
||||
"{'invisible':[('selection__" +
|
||||
field.name + "','=','remove_o2m')]}")})
|
||||
elif field.ttype == "many2one":
|
||||
all_fields["selection__" + field.name] = {
|
||||
'type': 'selection',
|
||||
|
@ -97,8 +97,8 @@ class MassEditingWizard(orm.TransientModel):
|
|||
etree.SubElement(xml_group, 'field', {
|
||||
'name': field.name, 'nolabel': '1', 'colspan': '2',
|
||||
'attrs': (
|
||||
"{'invisible':[('selection__"
|
||||
+ field.name + "','=','remove')]}")})
|
||||
"{'invisible':[('selection__" +
|
||||
field.name + "','=','remove')]}")})
|
||||
elif field.ttype == "char":
|
||||
all_fields["selection__" + field.name] = {
|
||||
'type': 'selection',
|
||||
|
@ -114,8 +114,8 @@ class MassEditingWizard(orm.TransientModel):
|
|||
etree.SubElement(xml_group, 'field', {
|
||||
'name': field.name, 'nolabel': '1',
|
||||
'attrs': (
|
||||
"{'invisible':[('selection__"
|
||||
+ field.name + "','=','remove')]}"),
|
||||
"{'invisible':[('selection__" +
|
||||
field.name + "','=','remove')]}"),
|
||||
'colspan': '2'})
|
||||
elif field.ttype == 'selection':
|
||||
all_fields["selection__" + field.name] = {
|
||||
|
@ -127,8 +127,8 @@ class MassEditingWizard(orm.TransientModel):
|
|||
etree.SubElement(xml_group, 'field', {
|
||||
'name': field.name, 'nolabel': '1', 'colspan': '2',
|
||||
'attrs': (
|
||||
"{'invisible':[('selection__"
|
||||
+ field.name + "','=','remove')]}")})
|
||||
"{'invisible':[('selection__" +
|
||||
field.name + "','=','remove')]}")})
|
||||
all_fields[field.name] = {
|
||||
'type': field.ttype,
|
||||
'string': field.field_description,
|
||||
|
@ -152,8 +152,8 @@ class MassEditingWizard(orm.TransientModel):
|
|||
etree.SubElement(xml_group, 'field', {
|
||||
'name': field.name, 'colspan': '4', 'nolabel': '1',
|
||||
'attrs': (
|
||||
"{'invisible':[('selection__"
|
||||
+ field.name + "','=','remove')]}")})
|
||||
"{'invisible':[('selection__" +
|
||||
field.name + "','=','remove')]}")})
|
||||
else:
|
||||
all_fields["selection__" + field.name] = {
|
||||
'type': 'selection',
|
||||
|
@ -166,8 +166,8 @@ class MassEditingWizard(orm.TransientModel):
|
|||
etree.SubElement(xml_group, 'field', {
|
||||
'name': field.name, 'nolabel': '1',
|
||||
'attrs': (
|
||||
"{'invisible':[('selection__"
|
||||
+ field.name + "','=','remove')]}"),
|
||||
"{'invisible':[('selection__" +
|
||||
field.name + "','=','remove')]}"),
|
||||
'colspan': '2', })
|
||||
etree.SubElement(
|
||||
xml_form, 'separator', {'string': '', 'colspan': '4'})
|
||||
|
|
|
@ -108,7 +108,8 @@ class _Defaults(dict):
|
|||
__slots__ = ()
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
func = lambda *a: str(value)
|
||||
def func(*a):
|
||||
return str(value)
|
||||
return dict.__setitem__(self, key, func)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue