Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] l10n_es_fiscalyear_closing: Varias mejoras #92

Merged
merged 1 commit into from
Dec 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 4 additions & 25 deletions l10n_es_fiscal_year_closing/__init__.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,7 @@
# -*- coding: utf-8 -*-
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com)
# Jordi Esteve <jesteve@zikzakmedia.com>
# $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/>.
#
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
"""
Spanish Fiscal Year Closing
"""
from . import fiscalyear_closing
from . import l10n_es_fiscalyear_closing

from . import models
from . import wizard
6 changes: 3 additions & 3 deletions l10n_es_fiscal_year_closing/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@
"wizard/wizard_run_view.xml",
"security/security.xml",
"security/ir.model.access.csv",
"fiscalyear_closing_workflow.xml",
"fiscalyear_closing_view.xml",
"hide_account_wizards.xml",
"views/fiscalyear_closing_workflow.xml",
"views/fiscalyear_closing_view.xml",
"views/hide_account_wizards.xml",
],
"active": False,
"installable": True,
Expand Down
136 changes: 16 additions & 120 deletions l10n_es_fiscal_year_closing/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -657,131 +657,27 @@ msgstr "Asientos creados por la operación de cierre"
msgid "Loss & Profit"
msgstr "Pérdidas y ganancias"

#. module: l10n_es_fiscal_year_closing
#: code:addons/l10n_es_fiscal_year_closing/models/account_fiscalyear.py:22
#, python-format
#~ msgid "The Net L&P period must be defined"
#~ msgstr "El periodo de pérdidas y ganancias patr. neto debe estar definido"

#, python-format
#~ msgid "The closing journal must be defined"
#~ msgstr "El diario de cierre debe estar definido"

#~ msgid "Other operations (for non Spanish charts of accounts)"
#~ msgstr "Otras operaciones (para planes contables no españoles)"

#~ msgid "Move created by the operation"
#~ msgstr "Asiento creado por la operación"

#~ msgid "Operation to perform"
#~ msgstr "Operación a realizar"

#~ msgid "Close fiscal year"
#~ msgstr "Cerrar ejercicio fiscal"

#~ msgid "Operations"
#~ msgstr "Operaciones"

#~ msgid "Account"
#~ msgstr "Cuenta"

#, python-format
#~ msgid "The L&P journal must be defined"
#~ msgstr "El diario de pérdidas y ganancias debe estar definido"

#, python-format
#~ msgid "The closing description must be defined"
#~ msgstr "La descripción de cierre debe estar definida"

#, python-format
#~ msgid "The Net L&P description must be defined"
#~ msgstr ""
#~ "La descripción de pérdidas y ganancias patr. neto debe estar definida"

#, python-format
#~ msgid "The L&P period must be defined"
#~ msgstr "El periodo de pérdidas y ganancias debe estar definido"

#~ msgid "Close Fiscal Year"
#~ msgstr "Cerrar ejercicio fiscal"

#, python-format
#~ msgid "The Net L&P date must be defined"
#~ msgstr ""
#~ "La fecha de pérdidas y ganancias de patrimonio neto debe estar definida"

#~ msgid "Open next fiscal year"
#~ msgstr "Abrir ejercicio fiscal siguiente"

#~ 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."

#~ msgid "Canceled"
#~ msgstr "Cancelado"

#, python-format
#~ msgid "The L&P description must be defined"
#~ msgstr "La descripción de pérdidas y ganancias debe estar definida"

#, python-format
#~ msgid "The closing date must be defined"
#~ msgstr "La fecha de cierre debe estar definida"

#, python-format
#~ msgid "The opening description must be defined"
#~ msgstr "La descripción de apertura debe estar definida"

#, python-format
#~ msgid "There is already a fiscal year closing with this name."
#~ msgstr "Ya existe un cierre de ejercicio con este nombre."

#~ msgid "Spanish Fiscal Year Closing"
#~ msgstr "Cierre de ejercicio fiscal español"

#, python-format
#~ msgid "The closing period must be defined"
#~ msgstr "El peridodo de cierre debe estar definido"

#, 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."

#, 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."

