From c23083512f2368a228ff4dd4a769634686850a15 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 14 Jan 2015 15:25:50 +0100 Subject: [PATCH] account_payment_partner : move unused file + cleanup code --- .../models/payment_order_create.py | 38 ------------------- .../wizard/payment_order_create.py | 4 +- 2 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 account_payment_partner/models/payment_order_create.py diff --git a/account_payment_partner/models/payment_order_create.py b/account_payment_partner/models/payment_order_create.py deleted file mode 100644 index 3b9b536a7..000000000 --- a/account_payment_partner/models/payment_order_create.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account Payment Partner module for OpenERP -# Copyright (C) 2014 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm - - -class PaymentOrderCreate(orm.TransientModel): - _inherit = 'payment.order.create' - - def extend_payment_order_domain( - self, cr, uid, payment_order, domain, context=None): - super(PaymentOrderCreate, self).extend_payment_order_domain( - cr, uid, payment_order, domain, context=context) - domain += [ - '|', '|', - ('invoice', '=', False), - ('invoice.payment_mode_id', '=', False), - ('invoice.payment_mode_id', '=', payment_order.mode.id)] - return True diff --git a/account_payment_partner/wizard/payment_order_create.py b/account_payment_partner/wizard/payment_order_create.py index c26b7f9d9..fdc7bdb49 100644 --- a/account_payment_partner/wizard/payment_order_create.py +++ b/account_payment_partner/wizard/payment_order_create.py @@ -28,10 +28,10 @@ class PaymentOrderCreate(models.TransientModel): @api.model def extend_payment_order_domain(self, payment_order, domain): - res = super(PaymentOrderCreate, self).extend_payment_order_domain( + super(PaymentOrderCreate, self).extend_payment_order_domain( payment_order, domain) domain += ['|', '|', ('invoice', '=', False), ('invoice.payment_mode_id', '=', False), ('invoice.payment_mode_id', '=', payment_order.mode.id)] - return res + return True