← Back to team overview

openobject-italia-core-devs team mailing list archive

lp:~openobject-italia-core-devs/openobject-italia/adding_account_fiscal_year_closing into lp:openobject-italia

 

Lorenzo Battistini - Agile BG - Domsense has proposed merging lp:~openobject-italia-core-devs/openobject-italia/adding_account_fiscal_year_closing into lp:openobject-italia.

Requested reviews:
  OpenERP Italia core devs (openobject-italia-core-devs)

For more details, see:
https://code.launchpad.net/~openobject-italia-core-devs/openobject-italia/adding_account_fiscal_year_closing/+merge/78205
-- 
https://code.launchpad.net/~openobject-italia-core-devs/openobject-italia/adding_account_fiscal_year_closing/+merge/78205
Your team OpenERP Italia core devs is requested to review the proposed merge of lp:~openobject-italia-core-devs/openobject-italia/adding_account_fiscal_year_closing into lp:openobject-italia.
=== added directory 'account_fiscal_year_closing'
=== added file 'account_fiscal_year_closing/__init__.py'
--- account_fiscal_year_closing/__init__.py	1970-01-01 00:00:00 +0000
+++ account_fiscal_year_closing/__init__.py	2011-10-05 07:03:24 +0000
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    $Id$
+#
+#    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/>.
+#
+##############################################################################
+"""
+Fiscal Year Closing
+"""
+import fyc
+import wizard

=== added file 'account_fiscal_year_closing/__openerp__.py'
--- account_fiscal_year_closing/__openerp__.py	1970-01-01 00:00:00 +0000
+++ account_fiscal_year_closing/__openerp__.py	2011-10-05 07:03:24 +0000
@@ -0,0 +1,64 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    Copyright (c) 2008 ACYSOS S.L. (http://acysos.com) All Rights Reserved.
+#                       Pedro Tarrafeta <pedro@xxxxxxxxxx>
+#    Copyright (C) 2011 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>).
+#
+#    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" : "Fiscal Year Closing",
+    "version" : "1.0",
+    "author" : "Pexego, OpenERP Italian Community",
+    "website" : "http://www.openerp-italia.org";,
+    "category" : "Generic Modules/Accounting",
+    "description": """
+Fiscal Year Closing Wizard
+    
+Replaces the default OpenERP end of year wizards (from account module)
+with a more advanced all-in-one wizard that will let the users:
+  - Check for unbalanced moves, moves with invalid dates
+    or period or draft moves on the fiscal year to be closed.
+  - Create the Loss and Profit entry.
+  - Create the Net Loss and Profit entry.
+  - Create the Closing entry.
+  - Create the Opening entry.
+
+It is stateful, saving all the info about the fiscal year closing, so the
+user can cancel and undo the operations easily.
+    """,
+    "license" : "AGPL-3",
+    "depends" : [
+                    "base",
+                    "account",
+                ],
+    "init_xml" : [],
+    "update_xml" : [
+                    "security/ir.model.access.csv",
+                    "fyc_workflow.xml",
+                    "fyc_wizard.xml",
+                    "fyc_view.xml",
+                    "hide_account_wizards.xml",
+                    ],
+    "active": False,
+    "installable": True
+}
+

