Clean a bit of PEP8 things

This commit is contained in:
Joël Grand-Guillaume
2014-07-16 14:46:22 +02:00
parent aaa379647c
commit 39fa48276d
10 changed files with 27 additions and 27 deletions

View File

@@ -43,7 +43,7 @@ It mainly contains the following features:
* product refund
* access to related customer data (orders, invoices, refunds, picking
in/out) from a claim
* use the OpenERP chatter within team like in opportunity (reply to refer to
* use the OpenERP chatter within team like in opportunity (reply to refer to
the team, not a person)
Using this module makes the logistic flow of return this way:

View File

@@ -75,7 +75,7 @@ class account_invoice(orm.Model):
raise orm.except_orm(
_('Error !'),
_('A refund has already been created for this claim !'))
return [(0, 0, line) for line in new_lines]
return [(0, 0, l) for l in new_lines]
def _prepare_refund(self, cr, uid, invoice, date=None, period_id=None,
description=None, journal_id=None, context=None):

View File

@@ -333,7 +333,7 @@ class claim_line(orm.Model):
return True
#TODO add the option to split the claim_line in order to manage the same
# TODO add the option to split the claim_line in order to manage the same
# product separately
class crm_claim(orm.Model):
_inherit = 'crm.claim'

View File

@@ -51,7 +51,7 @@ class claim_make_picking(orm.TransientModel):
}
def _get_claim_lines(self, cr, uid, context):
#TODO use custom states to show buttons of this wizard or not instead
# TODO use custom states to show buttons of this wizard or not instead
# of raise an error
if context is None:
context = {}
@@ -163,7 +163,6 @@ class claim_make_picking(orm.TransientModel):
p_type = 'out'
write_field = 'move_out_id'
note = 'RMA picking out'
view_xml_id = 'stock_picking_form'
else:
p_type = 'in'
write_field = 'move_in_id'

View File

@@ -2,7 +2,7 @@
##############################################################################
#
# Copyright 2013 Camptocamp
# Copyright 2009-2013 Akretion,
# Copyright 2009-2013 Akretion,
# Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume
#
# This program is free software: you can redistribute it and/or modify
@@ -20,5 +20,4 @@
#
##############################################################################
from . import stock
from . import wizard
from . import wizard

View File

@@ -2,7 +2,7 @@
##############################################################################
#
# Copyright 2013 Camptocamp
# Copyright 2009-2013 Akretion,
# Copyright 2009-2013 Akretion,
# Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume
#
# This program is free software: you can redistribute it and/or modify
@@ -51,15 +51,14 @@ Using this module make the logistic flow of return a bit more complexe:
WARNING: Use with caution, this module is currently not yet completely debugged and is waiting his author to be.
""",
'images': [],
'demo': [],
'data': [
'wizard/claim_make_picking_from_picking_view.xml',
'wizard/claim_make_picking_view.xml',
'stock_view.xml',
'stock_data.xml',
'claim_rma_view.xml',
],
'installable': True,
'application': True,
'images': [],
'demo': [],
'data': ['wizard/claim_make_picking_from_picking_view.xml',
'wizard/claim_make_picking_view.xml',
'stock_view.xml',
'stock_data.xml',
'claim_rma_view.xml',
],
'installable': True,
'application': True,
}

View File

@@ -21,7 +21,7 @@
#along with this program. If not, see <http://www.gnu.org/licenses/>. #
#########################################################################
from openerp.osv import fields, orm
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
from openerp import netsvc
import time
@@ -56,7 +56,8 @@ class claim_make_picking_from_picking(orm.TransientModel):
# Get default source location
def _get_source_loc(self, cr, uid, context):
if context is None: context = {}
if context is None:
context = {}
warehouse_obj = self.pool.get('stock.warehouse')
warehouse_id = self._get_default_warehouse(cr, uid, context=context)
return warehouse_obj.read(cr, uid,
@@ -64,7 +65,8 @@ class claim_make_picking_from_picking(orm.TransientModel):
# Get default destination location
def _get_dest_loc(self, cr, uid, context):
if context is None: context = {}
if context is None:
context = {}
warehouse_id = self._get_default_warehouse(cr, uid, context=context)
warehouse_obj = self.pool.get('stock.warehouse')
if context.get('picking_type'):
@@ -88,7 +90,8 @@ class claim_make_picking_from_picking(orm.TransientModel):
picking_obj = self.pool.get('stock.picking')
move_obj = self.pool.get('stock.move')
view_obj = self.pool.get('ir.ui.view')
if context is None: context = {}
if context is None:
context = {}
p_type = 'internal'
if context.get('picking_type'):
context_type = context.get('picking_type')[8:]

View File

@@ -36,7 +36,7 @@ Claim improvements to use them by shops:
* Add shop on claim
* Add various filter in order to work on a basic "by shop" basis
Was originally designed for e-commerce purpose, but could probably do the trick
Was originally designed for e-commerce purpose, but could probably do the trick
for other cases as well.
""",

View File

@@ -51,7 +51,7 @@ Those informations are used in the RMA Claim (Product Return Management) module.
'test': [],
'installable': True,
'active': False,
'certificate' : '',
'certificate': '',
'images': ['images/product_warranty.png'],
}

View File

@@ -2,7 +2,7 @@
##############################################################################
#
# Copyright 2013 Camptocamp
# Copyright 2009-2013 Akretion,
# Copyright 2009-2013 Akretion,
# Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume
#
# This program is free software: you can redistribute it and/or modify