1
# -*- encoding: utf-8 -*-
2
##############################################################################
4
# Account Payment Partner module for OpenERP
5
# Copyright (C) 2014 Akretion (http://www.akretion.com)
6
# @author Alexis de Lattre <alexis.delattre@akretion.com>
8
# This program is free software: you can redistribute it and/or modify
9
# it under the terms of the GNU Affero General Public License as
10
# published by the Free Software Foundation, either version 3 of the
11
# License, or (at your option) any later version.
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU Affero General Public License for more details.
18
# You should have received a copy of the GNU Affero General Public License
19
# along with this program. If not, see <http://www.gnu.org/licenses/>.
21
##############################################################################
23
from openerp.osv import orm
26
class payment_order_create(orm.TransientModel):
27
_inherit = 'payment.order.create'
29
def extend_payment_order_domain(
30
self, cr, uid, payment_order, domain, context=None):
31
super(payment_order_create, self).extend_payment_order_domain(
32
cr, uid, payment_order, domain, context=context)
35
('invoice', '=', False),
36
('invoice.payment_mode_id', '=', False),
37
('invoice.payment_mode_id', '=', payment_order.mode.id)