=== added file 'account_fiscal_year_closing/fyc.py'
--- account_fiscal_year_closing/fyc.py	1970-01-01 00:00:00 +0000
+++ account_fiscal_year_closing/fyc.py	2011-10-05 07:03:24 +0000
@@ -0,0 +1,769 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2010 Pexego Sistemas Informáticos. All Rights Reserved
+#    Copyright (C) 2011 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>).
+#
+#    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/>.
+#
+##############################################################################
+
+"""
+Fiscal Year Closing
+"""
+__author__ = "Borja López Soilán (Pexego)"
+
+
+from osv import fields, osv
+from tools.translate import _
+from datetime import datetime
+import netsvc
+
+#-------------------------------------------------------------------------------
+# Default Account Mappings
+#-------------------------------------------------------------------------------
+
+# Format for the mappings:
+#       (<source account code>, <dest account code>, <description>)
+
+# Loss & Profit
+'''
+_LP_ACCOUNT_MAPPING = [
+    ('6', '129%', False),
+    ('7', '129%', False),
+]
+'''
+
+# Net Loss & Profit
+'''
+_NLP_ACCOUNT_MAPPING = [
+    ('800', '133%', False),
+    ('802', '133%', False),
+    ('810', '1340%0', False),
+    ('811', '1341%0', False),
+    ('812', '1340%0', False),
+    ('813', '1341%0', False),
+    ('820', '135%0', False),
+    ('821', '135%0', False),
+    ('830', '13', False), # Can be any 13? account, like 130 or 133
+    ('833', '13', False), # Can be any 13? account, like 130 or 133
+    ('834', '137%0', False),
+    ('835', '137%0', False),
+    ('835', '137%0', False),
+    ('838', '133%0', False),
+    ('840', '130%0', False),
+    ('841', '131%0', False),
+    ('842', '132%0', False),
+    ('850', '115%0', False),
+    ('851', '115%0', False),
+    ('860', '136%0', False),
+    ('862', '136%0', False),
+    ('890', '133%0', False),
+    ('892', '133%0', False),
+    ('900', '133%', False),
+    ('902', '133%', False),
+    ('910', '1340%0', False),
+    ('911', '1341%0', False),
+    ('912', '1340%0', False),
+    ('913', '1341%0', False),
+    ('920', '135%0', False),
+    ('921', '135%0', False),
+    ('940', '130%0', False),
+    ('941', '131%0', False),
+    ('942', '132%0', False),
+    ('950', '115%0', False),
+    ('951', '115%0', False),
+    ('960', '136%0', False),
+    ('962', '136%0', False),
+    ('990', '133%0', False),
+    ('991', '133%0', False),
+    ('992', '133%0', False),
+    ('993', '133%0', False),
+]
+'''
+
+# Closing
+'''
+_C_ACCOUNT_MAPPING = [
+    ('1', False, False),
+    ('2', False, False),
+    ('3', False, False),
+    ('4', False, False),
+    ('5', False, False),
+]
+'''
+
+
+#-------------------------------------------------------------------------------
+# Predeclaration of the FYC object
+#-------------------------------------------------------------------------------
+class fiscal_year_closing_init(osv.osv):
+    """
+    Fiscal Year Closing Wizard
+    """
+
+    _name = "account_fiscal_year_closing.fyc"
+    _description = "Fiscal Year Closing Wizard"
+
+    _columns = {
+        'name': fields.char('Description', size=60, required=True),
+    }
+
+fiscal_year_closing_init()
+
+
+#-------------------------------------------------------------------------------
+# Account mapping objects (to be used on the fyc configuration)
+#-------------------------------------------------------------------------------
+
+class fiscal_year_closing_lp_account_mapping(osv.osv):
+    """
+    Loss & Profit Account Mapping
+    """
+
+    _name = "account_fiscal_year_closing.fyc_lp_account_map"
+    _description = "SFYC Loss & Profit Account Mapping"
+
+    _columns = {
+        'name': fields.char('Description', size=60, required=False),
+
+        # Parent eoy
+        'fyc_id': fields.many2one('account_fiscal_year_closing.fyc', 'Fiscal Year Closing', ondelete='cascade', required=True, select=1),
+
+        # Accounts
+        'source_account_id':fields.many2one('account.account', 'Source account', required=True, ondelete='cascade'),
+        'dest_account_id':fields.many2one('account.account', 'Dest account', required=False, ondelete='cascade'),
+    }
+fiscal_year_closing_lp_account_mapping()
+
+
+class fiscal_year_closing_nlp_account_mapping(osv.osv):
+    """
+    Net Loss & Profit Account Mapping
+    """
+
+    _name = "account_fiscal_year_closing.fyc_nlp_account_map"
+    _description = "SFYC Net Loss & Profit Account Mapping"
+
+    _columns = {
+        'name': fields.char('Description', size=60, required=False),
+
+        # Parent eoy
+        'fyc_id': fields.many2one('account_fiscal_year_closing.fyc', 'Fiscal Year Closing', ondelete='cascade', required=True, select=1),
+
+        # Accounts
+        'source_account_id':fields.many2one('account.account', 'Source account', required=True, ondelete='cascade'),
+        'dest_account_id':fields.many2one('account.account', 'Dest account', required=False, ondelete='cascade'),
+    }
+fiscal_year_closing_nlp_account_mapping()
+
+
+class fiscal_year_closing_c_account_mapping(osv.osv):
+    """
+    Closing Account Mapping
+    """
+
+    _name = "account_fiscal_year_closing.fyc_c_account_map"
+    _description = "SFYC Closing Account Mapping"
+
+    _columns = {
+        'name': fields.char('Description', size=60, required=False),
+
+        # Parent eoy
+        'fyc_id': fields.many2one('account_fiscal_year_closing.fyc', 'Fiscal Year Closing', ondelete='cascade', required=True, select=1),
+
+        # Accounts
+        'source_account_id':fields.many2one('account.account', 'Account', required=True, ondelete='cascade'),
+        'dest_account_id':fields.many2one('account.account', 'Dest account', ondelete='cascade'),
+    }
+fiscal_year_closing_c_account_mapping()
+
+#-------------------------------------------------------------------------------
+# Fiscal Year Closing Wizard
+#-------------------------------------------------------------------------------
+class fiscal_year_closing(osv.osv):
+    """
+    Fiscal Year Closing Wizard
+    """
+
+    _inherit = "account_fiscal_year_closing.fyc"
+
+    #
+    # Fields -------------------------------------------------------------------
+    #
+
+    _columns = {
+        # Company
+        'company_id': fields.many2one('res.company', 'Company', ondelete='cascade', readonly=True, required=True),
+
+        # Fiscal years
+        'closing_fiscalyear_id':fields.many2one('account.fiscalyear', 'Fiscal year to close', required=True, ondelete='cascade', select=1),
+        'opening_fiscalyear_id':fields.many2one('account.fiscalyear', 'Fiscal year to open', required=True, ondelete='cascade', select=2),
+
+        #
+        # Operations (to do), and their account moves (when done)
+        #
+        'create_loss_and_profit': fields.boolean('Create Loss & Profit move'),
+        'loss_and_profit_move_id': fields.many2one('account.move', 'L&P Move', ondelete='set null', readonly=True),
+        'create_net_loss_and_profit': fields.boolean('Create Net Loss & Profit'),
+        'net_loss_and_profit_move_id': fields.many2one('account.move', 'Net L&P Move', ondelete='set null', readonly=True),
+        'create_closing': fields.boolean('Close fiscal year'),
+        'closing_move_id': fields.many2one('account.move', 'Closing Move', ondelete='set null', readonly=True),
+        'create_opening': fields.boolean('Open next fiscal year'),
+        'opening_move_id': fields.many2one('account.move', 'Opening Move', ondelete='set null', readonly=True),
+
+        #
+        # Extra operations
+        #
+        'check_invalid_period_moves': fields.boolean('Check invalid period or date moves', help="Checks that there are no moves, on the fiscal year that is being closed, with dates or periods outside that fiscal year."),
+        'check_draft_moves': fields.boolean('Check draft moves', help="Checks that there are no draft moves on the fiscal year that is being closed. Non-confirmed moves won't be taken in account on the closing operations."),
+        'check_unbalanced_moves': fields.boolean('Check unbalanced moves', help="Checks that there are no unbalanced moves on the fiscal year that is being closed."),
+
+        # State
+        'state': fields.selection([
+                ('new', 'New'),
+                ('draft', 'Draft'),
+                ('in_progress', 'In Progress'),
+                ('done', 'Done'),
+                ('canceled', 'Canceled'),
+            ], 'Status'),
+
+        #
+        # Loss and Profit options
+        #
+        'lp_description': fields.char('Description', size=60),
+        'lp_journal_id': fields.many2one('account.journal', 'Journal'),
+        'lp_period_id': fields.many2one('account.period', 'Period'),
+        'lp_date': fields.date('Date'),
+        'lp_account_mapping_ids': fields.one2many('account_fiscal_year_closing.fyc_lp_account_map', 'fyc_id', 'Account mappings'),
+
+        #
+        # Net Loss and Profit options
+        #
+        'nlp_description': fields.char('Description', size=60),
+        'nlp_journal_id': fields.many2one('account.journal', 'Journal'),
+        'nlp_period_id': fields.many2one('account.period', 'Period'),
+        'nlp_date': fields.date('Date'),
+        'nlp_account_mapping_ids': fields.one2many('account_fiscal_year_closing.fyc_nlp_account_map', 'fyc_id', 'Account mappings'),
+
+        #
+        # Closing options
+        #
+        'c_description': fields.char('Description', size=60),
+        'c_journal_id': fields.many2one('account.journal', 'Journal'),
+        'c_period_id': fields.many2one('account.period', 'Period'),
+        'c_date': fields.date('Date'),
+        'c_account_mapping_ids': fields.one2many('account_fiscal_year_closing.fyc_c_account_map', 'fyc_id', 'Accounts'),
+
+        #
+        # Opening options
+        #
+        'o_description': fields.char('Description', size=60),
+        'o_journal_id': fields.many2one('account.journal', 'Journal'),
+        'o_period_id': fields.many2one('account.period', 'Period'),
+        'o_date': fields.date('Date'),
+    }
+
+    #
+    # Default values -----------------------------------------------------------
+    #
+
+    def _get_closing_fiscalyear_id(self, cr, uid, context):
+        """
+        Gets the last (previous) fiscal year
+        """
+        company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id
+        str_date = '%s-06-01' % (datetime.now().year - 1)
+        fiscalyear_ids = self.pool.get('account.fiscalyear').search(cr, uid, [
+                            ('company_id', '=', company.id),
+                            ('date_start', '<=', str_date),
+                            ('date_stop', '>=', str_date),
+                        ])
+        if not fiscalyear_ids:
+            fiscalyear_ids = self.pool.get('account.fiscalyear').search(cr, uid, [
+                    ('company_id', '=', False),
+                    ('date_start', '<=', str_date),
+                    ('date_stop', '>=', str_date),
+                ])
+        return fiscalyear_ids and fiscalyear_ids[0]
+
+    def _get_opening_fiscalyear_id(self, cr, uid, context):
+        """
+        Gets the current fiscal year
+        """
+        company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id
+        str_date = '%s-06-01' % datetime.now().year
+        fiscalyear_ids = self.pool.get('account.fiscalyear').search(cr, uid, [
+                            ('company_id', '=', company.id),
+                            ('date_start', '<=', str_date),
+                            ('date_stop', '>=', str_date),
+                        ])
+        if not fiscalyear_ids:
+            fiscalyear_ids = self.pool.get('account.fiscalyear').search(cr, uid, [
+                    ('company_id', '=', False),
+                    ('date_start', '<=', str_date),
+                    ('date_stop', '>=', str_date),
+                ])
+        return fiscalyear_ids and fiscalyear_ids[0]
+    
+    _defaults = {
+        # Current company by default:
+        'company_id': lambda self, cr, uid, context: self.pool.get('res.users').browse(cr, uid, uid, context).company_id.id,
+
+        # Draft state by default:
+        'state': lambda *a: 'new',
+
+        # Name
+        'name': lambda self, cr, uid, context: _("%s Fiscal Year Closing") % (datetime.now().year - 1),
+
+        # Fiscal years
+        'closing_fiscalyear_id': _get_closing_fiscalyear_id,
+        'opening_fiscalyear_id': _get_opening_fiscalyear_id,
+    }
+
+    #
+    # Workflow actions ---------------------------------------------------------
+    #
+
+    def _get_journal_id(self, cr, uid, fyc, context):
+        """
+        Gets the journal to use.
+        (It will search for a 'GRAL' or 'General' journal)
+        """
+        assert fyc.company_id, "A company should have been selected"
+        journal_ids = self.pool.get('account.journal').search(cr, uid, [
+                            ('company_id', '=', fyc.company_id.id),
+                            ('code', '=', 'GRAL'),
+                        ])
+        if not journal_ids:
+            journal_ids = self.pool.get('account.journal').search(cr, uid, [
+                            ('company_id', '=', False),
+                            ('code', '=', 'GRAL'),
+                        ])
+        if not journal_ids:
+            journal_ids = self.pool.get('account.journal').search(cr, uid, [
+                            ('company_id', '=', fyc.company_id.id),
+                            ('name', 'ilike', 'General'),
+                        ])
+        if not journal_ids:
+            journal_ids = self.pool.get('account.journal').search(cr, uid, [
+                            ('company_id', '=', False),
+                            ('name', 'ilike', 'General'),
+                        ])
+        return journal_ids and journal_ids[0]
+
+    def _get_lp_period_id(self, cr, uid, fyc, context):
+        """
+        Gets the period for the L&P entry
+        (It searches for a "PG%" special period on the previous fiscal year)
+        """
+        period_ids = self.pool.get('account.period').search(cr, uid, [
+                            ('fiscalyear_id', '=', fyc.closing_fiscalyear_id.id),
+                            ('special', '=', True),
+                            ('date_start', '=', fyc.closing_fiscalyear_id.date_stop),
+                            ('code', 'ilike', 'PG'),
+                        ])
+        if not period_ids:
+            period_ids = self.pool.get('account.period').search(cr, uid, [
+                                ('fiscalyear_id', '=', fyc.closing_fiscalyear_id.id),
+                                ('special', '=', True),
+                                ('date_start', '=', fyc.closing_fiscalyear_id.date_stop),
+                            ])
+        return period_ids and period_ids[0]
+
+    def _get_c_period_id(self, cr, uid, fyc, context):
+        """
+        Gets the period for the Closing entry
+        (It searches for a "C%" special period on the previous fiscal year)
+        """
+        period_ids = self.pool.get('account.period').search(cr, uid, [
+                            ('fiscalyear_id', '=', fyc.closing_fiscalyear_id.id),
+                            ('special', '=', True),
+                            ('date_start', '=', fyc.closing_fiscalyear_id.date_stop),
+                            ('code', 'ilike', 'C'),
+                        ])
+
+        if not period_ids:
+            period_ids = self.pool.get('account.period').search(cr, uid, [
+                                ('fiscalyear_id', '=', fyc.closing_fiscalyear_id.id),
+                                ('special', '=', True),
+                                ('date_start', '=', fyc.closing_fiscalyear_id.date_stop),
+                            ])
+        return period_ids and period_ids[0]
+
+    def _get_o_period_id(self, cr, uid, fyc, context):
+        """
+        Gets the period for the Opening entry
+        (It searches for a "A%" special period on the previous fiscal year)
+        """
+        period_ids = self.pool.get('account.period').search(cr, uid, [
+                            ('fiscalyear_id', '=', fyc.opening_fiscalyear_id.id),
+                            ('special', '=', True),
+                            ('date_stop', '=', fyc.opening_fiscalyear_id.date_start),
+                            ('code', 'ilike', 'A'),
+                        ])
+        if not period_ids:
+            period_ids = self.pool.get('account.period').search(cr, uid, [
+                                ('fiscalyear_id', '=', fyc.opening_fiscalyear_id.id),
+                                ('special', '=', True),
+                                ('date_stop', '=', fyc.opening_fiscalyear_id.date_start),
+                            ])
+        return period_ids and period_ids[0]
+
+
+    def _get_account_mappings(self, cr, uid, fyc, mapping, context):
+        """
+        Transforms the mapping dictionary on a list of mapping lines.
+        """
+        account_mappings = []
+        for source, dest, description in mapping:
+            #
+            # Find the source account
+            #
+            account_ids = self.pool.get('account.account').search(cr, uid, [
+                            ('company_id', '=', fyc.company_id.id),
+                            ('code', '=like', source),
+                        ])
+            source_account_id = account_ids and account_ids[0] or None
+
+            #
+            # Find the dest account
+            #
+            account_ids = self.pool.get('account.account').search(cr, uid, [
+                            ('company_id', '=', fyc.company_id.id),
+                            ('code', '=like', dest),
+                            ('type', '!=', 'view'),
+                        ])
+            dest_account_id = account_ids and account_ids[0] or None
+
+            #
+            # Use a default description if not provided
+            #
+            if not description:
+                if source_account_id:
+                    description = self.pool.get('account.account').read(cr, uid, source_account_id, ['name'])['name']
+
+            #
+            # If the mapping is valid for this chart of accounts
+            #
+            if source_account_id:
+                #
+                # Make sure that the dest account is valid
+                #
+                if dest_account_id:
+                    # Add the line to the result
+                    account_mappings.append({
+                            'name': description,
+                            'source_account_id': source_account_id,
+                            'dest_account_id': dest_account_id,
+                        })
+                else:
+                    # Add the line to the result
+                    account_mappings.append({
+                            'name': _('No destination account %s found for account %s.') % (dest, source),
+                            'source_account_id': source_account_id,
+                            'dest_account_id': None,
+                        })
+
+        return [(0, 0, acc_map) for acc_map in account_mappings]
+
+
+
+    def action_draft(self, cr, uid, ids, context=None):
+        """
+        Called when the user clicks the confirm button.
+        """
+        if context is None:
+            context = {}
+        #
+        # Make sure the lang is defined on the context
+        #
+        user = self.pool.get('res.users').browse(cr, uid, uid, context)
+        context['lang'] = context.get('lang') or user.context_lang
+
+        for fyc in self.browse(cr, uid, ids, context):
+            #
+            # Check for duplicated entries
+            #
+            fyc_ids = self.search(cr, uid, [('name', '=', fyc.name)])
+            if len(fyc_ids) > 1:
+                raise osv.except_osv(_('Error'), _('There is already a fiscal year closing with this name.'))
+            
+            assert fyc.closing_fiscalyear_id and fyc.closing_fiscalyear_id.id
+            fyc_ids = self.search(cr, uid, [('closing_fiscalyear_id', '=', fyc.closing_fiscalyear_id.id)])
+            if len(fyc_ids) > 1:
+                raise osv.except_osv(_('Error'), _('There is already a fiscal year closing for the fiscal year to close.'))
+
+            assert fyc.opening_fiscalyear_id and fyc.opening_fiscalyear_id.id
+            fyc_ids = self.search(cr, uid, [('opening_fiscalyear_id', '=', fyc.opening_fiscalyear_id.id)])
+            if len(fyc_ids) > 1:
+                raise osv.except_osv(_('Error'), _('There is already a fiscal year closing for the fiscal year to open.'))
+
+            #
+            # Check whether the default values of the fyc object have to be computed
+            # or they have already been computed (restarted workflow)
+            #
+            if fyc.c_account_mapping_ids:
+                # Fyc wizard reverted to 'new' after canceled
+
+                self.write(cr, uid, [fyc.id], { 'state': 'draft' })
+            else:
+                # New fyc wizard object
+
+                vals = {
+                    #
+                    # Perform all the operations by default
+                    #
+                    'create_loss_and_profit': True,
+                    'create_net_loss_and_profit': False,
+                    'create_closing': True,
+                    'create_opening': True,
+
+                    'check_invalid_period_moves': True,
+                    'check_draft_moves': True,
+                    'check_unbalanced_moves': True,
+
+                    #
+                    # L&P options
+                    #
+                    'lp_description': _("Loss & Profit"),
+                    'lp_journal_id': self._get_journal_id(cr, uid, fyc, context),
+                    'lp_period_id': self._get_lp_period_id(cr, uid, fyc, context),
+                    'lp_date': fyc.closing_fiscalyear_id.date_stop,
+#                    'lp_account_mapping_ids': self._get_account_mappings(cr, uid, fyc, _LP_ACCOUNT_MAPPING, context),
+
+                    #
+                    # Net L&P options
+                    #
+                    'nlp_description': _("Net Loss & Profit"),
+                    'nlp_journal_id': self._get_journal_id(cr, uid, fyc, context),
+                    'nlp_period_id': self._get_lp_period_id(cr, uid, fyc, context),
+                    'nlp_date': fyc.closing_fiscalyear_id.date_stop,
+#                    'nlp_account_mapping_ids': self._get_account_mappings(cr, uid, fyc, _NLP_ACCOUNT_MAPPING, context),
+
+                    #
+                    # Closing options
+                    #
+                    'c_description': _("Fiscal Year Closing"),
+                    'c_journal_id': self._get_journal_id(cr, uid, fyc, context),
+                    'c_period_id': self._get_c_period_id(cr, uid, fyc, context),
+                    'c_date': fyc.closing_fiscalyear_id.date_stop,
+#                    'c_account_mapping_ids': self._get_account_mappings(cr, uid, fyc, _C_ACCOUNT_MAPPING, context),
+
+                    #
+                    # Opening options
+                    #
+                    'o_description': _("Fiscal Year Opening"),
+                    'o_journal_id': self._get_journal_id(cr, uid, fyc, context),
+                    'o_period_id': self._get_o_period_id(cr, uid, fyc, context),
+                    'o_date': fyc.opening_fiscalyear_id.date_start,
+
+                    # *** New state ***
+                    'state': 'draft',
+                }
+                self.write(cr, uid, [fyc.id], vals)
+        return True
+
+
+    def action_run(self, cr, uid, ids, context=None):
+        """
+        Called when the create entries button is used.
+        """
+        # Note: Just change the state, everything else is done on the run wizard
+        #       *before* this action is called.
+        self.write(cr, uid, ids, {'state': 'in_progress'})
+        return True
+
+
+    def action_confirm(self, cr, uid, ids, context=None):
+        """
+        Called when the user clicks the confirm button.
+        """
+        if context is None:
+            context = {}
+        #
+        # Make sure the lang is defined on the context
+        #
+        user = self.pool.get('res.users').browse(cr, uid, uid, context)
+        context['lang'] = context.get('lang') or user.context_lang
+
+        for fyc in self.browse(cr, uid, ids, context):
+            #
+            # Require the L&P, closing, and opening moves to exist (NL&P is optional)
+            #
+            if not fyc.loss_and_profit_move_id:
+                raise osv.except_osv(_("Not all the operations have been performed!"), _("The Loss & Profit move is required"))
+            if not fyc.closing_move_id:
+                raise osv.except_osv(_("Not all the operations have been performed!"), _("The Closing move is required"))
+            if not fyc.opening_move_id:
+                raise osv.except_osv(_("Not all the operations have been performed!"), _("The Opening move is required"))
+
+            #
+            # Calculate the moves to check
+            #
+            moves = []
+            moves.append(fyc.loss_and_profit_move_id)
+            if fyc.net_loss_and_profit_move_id:
+                moves.append(fyc.net_loss_and_profit_move_id)
+            moves.append(fyc.closing_move_id)
+            moves.append(fyc.opening_move_id)
+
+            #
+            # Check and reconcile each of the moves
+            #
+            for move in moves:
+                netsvc.Logger().notifyChannel('fyc', netsvc.LOG_DEBUG, "Checking %s" % move.ref)
+                #
+                # Check if it has been confirmed
+                #
+                if move.state == 'draft':
+                    raise osv.except_osv(_("Some moves are in draft state!"), _("You have to review and confirm each of the moves before continuing"))
+                #
+                # Check the balance
+                #
+                amount = 0
+                for line in move.line_id:
+                    amount += (line.debit - line.credit)
+                if abs(amount) > 0.5 * 10 ** -int(self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')):
+                    raise osv.except_osv(_("Some moves are unbalanced!"), _("All the moves should be balanced before continuing"))
+
+                #
+                # Reconcile the move
+                #
+                # Note: We will reconcile all the lines, even the 'not reconcile' ones,
+                #       to prevent future problems (the user may change the
+                #       reconcile option of an account in the future)
+                #
+                netsvc.Logger().notifyChannel('fyc', netsvc.LOG_DEBUG, "Reconcile %s" % move.ref)
+                tmp_context = context.copy()
+                tmp_context['fy_closing'] = True # Fiscal year closing = reconcile everything
+                line_ids = [line.id for line in move.line_id]
+                self.pool.get('account.move.line').reconcile(cr, uid, line_ids, context=tmp_context)
+
+            #
+            # Close the fiscal year and it's periods
+            #
+            # Note: We can not just do a write, cause it would raise a
+            #       "You can not modify/delete a journal with entries for this period!"
+            #       so we have to do it on SQL level :(
+            #       This is based on the "account.fiscalyear.close.state" wizard.
+            #
+            netsvc.Logger().notifyChannel('fyc', netsvc.LOG_DEBUG, "Closing fiscal year")
+            query = """
+                    UPDATE account_journal_period
+                    SET state = 'done'
+                    WHERE period_id IN (SELECT id FROM account_period WHERE fiscalyear_id = %d)
+                    """
+            cr.execute(query % fyc.closing_fiscalyear_id.id)
+            query = """
+                    UPDATE account_period
+                    SET state = 'done'
+                    WHERE fiscalyear_id = %d
+                    """
+            cr.execute(query % fyc.closing_fiscalyear_id.id)
+            query = """
+                    UPDATE account_fiscalyear
+                    SET state = 'done'
+                    WHERE id = %d
+                    """
+            cr.execute(query % fyc.closing_fiscalyear_id.id)
+
+        # Done
+        self.write(cr, uid, ids, {'state': 'done'})
+        return True
+
+
+    def action_cancel(self, cr, uid, ids, context=None):
+        """
+        Called when the user clicks the cancel button.
+        """
+        if context is None:
+            context = {}
+        #
+        # Make sure the lang is defined on the context
+        #
+        user = self.pool.get('res.users').browse(cr, uid, uid, context)
+        context['lang'] = context.get('lang') or user.context_lang
+
+        #
+        # Uncheck all the operations
+        #
+        self.pool.get('account_fiscal_year_closing.fyc').write(cr, uid, ids, {
+                    'create_loss_and_profit': False,
+                    'create_net_loss_and_profit': False,
+                    'create_closing': False,
+                    'create_opening': False,
+                    'check_invalid_period_moves': False,
+                    'check_draft_moves': False,
+                    'check_unbalanced_moves': False,
+                }, context=context)
+
+        #
+        # Open the fiscal year and it's periods
+        #
+        # Note: We can not just do a write, cause it would raise a
+        #       "You can not modify/delete a journal with entries for this period!"
+        #       so we have to do it on SQL level :(
+        #       This is based on the "account.fiscalyear.close.state" wizard.
+        #
+        for fyc in self.browse(cr, uid, ids, context):
+            query = """
+                    UPDATE account_journal_period
+                    SET state = 'draft'
+                    WHERE period_id IN (SELECT id FROM account_period WHERE fiscalyear_id = %d)
+                    """
+            cr.execute(query % fyc.closing_fiscalyear_id.id)
+            query = """
+                    UPDATE account_period
+                    SET state = 'draft'
+                    WHERE fiscalyear_id = %d
+                    """
+            cr.execute(query % fyc.closing_fiscalyear_id.id)
+            query = """
+                    UPDATE account_fiscalyear
+                    SET state = 'draft'
+                    WHERE id = %d
+                    """
+            cr.execute(query % fyc.closing_fiscalyear_id.id)
+
+
+        # Canceled
+        self.write(cr, uid, ids, {'state': 'canceled'})
+
+        # Note: Everything else (removing the account moves) is done on the
+        #       cancel wizard *after* this action returns.
+        return True
+
+
+    def action_recover(self, cr, uid, ids, context=None):
+        """
+        Called when the user clicks the draft button to create
+        a new workflow instance.
+        """
+        self.write(cr, uid, ids, {'state': 'new'})
+        wf_service = netsvc.LocalService("workflow")
+        for item_id in ids:
+            wf_service.trg_create(uid, 'account_fiscal_year_closing.fyc', item_id, cr)
+        return True
+
+
+fiscal_year_closing()
+
+
+
+
+
+

=== added file 'account_fiscal_year_closing/fyc_view.xml'
--- account_fiscal_year_closing/fyc_view.xml	1970-01-01 00:00:00 +0000
+++ account_fiscal_year_closing/fyc_view.xml	2011-10-05 07:03:24 +0000
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+#
+#    OpenERP - Spanish Fiscal Year Closing
+#    Copyright (C) 2009 Pexego Sistemas Informáticos. All Rights Reserved
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+-->
+<!--
+Authors: Borja López Soilán (Pexego) - borja@xxxxxxx
+-->
+<openerp>
+    <data>
+
+        <!-- Wizard tree view -->
+        <record model="ir.ui.view" id="view_fyc_tree">
+            <field name="name">account_fiscal_year_closing.fyc.tree</field>
+            <field name="model">account_fiscal_year_closing.fyc</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree string="Fiscal Year Closings" colors="red:state=='new';blue:state=='draft';green:state=='in_progress'">
+                    <field name="company_id" select="1"/>
+                    <field name="name" select="2"/>
+                    <field name="closing_fiscalyear_id" select="1"/>
+                    <field name="opening_fiscalyear_id" select="1"/>
+                    <field name="state"/>
+                </tree>
+            </field>
+        </record>
+
+        <!-- Wizard form view -->
+        <record model="ir.ui.view" id="view_fyc_form">
+            <field name="name">account_fiscal_year_closing.fyc.form</field>
+            <field name="model">account_fiscal_year_closing.fyc</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Fiscal Year Closing">
+                    <group attrs="{'invisible':[('state','!=','new')]}" colspan="4">
+                        <label string="Please, select the company, fiscal year to close and fiscal year to open." colspan="4"/>
+                    </group>
+                    <group colspan="4">
+                        <field name="company_id" required="1" select="1" attrs="{'readonly':[('state','!=','new')]}"/>
+                        <field name="name" select="2" attrs="{'readonly':[('state','!=','new')]}"/>
+                    </group>
+                    <group string="Fiscal Years" colspan="4">
+                        <field name="closing_fiscalyear_id" attrs="{'readonly':[('state','!=','new')]}"/>
+                        <field name="opening_fiscalyear_id" attrs="{'readonly':[('state','!=','new')]}"/>
+                    </group>
+                    <group attrs="{'invisible':[('state','!=','new')]}" colspan="4">
+                        <button name="draft" string="Continue" states="new" icon="gtk-apply" colspan="4"/>
+                    </group>
+                    <group attrs="{'invisible':[('state','=','new')]}" colspan="4">
+                        <notebook colspan="4">
+                            <page string="General">
+                                <group string="Operations" colspan="4">
+                                    <group colspan="4">
+                                        <separator string="Operation to perform" colspan="2"/>
+                                        <separator string="Move created by the operation" colspan="2"/>
+                                        <field name="create_loss_and_profit" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="loss_and_profit_move_id"/>
+                                        <field name="create_net_loss_and_profit" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="net_loss_and_profit_move_id"/>
+                                        <field name="create_closing" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="closing_move_id"/>
+                                        <field name="create_opening" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="opening_move_id"/>
+                                    </group>
+                                    <separator string="Checks"/>
+                                    <group colspan="4">
+                                        <field name="check_invalid_period_moves" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="check_draft_moves" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="check_unbalanced_moves" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                    </group>
+                                </group>
+                                <group colspan="4" col="10">
+                                    <field name="state" select="2" readonly="1"/>
+                                    <button name="%(wiz_account_fiscal_year_closing_run)d"
+                                        type="action"
+                                        string="Perform the operations"
+                                        icon="gtk-execute"
+                                        states="draft,in_progress"/>
+                                    <button name="confirm" string="Confirm" states="in_progress" icon="gtk-apply"/>
+                                    <button name="%(wiz_account_fiscal_year_closing_cancel)d"
+                                        type="action"
+                                        string="Cancel"
+                                        icon="gtk-cancel"
+                                        states="in_progress,done"/>
+                                    <button name="action_recover" string="Draft" type="object" states="canceled" icon="gtk-undo"/>
+                                </group>
+                            </page>
+                            <page string="Configuration" attrs="{'invisible':[('state','=','new')]}">
+                                <notebook colspan="4">
+                                    <page string="Loss and Profit">
+                                        <field name="lp_description" colspan="4" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="lp_journal_id" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="lp_period_id" domain="[('special','=',True)]" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="lp_date" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="lp_account_mapping_ids" colspan="4" nolabel="1" attrs="{'readonly':[('state','in',('done','cancel'))]}">
+                                            <tree string="Account mappings" editable="top">
+                                                <field name="source_account_id"/>
+                                                <field name="dest_account_id" required="1"/>
+                                            </tree>
+                                            <form string="Account mapping">
+                                                <field name="source_account_id"/>
+                                                <field name="dest_account_id" required="1"/>
+                                                <field name="name"/>
+                                            </form>
+                                        </field>
+                                    </page>
+                                    <page string="Net Loss and Profit">
+                                        <field name="nlp_description" colspan="4" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="nlp_journal_id" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="nlp_period_id" domain="[('special','=',True)]" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="nlp_date" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="nlp_account_mapping_ids" colspan="4" nolabel="1" attrs="{'readonly':[('state','in',('done','cancel'))]}">
+                                            <tree string="Account mappings" editable="top">
+                                                <field name="source_account_id"/>
+                                                <field name="dest_account_id"/>
+                                            </tree>
+                                            <form string="Account mapping">
+                                                <field name="source_account_id"/>
+                                                <field name="dest_account_id"/>
+                                                <field name="name"/>
+                                            </form>
+                                        </field>
+                                    </page>
+                                    <page string="Closing">
+                                        <field name="c_description" colspan="4" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="c_journal_id" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="c_period_id" domain="[('special','=',True)]" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="c_date" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="c_account_mapping_ids" colspan="4" nolabel="1" attrs="{'readonly':[('state','in',('done','cancel'))]}">
+                                            <tree string="Accounts to close" editable="top">
+                                                <field name="source_account_id"/>
+                                            </tree>
+                                            <form string="Account to close">
+                                                <field name="source_account_id"/>
+                                                <field name="name"/>
+                                            </form>
+                                        </field>
+                                    </page>
+                                    <page string="Opening">
+                                        <field name="o_description" colspan="4" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="o_journal_id" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="o_period_id" domain="[('special','=',True)]" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                        <field name="o_date" attrs="{'readonly':[('state','in',('done','cancel'))]}"/>
+                                    </page>
+                                </notebook>
+                            </page>
+                        </notebook>
+                    </group>
+                </form>
+            </field>
+        </record>
+
+        <!-- Menus and windows -->
+
+        <record model="ir.actions.act_window" id="action_view_fyc_form">
+            <field name="name">Close Fiscal Year</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">account_fiscal_year_closing.fyc</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">form,tree</field>
+            <field name="view_id" ref="view_fyc_form"/>
+        </record>
+
+        <menuitem id="menu_fyc_new"
+                    parent="account.menu_account_end_year_treatments"
+                    name="Close Fiscal Year"
+                    action="action_view_fyc_form"
+                    sequence="10"/>
+
+        <record model="ir.actions.act_window" id="action_view_fyc_tree">
+            <field name="name">Fiscal Years Closings</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">account_fiscal_year_closing.fyc</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="view_fyc_tree"/>
+        </record>
+
+        <menuitem id="menu_fyc_list"
+                    parent="account.menu_account_end_year_treatments"
+                    name="Fiscal Years Closings"
+                    action="action_view_fyc_tree"
+                    sequence="11"/>
+
+    </data>
+</openerp>

=== added file 'account_fiscal_year_closing/fyc_wizard.xml'
--- account_fiscal_year_closing/fyc_wizard.xml	1970-01-01 00:00:00 +0000
+++ account_fiscal_year_closing/fyc_wizard.xml	2011-10-05 07:03:24 +0000
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+#
+#    OpenERP - Fiscal Year Closing
+#    Copyright (C) 2009 Pexego Sistemas Informáticos. All Rights Reserved
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+-->
+<!--
+Fiscal Year Closing wizard wizards :)
+
+Author: Borja López Soilán (Pexego) - borja@xxxxxxx
+-->
+<openerp>
+    <data>
+        <!-- Run operations wizard -->
+        <wizard id="wiz_account_fiscal_year_closing_run"
+                model="account_fiscal_year_closing.fyc"
+                string="Run"
+                name="account_fiscal_year_closing.wizard_run"
+                menu="False"/>
+
+        <!-- Cancel operations wizard -->
+        <wizard id="wiz_account_fiscal_year_closing_cancel"
+                model="account_fiscal_year_closing.fyc"
+                string="Cancel"
+                name="account_fiscal_year_closing.wizard_cancel"
+                menu="False"/>
+
+    </data>
+</openerp>

