diff --git a/__unported__/account_move_validation_improvement/__init__.py b/__unported__/account_move_validation_improvement/__init__.py deleted file mode 100644 index 3b5ae4de9..000000000 --- a/__unported__/account_move_validation_improvement/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Author Matthieu Dietrich. Copyright 2012 Camptocamp SA -# -# 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 . import wizard diff --git a/__unported__/account_move_validation_improvement/__openerp__.py b/__unported__/account_move_validation_improvement/__openerp__.py deleted file mode 100644 index 6c35a6dd4..000000000 --- a/__unported__/account_move_validation_improvement/__openerp__.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Author Vincent Renaville/Joel Grand-Guillaume. -# Copyright 2012 Camptocamp SA -# -# 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 . -############################################################################## -{ - "name": "Wizard to validate multiple moves", - "version": "1.0", - "depends": ["base", "account", "account_constraints"], - "author": "Camptocamp", - 'license': 'AGPL-3', - "description": """ -Re-defining a base wizard (validate all moves in a period for a journal), -but extending it to multiple periods and multiple journals. -It replaces the base one defined in addons/account/wizard. - """, - 'website': 'http://www.camptocamp.com', - 'data': ['wizard/account_validate_move_view.xml'], - 'installable': False, - 'active': False, -} diff --git a/__unported__/account_move_validation_improvement/wizard/__init__.py b/__unported__/account_move_validation_improvement/wizard/__init__.py deleted file mode 100644 index e6c364cad..000000000 --- a/__unported__/account_move_validation_improvement/wizard/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Author Matthieu Dietrich. Copyright 2012 Camptocamp SA -# -# 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 . import account_validate_move diff --git a/__unported__/account_move_validation_improvement/wizard/account_validate_move.py b/__unported__/account_move_validation_improvement/wizard/account_validate_move.py deleted file mode 100644 index 8a4fb3c7f..000000000 --- a/__unported__/account_move_validation_improvement/wizard/account_validate_move.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# 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 fields, orm, osv -from openerp.tools.translate import _ - - -class ValidateAccountMove(orm.TransientModel): - _name = "validate.account.move" - _inherit = "validate.account.move" - - _columns = { - 'journal_ids': fields.many2many('account.journal', string='Journals', - required=True), - 'period_ids': fields.many2many('account.period', string='Periods', - required=True, - domain=[('state', '<>', 'done')]), - # re-define existing fields as non-mandatory - 'journal_id': fields.many2one('account.journal', 'Journal', - required=False), - 'period_id': fields.many2one('account.period', 'Period', - required=False), - } - - def validate_move(self, cr, uid, ids, context=None): - obj_move = self.pool.get('account.move') - if context is None: - context = {} - data = self.browse(cr, uid, ids, context=context)[0] - journal_ids = [journal.id for journal in data.journal_ids] - period_ids = [period.id for period in data.period_ids] - ids_move = obj_move.search(cr, uid, [('state', '=', 'draft'), - ('journal_id', 'in', journal_ids), - ('period_id', '=', period_ids)], - order='date', - context=context) - if not ids_move: - raise osv.except_osv( - _('Warning!'), - _('Specified journal does not have any account move entries ' - 'in draft state for this period.') - ) - obj_move.button_validate(cr, uid, ids_move, context=context) - return {'type': 'ir.actions.act_window_close'} diff --git a/__unported__/account_move_validation_improvement/wizard/account_validate_move_view.xml b/__unported__/account_move_validation_improvement/wizard/account_validate_move_view.xml deleted file mode 100644 index c0d3b2882..000000000 --- a/__unported__/account_move_validation_improvement/wizard/account_validate_move_view.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - Post Journal Entries - validate.account.move - -
- - - - - -
-
-
- -
-