Skip to content

Commit

Permalink
Merge pull request #13 from hbrunn/7.0-autofix
Browse files Browse the repository at this point in the history
[IMP] autofix conventions
  • Loading branch information
yvaucher committed Feb 2, 2015
2 parents a307efb + bb65ca6 commit 95b125b
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 33 deletions.
16 changes: 9 additions & 7 deletions .travis.yml
Expand Up @@ -5,16 +5,18 @@ python:
virtualenv:
system_site_packages: true

env:
- VERSION="7.0" ODOO_REPO="odoo/odoo"
- VERSION="7.0" ODOO_REPO="OCA/OCB"

install:
- git clone https://github.com/OCA/maintainer-quality-tools.git $HOME/maintainer-quality-tools
- export PATH=$HOME/maintainer-quality-tools/travis:$PATH
- travis_install_nightly 7.0
- pip install coveralls flake8
- bzr branch --stacked lp:web-addons/7.0 ~/web-addons
- git clone https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools
- git clone https://github.com/OCA/web.git ${HOME}/web -b ${VERSION}
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
- travis_install_nightly

script:
- travis_run_flake8
- travis_run_tests 7.0 ~/web-addons
- travis_run_tests

after_success:
coveralls
8 changes: 4 additions & 4 deletions crm_claim_merge/wizard/crm_claim_merge.py
Expand Up @@ -65,17 +65,17 @@ def action_merge(self, cr, uid, ids, context=None):
context=context)
return self.redirect_new_claim(cr, uid, merged_id, context=context)

def default_get(self, cr, uid, fields, context=None):
def default_get(self, cr, uid, field_list, context=None):
"""
Use active_ids from the context to fetch the claims to merge.
"""
if context is None:
context = {}
res = super(crm_claim_merge, self).default_get(
cr, uid, fields, context=context)
if 'claim_ids' in fields:
cr, uid, field_list, context=context)
if 'claim_ids' in field_list:
res['claim_ids'] = claim_ids = context.get('active_ids')
if 'merge_in_id' in fields and claim_ids:
if 'merge_in_id' in field_list and claim_ids:
claim_obj = self.pool['crm.claim']
claims = claim_obj.browse(cr, uid, claim_ids, context=context)
res['merge_in_id'] = claim_obj._merge_get_default_main(
Expand Down
5 changes: 3 additions & 2 deletions crm_lead_stage_monitoring/crm.py
Expand Up @@ -35,9 +35,10 @@ def write(self, cr, uid, ids, vals, context=None):
vals['last_activity_stage'] = fields.datetime.now()
return super(CrmLead, self).write(cr, uid, ids, vals, context=context)

def copy(self, cr, uid, id, default=None, context=None):
def copy(self, cr, uid, rec_id, default=None, context=None):
if default is None:
default = {}
# Do not duplicate last_activity_stage
default['last_activity_stage'] = False
return super(CrmLead, self).copy(cr, uid, id, default, context=context)
return super(CrmLead, self).copy(cr, uid, rec_id, default,
context=context)
2 changes: 0 additions & 2 deletions lettermgmt/models/letter_folder.py
Expand Up @@ -34,5 +34,3 @@ class letter_folder(orm.Model):
help='Letters contained in this folder.'),
}
_sql_constraints = [('code_uniq', 'unique(code)', 'Code must be unique !')]

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2 changes: 0 additions & 2 deletions lettermgmt/models/letter_reassignment.py
Expand Up @@ -34,5 +34,3 @@ class letter_reassignment(orm.Model):
'letter_id': fields.many2one(
'res.letter', string='Letter', help='Letter in question.'),
}

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1 change: 1 addition & 0 deletions lettermgmt/models/res_letter.py
Expand Up @@ -25,6 +25,7 @@


class res_letter(orm.Model):

"""A register class to log all movements regarding letters"""
_name = 'res.letter'
_description = "Log of Letter Movements"
Expand Down
2 changes: 1 addition & 1 deletion newsletter/__init__.py
Expand Up @@ -20,4 +20,4 @@
#
##############################################################################

import model
from . import model
8 changes: 4 additions & 4 deletions newsletter/__openerp__.py
Expand Up @@ -89,9 +89,9 @@
"depends": [
'email_template',
'web_ckeditor4',
],
],
'css': [
],
],
'data': [
'data/ir_module_cateogry.xml',
'security/res_groups.xml',
Expand All @@ -102,10 +102,10 @@
'view/menu.xml',
'view/email_template_preview_view.xml',
'view/newsletter_type.xml',
],
],
'js': [
'static/src/js/newsletter.js',
],
],
'installable': True,
'auto_install': False,
'application': True,
Expand Down
8 changes: 4 additions & 4 deletions newsletter/model/__init__.py
Expand Up @@ -19,7 +19,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import newsletter_newsletter
import newsletter_topic
import newsletter_type
import email_template
from . import newsletter_newsletter
from . import newsletter_topic
from . import newsletter_type
from . import email_template
10 changes: 5 additions & 5 deletions newsletter/model/newsletter_newsletter.py
Expand Up @@ -24,7 +24,7 @@
from openerp.osv.orm import Model, except_orm
from openerp.osv import fields
from openerp.tools.safe_eval import safe_eval
from newsletter_type import newsletter_type
from .newsletter_type import newsletter_type
from openerp.tools.translate import _


Expand Down Expand Up @@ -99,11 +99,11 @@ def _may_send_get(self, cr, uid, ids, field_name, arg, context=None):
}

def on_change_type_id(self, cr, uid, ids, type_id, context=None):
newsletter_type = self.pool.get('newsletter.type').browse(
record = self.pool['newsletter.type'].browse(
cr, uid, type_id, context=context)
return {
'value': {
'plaintext_mode': newsletter_type.plaintext_mode,
'plaintext_mode': record.plaintext_mode,
}
}

Expand Down Expand Up @@ -163,9 +163,9 @@ def _cronjob_send_newsletter(self, cr, uid, ids, context=None):
if not ids:
break

for id in ids:
for rec_id in ids:
try:
self._do_send_newsletter(cr, uid, this, id,
self._do_send_newsletter(cr, uid, this, rec_id,
context=context)
except Exception as e:
self._logger.error(e)
Expand Down
4 changes: 2 additions & 2 deletions newsletter/model/newsletter_topic.py
Expand Up @@ -22,8 +22,8 @@

from openerp.osv.orm import Model
from openerp.osv import fields
from newsletter_type import newsletter_type
from newsletter_newsletter import _get_plaintext
from .newsletter_type import newsletter_type
from .newsletter_newsletter import _get_plaintext


class newsletter_topic(Model):
Expand Down

0 comments on commit 95b125b

Please sign in to comment.