=== added file 'account_fiscal_year_closing/fyc_workflow.xml'
--- account_fiscal_year_closing/fyc_workflow.xml	1970-01-01 00:00:00 +0000
+++ account_fiscal_year_closing/fyc_workflow.xml	2011-10-05 07:03:24 +0000
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+#
+#    OpenERP - Fiscal Year Closing
+#    Copyright (C) 2009 Pexego Sistemas Informáticos. All Rights Reserved
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+-->
+<!--
+Fiscal Year Closing wizard workflow.
+
+Author: Borja López Soilán (Pexego) - borja@xxxxxxx
+-->
+<openerp>
+    <data>
+        <!-- *** Nodes ***************************************************** -->
+
+        <record model="workflow" id="wkf_fyc">
+            <field name="name">Fiscal Year Closing workflow</field>
+            <field name="osv">account_fiscal_year_closing.fyc</field>
+            <field name="on_create">True</field>
+        </record>
+
+
+        <record model="workflow.activity" id="act_new">
+            <field name="wkf_id" ref="wkf_fyc"/>
+            <field name="flow_start">True</field>
+            <field name="name">new</field>
+        </record>
+
+        <record model="workflow.activity" id="act_draft">
+            <field name="wkf_id" ref="wkf_fyc"/>
+            <field name="name">draft</field>
+            <field name="action">action_draft()</field>
+            <field name="kind">function</field>
+        </record>
+
+        <record model="workflow.activity" id="act_progress">
+            <field name="wkf_id" ref="wkf_fyc"/>
+            <field name="name">in_progress</field>
+            <field name="action">action_run()</field>
+            <field name="kind">function</field>
+        </record>
+
+        <record model="workflow.activity" id="act_confirm">
+            <field name="wkf_id" ref="wkf_fyc"/>
+            <field name="name">confirmed</field>
+            <field name="action">action_confirm()</field>
+            <field name="kind">function</field>
+        </record>
+
+        <record model="workflow.activity" id="act_cancel">
+            <field name="wkf_id" ref="wkf_fyc"/>
+            <field name="name">canceled</field>
+            <field name="flow_stop">True</field>
+            <field name="action">action_cancel()</field>
+            <field name="kind">function</field>
+        </record>
+
+
+        <!-- *** Transitions *********************************************** -->
+
+        <record model="workflow.transition" id="trans_new_draft">
+            <field name="act_from" ref="act_new"/>
+            <field name="act_to" ref="act_draft"/>
+            <field name="signal">draft</field>
+        </record>
+
+        <record model="workflow.transition" id="trans_draft_progress">
+            <field name="act_from" ref="act_draft"/>
+            <field name="act_to" ref="act_progress"/>
+            <field name="signal">run</field>
+        </record>
+
+        <record model="workflow.transition" id="trans_progress_progress">
+            <field name="act_from" ref="act_progress"/>
+            <field name="act_to" ref="act_progress"/>
+            <field name="signal">run</field>
+        </record>
+
+        <record model="workflow.transition" id="trans_progress_confirm">
+            <field name="act_from" ref="act_progress"/>
+            <field name="act_to" ref="act_confirm"/>
+            <field name="signal">confirm</field>
+        </record>
+
+        <record model="workflow.transition" id="trans_progress_cancel">
+            <field name="act_from" ref="act_progress"/>
+            <field name="act_to" ref="act_cancel"/>
+            <field name="signal">cancel</field>
+        </record>
+
+        <record model="workflow.transition" id="trans_confirm_cancel">
+            <field name="act_from" ref="act_confirm"/>
+            <field name="act_to" ref="act_cancel"/>
+            <field name="signal">cancel</field>
+        </record>
+
+    </data>
+</openerp>

=== added file 'account_fiscal_year_closing/hide_account_wizards.xml'
--- account_fiscal_year_closing/hide_account_wizards.xml	1970-01-01 00:00:00 +0000
+++ account_fiscal_year_closing/hide_account_wizards.xml	2011-10-05 07:03:24 +0000
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+#
+#    OpenERP - Fiscal Year Closing
+#    Copyright (C) 2009 Pexego Sistemas Informáticos. All Rights Reserved
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+-->
+<!--
+Authors: Borja López Soilán (Pexego) - borja@xxxxxxx
+-->
+<openerp>
+    <data>
+
+        <menuitem id="menu_account_end_year_treatments_old"
+            name="Other operations"
+            parent="account.menu_account_end_year_treatments"
+            sequence="100"/>
+
+        <menuitem id="account.menu_wizard_fy_close"
+            parent="menu_account_end_year_treatments_old"/>
+
+        <menuitem id="account.menu_wizard_fy_close_state"
+            parent="menu_account_end_year_treatments_old"/>
+
+        <menuitem id="account.menu_wizard_account_open_closed_fiscalyear"
+            parent="menu_account_end_year_treatments_old"/>
+
+    </data>
+</openerp>

