Browse Source

Merge pull request #71 from grap/7.0-fix_pep8

[7.0] [FIX] Pep8 (various modules)
pull/74/head
Sandy 10 years ago
parent
commit
cb16c9ad89
  1. 2
      cron_run_manually/__openerp__.py
  2. 2
      fetchmail_attach_from_folder/match_algorithm/email_domain.py
  3. 2
      fetchmail_attach_from_folder/wizard/attach_mail_manually.py
  4. 5
      import_odbc/import_odbc.py
  5. 5
      server_environment/serv_config.py
  6. 5
      super_calendar/super_calendar.py
  7. 3
      users_ldap_groups/users_ldap_groups_operators.py

2
cron_run_manually/__openerp__.py

@ -34,4 +34,4 @@ of the scheduler.
'depends': ['base'],
'data': ['view/ir_cron.xml'],
'installable': True,
}
}

2
fetchmail_attach_from_folder/match_algorithm/email_domain.py

@ -40,6 +40,6 @@ class email_domain(email_exact):
self._get_mailaddress_search_domain(
conf, mail_message,
operator='like',
values=['%@'+domain for domain in set(domains)]),
values=['%@' + domain for domain in set(domains)]),
order=conf.model_order)
return ids

2
fetchmail_attach_from_folder/wizard/attach_mail_manually.py

@ -74,7 +74,7 @@ class attach_mail_manually(TransientModel):
'msgid': msgid,
'subject': mail_message.get('subject', ''),
'date': mail_message.get('date', ''),
'object_id': folder.model_id.model+',False'
'object_id': folder.model_id.model + ',False'
}))
connection.close()

5
import_odbc/import_odbc.py

@ -67,8 +67,7 @@ class import_odbc_dbtable(orm.Model):
'last_log': fields.text('Last run log', readonly=True),
'ignore_rel_errors': fields.boolean(
'Ignore relationship errors',
help="On error try to reimport rows ignoring relationships."
),
help="On error try to reimport rows ignoring relationships."),
'raise_import_errors': fields.boolean(
'Raise import errors',
help="Import errors not handled, intended for debugging purposes."
@ -95,7 +94,7 @@ class import_odbc_dbtable(orm.Model):
+ ': '
+ obj_id.split('_')[-1])
if ': .' in msg and not rel_id:
rel_id = msg[msg.find(': .')+3:]
rel_id = msg[msg.find(': .') + 3:]
if '_id_' in rel_id:
rel_id = ('.'.join(rel_id.split('_')[:-2])
+ ': '

5
server_environment/serv_config.py

@ -172,8 +172,9 @@ class ServerConfiguration(orm.TransientModel):
arch += '</notebook></form>'
self._arch = etree.fromstring(arch)
def fields_view_get(self, cr, uid, view_id=None, view_type='form',
context=None, toolbar=False, submenu=False):
def fields_view_get(
self, cr, uid, view_id=None, view_type='form', context=None,
toolbar=False, submenu=False):
"""Overwrite the default method to render the custom view."""
res = super(ServerConfiguration, self).fields_view_get(cr, uid,
view_id,

5
super_calendar/super_calendar.py

@ -125,7 +125,7 @@ class super_calendar_configurator(orm.Model):
False
),
'configurator_id': configurator.id,
'res_id': line.name.model+','+str(record['id']),
'res_id': line.name.model + ',' + str(record['id']),
'model_id': line.name.id,
}
return super_calendar_values
@ -149,8 +149,7 @@ class super_calendar_configurator_line(orm.Model):
'description_code': fields.text(
'Description field',
help="Use '${o}' to refer to the involved object. "
"E.g.: '${o.project_id.name}'"
),
"E.g.: '${o.project_id.name}'"),
'date_start_field_id': fields.many2one(
'ir.model.fields', 'Start date field',
domain="['&','|',('ttype', '=', 'datetime'),"

3
users_ldap_groups/users_ldap_groups_operators.py

@ -57,8 +57,7 @@ class query(LDAPOperator):
logger):
query_string = Template(value).safe_substitute(dict(
[(attr, ldap_entry[1][attribute][0]) for attr in ldap_entry[1]]
)
)
))
logger.debug('evaluating query group mapping, filter: %s',
query_string)
results = company.query(ldap_config, query_string)

Loading…
Cancel
Save