diff --git a/rma_sale/models/rma_order.py b/rma_sale/models/rma_order.py index a97124b6..bb167e96 100644 --- a/rma_sale/models/rma_order.py +++ b/rma_sale/models/rma_order.py @@ -17,7 +17,7 @@ class RmaOrder(models.Model): self.sale_count = len(list(set(sales_list))) sale_count = fields.Integer(compute=_compute_sales_count, - string='# of Sales', copy=False, default=0) + string='# of Sales', copy=False, default=0) @api.model def _get_line_domain(self, rma_id, line): @@ -38,4 +38,4 @@ class RmaOrder(models.Model): if rma_line.sale_line_id and rma_line.sale_line_id.id: order_ids.append(rma_line.sale_line_id.order_id.id) result['domain'] = [('id', 'in', order_ids)] - return result \ No newline at end of file + return result diff --git a/rma_sale/models/rma_order_line.py b/rma_sale/models/rma_order_line.py index e6be59ec..b4088098 100644 --- a/rma_sale/models/rma_order_line.py +++ b/rma_sale/models/rma_order_line.py @@ -4,6 +4,7 @@ from openerp import _, api, fields, models from openerp.addons import decimal_precision as dp + class RmaOrderLine(models.Model): _inherit = "rma.order.line" diff --git a/rma_sale/wizards/rma_add_sale.py b/rma_sale/wizards/rma_add_sale.py index 1ed460fd..5b382646 100644 --- a/rma_sale/wizards/rma_add_sale.py +++ b/rma_sale/wizards/rma_add_sale.py @@ -2,11 +2,8 @@ # © 2017 Eficent Business and IT Consulting Services S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) -import time -from openerp import models, fields, exceptions, api, _ +from openerp import _, api, fields, models from openerp.exceptions import ValidationError -from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT as DT_FORMAT -import openerp.addons.decimal_precision as dp class RmaAddSale(models.TransientModel): @@ -31,9 +28,9 @@ class RmaAddSale(models.TransientModel): return res rma_id = fields.Many2one('rma.order', - string='RMA Order', - readonly=True, - ondelete='cascade') + string='RMA Order', + readonly=True, + ondelete='cascade') partner_id = fields.Many2one(comodel_name='res.partner', string='Partner', readonly=True) diff --git a/rma_sale/wizards/rma_make_picking.py b/rma_sale/wizards/rma_make_picking.py index 7291d4be..deb557a2 100644 --- a/rma_sale/wizards/rma_make_picking.py +++ b/rma_sale/wizards/rma_make_picking.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # © 2017 Eficent Business and IT Consulting Services S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) -from openerp import models, fields, exceptions, api, _ +from openerp import api, fields, models class RmaMakePicking(models.TransientModel): @@ -13,8 +13,9 @@ class RmaMakePicking(models.TransientModel): res['sale_line_id'] = line.sale_line_id.id return res + class RmaMakePickingItem(models.TransientModel): _inherit = "rma_make_picking.wizard.item" sale_line_id = fields.Many2one('sale.order.line', - string='Sale Line') + string='Sale Line') diff --git a/rma_sale/wizards/rma_refund.py b/rma_sale/wizards/rma_refund.py index 020315ae..7b0eb2b0 100644 --- a/rma_sale/wizards/rma_refund.py +++ b/rma_sale/wizards/rma_refund.py @@ -1,9 +1,7 @@ # -*- coding: utf-8 -*- # © 2017 Eficent Business and IT Consulting Services S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) -from openerp import models, fields, exceptions, api, _ -import openerp.addons.decimal_precision as dp -from openerp.exceptions import ValidationError +from openerp import _, api, fields, models class RmaRefund(models.TransientModel): @@ -20,4 +18,4 @@ class RmaRefundItem(models.TransientModel): _inherit = "rma.refund.item" sale_line_id = fields.Many2one('sale.order.line', - string='Sale Line') + string='Sale Line')