=== added directory 'account_fiscal_year_closing/i18n'
=== added file 'account_fiscal_year_closing/i18n/ca.po'
--- account_fiscal_year_closing/i18n/ca.po	1970-01-01 00:00:00 +0000
+++ account_fiscal_year_closing/i18n/ca.po	2011-10-05 07:03:24 +0000
@@ -0,0 +1,820 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* l10n_es_fiscal_year_closing
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.7\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2010-03-23 18:01:36+0000\n"
+"PO-Revision-Date: 2010-04-12 00:29+0100\n"
+"Last-Translator: Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "You have to review and confirm each of the moves before continuing"
+msgstr "Hauríeu de revisar i confirmar cadascun dels assentaments abans de continuar"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#: field:l10n_es_fiscal_year_closing.fyc_c_account_map,fyc_id:0
+#: field:l10n_es_fiscal_year_closing.fyc_lp_account_map,fyc_id:0
+#: field:l10n_es_fiscal_year_closing.fyc_nlp_account_map,fyc_id:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_cancel:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_run:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_run:0
+#, python-format
+msgid "Fiscal Year Closing"
+msgstr "Tancament d'exercici fiscal"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "All the moves should be balanced before continuing"
+msgstr "Tots els assentaments han d'estar quadrats abans de continuar"
+
+#. module: l10n_es_fiscal_year_closing
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr "Nom de model no vàlid en la definició d'acció."
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.ui.menu,name:l10n_es_fiscal_year_closing.menu_account_end_year_treatments_old
+msgid "Other operations (for non Spanish charts of accounts)"
+msgstr "Altres operacions (per a plans comptables no espanyols)"
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.model,name:l10n_es_fiscal_year_closing.model_l10n_es_fiscal_year_closing_fyc_c_account_map
+msgid "SFYC Closing Account Mapping"
+msgstr "Mapa comptes tancament CEFE"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,check_invalid_period_moves:0
+msgid "Check invalid period or date moves"
+msgstr "Comprova assentaments amb període o dates invàlids"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,company_id:0
+msgid "Company"
+msgstr "Companyia"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Operation to perform"
+msgstr "Operació a realitzar"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,show_exception:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,show_exception:0
+msgid "Fiscal Year Closing - Error!"
+msgstr "Tancament exercici fiscal - Error!"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "%s Fiscal Year Closing"
+msgstr "Tancament exercici fiscal %s"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,create_closing:0
+msgid "Close fiscal year"
+msgstr "Tanca exercici fiscal"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc_c_account_map,source_account_id:0
+msgid "Account"
+msgstr "Compte"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,progress:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,progress:0
+msgid "The process may take a while."
+msgstr "El procés pot tardar una mica."
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,show_exception:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,show_exception:0
+msgid "Error: One of the selected operations has failed!"
+msgstr "Error: Una de les operacions seleccionades ha fallat!"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Closing"
+msgstr "Tancament"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Operations"
+msgstr "Operacions"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,c_account_mapping_ids:0
+msgid "Accounts"
+msgstr "Comptes"
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.model,name:l10n_es_fiscal_year_closing.model_l10n_es_fiscal_year_closing_fyc_nlp_account_map
+msgid "SFYC Net Loss & Profit Account Mapping"
+msgstr "Mapa de compte de Pèrdues i Guanys Patr. Net CECE"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Confirm"
+msgstr "Confirma"
+
+#. module: l10n_es_fiscal_year_closing
+#: selection:l10n_es_fiscal_year_closing.fyc,state:0
+msgid "New"
+msgstr "Nou"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,opening_fiscalyear_id:0
+msgid "Fiscal year to open"
+msgstr "Exercici fiscal a obrir"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "The Opening move is required"
+msgstr "L'assentament d'obertura és obligatori"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Account mapping"
+msgstr "Mapa de comptes"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,check_unbalanced_moves:0
+msgid "Check unbalanced moves"
+msgstr "Comprova assentaments desquadrats"
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.actions.wizard,name:l10n_es_fiscal_year_closing.wiz_l10n_es_fiscal_year_closing_run
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,init_cancel,run:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel,run:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,init_run,run:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,init_run,run:0
+msgid "Run"
+msgstr "Executa"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,net_loss_and_profit_move_id:0
+msgid "Net L&P Move"
+msgstr "Assentament de PiG Patr. Net"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,closing_move_id:0
+msgid "Closing Move"
+msgstr "Assentament de Tancament"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,progress,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,progress,end:0
+msgid "Close (continues in background)"
+msgstr "Tanca (continua en segon pla)"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Configuration"
+msgstr "Configuració"
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.actions.act_window,name:l10n_es_fiscal_year_closing.action_view_fyc_form
+#: model:ir.ui.menu,name:l10n_es_fiscal_year_closing.menu_fyc_new
+msgid "Close Fiscal Year"
+msgstr "Tanca un exercici fiscal"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc_c_account_map,dest_account_id:0
+#: field:l10n_es_fiscal_year_closing.fyc_lp_account_map,dest_account_id:0
+#: field:l10n_es_fiscal_year_closing.fyc_nlp_account_map,dest_account_id:0
+msgid "Dest account"
+msgstr "Compte destí"
+
+#. module: l10n_es_fiscal_year_closing
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "XML invàlid per a la definició de la vista!"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_cancel:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel:0
+msgid "It will remove the previously generated account moves."
+msgstr "Eliminarà els assentaments generats anteriorment."
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,done:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,done:0
+msgid "The selected operations have been performed sucessfuly."
+msgstr "Les operacions seleccionades han estat realitzades amb èxit."
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,init_cancel,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,init_run,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,init_run,end:0
+msgid "Cancel"
+msgstr "Cancel·la"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_cancel:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel:0
+msgid "This wizard will cancel the selected operations."
+msgstr "Aquest assistent cancel·larà les operacions seleccionades."
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_run,progress,task_progress:0
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_cancel,progress,task_progress:0
+msgid "Task Progress"
+msgstr "Progrés de la tasca"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Move created by the operation"
+msgstr "Assentament creat per l'operació"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,create_opening:0
+msgid "Open next fiscal year"
+msgstr "Obre exercici fiscal següent"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Please, select the company, fiscal year to close and fiscal year to open."
+msgstr "Seleccioneu la companyia, exercici fiscal a tancar i exercici fiscal a obrir."
+
+#. module: l10n_es_fiscal_year_closing
+#: selection:l10n_es_fiscal_year_closing.fyc,state:0
+msgid "Canceled"
+msgstr "Cancel·lat"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_cancel:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel:0
+msgid "Closed periods, and the fiscal year, will be reopened."
+msgstr "Els períodes tancats i l'exercici fiscal seran reoberts."
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_run:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_run:0
+msgid "This wizard will perform the selected operations."
+msgstr "L'assistent realitzarà les operacions seleccionades."
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid ""
+"One or more draft moves found: \n"
+"%s"
+msgstr ""
+"S'han trobat un o més assentaments esborrany: \n"
+"%s"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc_lp_account_map,source_account_id:0
+#: field:l10n_es_fiscal_year_closing.fyc_nlp_account_map,source_account_id:0
+msgid "Source account"
+msgstr "Compte origen"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Net Loss & Profit"
+msgstr "Pèrdues i Guanys Patr. Net"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+#: selection:l10n_es_fiscal_year_closing.fyc,state:0
+msgid "Draft"
+msgstr "Esborrany"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Spanish Fiscal Year Closings"
+msgstr "Tancaments d'exercicis fiscals espanyols"
+
+#. module: l10n_es_fiscal_year_closing
+#: constraint:ir.model:0
+msgid "The Object name must start with x_ and not contain any special character !"
+msgstr "El nom de l'objecte ha de començar amb x_ i no contenir cap caràcter especial!"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Checks"
+msgstr "Comprovacions"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Loss and Profit"
+msgstr "Pèrdues i Guanys"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,state:0
+msgid "Status"
+msgstr "Estat"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Not all the operations have been performed!"
+msgstr "No s'han realitzat totes les operacions!"
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.module.module,shortdesc:l10n_es_fiscal_year_closing.module_meta_information
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Spanish Fiscal Year Closing"
+msgstr "Tancament d'exercici fiscal espanyol"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,c_date:0
+#: field:l10n_es_fiscal_year_closing.fyc,lp_date:0
+#: field:l10n_es_fiscal_year_closing.fyc,nlp_date:0
+#: field:l10n_es_fiscal_year_closing.fyc,o_date:0
+msgid "Date"
+msgstr "Data"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,done:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,done:0
+msgid "Fiscal Year Closing - Done"
+msgstr "Tancament d'exercici fiscal - Realitzat"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_run:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_run:0
+msgid "Non-selected operations will be canceled."
+msgstr "Les operacions no seleccionades seran cancel·lades. "
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_run,show_exception,exception_text:0
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_cancel,show_exception,exception_text:0
+msgid "Exception"
+msgstr "Excepció"
+
+#. module: l10n_es_fiscal_year_closing
+#: help:l10n_es_fiscal_year_closing.fyc,check_draft_moves:0
+msgid "Checks that there are no draft moves on the fiscal year that is being closed. Non-confirmed moves won't be taken in account on the closing operations."
+msgstr "Comprova que no existeixen assentaments esborrany en l'exercici fiscal que s'està tancant. Els assentaments no confirmats no es tindran en compte en les operacions de tancament."
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.model,name:l10n_es_fiscal_year_closing.model_l10n_es_fiscal_year_closing_fyc_lp_account_map
+msgid "SFYC Loss & Profit Account Mapping"
+msgstr "Mapa de comptes de PiG CECE"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing move shouldn't be empty"
+msgstr "L'assentament de tancament no hauria d'estar buit"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "The Loss & Profit move is required"
+msgstr "L'assentament de Pèrdues i Guanys és obligatori"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,c_period_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,lp_period_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,nlp_period_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,o_period_id:0
+msgid "Period"
+msgstr "Període"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Some moves are in draft state!"
+msgstr "Alguns assentaments estan en estat esborrany!"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "General"
+msgstr "General"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Net Loss and Profit"
+msgstr "Pèrdues i Guanys Patr. Net"
+
+#. module: l10n_es_fiscal_year_closing
+#: selection:l10n_es_fiscal_year_closing.fyc,state:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,done,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,done,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,show_exception,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,show_exception,end:0
+msgid "Done"
+msgstr "Fet"
+
+#. module: l10n_es_fiscal_year_closing
+#: help:l10n_es_fiscal_year_closing.fyc,check_invalid_period_moves:0
+msgid "Checks that there are no moves, on the fiscal year that is being closed, with dates or periods outside that fiscal year."
+msgstr "Comprova que no existeixin assentaments, en l'exercici fiscal que s'està tancant, amb dates o períodes fora d'aquest exercici fiscal."
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid ""
+"One or more moves with invalid period or date found on the fiscal year: \n"
+"%s"
+msgstr ""
+"S'han trobat un o més assentaments amb períodes o data invàlids en l'exercici fiscal:\n"
+"%s"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,progress,run:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,progress,run:0
+msgid "Keep waiting"
+msgstr "Seguir esperant"
+
+#. module: l10n_es_fiscal_year_closing
+#: selection:l10n_es_fiscal_year_closing.fyc,state:0
+msgid "In Progress"
+msgstr "En progrés"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Some moves are unbalanced!"
+msgstr "Alguns assentaments estan desquadrats!"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The operation must be a supported one"
+msgstr "L'operació ha de ser una de suportada"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,show_exception:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,show_exception:0
+msgid "Details"
+msgstr "Detalls"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_run:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_run:0
+msgid "It will create account moves for the operations you selected, skipping those already created."
+msgstr "Crearà assentaments per a les operacions seleccionades, ignorant els que ja s'han creat."
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.actions.act_window,name:l10n_es_fiscal_year_closing.action_view_fyc_tree
+#: model:ir.ui.menu,name:l10n_es_fiscal_year_closing.menu_fyc_list
+msgid "Fiscal Years Closings"
+msgstr "Tancaments d'exercicis fiscals"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "The Closing move is required"
+msgstr "L'assentament de tancament és obligatori"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,opening_move_id:0
+msgid "Opening Move"
+msgstr "Assentament d'obertura"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,c_description:0
+#: field:l10n_es_fiscal_year_closing.fyc,lp_description:0
+#: field:l10n_es_fiscal_year_closing.fyc,name:0
+#: field:l10n_es_fiscal_year_closing.fyc,nlp_description:0
+#: field:l10n_es_fiscal_year_closing.fyc,o_description:0
+#: field:l10n_es_fiscal_year_closing.fyc_c_account_map,name:0
+#: field:l10n_es_fiscal_year_closing.fyc_lp_account_map,name:0
+#: field:l10n_es_fiscal_year_closing.fyc_nlp_account_map,name:0
+msgid "Description"
+msgstr "Descripció"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Opening"
+msgstr "Obertura"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Account to close"
+msgstr "Compte a tancar"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,c_journal_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,lp_journal_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,nlp_journal_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,o_journal_id:0
+msgid "Journal"
+msgstr "Diari"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+#: field:l10n_es_fiscal_year_closing.fyc,lp_account_mapping_ids:0
+#: field:l10n_es_fiscal_year_closing.fyc,nlp_account_mapping_ids:0
+msgid "Account mappings"
+msgstr "Mapes de comptes"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,check_draft_moves:0
+msgid "Check draft moves"
+msgstr "Comprova assentaments esborrany"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,create_loss_and_profit:0
+msgid "Create Loss & Profit move"
+msgstr "Crea assentament de Pèrdues i Guanys"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Fiscal Years"
+msgstr "Exercicis fiscals"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,closing_fiscalyear_id:0
+msgid "Fiscal year to close"
+msgstr "Exercici fiscal a tancar"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid ""
+"One or more unbalanced moves found: \n"
+"%s"
+msgstr ""
+"Es trobaran un o més assentaments desquadrats: \n"
+"%s"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing move must exist"
+msgstr "L'assentament de tancament ha d'existir"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,progress:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,progress:0
+msgid "Fiscal Year Closing - Working"
+msgstr "Tancament d'exercici fiscal - Treballant"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Perform the operations"
+msgstr "Executa les operacions"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Continue"
+msgstr "Continua"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_run,progress,progress:0
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_cancel,progress,progress:0
+msgid "Total Progress"
+msgstr "Progrés total"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Accounts to close"
+msgstr "Comptes a tancar"
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.module.module,description:l10n_es_fiscal_year_closing.module_meta_information
+msgid ""
+"Spanish Fiscal Year Closing Wizard\n"
+"    \n"
+"Replaces the default OpenERP end of year wizards (from account module)\n"
+"with a more advanced all-in-one wizard that will let the users:\n"
+"  - Check for unbalanced moves, moves with invalid dates\n"
+"    or period or draft moves on the fiscal year to be closed.\n"
+"  - Create the Loss and Profit entry.\n"
+"  - Create the Net Loss and Profit entry.\n"
+"  - Create the Closing entry.\n"
+"  - Create the Opening entry.\n"
+"\n"
+"It's hightly configurable, and comes preconfigured for the current Spanish chart of accounts.\n"
+"\n"
+"Also is stateful, saving all the info about the fiscal year closing, so the\n"
+"user can cancel and undo the operations easily.\n"
+"    "
+msgstr ""
+"Assistent de tancament d'exercici fiscal espanyol\n"
+"    \n"
+"Substitueix els assistents de final d'any predeterminats d'OpenERP (del mòdul account)\n"
+"amb un assistent tot-en-un més avançat que permetrà als usuaris:\n"
+"  - Comprovar els assentaments desquadrats, amb dates i períodes\n"
+"    invàlids o assentaments esborrany en l'exercici fiscal a tancar.\n"
+"  - Crear l'assentament de Pèrdues i Guanys.\n"
+"  - Crear l'assentament de Pèrdues i Guanys de Patrimoni Net.\n"
+"  - Crear l'assentament de Tancament.\n"
+"  - Crear l'assentament d'Obertura.\n"
+"\n"
+"És altament configurable, i ve preconfigurat pel pla de comptes espanyol actual.\n"
+"\n"
+"També conserva l'estat, guardant tota la informació sobre el tancament de l'exercici fiscal,\n"
+"per a que l'usuari pugui cancel·lar i desfer les operacions fàcilment.\n"
+"    "
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,loss_and_profit_move_id:0
+msgid "L&P Move"
+msgstr "Assentament PiG"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,create_net_loss_and_profit:0
+msgid "Create Net Loss & Profit"
+msgstr "Crea assentament Pèrdues i Guanys Patr. Net"
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.model,name:l10n_es_fiscal_year_closing.model_l10n_es_fiscal_year_closing_fyc
+msgid "Spanish Fiscal Year Closing Wizard"
+msgstr "Assistent de tancament d'exercici fiscal espanyol"
+
+#. module: l10n_es_fiscal_year_closing
+#: help:l10n_es_fiscal_year_closing.fyc,check_unbalanced_moves:0
+msgid "Checks that there are no unbalanced moves on the fiscal year that is being closed."
+msgstr "Comprova que no existeixen assentaments desquadrats en l'exercici fiscal que s'està tancant."
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Fiscal Year Opening"
+msgstr "Obertura d'exercici fiscal"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "The name must be unique"
+msgstr "El nom ha de ser únic"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Error"
+msgstr "Error"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing move must exist to create the opening one"
+msgstr "L'assentament de tancament ha d'existir per a crear el d'obertura"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P move must exist before creating the closing one"
+msgstr "L'assentament de PiG ha d'existir abans de crear el de tancament"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P description must be defined"
+msgstr "La descripció de PiG ha d'estar definida"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P date must be defined"
+msgstr "La data de PiG ha d'estar definida"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P period must be defined"
+msgstr "El període de PiG ha d'estar definit"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P journal must be defined"
+msgstr "El diari de PiG ha d'estar definit"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The Net L&P description must be defined"
+msgstr "La descripció de PiG Patr. Net ha d'estar definida"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The Net L&P date must be defined"
+msgstr "La data de PiG Patr. Net ha d'estar definida"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The Net L&P period must be defined"
+msgstr "El període de PiG Patr. Net ha d'estar definit"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The Net L&P journal must be defined"
+msgstr "El diari de PiG Patr. Net ha d'estar definit"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing description must be defined"
+msgstr "La descripció de tancament ha d'estar definida"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing date must be defined"
+msgstr "La data de tancament ha d'estar definida"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing period must be defined"
+msgstr "El període de tancament ha d'estar definit"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing journal must be defined"
+msgstr "El diari de tancament ha d'estar definit"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The opening description must be defined"
+msgstr "La descripció d'obertura ha d'estar definida"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The opening date must be defined"
+msgstr "La data d'obertura ha d'estar definida"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The opening period must be defined"
+msgstr "El període d'obertura ha d'estar definit"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The opening journal must be defined"
+msgstr "El diari d'obertura ha d'estar definit"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Loss & Profit"
+msgstr "Pèrdues i Guanys"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "There is already a fiscal year closing with this name."
+msgstr "Ja existeix un tancament d'exercici amb aquest nom."
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid ""
+"One or more draft moves found: \n"
+"%s"
+msgstr ""
+"Un o més assentaments esborrany trobats: \n"
+"%s"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "There is already a fiscal year closing for the fiscal year to close."
+msgstr "Ja existeix un tancament d'exercici per l'exercici a tancar."
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "There is already a fiscal year closing for the fiscal year to open."
+msgstr "Ja existeix un tancament d'exercici per l'exercici a obrir."
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid ""
+"One or more moves with invalid period or date found on the fiscal year: \n"
+"%s"
+msgstr ""
+"S'han trobat un o més assentaments amb períodes o data invàlids en l'exercici: \n"
+"%s"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid ""
+"One or more unbalanced moves found: \n"
+"%s"
+msgstr ""
+"S'ha trobat un o més assentaments desquadrats: \n"
+"%s"
+

