[ADD] account_banking_payment_blocking

In the payment order creation wizard, do not propose invoices that are under litigation.

This is based on the blocked (aka No Followup) flag on the account move lines.
This commit is contained in:
Stéphane Bidoul
2014-09-15 15:46:56 +02:00
committed by Adrien Peiffer (ACSONE)
parent d6bf60eb51
commit 1ea580872d
4 changed files with 132 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Payment Blocking module for OpenERP
# Copyright (C) 2014 ACSONE SA/NV (http://acsone.eu)
# @author Stéphane Bidoul <stephane.bidoul@acsone.eu>
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
import model

View File

@@ -0,0 +1,52 @@
##############################################################################
#
# Copyright (C) ACSONE SA/NV (<http://acsone.eu>)
#
# All other contributions are (C) by their respective contributors
#
# All Rights Reserved
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'account banking payment blocking',
'version': '0.1',
'category': 'Banking addons',
'description': """
Prevent invoices under litigation to be proposed in payment orders
""",
'author': 'Stéphane Bidoul',
'website': 'http://acsone.eu',
'depends': [
'base',
'account_banking_payment_export'
],
'data': [
],
'test': [
],
'demo': [
],
'js': [
],
'qweb': [
],
'css': [
],
'installable': True,
'application': False,
'auto_install': False,
'license': 'AGPL-3',
}

View File

@@ -0,0 +1,23 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Payment Blocking module for OpenERP
# Copyright (C) 2014 ACSONE SA/NV (http://acsone.eu)
# @author Stéphane Bidoul <stephane.bidoul@acsone.eu>
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
import payment_order_create

View File

@@ -0,0 +1,34 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Payment Blocking module for OpenERP
# Copyright (C) 2014 ACSONE SA/NV (http://acsone.eu)
# @author Stéphane Bidoul <stephane.bidoul@acsone.eu>
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp.osv import orm
class payment_order_create(orm.TransientModel):
_inherit = 'payment.order.create'
def extend_payment_order_domain(
self, cr, uid, payment_order, domain, context=None):
super(payment_order_create, self).extend_payment_order_domain(
cr, uid, payment_order, domain, context=context)
domain += [('blocked', '!=', True)]
return True