#, python-format
#~ msgid "The L&P date must be defined"
#~ msgstr "La fecha de pérdidas y ganancias debe estar definida"
msgid "Closing Period"
msgstr "Periodo de cierre"

#. module: l10n_es_fiscal_year_closing
#: code:addons/l10n_es_fiscal_year_closing/models/account_fiscalyear.py:23
#, python-format
#~ msgid "The opening journal must be defined"
#~ msgstr "El diario de apertura debe estar definido"

#~ msgid "In Progress"
#~ msgstr "En progreso"
msgid "C"
msgstr "C"

#. module: l10n_es_fiscal_year_closing
#: code:addons/l10n_es_fiscal_year_closing/models/account_fiscalyear.py:29
#, python-format
#~ msgid "The opening date must be defined"
#~ msgstr "La fecha de apertura debe estar definida"

#~ msgid "Fiscal Years Closings"
#~ msgstr "Cierres de ejercicios fiscales"
msgid "Profit and loss Period"
msgstr "Periodo de pérdidas y ganancias"

#. module: l10n_es_fiscal_year_closing
#: code:addons/l10n_es_fiscal_year_closing/models/account_fiscalyear.py:30
#, python-format
#~ msgid "The Net L&P journal must be defined"
#~ msgstr "El diario de pérdidas y ganancias patr. neto debe estar definido"

#~ msgid "Perform the operations"
#~ msgstr "Ejecutar las operaciones"
msgid "PL"
msgstr "PL"

#~ msgid "Create Net Loss & Profit"
#~ msgstr "Crear asiento de pérdidas y ganancias patr. neto"

#~ msgid "Spanish Fiscal Year Closing Wizard"
#~ msgstr "Asistente de cierre de ejercicio fiscal español"

#, python-format
#~ msgid "The opening period must be defined"
#~ msgstr "El periodo de apertura debe estar definido"
24 changes: 24 additions & 0 deletions l10n_es_fiscal_year_closing/i18n/l10n_es_fiscal_year_closing.pot
Original file line number Diff line number Diff line change
Expand Up @@ -610,3 +610,27 @@ msgstr ""
msgid "Loss & Profit"
msgstr ""

#. module: l10n_es_fiscal_year_closing
#: code:addons/l10n_es_fiscal_year_closing/models/account_fiscalyear.py:22
#, python-format
msgid "Closing Period"
msgstr ""

#. module: l10n_es_fiscal_year_closing
#: code:addons/l10n_es_fiscal_year_closing/models/account_fiscalyear.py:23
#, python-format
msgid "C"
msgstr ""

#. module: l10n_es_fiscal_year_closing
#: code:addons/l10n_es_fiscal_year_closing/models/account_fiscalyear.py:29
#, python-format
msgid "Profit and loss Period"
msgstr ""

#. module: l10n_es_fiscal_year_closing
#: code:addons/l10n_es_fiscal_year_closing/models/account_fiscalyear.py:30
#, python-format
msgid "PL"
msgstr ""

7 changes: 7 additions & 0 deletions l10n_es_fiscal_year_closing/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from . import fiscalyear_closing
from . import l10n_es_fiscalyear_closing
from . import account_fiscalyear
35 changes: 35 additions & 0 deletions l10n_es_fiscal_year_closing/models/account_fiscalyear.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, api, _


class AccountFiscalyear(models.Model):
_inherit = "account.fiscalyear"

@api.v7
def create_period(self, cr, uid, ids, context=None, interval=1):
recs = self.browse(cr, uid, ids, context)
recs.create_period(interval=interval)

@api.v8
def create_period(self, interval=1):
res = super(AccountFiscalyear, self).create_period(interval=interval)
period_model = self.env['account.period']
for fy in self:
period_model.create({
'name': "%s %s" % (_('Closing Period'), fy.code),
'code': '%s/%s' % (_('C'), fy.code),
'date_start': fy.date_stop,
'date_stop': fy.date_stop,
'special': True,
'fiscalyear_id': fy.id})
period_model.create({
'name': "%s %s" % (_('Profit and loss Period'), fy.code),
'code': '%s/%s' % (_('PL'), fy.code),
'date_start': fy.date_stop,
'date_stop': fy.date_stop,
'special': True,
'fiscalyear_id': fy.id})
return res