=== added file 'account_fiscal_year_closing/i18n/es.po'
--- account_fiscal_year_closing/i18n/es.po	1970-01-01 00:00:00 +0000
+++ account_fiscal_year_closing/i18n/es.po	2011-10-05 07:03:24 +0000
@@ -0,0 +1,820 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* l10n_es_fiscal_year_closing
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.7\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2010-03-23 18:01:36+0000\n"
+"PO-Revision-Date: 2010-03-23 19:44+0100\n"
+"Last-Translator: Borja López Soilán (Pexego) <borja@xxxxxxx>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "UserError"
+msgstr "ErrorUsuario"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "No destination account %s found for account %s."
+msgstr "Sin cuenta destino %s para la cuenta %s."
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The Net L&P account mappings are not properly configured: %s"
+msgstr "El mapeo de cuentas P&G Neto no está configurado correctamente: %s"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P account mappings are not properly configured: %s"
+msgstr "El mapeo de cuentas P&G no está configurado correctamente: %s"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "One or more draft moves found: \n%s"
+msgstr "Se encontraron uno o más asientos en borrador: \n%s"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "One or more moves with invalid period or date found on the fiscal year: \n%s"
+msgstr "Se encontraron uno o más asientos con periodo o fecha inválidos en el ejercicio fiscal: \n%s"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "One or more unbalanced moves found: \n%s"
+msgstr "Se encontraron uno o más asientos descuadrados: \n%s"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "You have to review and confirm each of the moves before continuing"
+msgstr "Debe revisar y confirmar cada uno de los asientos antes de continuar"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#: field:l10n_es_fiscal_year_closing.fyc_c_account_map,fyc_id:0
+#: field:l10n_es_fiscal_year_closing.fyc_lp_account_map,fyc_id:0
+#: field:l10n_es_fiscal_year_closing.fyc_nlp_account_map,fyc_id:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_cancel:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_run:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_run:0
+#, python-format
+msgid "Fiscal Year Closing"
+msgstr "Cierre de ejercicio fiscal"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "All the moves should be balanced before continuing"
+msgstr "Todos los asientos deben estar cuadrados antes de continuar"
+
+#. module: l10n_es_fiscal_year_closing
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr "Nombre de modelo no válido en la definición de acción."
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.ui.menu,name:l10n_es_fiscal_year_closing.menu_account_end_year_treatments_old
+msgid "Other operations (for non Spanish charts of accounts)"
+msgstr "Otras operaciones (para planes contables no españoles)"
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.model,name:l10n_es_fiscal_year_closing.model_l10n_es_fiscal_year_closing_fyc_c_account_map
+msgid "SFYC Closing Account Mapping"
+msgstr "Mapeo cuentas cierre CEFE"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,check_invalid_period_moves:0
+msgid "Check invalid period or date moves"
+msgstr "Comprobar asientos con periodo o fechas inválidos"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,company_id:0
+msgid "Company"
+msgstr "Compañía"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Operation to perform"
+msgstr "Operación a realizar"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,show_exception:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,show_exception:0
+msgid "Fiscal Year Closing - Error!"
+msgstr "Cierre ejercicio fiscal - ¡Error!"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "%s Fiscal Year Closing"
+msgstr "Cierre ejercicio fiscal %s"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,create_closing:0
+msgid "Close fiscal year"
+msgstr "Cerrar ejercicio fiscal"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc_c_account_map,source_account_id:0
+msgid "Account"
+msgstr "Cuenta"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,progress:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,progress:0
+msgid "The process may take a while."
+msgstr "El proceso podría tardar un poco."
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,show_exception:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,show_exception:0
+msgid "Error: One of the selected operations has failed!"
+msgstr "Error: ¡Una de las operaciones seleccionadas ha fallado!"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Closing"
+msgstr "Cierre"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Operations"
+msgstr "Operaciones"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,c_account_mapping_ids:0
+msgid "Accounts"
+msgstr "Cuentas"
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.model,name:l10n_es_fiscal_year_closing.model_l10n_es_fiscal_year_closing_fyc_nlp_account_map
+msgid "SFYC Net Loss & Profit Account Mapping"
+msgstr "Mapeado de cuenta de Pérdidas y Ganancias Patr. Neto CECE"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Confirm"
+msgstr "Confirmar"
+
+#. module: l10n_es_fiscal_year_closing
+#: selection:l10n_es_fiscal_year_closing.fyc,state:0
+msgid "New"
+msgstr "Nuevo"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,opening_fiscalyear_id:0
+msgid "Fiscal year to open"
+msgstr "Ejercicio fiscal a abrir"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "The Opening move is required"
+msgstr "El asiento de Apertura es obligatorio"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Account mapping"
+msgstr "Mapeado de cuenta"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,check_unbalanced_moves:0
+msgid "Check unbalanced moves"
+msgstr "Comprobar asientos descuadrados"
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.actions.wizard,name:l10n_es_fiscal_year_closing.wiz_l10n_es_fiscal_year_closing_run
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,init_cancel,run:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel,run:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,init_run,run:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,init_run,run:0
+msgid "Run"
+msgstr "Ejecutar"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,net_loss_and_profit_move_id:0
+msgid "Net L&P Move"
+msgstr "Asiento de PyG Patr. Neto"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,closing_move_id:0
+msgid "Closing Move"
+msgstr "Asiento de Cierre"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,progress,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,progress,end:0
+msgid "Close (continues in background)"
+msgstr "Cerrar (continua en segundo plano)"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Configuration"
+msgstr "Configuración"
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.actions.act_window,name:l10n_es_fiscal_year_closing.action_view_fyc_form
+#: model:ir.ui.menu,name:l10n_es_fiscal_year_closing.menu_fyc_new
+msgid "Close Fiscal Year"
+msgstr "Cerrar ejercicio fiscal"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc_c_account_map,dest_account_id:0
+#: field:l10n_es_fiscal_year_closing.fyc_lp_account_map,dest_account_id:0
+#: field:l10n_es_fiscal_year_closing.fyc_nlp_account_map,dest_account_id:0
+msgid "Dest account"
+msgstr "Cuenta destino"
+
+#. module: l10n_es_fiscal_year_closing
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "¡XML inválido para la definición de la vista!"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_cancel:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel:0
+msgid "It will remove the previously generated account moves."
+msgstr "Eliminará los asientos generados anteriormente."
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,done:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,done:0
+msgid "The selected operations have been performed sucessfuly."
+msgstr "Las operaciones seleccionadas han sido realizadas con éxito."
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,init_cancel,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,init_run,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,init_run,end:0
+msgid "Cancel"
+msgstr "Cancelar"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_cancel:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel:0
+msgid "This wizard will cancel the selected operations."
+msgstr "Este asistente cancelará las operaciones seleccionadas."
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_run,progress,task_progress:0
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_cancel,progress,task_progress:0
+msgid "Task Progress"
+msgstr "Progreso tarea"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Move created by the operation"
+msgstr "Asiento creado por la operación"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,create_opening:0
+msgid "Open next fiscal year"
+msgstr "Abrir ejercicio fiscal siguiente"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Please, select the company, fiscal year to close and fiscal year to open."
+msgstr "Por favor, seleccione la compañía, ejercicio fiscal a cerrar y ejercicio fiscal a abrir."
+
+#. module: l10n_es_fiscal_year_closing
+#: selection:l10n_es_fiscal_year_closing.fyc,state:0
+msgid "Canceled"
+msgstr "Cancelado"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_cancel:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel:0
+msgid "Closed periods, and the fiscal year, will be reopened."
+msgstr "Los periodos cerrados, y el ejercicio fiscal, serán reabiertos."
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_run:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_run:0
+msgid "This wizard will perform the selected operations."
+msgstr "El asistente realizará las operaciones seleccionadas."
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc_lp_account_map,source_account_id:0
+#: field:l10n_es_fiscal_year_closing.fyc_nlp_account_map,source_account_id:0
+msgid "Source account"
+msgstr "Cuenta origen"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Net Loss & Profit"
+msgstr "Pérdidas y Ganancias Patr. Neto"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+#: selection:l10n_es_fiscal_year_closing.fyc,state:0
+msgid "Draft"
+msgstr "Borrador"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Spanish Fiscal Year Closings"
+msgstr "Cierres de ejercicio fiscal españoles"
+
+#. module: l10n_es_fiscal_year_closing
+#: constraint:ir.model:0
+msgid "The Object name must start with x_ and not contain any special character !"
+msgstr "¡El nombre del objeto debe empezar con x_ y no contener ningún carácter especial!"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Checks"
+msgstr "Comprobaciones"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Loss and Profit"
+msgstr "Pérdidas y Ganancias"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,state:0
+msgid "Status"
+msgstr "Estado"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Not all the operations have been performed!"
+msgstr "¡No se han realizado todas las operaciones!"
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.module.module,shortdesc:l10n_es_fiscal_year_closing.module_meta_information
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Spanish Fiscal Year Closing"
+msgstr "Cierre de ejercicio fiscal español"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,c_date:0
+#: field:l10n_es_fiscal_year_closing.fyc,lp_date:0
+#: field:l10n_es_fiscal_year_closing.fyc,nlp_date:0
+#: field:l10n_es_fiscal_year_closing.fyc,o_date:0
+msgid "Date"
+msgstr "Fecha"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,done:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,done:0
+msgid "Fiscal Year Closing - Done"
+msgstr "Cierre de ejercicio fiscal - Realizado"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_run:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_run:0
+msgid "Non-selected operations will be canceled."
+msgstr "Las operaciones no seleccionadas serán canceladas. "
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_run,show_exception,exception_text:0
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_cancel,show_exception,exception_text:0
+msgid "Exception"
+msgstr "Excepción"
+
+#. module: l10n_es_fiscal_year_closing
+#: help:l10n_es_fiscal_year_closing.fyc,check_draft_moves:0
+msgid "Checks that there are no draft moves on the fiscal year that is being closed. Non-confirmed moves won't be taken in account on the closing operations."
+msgstr "Comprueba que no existan asientos borrador en el ejercicio fiscal que se está cerrando. Los asientos no confirmados no se tendrán en cuenta en las operaciones de cierre."
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.model,name:l10n_es_fiscal_year_closing.model_l10n_es_fiscal_year_closing_fyc_lp_account_map
+msgid "SFYC Loss & Profit Account Mapping"
+msgstr "Mapeado de cuenta de PyG CECE"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing move shouldn't be empty"
+msgstr "El asiento de cierre no debería estar vacío"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "The Loss & Profit move is required"
+msgstr "El asiento de Pérdidas y Ganancias es obligatorio"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,c_period_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,lp_period_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,nlp_period_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,o_period_id:0
+msgid "Period"
+msgstr "Periodo"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Some moves are in draft state!"
+msgstr "¡Algunos asientos están en estado borrador!"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "General"
+msgstr "General"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Net Loss and Profit"
+msgstr "Pérdidas y Ganancias Patr. Neto"
+
+#. module: l10n_es_fiscal_year_closing
+#: selection:l10n_es_fiscal_year_closing.fyc,state:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,done,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,done,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,show_exception,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,show_exception,end:0
+msgid "Done"
+msgstr "Hecho"
+
+#. module: l10n_es_fiscal_year_closing
+#: help:l10n_es_fiscal_year_closing.fyc,check_invalid_period_moves:0
+msgid "Checks that there are no moves, on the fiscal year that is being closed, with dates or periods outside that fiscal year."
+msgstr "Comprueba que no existan asientos, en el ejercicio fiscal que se está cerrando, con fechas o periodos fuera de ese ejercicio fiscal."
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,progress,run:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,progress,run:0
+msgid "Keep waiting"
+msgstr "Seguir esperando"
+
+#. module: l10n_es_fiscal_year_closing
+#: selection:l10n_es_fiscal_year_closing.fyc,state:0
+msgid "In Progress"
+msgstr "En progreso"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Some moves are unbalanced!"
+msgstr "¡Algunos asientos están descuadrados!"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The operation must be a supported one"
+msgstr "La operación debe ser una soportada"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,show_exception:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,show_exception:0
+msgid "Details"
+msgstr "Detalles"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_run:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_run:0
+msgid "It will create account moves for the operations you selected, skipping those already created."
+msgstr "Creará asientos para las operaciones seleccionadas, ignorando aquellos ya creados."
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.actions.act_window,name:l10n_es_fiscal_year_closing.action_view_fyc_tree
+#: model:ir.ui.menu,name:l10n_es_fiscal_year_closing.menu_fyc_list
+msgid "Fiscal Years Closings"
+msgstr "Cierres de ejercicios fiscales"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "The Closing move is required"
+msgstr "El asiento de cierre es obligatorio"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,opening_move_id:0
+msgid "Opening Move"
+msgstr "Asiento de Apertura"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,c_description:0
+#: field:l10n_es_fiscal_year_closing.fyc,lp_description:0
+#: field:l10n_es_fiscal_year_closing.fyc,name:0
+#: field:l10n_es_fiscal_year_closing.fyc,nlp_description:0
+#: field:l10n_es_fiscal_year_closing.fyc,o_description:0
+#: field:l10n_es_fiscal_year_closing.fyc_c_account_map,name:0
+#: field:l10n_es_fiscal_year_closing.fyc_lp_account_map,name:0
+#: field:l10n_es_fiscal_year_closing.fyc_nlp_account_map,name:0
+msgid "Description"
+msgstr "Descripción"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Opening"
+msgstr "Apertura"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Account to close"
+msgstr "Cuenta a cerrar"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,c_journal_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,lp_journal_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,nlp_journal_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,o_journal_id:0
+msgid "Journal"
+msgstr "Diario"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+#: field:l10n_es_fiscal_year_closing.fyc,lp_account_mapping_ids:0
+#: field:l10n_es_fiscal_year_closing.fyc,nlp_account_mapping_ids:0
+msgid "Account mappings"
+msgstr "Mapeos de cuentas"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,check_draft_moves:0
+msgid "Check draft moves"
+msgstr "Comprobar asientos borrador"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,create_loss_and_profit:0
+msgid "Create Loss & Profit move"
+msgstr "Crear asiento de Pérdidas y Ganancias"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Fiscal Years"
+msgstr "Ejercicios fiscales"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,closing_fiscalyear_id:0
+msgid "Fiscal year to close"
+msgstr "Ejercicio fiscal a cerrar"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing move must exist"
+msgstr "El asiento de cierre debe existir"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,progress:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,progress:0
+msgid "Fiscal Year Closing - Working"
+msgstr "Cierre de ejercicio fiscal - Trabajando"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Perform the operations"
+msgstr "Ejecutar las operaciones"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Continue"
+msgstr "Continuar"
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_run,progress,progress:0
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_cancel,progress,progress:0
+msgid "Total Progress"
+msgstr "Progreso total"
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Accounts to close"
+msgstr "Cuentas a cerrar"
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.module.module,description:l10n_es_fiscal_year_closing.module_meta_information
+msgid ""
+"Spanish Fiscal Year Closing Wizard\n"
+"    \n"
+"Replaces the default OpenERP end of year wizards (from account module)\n"
+"with a more advanced all-in-one wizard that will let the users:\n"
+"  - Check for unbalanced moves, moves with invalid dates\n"
+"    or period or draft moves on the fiscal year to be closed.\n"
+"  - Create the Loss and Profit entry.\n"
+"  - Create the Net Loss and Profit entry.\n"
+"  - Create the Closing entry.\n"
+"  - Create the Opening entry.\n"
+"\n"
+"It's hightly configurable, and comes preconfigured for the current Spanish chart of accounts.\n"
+"\n"
+"Also is stateful, saving all the info about the fiscal year closing, so the\n"
+"user can cancel and undo the operations easily.\n"
+"    "
+msgstr ""
+"Asistente de cierre de ejercicio fiscal español\n"
+"    \n"
+"Substituye los asistentes de fin de año predeterminados de OpenERP (del módulo account)\n"
+"con un asistente todo-en-uno más avanzado que permitirá a los usuarios:\n"
+"  - Comprobar los asientos descuadrados, con fechas y periodos\n"
+"    inválidos o asientos borrador en el ejercicio fiscal a cerrar.\n"
+"  - Crear el asiento de Pérdidas y Ganancias.\n"
+"  - Crear el asiento de Pérdidas y Ganancias de Patrimonio Neto.\n"
+"  - Crear el asiento de Cierre.\n"
+"  - Crear el asiento de Apertura.\n"
+"\n"
+"Es altamente configurable, y viene preconfigurado para el plan de cuentas español actual.\n"
+"\n"
+"También conserva el estado, guardando toda la información sobre el cierre del ejercicio fiscal,\n"
+"para que el usuario pueda cancelar y deshacer las operaciones fácilmente.\n"
+"    "
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,loss_and_profit_move_id:0
+msgid "L&P Move"
+msgstr "Asiento PyG"
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,create_net_loss_and_profit:0
+msgid "Create Net Loss & Profit"
+msgstr "Crear asiento Pérdidas y Ganancias Patr. Neto"
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.model,name:l10n_es_fiscal_year_closing.model_l10n_es_fiscal_year_closing_fyc
+msgid "Spanish Fiscal Year Closing Wizard"
+msgstr "Asistente de cierre de ejercicio fiscal español"
+
+#. module: l10n_es_fiscal_year_closing
+#: help:l10n_es_fiscal_year_closing.fyc,check_unbalanced_moves:0
+msgid "Checks that there are no unbalanced moves on the fiscal year that is being closed."
+msgstr "Comprueba que no existan asientos descuadrados en el ejercicio fiscal que se está cerrando."
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Fiscal Year Opening"
+msgstr "Apertura de ejercicio fiscal"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "The name must be unique"
+msgstr "El nombre debe ser único"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Error"
+msgstr "Error"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing move must exist to create the opening one"
+msgstr "El asiento de cierre debe existir para crear el de apertura"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P move must exist before creating the closing one"
+msgstr "El asiento de PyG debe existir antes de crear el de cierre"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P description must be defined"
+msgstr "La descripción de PyG debe estar definida"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P date must be defined"
+msgstr "La fecha de PyG debe estar definida"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P period must be defined"
+msgstr "El periodo de PyG debe estar definido"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P journal must be defined"
+msgstr "El diario de PyG debe estar definido"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The Net L&P description must be defined"
+msgstr "La descripción de PyG Patr. Neto debe estar definida"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The Net L&P date must be defined"
+msgstr "La fecha de PyG Patr. Neto debe estar definida"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The Net L&P period must be defined"
+msgstr "El periodo de PyG Patr. Neto debe estar definido"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The Net L&P journal must be defined"
+msgstr "El diario de PyG Patr. Neto debe estar definido"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing description must be defined"
+msgstr "La descripción de cierre debe estar definida"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing date must be defined"
+msgstr "La fecha de cierre debe estar definida"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing period must be defined"
+msgstr "El peridodo de cierre debe estar definido"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing journal must be defined"
+msgstr "El diario de cierre debe estar definido"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The opening description must be defined"
+msgstr "La descripción de apertura debe estar definida"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The opening date must be defined"
+msgstr "La fecha de apertura debe estar definida"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The opening period must be defined"
+msgstr "El periodo de apertura debe estar definido"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The opening journal must be defined"
+msgstr "El diario de apertura debe estar definido"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Loss & Profit"
+msgstr "Pérdidas y Ganancias"
+
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "There is already a fiscal year closing with this name."
+msgstr "Ya existe un cierre de ejercicio con este nombre."
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "One or more draft moves found: \n%s"
+msgstr "Uno o más asientos borrador encontrados: \n%s"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "There is already a fiscal year closing for the fiscal year to close."
+msgstr "Ya existe un cierre de ejercicio para el ejercicio a cerrar."
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "There is already a fiscal year closing for the fiscal year to open."
+msgstr "Ya existe un cierre de ejercicio para el ejercicio a abrir."
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "One or more moves with invalid period or date found on the fiscal year: \n%s"
+msgstr "Se encontraron uno o más asientos con periodo o fecha inválidos en el ejercicio: \n%s"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "One or more unbalanced moves found: \n%s"
+msgstr "Se encontraron uno o más asientos descuadrados: \n%s"

=== added file 'account_fiscal_year_closing/i18n/l10n_es_cierre_ejercicio.pot'
--- account_fiscal_year_closing/i18n/l10n_es_cierre_ejercicio.pot	1970-01-01 00:00:00 +0000
+++ account_fiscal_year_closing/i18n/l10n_es_cierre_ejercicio.pot	2011-10-05 07:03:24 +0000
@@ -0,0 +1,786 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* l10n_es_fiscal_year_closing
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.7\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2010-03-23 18:01:19+0000\n"
+"PO-Revision-Date: 2010-03-23 18:01:19+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "UserError"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "No destination account %s found for account %s."
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The Net L&P account mappings are not properly configured: %s"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P account mappings are not properly configured: %s"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "One or more draft moves found: \n%s"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "One or more moves with invalid period or date found on the fiscal year: \n%s"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "One or more unbalanced moves found: \n%s"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "You have to review and confirm each of the moves before continuing"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#: field:l10n_es_fiscal_year_closing.fyc_c_account_map,fyc_id:0
+#: field:l10n_es_fiscal_year_closing.fyc_lp_account_map,fyc_id:0
+#: field:l10n_es_fiscal_year_closing.fyc_nlp_account_map,fyc_id:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_cancel:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_run:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_run:0
+#, python-format
+msgid "Fiscal Year Closing"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "All the moves should be balanced before continuing"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.ui.menu,name:l10n_es_fiscal_year_closing.menu_account_end_year_treatments_old
+msgid "Other operations (for non Spanish charts of accounts)"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.model,name:l10n_es_fiscal_year_closing.model_l10n_es_fiscal_year_closing_fyc_c_account_map
+msgid "SFYC Closing Account Mapping"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,check_invalid_period_moves:0
+msgid "Check invalid period or date moves"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Operation to perform"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,show_exception:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,show_exception:0
+msgid "Fiscal Year Closing - Error!"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "%s Fiscal Year Closing"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,create_closing:0
+msgid "Close fiscal year"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc_c_account_map,source_account_id:0
+msgid "Account"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,progress:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,progress:0
+msgid "The process may take a while."
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,show_exception:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,show_exception:0
+msgid "Error: One of the selected operations has failed!"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Closing"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Operations"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,c_account_mapping_ids:0
+msgid "Accounts"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.model,name:l10n_es_fiscal_year_closing.model_l10n_es_fiscal_year_closing_fyc_nlp_account_map
+msgid "SFYC Net Loss & Profit Account Mapping"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Confirm"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: selection:l10n_es_fiscal_year_closing.fyc,state:0
+msgid "New"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,opening_fiscalyear_id:0
+msgid "Fiscal year to open"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "The Opening move is required"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Account mapping"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,check_unbalanced_moves:0
+msgid "Check unbalanced moves"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.actions.wizard,name:l10n_es_fiscal_year_closing.wiz_l10n_es_fiscal_year_closing_run
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,init_cancel,run:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel,run:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,init_run,run:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,init_run,run:0
+msgid "Run"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,net_loss_and_profit_move_id:0
+msgid "Net L&P Move"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,closing_move_id:0
+msgid "Closing Move"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,progress,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,progress,end:0
+msgid "Close (continues in background)"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Configuration"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.actions.act_window,name:l10n_es_fiscal_year_closing.action_view_fyc_form
+#: model:ir.ui.menu,name:l10n_es_fiscal_year_closing.menu_fyc_new
+msgid "Close Fiscal Year"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc_c_account_map,dest_account_id:0
+#: field:l10n_es_fiscal_year_closing.fyc_lp_account_map,dest_account_id:0
+#: field:l10n_es_fiscal_year_closing.fyc_nlp_account_map,dest_account_id:0
+msgid "Dest account"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_cancel:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel:0
+msgid "It will remove the previously generated account moves."
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,done:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,done:0
+msgid "The selected operations have been performed sucessfuly."
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,init_cancel,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,init_run,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,init_run,end:0
+msgid "Cancel"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_cancel:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel:0
+msgid "This wizard will cancel the selected operations."
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_run,progress,task_progress:0
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_cancel,progress,task_progress:0
+msgid "Task Progress"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Move created by the operation"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,create_opening:0
+msgid "Open next fiscal year"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Please, select the company, fiscal year to close and fiscal year to open."
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: selection:l10n_es_fiscal_year_closing.fyc,state:0
+msgid "Canceled"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_cancel:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_cancel:0
+msgid "Closed periods, and the fiscal year, will be reopened."
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_run:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_run:0
+msgid "This wizard will perform the selected operations."
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc_lp_account_map,source_account_id:0
+#: field:l10n_es_fiscal_year_closing.fyc_nlp_account_map,source_account_id:0
+msgid "Source account"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Net Loss & Profit"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+#: selection:l10n_es_fiscal_year_closing.fyc,state:0
+msgid "Draft"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Spanish Fiscal Year Closings"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: constraint:ir.model:0
+msgid "The Object name must start with x_ and not contain any special character !"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Checks"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Loss and Profit"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,state:0
+msgid "Status"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Not all the operations have been performed!"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.module.module,shortdesc:l10n_es_fiscal_year_closing.module_meta_information
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Spanish Fiscal Year Closing"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,c_date:0
+#: field:l10n_es_fiscal_year_closing.fyc,lp_date:0
+#: field:l10n_es_fiscal_year_closing.fyc,nlp_date:0
+#: field:l10n_es_fiscal_year_closing.fyc,o_date:0
+msgid "Date"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,done:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,done:0
+msgid "Fiscal Year Closing - Done"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_run:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_run:0
+msgid "Non-selected operations will be canceled."
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_run,show_exception,exception_text:0
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_cancel,show_exception,exception_text:0
+msgid "Exception"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: help:l10n_es_fiscal_year_closing.fyc,check_draft_moves:0
+msgid "Checks that there are no draft moves on the fiscal year that is being closed. Non-confirmed moves won't be taken in account on the closing operations."
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.model,name:l10n_es_fiscal_year_closing.model_l10n_es_fiscal_year_closing_fyc_lp_account_map
+msgid "SFYC Loss & Profit Account Mapping"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing move shouldn't be empty"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "The Loss & Profit move is required"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,c_period_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,lp_period_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,nlp_period_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,o_period_id:0
+msgid "Period"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Some moves are in draft state!"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "General"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Net Loss and Profit"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: selection:l10n_es_fiscal_year_closing.fyc,state:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,done,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,done,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,show_exception,end:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,show_exception,end:0
+msgid "Done"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: help:l10n_es_fiscal_year_closing.fyc,check_invalid_period_moves:0
+msgid "Checks that there are no moves, on the fiscal year that is being closed, with dates or periods outside that fiscal year."
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_run,progress,run:0
+#: wizard_button:l10n_es_fiscal_year_closing.wizard_cancel,progress,run:0
+msgid "Keep waiting"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: selection:l10n_es_fiscal_year_closing.fyc,state:0
+msgid "In Progress"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Some moves are unbalanced!"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The operation must be a supported one"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,show_exception:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,show_exception:0
+msgid "Details"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,init_run:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,init_run:0
+msgid "It will create account moves for the operations you selected, skipping those already created."
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.actions.act_window,name:l10n_es_fiscal_year_closing.action_view_fyc_tree
+#: model:ir.ui.menu,name:l10n_es_fiscal_year_closing.menu_fyc_list
+msgid "Fiscal Years Closings"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "The Closing move is required"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,opening_move_id:0
+msgid "Opening Move"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,c_description:0
+#: field:l10n_es_fiscal_year_closing.fyc,lp_description:0
+#: field:l10n_es_fiscal_year_closing.fyc,name:0
+#: field:l10n_es_fiscal_year_closing.fyc,nlp_description:0
+#: field:l10n_es_fiscal_year_closing.fyc,o_description:0
+#: field:l10n_es_fiscal_year_closing.fyc_c_account_map,name:0
+#: field:l10n_es_fiscal_year_closing.fyc_lp_account_map,name:0
+#: field:l10n_es_fiscal_year_closing.fyc_nlp_account_map,name:0
+msgid "Description"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Opening"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Account to close"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,c_journal_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,lp_journal_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,nlp_journal_id:0
+#: field:l10n_es_fiscal_year_closing.fyc,o_journal_id:0
+msgid "Journal"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+#: field:l10n_es_fiscal_year_closing.fyc,lp_account_mapping_ids:0
+#: field:l10n_es_fiscal_year_closing.fyc,nlp_account_mapping_ids:0
+msgid "Account mappings"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,check_draft_moves:0
+msgid "Check draft moves"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,create_loss_and_profit:0
+msgid "Create Loss & Profit move"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Fiscal Years"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,closing_fiscalyear_id:0
+msgid "Fiscal year to close"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing move must exist"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_run,progress:0
+#: wizard_view:l10n_es_fiscal_year_closing.wizard_cancel,progress:0
+msgid "Fiscal Year Closing - Working"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Perform the operations"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Continue"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_run,progress,progress:0
+#: wizard_field:l10n_es_fiscal_year_closing.wizard_cancel,progress,progress:0
+msgid "Total Progress"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: view:l10n_es_fiscal_year_closing.fyc:0
+msgid "Accounts to close"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.module.module,description:l10n_es_fiscal_year_closing.module_meta_information
+msgid "Spanish Fiscal Year Closing Wizard\n"
+"    \n"
+"Replaces the default OpenERP end of year wizards (from account module)\n"
+"with a more advanced all-in-one wizard that will let the users:\n"
+"  - Check for unbalanced moves, moves with invalid dates\n"
+"    or period or draft moves on the fiscal year to be closed.\n"
+"  - Create the Loss and Profit entry.\n"
+"  - Create the Net Loss and Profit entry.\n"
+"  - Create the Closing entry.\n"
+"  - Create the Opening entry.\n"
+"\n"
+"It's hightly configurable, and comes preconfigured for the current Spanish chart of accounts.\n"
+"\n"
+"Also is stateful, saving all the info about the fiscal year closing, so the\n"
+"user can cancel and undo the operations easily.\n"
+"    "
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,loss_and_profit_move_id:0
+msgid "L&P Move"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: field:l10n_es_fiscal_year_closing.fyc,create_net_loss_and_profit:0
+msgid "Create Net Loss & Profit"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: model:ir.model,name:l10n_es_fiscal_year_closing.model_l10n_es_fiscal_year_closing_fyc
+msgid "Spanish Fiscal Year Closing Wizard"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: help:l10n_es_fiscal_year_closing.fyc,check_unbalanced_moves:0
+msgid "Checks that there are no unbalanced moves on the fiscal year that is being closed."
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Fiscal Year Opening"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "The name must be unique"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Error"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing move must exist to create the opening one"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P move must exist before creating the closing one"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P description must be defined"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P date must be defined"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P period must be defined"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The L&P journal must be defined"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The Net L&P description must be defined"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The Net L&P date must be defined"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The Net L&P period must be defined"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The Net L&P journal must be defined"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing description must be defined"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing date must be defined"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing period must be defined"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The closing journal must be defined"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The opening description must be defined"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The opening date must be defined"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The opening period must be defined"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/wizard/wizard_run.py:0
+#, python-format
+msgid "The opening journal must be defined"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "Loss & Profit"
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "There is already a fiscal year closing with this name."
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "There is already a fiscal year closing for the fiscal year to close."
+msgstr ""
+
+#. module: l10n_es_fiscal_year_closing
+#: code:addons/l10n_es_fiscal_year_closing/fyc.py:0
+#, python-format
+msgid "There is already a fiscal year closing for the fiscal year to open."
+msgstr ""
+
+

=== added directory 'account_fiscal_year_closing/security'
=== added file 'account_fiscal_year_closing/security/ir.model.access.csv'
--- account_fiscal_year_closing/security/ir.model.access.csv	1970-01-01 00:00:00 +0000
+++ account_fiscal_year_closing/security/ir.model.access.csv	2011-10-05 07:03:24 +0000
@@ -0,0 +1,11 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_account_fiscal_year_closing_fyc","account_fiscal_year_closing.fyc","model_account_fiscal_year_closing_fyc","account.group_account_user",1,0,0,0
+"access_account_fiscal_year_closing_fyc","account_fiscal_year_closing.fyc","model_account_fiscal_year_closing_fyc","account.group_account_manager",1,1,1,1
+"access_account_fiscal_year_closing_fyc_lp_account_map","account_fiscal_year_closing.fyc_lp_account_map","model_account_fiscal_year_closing_fyc_lp_account_map","account.group_account_user",1,0,0,0
+"access_account_fiscal_year_closing_fyc_lp_account_map","account_fiscal_year_closing.fyc_lp_account_map","model_account_fiscal_year_closing_fyc_lp_account_map","account.group_account_manager",1,1,1,1
+"access_account_fiscal_year_closing_fyc_nlp_account_map","account_fiscal_year_closing.fyc_nlp_account_map","model_account_fiscal_year_closing_fyc_nlp_account_map","account.group_account_user",1,0,0,0
+"access_account_fiscal_year_closing_fyc_nlp_account_map","account_fiscal_year_closing.fyc_nlp_account_map","model_account_fiscal_year_closing_fyc_nlp_account_map","account.group_account_manager",1,1,1,1
+"access_account_fiscal_year_closing_fyc_c_account_map","account_fiscal_year_closing.fyc_c_account_map","model_account_fiscal_year_closing_fyc_c_account_map","account.group_account_user",1,0,0,0
+"access_account_fiscal_year_closing_fyc_c_account_map","account_fiscal_year_closing.fyc_c_account_map","model_account_fiscal_year_closing_fyc_c_account_map","account.group_account_manager",1,1,1,1
+"access_account_fiscal_year_closing_fyc","account_fiscal_year_closing.fyc","model_account_fiscal_year_closing_fyc","account.group_account_user",1,0,0,0
+"access_account_fiscal_year_closing_fyc","account_fiscal_year_closing.fyc","model_account_fiscal_year_closing_fyc","account.group_account_manager",1,1,1,1

=== added directory 'account_fiscal_year_closing/wizard'
=== added file 'account_fiscal_year_closing/wizard/__init__.py'
--- account_fiscal_year_closing/wizard/__init__.py	1970-01-01 00:00:00 +0000
+++ account_fiscal_year_closing/wizard/__init__.py	2011-10-05 07:03:24 +0000
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    $Id$
+#
+#    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/>.
+#
+##############################################################################
+"""
+Fiscal Year Closing Wizards
+"""
+import wizard_run

=== added file 'account_fiscal_year_closing/wizard/wizard_run.py'
--- account_fiscal_year_closing/wizard/wizard_run.py	1970-01-01 00:00:00 +0000
+++ account_fiscal_year_closing/wizard/wizard_run.py	2011-10-05 07:03:24 +0000
@@ -0,0 +1,905 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP - Import operations model 347 engine
+#    Copyright (C) 2009 Asr Oss. All Rights Reserved
+#    $Id$
+#
+#    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/>.
+#
+##############################################################################
+
+"""
+Create FYC entries wizards
+"""
+__author__ = """Borja López Soilán (Pexego) - borja@xxxxxxx"""
+
+from tools.translate import _
+import wizard
+import pooler
+import time
+import threading
+import sql_db
+import netsvc
+import decimal_precision as dp
+from tools import config
+
+class wizard_run(wizard.interface):
+    """
+    Wizard to create the FYC entries.
+    """
+
+    ############################################################################
+    # Forms
+    ############################################################################
+
+    _init_run_form = """<?xml version="1.0" encoding="utf-8"?>
+    <form string="Fiscal Year Closing" colspan="4" width="400">
+        <label string="This wizard will perform the selected operations." colspan="4"/>
+        <label string="" colspan="4"/>
+        <label string="It will create account moves for the operations you selected, skipping those already created." colspan="4"/>
+        <label string="Non-selected operations will be canceled." colspan="4"/>
+    </form>"""
+
+    _init_cancel_form = """<?xml version="1.0" encoding="utf-8"?>
+    <form string="Fiscal Year Closing" colspan="4" width="400">
+        <label string="This wizard will cancel the selected operations." colspan="4"/>
+        <label string="" colspan="4"/>
+        <label string="It will remove the previously generated account moves." colspan="4"/>
+        <label string="Closed periods, and the fiscal year, will be reopened." colspan="4"/>
+    </form>"""
+
+    _progress_form = '''<?xml version="1.0"?>
+    <form string="Fiscal Year Closing - Working" colspan="4" width="400" auto_refresh="1">
+        <label string="The process may take a while." colspan="4"/>
+        <label string="" colspan="4"/>
+        <field name="task_progress" widget="progressbar" colspan="4"/>
+        <field name="progress" widget="progressbar" colspan="4"/>
+    </form>'''
+
+    _progress_fields = {
+        'task_progress': { 'string': 'Task Progress', 'type':'float' },
+        'progress': { 'string': 'Total Progress', 'type':'float' },
+    }
+
+
+    _done_form = """<?xml version="1.0" encoding="utf-8"?>
+    <form string="Fiscal Year Closing - Done" colspan="4" width="400">
+        <label string="The selected operations have been performed sucessfuly." colspan="4"/>
+        <label string="" colspan="4"/>
+    </form>"""
+
+    _show_exception_form = """<?xml version="1.0" encoding="utf-8"?>
+    <form string="Fiscal Year Closing - Error!" colspan="4" width="400">
+        <label string="Error: One of the selected operations has failed!" colspan="4"/>
+        <label string="" colspan="4"/>
+        <separator string="Details"/>
+        <field name="exception_text" colspan="4" nolabel="1"/>
+    </form>"""
+
+    _show_exception_fields = {
+        'exception_text': {'string': 'Exception', 'type':'text' },
+    }
+
+    ############################################################################
+    # CHECK OPERATIONS
+    ############################################################################
+
+    def _check_invalid_period_moves(self, cr, uid, fyc, data, context):
+        """
+        Checks for moves with invalid period on the fiscal year that is being closed
+        """
+        pool = pooler.get_pool(cr.dbname)
+        data['process_task_progress'] = 0.0
+
+        # Consider all the periods of the fiscal year.
+        period_ids = [period.id for period in fyc.closing_fiscalyear_id.period_ids]
+
+        # Find moves on the closing fiscal year with dates of previous years
+        account_move_ids = pool.get('account.move').search(cr, uid, [
+                                ('period_id', 'in', period_ids),
+                                ('date', '<', fyc.closing_fiscalyear_id.date_start),
+                            ], context=context)
+
+        # Find moves on the closing fiscal year with dates of next years
+        account_move_ids.extend(pool.get('account.move').search(cr, uid, [
+                                ('period_id', 'in', period_ids),
+                                ('date', '>', fyc.closing_fiscalyear_id.date_stop),
+                            ], context=context))
+
+        # Find moves not on the closing fiscal year with dates on its year
+        account_move_ids.extend(pool.get('account.move').search(cr, uid, [
+                                ('period_id', 'not in', period_ids),
+                                ('date', '>=', fyc.closing_fiscalyear_id.date_start),
+                                ('date', '<=', fyc.closing_fiscalyear_id.date_stop),
+                            ], context=context))
+
+        #
+        # If one or more moves where found, raise an exception
+        #
+        if len(account_move_ids):
+            invalid_period_moves = pool.get('account.move').browse(cr, uid, account_move_ids, context)
+            str_invalid_period_moves = '\n'.join(['id: %s, date: %s, number: %s, ref: %s' % (move.id, move.date, move.name, move.ref) for move in invalid_period_moves])
+            raise wizard.except_wizard(_('Error'), _('One or more moves with invalid period or date found on the fiscal year: \n%s') % str_invalid_period_moves)
+
+        data['process_task_progress'] = 100.0
+
+
+    def _check_draft_moves(self, cr, uid, fyc, data, context):
+        """
+        Checks for draft moves on the fiscal year that is being closed
+        """
+        pool = pooler.get_pool(cr.dbname)
+        data['process_task_progress'] = 0.0
+
+        #
+        # Consider all the periods of the fiscal year *BUT* the L&P,
+        # Net L&P and the Closing one.
+        #
+        period_ids = []
+        for period in fyc.closing_fiscalyear_id.period_ids:
+            if period.id != fyc.lp_period_id.id \
+                    and period.id != fyc.nlp_period_id.id \
+                    and period.id != fyc.c_period_id.id:
+                period_ids.append(period.id)
+
+        # Find the moves on the given periods
+        account_move_ids = pool.get('account.move').search(cr, uid, [
+                                ('period_id', 'in', period_ids),
+                                ('state', '=', 'draft'),
+                            ], context=context)
+
+        #
+        # If one or more draft moves where found, raise an exception
+        #
+        if len(account_move_ids):
+            draft_moves = pool.get('account.move').browse(cr, uid, account_move_ids, context)
+            str_draft_moves = '\n'.join(['id: %s, date: %s, number: %s, ref: %s' % (move.id, move.date, move.name, move.ref) for move in draft_moves])
+            raise wizard.except_wizard(_('Error'), _('One or more draft moves found: \n%s') % str_draft_moves)
+
+        data['process_task_progress'] = 100.0
+
+
+    def _check_unbalanced_moves(self, cr, uid, fyc, data, context):
+        """
+        Checks for unbalanced moves on the fiscal year that is being closed
+        """
+        pool = pooler.get_pool(cr.dbname)
+        data['process_task_progress'] = 0.0
+
+        #
+        # Consider all the periods of the fiscal year *BUT* the L&P,
+        # Net L&P and the Closing one.
+        #
+        period_ids = []
+        for period in fyc.closing_fiscalyear_id.period_ids:
+            if period.id != fyc.lp_period_id.id \
+                    and period.id != fyc.nlp_period_id.id \
+                    and period.id != fyc.c_period_id.id:
+                period_ids.append(period.id)
+
+        # Find the moves on the given periods
+        account_move_ids = pool.get('account.move').search(cr, uid, [
+                                ('period_id', 'in', period_ids),
+                                ('state', '!=', 'draft'),
+                            ], context=context)
+
+        #
+        # For each found move, check it
+        #
+        unbalanced_moves = []
+        total_accounts = len(account_move_ids)
+        accounts_done = 0
+        for move in pool.get('account.move').browse(cr, uid, account_move_ids, context):
+            amount = 0
+            for line in move.line_id:
+                amount += (line.debit - line.credit)
+
+            if round(abs(amount), pool.get('decimal.precision').precision_get(cr, uid, 'Account')) > 0:
+                unbalanced_moves.append(move)
+
+            accounts_done += 1
+            data['process_task_progress'] = (accounts_done * 90.0) / total_accounts
+
+        #
+        # If one or more unbalanced moves where found, raise an exception
+        #
+        if len(unbalanced_moves):
+            str_unbalanced_moves = '\n'.join(['id: %s, date: %s, number: %s, ref: %s' % (move.id, move.date, move.name, move.ref) for move in unbalanced_moves])
+            raise wizard.except_wizard(_('Error'), _('One or more unbalanced moves found: \n%s') % str_unbalanced_moves)
+
+        data['process_task_progress'] = 100.0
+
+
+
+    ############################################################################
+    # CLOSING/OPENING OPERATIONS
+    ############################################################################
+
+    def create_closing_move(self, cr, uid, operation, fyc, data, context):
+        """
+        Create a closing move (L&P, NL&P or Closing move).
+        """
+        pool = pooler.get_pool(cr.dbname)
+
+        data['process_task_progress'] = 0.0
+
+        move_lines = []
+        dest_accounts_totals = {}
+        period_ids = []
+        for period in fyc.closing_fiscalyear_id.period_ids:
+            period_ids.append(period.id)
+        account_mapping_ids = []
+        description = None
+        date = None
+        period_id = None
+        journal_id = None
+        fiscalyear_id = fyc.closing_fiscalyear_id.id
+
+        #
+        # Depending on the operation we will use different data
+        #
+        if operation == 'loss_and_profit':
+            '''
+            #
+            # Consider all the periods of the fiscal year *BUT* the L&P,
+            # Net L&P and the Closing one.
+            #
+            for period in fyc.closing_fiscalyear_id.period_ids:
+                if period.id != fyc.lp_period_id.id \
+                        and period.id != fyc.nlp_period_id.id \
+                        and period.id != fyc.c_period_id.id:
+                    period_ids.append(period.id)
+            '''
+            #
+            # Set the accounts to use
+            #
+            account_mapping_ids = fyc.lp_account_mapping_ids
+            for account_map in account_mapping_ids:
+                if not account_map.dest_account_id:
+                    raise wizard.except_wizard(_('UserError'), _("The L&P account mappings are not properly configured: %s") % account_map.name)
+
+            #
+            # Get the values for the lines
+            #
+            if not fyc.lp_description:
+                raise wizard.except_wizard(_('UserError'), _("The L&P description must be defined"))
+            if not fyc.lp_date:
+                raise wizard.except_wizard(_('UserError'), _("The L&P date must be defined"))
+            if not (fyc.lp_period_id and fyc.lp_period_id.id):
+                raise wizard.except_wizard(_('UserError'), _("The L&P period must be defined"))
+            if not (fyc.lp_journal_id and fyc.lp_journal_id.id):
+                raise wizard.except_wizard(_('UserError'), _("The L&P journal must be defined"))
+            description = fyc.lp_description
+            date = fyc.lp_date
+            period_id = fyc.lp_period_id.id
+            journal_id = fyc.lp_journal_id.id
+        elif operation == 'net_loss_and_profit':
+            '''
+            #
+            # Consider all the periods of the fiscal year *BUT* the 
+            # Net L&P and the Closing one.
+            #
+            for period in fyc.closing_fiscalyear_id.period_ids:
+                if period.id != fyc.nlp_period_id.id \
+                        and period.id != fyc.c_period_id.id:
+                    period_ids.append(period.id)
+            '''
+            #
+            # Set the accounts to use
+            #
+            account_mapping_ids = fyc.nlp_account_mapping_ids
+            '''
+            for account_map in account_mapping_ids:
+                if not account_map.dest_account_id:
+                    raise wizard.except_wizard(_('UserError'), _("The Net L&P account mappings are not properly configured: %s") % account_map.name)
+            '''
+            #
+            # Get the values for the lines
+            #
+            if not fyc.nlp_description:
+                raise wizard.except_wizard(_('UserError'), _("The Net L&P description must be defined"))
+            if not fyc.nlp_date:
+                raise wizard.except_wizard(_('UserError'), _("The Net L&P date must be defined"))
+            if not (fyc.nlp_period_id and fyc.nlp_period_id.id):
+                raise wizard.except_wizard(_('UserError'), _("The Net L&P period must be defined"))
+            if not (fyc.nlp_journal_id and fyc.nlp_journal_id.id):
+                raise wizard.except_wizard(_('UserError'), _("The Net L&P journal must be defined"))
+            description = fyc.nlp_description
+            date = fyc.nlp_date
+            period_id = fyc.nlp_period_id.id
+            journal_id = fyc.nlp_journal_id.id
+        elif operation == 'close':
+            # Require the user to have performed the L&P operation
+            if not (fyc.loss_and_profit_move_id and fyc.loss_and_profit_move_id.id):
+                raise wizard.except_wizard(_('UserError'), _("The L&P move must exist before creating the closing one"))
+            '''
+            #
+            # Consider all the periods of the fiscal year *BUT* the Closing one.
+            #
+            for period in fyc.closing_fiscalyear_id.period_ids:
+                if period.id != fyc.c_period_id.id:
+                    period_ids.append(period.id)
+            '''
+            # Set the accounts to use
+            account_mapping_ids = fyc.c_account_mapping_ids
+            #
+            # Get the values for the lines
+            #
+            if not fyc.c_description:
+                raise wizard.except_wizard(_('UserError'), _("The closing description must be defined"))
+            if not fyc.c_date:
+                raise wizard.except_wizard(_('UserError'), _("The closing date must be defined"))
+            if not (fyc.c_period_id and fyc.c_period_id.id):
+                raise wizard.except_wizard(_('UserError'), _("The closing period must be defined"))
+            if not (fyc.c_journal_id and fyc.c_journal_id.id):
+                raise wizard.except_wizard(_('UserError'), _("The closing journal must be defined"))
+            description = fyc.c_description
+            date = fyc.c_date
+            period_id = fyc.c_period_id.id
+            journal_id = fyc.c_journal_id.id
+        else:
+            assert operation in ('loss_and_profit', 'net_loss_and_profit', 'close'), "The operation must be a supported one"
+
+
+        #
+        # For each (parent) account in the mapping list
+        #
+        total_accounts = len(account_mapping_ids)
+        accounts_done = 0
+        for account_map in account_mapping_ids:
+            # Init (if needed) the dictionary that will store the totals for the dest accounts
+            if account_map.dest_account_id:
+                dest_accounts_totals[account_map.dest_account_id.id] = dest_accounts_totals.get(account_map.dest_account_id.id, 0)
+
+            context.update({'periods': period_ids})
+            ctx = context.copy()
+
+            # Find its children accounts (recursively)
+            # FIXME: _get_children_and_consol is a protected member of account_account but the OpenERP code base uses it like this :(
+            child_ids = pool.get('account.account')._get_children_and_consol(cr, uid, [account_map.source_account_id.id], ctx)
+            
+            # For each children account. (Notice the context filter! the computed balanced is based on this filter)
+            for account in pool.get('account.account').browse(cr, uid, child_ids, ctx):
+                # Check if the children account needs to (and can) be closed
+                # Note: We currently ignore the close_method (account.user_type.close_method)
+                #       and always do a balance close.
+                if account.type != 'view': 
+                    # Compute the balance for the account (uses the previous browse context filter)
+                    balance = account.balance
+                    # Check if the balance is greater than the limit
+                    if round(abs(balance), pool.get('decimal.precision').precision_get(cr, uid, 'Account')) > 0:
+                        #
+                        # Add a new line to the move
+                        #
+                        move_lines.append({
+                                'account_id': account.id,
+                                'debit': balance<0 and -balance,
+                                'credit': balance>0 and balance,
+                                'name': description,
+                                'date': date,
+                                'period_id': period_id,
+                                'journal_id': journal_id,
+                            })
+
+                        # Update the dest account total (with the inverse of the balance)
+                        if account_map.dest_account_id:
+                            dest_accounts_totals[account_map.dest_account_id.id] -= balance
+            accounts_done += 1
+            data['process_task_progress'] = (accounts_done * 90.0) / total_accounts
+
+        #
+        # Add the dest lines
+        #
+        for dest_account_id in dest_accounts_totals.keys():
+            balance = dest_accounts_totals[dest_account_id]
+            move_lines.append({
+                    'account_id': dest_account_id,
+                    'debit': balance<0 and -balance,
+                    'credit': balance>0 and balance,
+                    'name': description,
+                    'date': date,
+                    'period_id': period_id,
+                    'journal_id': journal_id,
+                })
+        data['process_task_progress'] = 95.0
+
+        #
+        # Finally create the account move with all the lines (if needed)
+        #
+        if len(move_lines):
+            move_id = pool.get('account.move').create(cr, uid, {
+                            'ref': description,
+                            'date': date,
+                            'period_id': period_id,
+                            'journal_id': journal_id,
+                            'line_id': [(0,0,line) for line in move_lines],
+                        }, context=context)
+            pool.get('account.move').button_validate(cr, uid, [move_id], context)
+        else:
+            move_id = None
+        data['process_task_progress'] = 99.0
+
+        #
+        # Save the reference to the created account move into the fyc object
+        #
+        if operation == 'loss_and_profit':
+            pool.get('account_fiscal_year_closing.fyc').write(cr, uid, [fyc.id], { 'loss_and_profit_move_id': move_id })
+        elif operation == 'net_loss_and_profit':
+            pool.get('account_fiscal_year_closing.fyc').write(cr, uid, [fyc.id], { 'net_loss_and_profit_move_id': move_id })
+        elif operation == 'close':
+            pool.get('account_fiscal_year_closing.fyc').write(cr, uid, [fyc.id], { 'closing_move_id': move_id })
+        else:
+            assert operation in ('loss_and_profit', 'net_loss_and_profit', 'close'), "The operation must be a supported one"
+
+        data['process_task_progress'] = 100.0
+        return move_id
+
+
+    def create_opening_move(self, cr, uid, operation, fyc, data, context):
+        """
+        Create an opening move (based on the closing one)
+        """
+        pool = pooler.get_pool(cr.dbname)
+        data['process_task_progress'] = 0.0
+
+        move_lines = []
+        description = None
+        date = None
+        period_id = None
+        journal_id = None
+        closing_move = None
+
+        #
+        # Depending on the operation we will use one or other closing move
+        # as the base for the opening move.
+        # Note: Yes, currently only one 'closing' move exists,
+        #       but I want this to be extensible :)
+        #
+        if operation == 'open':
+            closing_move = fyc.closing_move_id
+            # Require the user to have performed the closing operation
+            if not (closing_move and closing_move.id):
+                raise wizard.except_wizard(_('UserError'), _("The closing move must exist to create the opening one"))
+            if not closing_move.line_id:
+                raise wizard.except_wizard(_('UserError'), _("The closing move shouldn't be empty"))
+            #
+            # Get the values for the lines
+            #
+            if not fyc.o_description:
+                raise wizard.except_wizard(_('UserError'), _("The opening description must be defined"))
+            if not fyc.o_date:
+                raise wizard.except_wizard(_('UserError'), _("The opening date must be defined"))
+            if not (fyc.o_period_id and fyc.o_period_id.id):
+                raise wizard.except_wizard(_('UserError'), _("The opening period must be defined"))
+            if not (fyc.o_journal_id and fyc.o_journal_id.id):
+                raise wizard.except_wizard(_('UserError'), _("The opening journal must be defined"))
+            description = fyc.o_description
+            date = fyc.o_date
+            period_id = fyc.o_period_id.id
+            journal_id = fyc.o_journal_id.id
+        else:
+            assert operation in ('open'), "The operation must be a supported one"
+
+        #
+        # Read the lines from the closing move, and append the inverse lines
+        # to the opening move lines.
+        #
+        total_accounts = len(closing_move.line_id)
+        accounts_done = 0
+        for line in closing_move.line_id:
+            move_lines.append({
+                    'account_id': line.account_id.id,
+                    'debit': line.credit,
+                    'credit': line.debit,
+                    'name': description,
+                    'date': date,
+                    'period_id': period_id,
+                    'journal_id': journal_id,
+                })
+            accounts_done += 1
+            data['process_task_progress'] = (accounts_done * 90.0) / total_accounts
+
+        #
+        # Finally create the account move with all the lines (if needed)
+        #
+        if len(move_lines):
+            move_id = pool.get('account.move').create(cr, uid, {
+                            'ref': description,
+                            'date': date,
+                            'period_id': period_id,
+                            'journal_id': journal_id,
+                            'line_id': [(0,0,line) for line in move_lines],
+                        }, context=context)
+            pool.get('account.move').button_validate(cr, uid, [move_id], context)
+        else:
+            move_id = None
+        data['process_task_progress'] = 99.0
+
+        #
+        # Save the reference to the created account move into the fyc object
+        #
+        if operation == 'open':
+            pool.get('account_fiscal_year_closing.fyc').write(cr, uid, [fyc.id], { 'opening_move_id': move_id })
+        else:
+            assert operation in ('open'), "The operation must be a supported one"
+
+        data['process_task_progress'] = 100.0
+        return move_id
+
+
+    def remove_move(self, cr, uid, operation, fyc, data, context):
+        """
+        Remove a account move (L&P, NL&P, Closing or Opening move)
+        """
+        pool = pooler.get_pool(cr.dbname)
+        data['process_task_progress'] = 0.0
+
+        #
+        # Depending on the operation we will delete one or other move
+        #
+        move = None
+        if operation == 'loss_and_profit':
+            move = fyc.loss_and_profit_move_id
+            pool.get('account_fiscal_year_closing.fyc').write(cr, uid, fyc.id, { 'loss_and_profit_move_id': None })
+        elif operation == 'net_loss_and_profit':
+            move = fyc.net_loss_and_profit_move_id
+            pool.get('account_fiscal_year_closing.fyc').write(cr, uid, fyc.id, { 'net_loss_and_profit_move_id': None })
+        elif operation == 'close':
+            move = fyc.closing_move_id
+            pool.get('account_fiscal_year_closing.fyc').write(cr, uid, fyc.id, { 'closing_move_id': None })
+        elif operation == 'open':
+            move = fyc.opening_move_id
+            pool.get('account_fiscal_year_closing.fyc').write(cr, uid, fyc.id, { 'opening_move_id': None })
+        else:
+            assert operation in ('loss_and_profit', 'net_loss_and_profit', 'close', 'open'), "The operation must be a supported one"
+        data['process_task_progress'] = 15.0
+
+        assert move and move.id, "The move to delete must be defined"
+
+        #
+        # Unreconcile the move if needed
+        #
+        reconcile_ids = []
+        for line in move.line_id:
+            if line.reconcile_id and (line.reconcile_id.id not in reconcile_ids):
+                reconcile_ids.append(line.reconcile_id.id)
+            if line.reconcile_partial_id and (line.reconcile_partial_id.id not in reconcile_ids):
+                reconcile_ids.append(line.reconcile_partial_id.id)
+        if reconcile_ids:
+            pool.get('account.move.reconcile').unlink(cr, uid, reconcile_ids, context)
+        data['process_task_progress'] = 30.0
+
+        #
+        # Remove the move after changing it's state to draft
+        #
+        pool.get('account.move').write(cr, uid, [move.id], {'state': 'draft'}, context)
+        pool.get('account.move').unlink(cr, uid, [move.id], context)
+
+        data['process_task_progress'] = 100.0
+        return move.id
+
+
+    ############################################################################
+    # Wizard Actions
+    ############################################################################
+
+    def _init_choice(self, cr, uid, data, context):
+        """
+        Choice-like action that checks whether the operations must be run
+        or canceled.
+        """
+        if context is None:
+            context = {}
+        if context.get('cancel_mode'):
+            data['cancel_mode'] = True
+            return 'init_cancel'
+        else:
+            data['cancel_mode'] = False
+            return 'init_run'
+        
+
+    def _run(self, db_name, uid, data, context=None):
+        """
+        Creates / removes FYC entries
+        """
+        data['process_progress'] = 0
+        data['process_task_progress'] = 0
+        data['process_task'] = None
+        try:
+            conn = sql_db.db_connect(db_name)
+            cr = conn.cursor()
+            pool = pooler.get_pool(cr.dbname)
+
+            #
+            # If the wizard is in cancel mode, run the objects cancel action
+            # to let it undo the confirmation action, before running the wizard.
+            #
+            if data.get('cancel_mode'):
+                wf_service = netsvc.LocalService("workflow")
+                wf_service.trg_validate(uid, 'account_fiscal_year_closing.fyc', data['id'], 'cancel', cr)
+
+            # Read the object
+            fyc = pool.get('account_fiscal_year_closing.fyc').browse(cr, uid, data['id'], context=context)
+
+            #
+            # Calculate the operations to perform (needed to calculate the progress)
+            #
+            total_operations = 0
+            operations_done = 0
+            if fyc.check_invalid_period_moves:
+                total_operations += 1
+            if fyc.check_draft_moves:
+                total_operations += 1
+            if fyc.check_unbalanced_moves:
+                total_operations += 1
+            if (fyc.create_loss_and_profit and not fyc.loss_and_profit_move_id) \
+                or ((not fyc.create_loss_and_profit) and fyc.loss_and_profit_move_id):
+                total_operations += 1
+            if (fyc.create_net_loss_and_profit and not fyc.net_loss_and_profit_move_id) \
+                or ((not fyc.create_net_loss_and_profit) and fyc.net_loss_and_profit_move_id):
+                total_operations += 1
+            if (fyc.create_closing and not fyc.closing_move_id) \
+                or ((not fyc.create_closing) and fyc.closing_move_id):
+                total_operations += 1
+            if (fyc.create_opening and not fyc.opening_move_id) \
+                or ((not fyc.create_opening) and fyc.opening_move_id):
+                total_operations += 1
+                
+            if total_operations > 0:
+
+                #
+                # Check for invalid period moves if needed
+                #
+                if fyc.check_invalid_period_moves:
+                    data['process_task'] = 'Check invalid period/date moves'
+                    self._check_invalid_period_moves(cr, uid, fyc, data, context)
+                    operations_done += 1
+                    data['process_progress'] = (operations_done * 100.0) / total_operations
+
+                #
+                # Check for draft moves if needed
+                #
+                if fyc.check_draft_moves:
+                    data['process_task'] = 'Check draft moves'
+                    self._check_draft_moves(cr, uid, fyc, data, context)
+                    operations_done += 1
+                    data['process_progress'] = (operations_done * 100.0) / total_operations
+
+                #
+                # Check for unbalanced moves if needed
+                #
+                if fyc.check_unbalanced_moves:
+                    data['process_task'] = 'Check unbalanced moves'
+                    self._check_unbalanced_moves(cr, uid, fyc, data, context)
+                    operations_done += 1
+                    data['process_progress'] = (operations_done * 100.0) / total_operations
+
+                #
+                # Create L&P move if needed
+                #
+                if fyc.create_loss_and_profit and not fyc.loss_and_profit_move_id:
+                    data['process_task'] = 'Create L&P move'
+                    self.create_closing_move(cr, uid, 'loss_and_profit', fyc, data, context)
+                    operations_done += 1
+                    data['process_progress'] = (operations_done * 100.0) / total_operations
+                #
+                # Remove the L&P move if needed
+                #
+                if (not fyc.create_loss_and_profit) and fyc.loss_and_profit_move_id:
+                    data['process_task'] = 'Remove L&P move'
+                    self.remove_move(cr, uid, 'loss_and_profit', fyc, data, context)
+                    operations_done += 1
+                    data['process_progress'] = (operations_done * 100.0) / total_operations
+
+                # Refresh the cached fyc object
+                fyc = pool.get('account_fiscal_year_closing.fyc').browse(cr, uid, data['id'], context=context)
+
+
+                #
+                # Create the Net L&P move if needed
+                #
+                if fyc.create_net_loss_and_profit and not fyc.net_loss_and_profit_move_id:
+                    data['process_task'] = 'Create NL&P move'
+                    self.create_closing_move(cr, uid, 'net_loss_and_profit', fyc, data, context)
+                    operations_done += 1
+                    data['process_progress'] = (operations_done * 100.0) / total_operations
+                #
+                # Remove the Net L&P move if needed
+                #
+                if (not fyc.create_net_loss_and_profit) and fyc.net_loss_and_profit_move_id:
+                    data['process_task'] = 'Remove NL&P move'
+                    self.remove_move(cr, uid, 'net_loss_and_profit', fyc, data, context)
+                    operations_done += 1
+                    data['process_progress'] = (operations_done * 100.0) / total_operations
+
+                # Refresh the cached fyc object
+                fyc = pool.get('account_fiscal_year_closing.fyc').browse(cr, uid, data['id'], context=context)
+
+
+                #
+                # Create the closing move if needed
+                #
+                if fyc.create_closing and not fyc.closing_move_id:
+                    data['process_task'] = 'Create closing move'
+                    self.create_closing_move(cr, uid, 'close', fyc, data, context)
+                    operations_done += 1
+                    data['process_progress'] = (operations_done * 100.0) / total_operations
+                #
+                # Remove the closing move if needed
+                #
+                if (not fyc.create_closing) and fyc.closing_move_id:
+                    data['process_task'] = 'Remove closing move'
+                    self.remove_move(cr, uid, 'close', fyc, data, context)
+                    operations_done += 1
+                    data['process_progress'] = (operations_done * 100.0) / total_operations
+
+                # Refresh the cached fyc object
+                fyc = pool.get('account_fiscal_year_closing.fyc').browse(cr, uid, data['id'], context=context)
+
+                
+                #
+                # Create the opening move if needed
+                #
+                if fyc.create_opening and not fyc.opening_move_id:
+                    data['process_task'] = 'Create opening move'
+                    self.create_opening_move(cr, uid, 'open', fyc, data, context)
+                    operations_done += 1
+                    data['process_progress'] = (operations_done * 100.0) / total_operations
+                #
+                # Remove the opening move if needed
+                #
+                if (not fyc.create_opening) and fyc.opening_move_id:
+                    data['process_task'] = 'Remove opening move'
+                    self.remove_move(cr, uid, 'open', fyc, data, context)
+                    operations_done += 1
+                    data['process_progress'] = (operations_done * 100.0) / total_operations
+
+            #
+            # Set the as done (if not in cancel_mode)
+            #
+            if not data.get('cancel_mode'):
+                wf_service = netsvc.LocalService("workflow")
+                wf_service.trg_validate(uid, 'account_fiscal_year_closing.fyc', fyc.id, 'run', cr)
+
+            data['process_progress'] = 100
+            cr.commit()
+        except Exception, ex:
+            data['process_exception'] = ex
+            cr.rollback()
+            raise
+        finally:
+            cr.close()
+            data['process_done'] = True
+        return {}
+
+
+    def _run_in_background_choice(self, cr, uid, data, context):
+        """
+        Choice-like action that runs the process on background,
+        waiting for it to end or timeout.
+        """
+        if not data.get('process_thread'):
+            # Run the calculation in background
+            data['process_done'] = False
+            data['process_exception'] = None
+            data['process_thread'] = threading.Thread(target=self._run, args=(cr.dbname, uid, data, context))
+            data['process_thread'].start()
+        #
+        # Wait up some seconds seconds for the task to end.
+        #
+        time_left = 20
+        while not data['process_done'] and time_left > 0:
+            time_left = time_left - 1
+            time.sleep(1)
+            message = "Fiscal year closing progress: %s%% (%s: %s%%)" % (data.get('process_progress'), data.get('process_task'), data.get('process_task_progress'))
+            netsvc.Logger().notifyChannel('fyc', netsvc.LOG_DEBUG, message)
+        #
+        # Check if we are done
+        #
+        if data['process_done']:
+            if data['process_exception']:
+                return 'show_exception'
+            else:
+                return 'done'
+        else:
+            return 'progress'
+
+
+    def _progress_action(self, cr, uid, data, context):
+        """
+        Action that gets the current progress
+        """
+        return {
+            'task_progress': data['process_task_progress'],
+            'progress': data['process_progress']
+        }
+
+    def _show_exception_action(self, cr, uid, data, context):
+        """
+        Action that gets the calculation exception text
+        """
+        exception_text = ''
+        if data.get('process_exception'):
+            if isinstance(data['process_exception'], wizard.except_wizard):
+                exception_text = data['process_exception'].value
+            else:
+                try:
+                    exception_text = unicode(data['process_exception'])
+                except:
+                    exception_text = str(data['process_exception'])
+        return { 'exception_text': exception_text }
+
+    ############################################################################
+    # States
+    ############################################################################
+
+    states = {
+        'init': {
+            'actions': [],
+            'result': {'type': 'choice', 'next_state': _init_choice}
+        },
+        'init_run': {
+            'actions': [],
+            'result': {'type':'form', 'arch': _init_run_form, 'fields': {}, 'state':[('end', 'Cancel', 'gtk-cancel', True), ('run', 'Run', 'gtk-apply', True)]}
+        },
+        'init_cancel': {
+            'actions': [],
+            'result': {'type':'form', 'arch': _init_cancel_form, 'fields': {}, 'state':[('end', 'Cancel', 'gtk-cancel', True), ('run', 'Run', 'gtk-apply', True)]}
+        },
+        'run': {
+            'actions': [],
+            'result': {'type': 'choice', 'next_state': _run_in_background_choice}
+        },
+        'progress': {
+            'actions': [_progress_action],
+            'result': {'type': 'form', 'arch': _progress_form, 'fields': _progress_fields, 'state':[('end','Close (continues in background)', 'gtk-cancel', True),('run','Keep waiting', 'gtk-go-forward', True)]}
+        },
+        'done': {
+            'actions': [],
+            'result': {'type': 'form', 'arch': _done_form, 'fields': {}, 'state':[('end','Done', 'gtk-ok', True)]}
+        },
+        'show_exception': {
+            'actions': [_show_exception_action],
+            'result': {'type': 'form', 'arch': _show_exception_form, 'fields': _show_exception_fields, 'state':[('end','Done', 'gtk-ok', True)]}
+        }
+    }
+
+
+wizard_run('account_fiscal_year_closing.wizard_run')
+
+
+class wizard_cancel(wizard_run):
+    """
+    Wizard to remove the FYC entries.
+    """
+
+    def _init_choice(self, cr, uid, data, context):
+        """
+        Choice-like action that checks whether the operations must be run
+        or canceled. => Always cancel on wizard_cancel.
+        """
+        data['cancel_mode'] = True
+        return 'init_cancel'
+
+    states = wizard_run.states.copy()
+    
+    states['init'] = {
+            'actions': [],
+            'result': {'type': 'choice', 'next_state': _init_choice}
+        }
+
+
+wizard_cancel('account_fiscal_year_closing.wizard_cancel')
+


Follow ups