From ed5805135a0ee917723e535ee6bf877a8b78e327 Mon Sep 17 00:00:00 2001 From: "Omar (pexego)" Date: Fri, 4 Mar 2011 18:52:36 +0100 Subject: [PATCH 001/173] [ADD] l10n_es_aeat, l10n_es_aeat_347, l10n_es_aeat_349: Adds a generic module for aeat models, 347 module was portedto v6.0 and adds new module to print AEAT model 349. --- l10n_es_aeat/__init__.py | 27 +++ l10n_es_aeat/__openerp__.py | 41 +++++ l10n_es_aeat/aeat_menuitem.xml | 11 ++ l10n_es_aeat/aeat_report.py | 112 ++++++++++++ l10n_es_aeat/i18n/ca.po | 163 +++++++++++++++++ l10n_es_aeat/i18n/es.po | 193 ++++++++++++++++++++ l10n_es_aeat/i18n/l10n_es_aeat.pot | 197 +++++++++++++++++++++ l10n_es_aeat/security/ir.model.access.csv | 3 + l10n_es_aeat/wizard/__init__.py | 24 +++ l10n_es_aeat/wizard/export_to_boe.py | 205 ++++++++++++++++++++++ 10 files changed, 976 insertions(+) create mode 100755 l10n_es_aeat/__init__.py create mode 100755 l10n_es_aeat/__openerp__.py create mode 100755 l10n_es_aeat/aeat_menuitem.xml create mode 100755 l10n_es_aeat/aeat_report.py create mode 100755 l10n_es_aeat/i18n/ca.po create mode 100755 l10n_es_aeat/i18n/es.po create mode 100755 l10n_es_aeat/i18n/l10n_es_aeat.pot create mode 100755 l10n_es_aeat/security/ir.model.access.csv create mode 100755 l10n_es_aeat/wizard/__init__.py create mode 100755 l10n_es_aeat/wizard/export_to_boe.py diff --git a/l10n_es_aeat/__init__.py b/l10n_es_aeat/__init__.py new file mode 100755 index 00000000000..98990bdd7c8 --- /dev/null +++ b/l10n_es_aeat/__init__.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2004-2011 +# Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved +# +# 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 . +# +############################################################################## + +__author__ = "Luis Manuel Angueira Blanco (Pexego)" + + +import aeat_report +import wizard +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/l10n_es_aeat/__openerp__.py b/l10n_es_aeat/__openerp__.py new file mode 100755 index 00000000000..58cb5dbf033 --- /dev/null +++ b/l10n_es_aeat/__openerp__.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2004-2011 +# Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved +# +# 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 . +# +############################################################################## + +{ + 'name' : "AEAT Base", + 'version' : "1.0", + 'author' : "Pexego", + 'website' : "http://www.pexego.es", + 'category' : "Localisation/Accounting", + 'init_xml' : [ + ], + 'depends' : ["account"], + 'update_xml' : [ + 'aeat_menuitem.xml', + 'security/ir.model.access.csv' + ], + 'demo_xml' : [], + 'test' : [], + 'installable' : True, + 'active' : False, +} + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/l10n_es_aeat/aeat_menuitem.xml b/l10n_es_aeat/aeat_menuitem.xml new file mode 100755 index 00000000000..c17a0aabf5a --- /dev/null +++ b/l10n_es_aeat/aeat_menuitem.xml @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file diff --git a/l10n_es_aeat/aeat_report.py b/l10n_es_aeat/aeat_report.py new file mode 100755 index 00000000000..584e23db91d --- /dev/null +++ b/l10n_es_aeat/aeat_report.py @@ -0,0 +1,112 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2004-2011 +# Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved +# +# 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 . +# +############################################################################## + +__author__ = "Luis Manuel Angueira Blanco (Pexego)" + + +import netsvc +import re +from tools.translate import _ + +from osv import osv, fields + +class l10n_es_aeat_report(osv.osv): + _name = "l10n.es.aeat.report" + _description = "AEAT Report base module" + + + def on_change_company_id(self, cr, uid, ids, company_id): + """ + Loads some company data (the VAT number) when the selected + company changes. + """ + company_vat = '' + if company_id: + company = self.pool.get('res.company').browse(cr, uid, company_id) + if company.partner_id and company.partner_id.vat: + # Remove the ES part from spanish vat numbers (ES12345678Z => 12345678Z) + company_vat = re.match("(ES){0,1}(.*)", company.partner_id.vat).groups()[1] + return { 'value': { 'company_vat': company_vat } } + + + _columns = { + 'company_id': fields.many2one('res.company', 'Company', required=True, states={'done':[('readonly',True)]}), + + 'number': fields.char('Declaration Number', size=13, states={'calculated':[('required',True)],'done':[('readonly',True)]}), + 'previous_number' : fields.char('Previous Declaration Number', size=13, states={'done':[('readonly',True)]}), + + 'representative_vat': fields.char('L.R. VAT number', size=9, help="Legal Representative VAT number.", + states={'calculated':[('required',True)],'confirmed':[('readonly',True)]}), + + 'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, states={'done': [('readonly', True)]}), + + 'company_vat': fields.char('VAT number', size=9, states={'calculated':[('required',True)],'done':[('readonly',True)]}), + + 'type': fields.selection([ + ('N','Normal'), + ('C','Complementary'), + ('S','Substitutive')], 'Statement Type', + states={'calculated':[('required',True)],'done':[('readonly',True)]}), + + 'support_type': fields.selection([ + ('C','DVD'), + ('T','Telematics')], 'Support Type', + states={'calculated':[('required',True)],'done':[('readonly',True)]}), + + 'calculation_date': fields.datetime("Calculation date"), + 'state' : fields.selection([ + ('draft', 'Draft'), + ('calculating', 'Processing'), + ('calculated', 'Processed'), + ('done', 'Done'), + ('canceled', 'Canceled') + ], 'State', readonly=True), + } + + _defaults = { + 'company_id' : lambda self, cr, uid, context: + self.pool.get('res.users').browse(cr, uid, uid, context).company_id and + self.pool.get('res.users').browse(cr, uid, uid, context).company_id.id, + 'type' : lambda *a: 'N', + 'support_type' : lambda *a: 'T', + 'state' : lambda *a: 'draft', + } + + + def action_recover(self, cr, uid, ids, context=None): + self.write(cr, uid, ids, {'state': 'draft', 'calculation_date': None}) + wf_service = netsvc.LocalService("workflow") + for item_id in ids: + wf_service.trg_create(uid, self._name, item_id, cr) + return True + + + def unlink(self, cr, uid, ids, context=None): + if context is None: + context = {} + + for item in self.browse(cr, uid, ids): + if item.state not in ['draft', 'canceled']: + raise osv.except_osv(_('Error!'), _("Only reports in 'draft' or 'cancel' state can be removed")) + + return super(l10n_es_aeat_report, self).unlink(cr, uid, ids, context) + +l10n_es_aeat_report() \ No newline at end of file diff --git a/l10n_es_aeat/i18n/ca.po b/l10n_es_aeat/i18n/ca.po new file mode 100755 index 00000000000..059a30b6e0a --- /dev/null +++ b/l10n_es_aeat/i18n/ca.po @@ -0,0 +1,163 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * l10n_es_aeat +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 6.0.0-rc1\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2010-12-13 17:34:49+0000\n" +"PO-Revision-Date: 2010-12-13 18:44+0100\n" +"Last-Translator: Luis Manuel Angueira Blanco \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_aeat +#: field:l10n.es.aeat.report,type:0 +msgid "Statement Type" +msgstr "Tipus declaració" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,support_type:0 +msgid "DVD" +msgstr "DVD" + +#. module: l10n_es_aeat +#: field:account.invoice,refund_invoices_description:0 +msgid "Refund invoices description" +msgstr "Descripción de facturas rectificativas." + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,state:0 +msgid "State" +msgstr "Estat" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Draft" +msgstr "Esborrany" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,type:0 +msgid "Normal" +msgstr "Normal" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,company_id:0 +msgid "Company" +msgstr "Companyia" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Processing" +msgstr "Processant" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,type:0 +msgid "Substitutive" +msgstr "Substitutiva" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fical Year" +msgstr "Exercici fiscal" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,previous_number:0 +msgid "Previous Declaration Number" +msgstr "Número declaració anterior" + +#. module: l10n_es_aeat +#: field:account.invoice,origin_invoices_ids:0 +msgid "Refund invoice" +msgstr "Factura rectificativa" + +#. module: l10n_es_aeat +#: help:l10n.es.aeat.report,representative_vat:0 +msgid "Legal Representative VAT number." +msgstr "NIF del representant legal." + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,support_type:0 +msgid "Support Type" +msgstr "Tipus de suport" + +#. module: l10n_es_aeat +#: help:account.invoice,origin_invoices_ids:0 +msgid "Links to original invoice which is referred by current refund invoice" +msgstr "Enllaça amb la factura original a la qual fa referència la factura actual" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat +#: model:ir.module.module,shortdesc:l10n_es_aeat.module_meta_information +msgid "AEAT Base" +msgstr "AEAT Base" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report +msgid "AEAT Report base module" +msgstr "Mòdul base Agència Tributària" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,calculation_date:0 +msgid "Calculation date" +msgstr "Data del càlcul" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,representative_vat:0 +msgid "L.R. VAT number" +msgstr "NIF R.L." + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,company_vat:0 +msgid "VAT number" +msgstr "NIF / CIF" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,support_type:0 +msgid "Telematics" +msgstr "Telemàtica" + +#. module: l10n_es_aeat +#: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat +msgid "AEAT Reports" +msgstr "Informe Agència Tributària" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report_export_to_boe +msgid "Export Report to BOE Format" +msgstr "Exporta a fitxer BOE" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,type:0 +msgid "Complementary" +msgstr "Complementària" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,number:0 +msgid "Declaration Number" +msgstr "Número declaració" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Canceled" +msgstr "Cancel·lada" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Done" +msgstr "Realitzat" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_account_invoice +msgid "Invoice" +msgstr "Factura" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Processed" +msgstr "Processat" + diff --git a/l10n_es_aeat/i18n/es.po b/l10n_es_aeat/i18n/es.po new file mode 100755 index 00000000000..cb6d0d03f8d --- /dev/null +++ b/l10n_es_aeat/i18n/es.po @@ -0,0 +1,193 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * l10n_es_aeat +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 6.0.0-rc1\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2010-12-13 17:34:49+0000\n" +"PO-Revision-Date: 2010-12-13 18:44+0100\n" +"Last-Translator: Luis Manuel Angueira Blanco \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_aeat +#: field:l10n.es.aeat.report,type:0 +msgid "Statement Type" +msgstr "Tipo de declaración" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:104 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:144 +#, python-format +msgid "The formated string must match the given length" +msgstr "La cadena formateada debe satisfacer el tamaño dado." + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,support_type:0 +msgid "DVD" +msgstr "DVD" + +#. module: l10n_es_aeat +#: field:account.invoice,refund_invoices_description:0 +msgid "Refund invoices description" +msgstr "Descripción de facturas rectificativas." + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,state:0 +msgid "State" +msgstr "Estado" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Draft" +msgstr "Borrador" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,type:0 +msgid "Normal" +msgstr "Normal" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,company_id:0 +msgid "Company" +msgstr "Compañía" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Processing" +msgstr "Calculando" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,type:0 +msgid "Substitutive" +msgstr "Sustitutiva" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fical Year" +msgstr "Año fiscal" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,previous_number:0 +msgid "Previous Declaration Number" +msgstr "Número de declaración previa" + +#. module: l10n_es_aeat +#: field:account.invoice,origin_invoices_ids:0 +msgid "Refund invoice" +msgstr "Factura rectificativa" + +#. module: l10n_es_aeat +#: help:l10n.es.aeat.report,representative_vat:0 +msgid "Legal Representative VAT number." +msgstr "Nombre del Representante Legal." + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,support_type:0 +msgid "Support Type" +msgstr "Tipo de Soporte" + +#. module: l10n_es_aeat +#: help:account.invoice,origin_invoices_ids:0 +msgid "Links to original invoice which is referred by current refund invoice" +msgstr "Enlaza con la factura original a la que hace referencia la factura actual" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat +#: model:ir.module.module,shortdesc:l10n_es_aeat.module_meta_information +msgid "AEAT Base" +msgstr "AEAT Base" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report +msgid "AEAT Report base module" +msgstr "Módulo base Agencia Tributaria" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,calculation_date:0 +msgid "Calculation date" +msgstr "Fecha de cálculo" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,representative_vat:0 +msgid "L.R. VAT number" +msgstr "CIF/NIF Repr. Legal" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,company_vat:0 +msgid "VAT number" +msgstr "CIF/NIF" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/aeat_report.py:107 +#, python-format +msgid "Only reports in 'draft' or 'cancel' state can be removed" +msgstr "Sólo informes en estado 'borrador' o 'cancelado' pueden ser borrados" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,support_type:0 +msgid "Telematics" +msgstr "Telemática" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/aeat_report.py:107 +#, python-format +msgid "Error!" +msgstr "¡Error!" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fiscal Year" +msgstr "Año fiscal" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,number:0 +msgid "Declaration Number" +msgstr "Número declaración" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:100 +#, python-format +msgid "Wrong aling option. It should be < or >" +msgstr "Opción de alineamiento errónea. Debería ser < o >" + +#. module: l10n_es_aeat +#: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat +msgid "AEAT Reports" +msgstr "Agencia Tributaria" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report_export_to_boe +msgid "Export Report to BOE Format" +msgstr "Exportar a formato BOE" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,type:0 +msgid "Complementary" +msgstr "Complementaria" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Canceled" +msgstr "Cancelado" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Done" +msgstr "Hecho" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_account_invoice +msgid "Invoice" +msgstr "Factura" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Processed" +msgstr "Calculado" + diff --git a/l10n_es_aeat/i18n/l10n_es_aeat.pot b/l10n_es_aeat/i18n/l10n_es_aeat.pot new file mode 100755 index 00000000000..dba028f9236 --- /dev/null +++ b/l10n_es_aeat/i18n/l10n_es_aeat.pot @@ -0,0 +1,197 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * l10n_es_aeat +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 6.0.0-rc1\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2010-12-13 17:34:49+0000\n" +"PO-Revision-Date: 2010-12-13 18:44+0100\n" +"Last-Translator: Luis Manuel Angueira Blanco \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_aeat +#: field:l10n.es.aeat.report,type:0 +msgid "Statement Type" +msgstr "" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:104 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:144 +#, python-format +msgid "The formated string must match the given length" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,support_type:0 +msgid "DVD" +msgstr "" + +#. module: l10n_es_aeat +#: field:account.invoice,refund_invoices_description:0 +msgid "Refund invoices description" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,state:0 +msgid "State" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Draft" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,type:0 +msgid "Normal" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,company_id:0 +msgid "Company" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Processing" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,type:0 +msgid "Substitutive" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fical Year" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,previous_number:0 +msgid "Previous Declaration Number" +msgstr "" + +#. module: l10n_es_aeat +#: field:account.invoice,origin_invoices_ids:0 +msgid "Refund invoice" +msgstr "" + +#. module: l10n_es_aeat +#: help:l10n.es.aeat.report,representative_vat:0 +msgid "Legal Representative VAT number." +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,support_type:0 +msgid "Support Type" +msgstr "" + +#. module: l10n_es_aeat +#: help:account.invoice,origin_invoices_ids:0 +msgid "Links to original invoice which is referred by current refund invoice" +msgstr "" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat +#: model:ir.module.module,shortdesc:l10n_es_aeat.module_meta_information +msgid "AEAT Base" +msgstr "" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report +msgid "AEAT Report base module" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,calculation_date:0 +msgid "Calculation date" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,representative_vat:0 +msgid "L.R. VAT number" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,company_vat:0 +msgid "VAT number" +msgstr "" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/aeat_report.py:107 +#, python-format +msgid "Only reports in 'draft' or 'cancel' state can be removed" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,support_type:0 +msgid "Telematics" +msgstr "" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/aeat_report.py:107 +#, python-format +msgid "Error!" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fiscal Year" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,number:0 +msgid "Declaration Number" +msgstr "" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:100 +#, python-format +msgid "Wrong aling option. It should be < or >" +msgstr "" + +#. module: l10n_es_aeat +#: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat +msgid "AEAT Reports" +msgstr "" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report_export_to_boe +msgid "Export Report to BOE Format" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,type:0 +msgid "Complementary" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,number:0 +msgid "Declaration Number" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Canceled" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Done" +msgstr "" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Processed" +msgstr "" \ No newline at end of file diff --git a/l10n_es_aeat/security/ir.model.access.csv b/l10n_es_aeat/security/ir.model.access.csv new file mode 100755 index 00000000000..8e593714cca --- /dev/null +++ b/l10n_es_aeat/security/ir.model.access.csv @@ -0,0 +1,3 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_l10n_es_aeat_report","l10n.es.aeat.report","model_l10n_es_aeat_report","account.group_account_user",1,0,0,0 +"access_l10n_es_aeat_report_manager","l10n.es.aeat.report manager","model_l10n_es_aeat_report","account.group_account_manager",1,1,1,1 \ No newline at end of file diff --git a/l10n_es_aeat/wizard/__init__.py b/l10n_es_aeat/wizard/__init__.py new file mode 100755 index 00000000000..8d292fa843c --- /dev/null +++ b/l10n_es_aeat/wizard/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2004-2011 +# Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved +# +# 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 . +# +############################################################################## + +__author__ = "Luis Manuel Angueira Blanco (Pexego)" + +import export_to_boe \ No newline at end of file diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py new file mode 100755 index 00000000000..ba5489bab2b --- /dev/null +++ b/l10n_es_aeat/wizard/export_to_boe.py @@ -0,0 +1,205 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2004-2011 +# Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved +# +# 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 . +# +############################################################################## + +__author__ = "Luis Manuel Angueira Blanco (Pexego)" + + +import base64 +import time + +from tools.translate import _ +from osv import osv + + +class l10n_es_aeat_report_export_to_boe(osv.osv_memory): + _name = "l10n.es.aeat.report.export_to_boe" + _description = "Export Report to BOE Format" + + ######################## + ### HELPER FUNCTIONS ### + ######################## + def _formatString(self, text, length, fill=' ', align='<'): + """ + Formats the string into a fixed length ASCII (iso-8859-1) record. + + Note: + 'Todos los campos alfanuméricos y alfabéticos se presentarán alineados a la izquierda y + rellenos de blancos por la derecha, en mayúsculas sin caracteres especiales, y sin vocales acentuadas. + Para los caracteres específicos del idioma se utilizará la codificación ISO-8859-1. De esta + forma la letra “Ñ” tendrá el valor ASCII 209 (Hex. D1) y la “Ç”(cedilla mayúscula) el valor ASCII + 199 (Hex. C7).' + """ + + if not text: + return fill*length + + # + # Replace accents + # + replacements = [ + (u'Á', 'A'),(u'á', 'A'), + (u'É', 'E'),(u'é', 'E'), + (u'Í', 'I'),(u'í', 'I'), + (u'Ó', 'O'),(u'ó', 'O'), + (u'Ú', 'U'),(u'ú', 'U'), + (u'Ä', 'A'),(u'ä', 'A'), + (u'Ë', 'E'),(u'ë', 'E'), + (u'Ï', 'I'),(u'ï', 'I'), + (u'Ö', 'O'),(u'ö', 'O'), + (u'Ü', 'U'),(u'ü', 'U'), + (u'À', 'A'),(u'à', 'A'), + (u'È', 'E'),(u'è', 'E'), + (u'Ì', 'I'),(u'ì', 'I'), + (u'Ò', 'O'),(u'ò', 'O'), + (u'Ù', 'U'),(u'ù', 'U'), + (u'Â', 'A'),(u'â', 'A'), + (u'Ê', 'E'),(u'ê', 'E'), + (u'Î', 'I'),(u'î', 'I'), + (u'Ô', 'O'),(u'ô', 'O'), + (u'Û', 'U'),(u'û', 'U')] + + # + # String uppercase + # + text = text.upper() + + # + # Turn text (probably unicode) into an ASCII (iso-8859-1) string + # + if isinstance(text, (unicode)): + ascii_string = text.encode('iso-8859-1', 'ignore') + else: + ascii_string = str(text or '') + # Cut the string if it is too long + if len(ascii_string) > length: + ascii_string = ascii_string[:length] + # Format the string + #ascii_string = '{0:{1}{2}{3}s}'.format(ascii_string, fill, align, length) #for python >= 2.6 + if align == '<': + ascii_string = str(ascii_string) + (length-len(str(ascii_string)))*fill + elif align == '>': + ascii_string = (length-len(str(ascii_string)))*fill + str(ascii_string) + else: + assert False, _('Wrong aling option. It should be < or >') + + # Sanity-check + assert len(ascii_string) == length, \ + _("The formated string must match the given length") + # Return string + return ascii_string + + + def _formatNumber(self, number, int_length, dec_length=0, include_sign=False): + """ + Formats the number into a fixed length ASCII (iso-8859-1) record. + Note: + 'Todos los campos numéricos se presentarán alineados a la derecha + y rellenos a ceros por la izquierda sin signos y sin empaquetar.' + (http://www.boe.es/boe/dias/2008/10/23/pdfs/A42154-42190.pdf) + """ + # + # Separate the number parts (-55.23 => int_part=55, dec_part=0.23, sign='N') + # + if number == '': + number = 0.0 + + number = float(number) + sign = number > 0 and ' ' or 'N' + number = abs(number) + int_part = int(number) + dec_part = int(round((number % 1.0),2)*100.0) + + ## + ## Format the string + ascii_string = '' + if include_sign: + ascii_string += sign + + if int_length > 0: + ascii_string += '%.*d' % (int_length, int_part) + + if dec_length > 0: + ascii_string += str(dec_part)+(dec_length-len(str(dec_part)))*'0' + + # Sanity-check + assert len(ascii_string) == (include_sign and 1 or 0) + int_length + dec_length, \ + _("The formated string must match the given length") + # Return the string + return ascii_string + + + def _formatBoolean(self, value, yes='X', no=' '): + """ + Formats a boolean value into a fixed length ASCII (iso-8859-1) record. + """ + return value and yes or no + + + ######################### + ### RECORDS FUNCTIONS ### + ######################### + def _get_formated_declaration_record(self, report): + return '' + + def _get_formated_partner_record(self, report, partner_record): + return '' + + def _get_formated_other_records(self, report): + return '' + + def _export_boe_file(self, cr, uid, ids, report, model=None, context=None): + """ + Action that exports the data into a BOE formated text file + """ + if context is None: + context = {} + + assert model , u"AEAT Model is necessary" + + file_contents = '' + + ## + ## Add header record + file_contents += self._get_formated_declaration_record(report) + + ## + ## Add the partner records + for partner_record in report.partner_record_ids: + file_contents += self._get_formated_partner_record(report, partner_record) + + ## + ## Adds other fields + file_contents += self._get_formated_other_records(report) + + ## + ## Generate the file and save as attachment + file = base64.encodestring(file_contents) + + file_name = _("%s_report_%s.txt") % (model, time.strftime(_("%Y-%m-%d"))) + self.pool.get("ir.attachment").create(cr, uid, { + "name" : file_name, + "datas" : file, + "datas_fname" : file_name, + "res_model" : "l10n.es.aeat.mod%s.report" % model, + "res_id" : ids and ids[0] + }, context=context) + +l10n_es_aeat_report_export_to_boe() \ No newline at end of file From f08737e93542b456604a444b9dc312cb1be169d8 Mon Sep 17 00:00:00 2001 From: Jordi Esteve Date: Fri, 11 Mar 2011 22:15:22 +0100 Subject: [PATCH 002/173] =?UTF-8?q?[IMP+FIX]=20l10n=5Fes=5Faeat,=20l10n=5F?= =?UTF-8?q?es=5Faeat=5Fmod347,=20l10n=5Fes=5Faeat=5Fmod349:=20Peque=C3=B1a?= =?UTF-8?q?s=20mejoras=20generales=20(vistas,=20traducciones,=20c=C3=B3dig?= =?UTF-8?q?o)=20y=20correcci=C3=B3n=20peque=C3=B1o=20bug=20por=20un=20olvi?= =?UTF-8?q?do=20en=20la=20adaptaci=C3=B3n=20de=20la=20v5=20a=20la=20v6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- l10n_es_aeat/i18n/ca.po | 58 ++++++++++++++++++++++-------- l10n_es_aeat/i18n/es.po | 28 +++++++-------- l10n_es_aeat/i18n/l10n_es_aeat.pot | 7 +--- 3 files changed, 59 insertions(+), 34 deletions(-) diff --git a/l10n_es_aeat/i18n/ca.po b/l10n_es_aeat/i18n/ca.po index 059a30b6e0a..07c6c819d96 100755 --- a/l10n_es_aeat/i18n/ca.po +++ b/l10n_es_aeat/i18n/ca.po @@ -1,14 +1,14 @@ # Translation of OpenERP Server. # This file contains the translation of the following modules: -# * l10n_es_aeat +# * l10n_es_aeat # msgid "" msgstr "" "Project-Id-Version: OpenERP Server 6.0.0-rc1\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2010-12-13 17:34:49+0000\n" -"PO-Revision-Date: 2010-12-13 18:44+0100\n" -"Last-Translator: Luis Manuel Angueira Blanco \n" +"PO-Revision-Date: 2011-03-11 21:07+0100\n" +"Last-Translator: Jordi Esteve (Zikzakmedia) \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -20,6 +20,13 @@ msgstr "" msgid "Statement Type" msgstr "Tipus declaració" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:104 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:144 +#, python-format +msgid "The formated string must match the given length" +msgstr "La cadena formatejada ha de satisfer la llargada donada." + #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 msgid "DVD" @@ -28,7 +35,7 @@ msgstr "DVD" #. module: l10n_es_aeat #: field:account.invoice,refund_invoices_description:0 msgid "Refund invoices description" -msgstr "Descripción de facturas rectificativas." +msgstr "Descripció de factures rectificatives." #. module: l10n_es_aeat #: field:l10n.es.aeat.report,state:0 @@ -88,7 +95,7 @@ msgstr "Tipus de suport" #. module: l10n_es_aeat #: help:account.invoice,origin_invoices_ids:0 msgid "Links to original invoice which is referred by current refund invoice" -msgstr "Enllaça amb la factura original a la qual fa referència la factura actual" +msgstr "Enllaça amb la factura original a la qual fa referència la factura actual." #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat @@ -99,7 +106,7 @@ msgstr "AEAT Base" #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report msgid "AEAT Report base module" -msgstr "Mòdul base Agència Tributària" +msgstr "Mòdul base per les declaracions de l'Agència Tributària" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,calculation_date:0 @@ -116,15 +123,43 @@ msgstr "NIF R.L." msgid "VAT number" msgstr "NIF / CIF" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/aeat_report.py:107 +#, python-format +msgid "Only reports in 'draft' or 'cancel' state can be removed" +msgstr "Només declaracions en estat 'Esborrany' o 'Cancel·lada' poden ser eliminades" + #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 msgid "Telematics" msgstr "Telemàtica" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/aeat_report.py:107 +#, python-format +msgid "Error!" +msgstr "Error!" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fiscal Year" +msgstr "Exercici fiscal" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,number:0 +msgid "Declaration Number" +msgstr "Número declaració" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:100 +#, python-format +msgid "Wrong aling option. It should be < or >" +msgstr "Opció d'alineament errònia. Hauria de ser < o >" + #. module: l10n_es_aeat #: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat msgid "AEAT Reports" -msgstr "Informe Agència Tributària" +msgstr "Declaracions Agència Tributària" #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report_export_to_boe @@ -136,11 +171,6 @@ msgstr "Exporta a fitxer BOE" msgid "Complementary" msgstr "Complementària" -#. module: l10n_es_aeat -#: field:l10n.es.aeat.report,number:0 -msgid "Declaration Number" -msgstr "Número declaració" - #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 msgid "Canceled" @@ -149,7 +179,7 @@ msgstr "Cancel·lada" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 msgid "Done" -msgstr "Realitzat" +msgstr "Realitzada" #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_account_invoice @@ -159,5 +189,5 @@ msgstr "Factura" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 msgid "Processed" -msgstr "Processat" +msgstr "Calculada" diff --git a/l10n_es_aeat/i18n/es.po b/l10n_es_aeat/i18n/es.po index cb6d0d03f8d..6a2a2d59390 100755 --- a/l10n_es_aeat/i18n/es.po +++ b/l10n_es_aeat/i18n/es.po @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0.0-rc1\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2010-12-13 17:34:49+0000\n" -"PO-Revision-Date: 2010-12-13 18:44+0100\n" -"Last-Translator: Luis Manuel Angueira Blanco \n" +"PO-Revision-Date: 2011-03-11 21:02+0100\n" +"Last-Translator: Jordi Esteve (Zikzakmedia) \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -70,7 +70,7 @@ msgstr "Sustitutiva" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,fiscalyear_id:0 msgid "Fical Year" -msgstr "Año fiscal" +msgstr "Ejercicio fiscal" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,previous_number:0 @@ -85,17 +85,17 @@ msgstr "Factura rectificativa" #. module: l10n_es_aeat #: help:l10n.es.aeat.report,representative_vat:0 msgid "Legal Representative VAT number." -msgstr "Nombre del Representante Legal." +msgstr "Nombre del representante legal." #. module: l10n_es_aeat #: field:l10n.es.aeat.report,support_type:0 msgid "Support Type" -msgstr "Tipo de Soporte" +msgstr "Tipo de soporte" #. module: l10n_es_aeat #: help:account.invoice,origin_invoices_ids:0 msgid "Links to original invoice which is referred by current refund invoice" -msgstr "Enlaza con la factura original a la que hace referencia la factura actual" +msgstr "Enlaza con la factura original a la que hace referencia la factura actual." #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat @@ -106,7 +106,7 @@ msgstr "AEAT Base" #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report msgid "AEAT Report base module" -msgstr "Módulo base Agencia Tributaria" +msgstr "Módulo base para las declaraciones de la Agencia Tributaria" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,calculation_date:0 @@ -116,7 +116,7 @@ msgstr "Fecha de cálculo" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,representative_vat:0 msgid "L.R. VAT number" -msgstr "CIF/NIF Repr. Legal" +msgstr "CIF/NIF Repr. legal" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,company_vat:0 @@ -127,7 +127,7 @@ msgstr "CIF/NIF" #: code:addons/l10n_es_aeat/aeat_report.py:107 #, python-format msgid "Only reports in 'draft' or 'cancel' state can be removed" -msgstr "Sólo informes en estado 'borrador' o 'cancelado' pueden ser borrados" +msgstr "Sólo declaraciones en estado 'Borrador' o 'Cancelada' pueden ser eliminadas" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 @@ -143,7 +143,7 @@ msgstr "¡Error!" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,fiscalyear_id:0 msgid "Fiscal Year" -msgstr "Año fiscal" +msgstr "Ejercicio fiscal" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,number:0 @@ -159,7 +159,7 @@ msgstr "Opción de alineamiento errónea. Debería ser < o >" #. module: l10n_es_aeat #: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat msgid "AEAT Reports" -msgstr "Agencia Tributaria" +msgstr "Declaraciones Agencia Tributaria" #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report_export_to_boe @@ -174,12 +174,12 @@ msgstr "Complementaria" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 msgid "Canceled" -msgstr "Cancelado" +msgstr "Cancelada" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 msgid "Done" -msgstr "Hecho" +msgstr "Realizada" #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_account_invoice @@ -189,5 +189,5 @@ msgstr "Factura" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 msgid "Processed" -msgstr "Calculado" +msgstr "Calculada" diff --git a/l10n_es_aeat/i18n/l10n_es_aeat.pot b/l10n_es_aeat/i18n/l10n_es_aeat.pot index dba028f9236..d62be831968 100755 --- a/l10n_es_aeat/i18n/l10n_es_aeat.pot +++ b/l10n_es_aeat/i18n/l10n_es_aeat.pot @@ -171,11 +171,6 @@ msgstr "" msgid "Complementary" msgstr "" -#. module: l10n_es_aeat -#: field:l10n.es.aeat.report,number:0 -msgid "Declaration Number" -msgstr "" - #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 msgid "Canceled" @@ -194,4 +189,4 @@ msgstr "" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 msgid "Processed" -msgstr "" \ No newline at end of file +msgstr "" From 08735841e3109de9048c46349905efa624142322 Mon Sep 17 00:00:00 2001 From: Albert Cervera i Areny Date: Wed, 15 Jun 2011 18:59:08 +0200 Subject: [PATCH 003/173] [FIX] l10n_es_aeat: Fix _format_number function so number '22027.0' is formatted correctly. With this number 'dec_part' would become 100 (instead of 0) and fail in the final assertion. Instead of providing a workaround for this case, I simply replace the formatting with '%0*.*f' which seems easier specially because it already does the appropriate rounding. --- l10n_es_aeat/wizard/export_to_boe.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py index ba5489bab2b..f99ef0e3b4e 100755 --- a/l10n_es_aeat/wizard/export_to_boe.py +++ b/l10n_es_aeat/wizard/export_to_boe.py @@ -125,7 +125,6 @@ def _formatNumber(self, number, int_length, dec_length=0, include_sign=False): sign = number > 0 and ' ' or 'N' number = abs(number) int_part = int(number) - dec_part = int(round((number % 1.0),2)*100.0) ## ## Format the string @@ -133,11 +132,11 @@ def _formatNumber(self, number, int_length, dec_length=0, include_sign=False): if include_sign: ascii_string += sign - if int_length > 0: - ascii_string += '%.*d' % (int_length, int_part) - if dec_length > 0: - ascii_string += str(dec_part)+(dec_length-len(str(dec_part)))*'0' + ascii_string += '%0*.*f' % (int_length+dec_length+1,dec_length, number) + ascii_string = ascii_string.replace('.','') + elif int_length > 0: + ascii_string += '%.*d' % (int_length, int_part) # Sanity-check assert len(ascii_string) == (include_sign and 1 or 0) + int_length + dec_length, \ @@ -202,4 +201,4 @@ def _export_boe_file(self, cr, uid, ids, report, model=None, context=None): "res_id" : ids and ids[0] }, context=context) -l10n_es_aeat_report_export_to_boe() \ No newline at end of file +l10n_es_aeat_report_export_to_boe() From d822a8b80cefea76987a890c36a857a21ea680e7 Mon Sep 17 00:00:00 2001 From: "Omar (pexego)" Date: Wed, 3 Aug 2011 12:50:08 +0200 Subject: [PATCH 004/173] =?UTF-8?q?[REF]=20Cambio=20de=20licencia=20de=20G?= =?UTF-8?q?PL3=20a=20AGPL=20en=20los=20m=C3=B3dulos=20donde=20s=C3=B3lo=20?= =?UTF-8?q?aparec=C3=ADa=20Pexego=20en=20la=20licencia,=20quedan=20los=20c?= =?UTF-8?q?ompartidos.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- l10n_es_aeat/__init__.py | 10 +++++----- l10n_es_aeat/__openerp__.py | 13 +++++++------ l10n_es_aeat/aeat_report.py | 10 +++++----- l10n_es_aeat/wizard/__init__.py | 10 +++++----- l10n_es_aeat/wizard/export_to_boe.py | 10 +++++----- 5 files changed, 27 insertions(+), 26 deletions(-) diff --git a/l10n_es_aeat/__init__.py b/l10n_es_aeat/__init__.py index 98990bdd7c8..34c669c2b66 100755 --- a/l10n_es_aeat/__init__.py +++ b/l10n_es_aeat/__init__.py @@ -5,16 +5,16 @@ # Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved # # 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. +# 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 General Public License for more details. +# GNU Affero General Public License for more details. # -# You should have received a copy of the GNU General Public License +# You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # ############################################################################## diff --git a/l10n_es_aeat/__openerp__.py b/l10n_es_aeat/__openerp__.py index 58cb5dbf033..3d0fff4e2a6 100755 --- a/l10n_es_aeat/__openerp__.py +++ b/l10n_es_aeat/__openerp__.py @@ -5,16 +5,16 @@ # Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved # # 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. +# 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 General Public License for more details. +# GNU Affero General Public License for more details. # -# You should have received a copy of the GNU General Public License +# You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # ############################################################################## @@ -23,6 +23,7 @@ 'name' : "AEAT Base", 'version' : "1.0", 'author' : "Pexego", + 'license' : "AGPL-3", 'website' : "http://www.pexego.es", 'category' : "Localisation/Accounting", 'init_xml' : [ @@ -38,4 +39,4 @@ 'active' : False, } -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/l10n_es_aeat/aeat_report.py b/l10n_es_aeat/aeat_report.py index 584e23db91d..e4fc3a75f1b 100755 --- a/l10n_es_aeat/aeat_report.py +++ b/l10n_es_aeat/aeat_report.py @@ -5,16 +5,16 @@ # Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved # # 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. +# 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 General Public License for more details. +# GNU Affero General Public License for more details. # -# You should have received a copy of the GNU General Public License +# You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # ############################################################################## diff --git a/l10n_es_aeat/wizard/__init__.py b/l10n_es_aeat/wizard/__init__.py index 8d292fa843c..6590e96ca13 100755 --- a/l10n_es_aeat/wizard/__init__.py +++ b/l10n_es_aeat/wizard/__init__.py @@ -5,16 +5,16 @@ # Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved # # 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. +# 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 General Public License for more details. +# GNU Affero General Public License for more details. # -# You should have received a copy of the GNU General Public License +# You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # ############################################################################## diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py index f99ef0e3b4e..ba1969df55c 100755 --- a/l10n_es_aeat/wizard/export_to_boe.py +++ b/l10n_es_aeat/wizard/export_to_boe.py @@ -5,16 +5,16 @@ # Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved # # 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. +# 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 General Public License for more details. +# GNU Affero General Public License for more details. # -# You should have received a copy of the GNU General Public License +# You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # ############################################################################## From d8e0b022a80e96ba17e676dc1982a299b9a611b0 Mon Sep 17 00:00:00 2001 From: "Omar (pexego)" Date: Tue, 20 Mar 2012 12:13:48 +0100 Subject: [PATCH 005/173] =?UTF-8?q?[FIX]=20l10n=5Fes=5Faeat=5Fmod347,l10n?= =?UTF-8?q?=5Fes=5Faeat:=20A=C3=B1adimos=20los=20=C3=BAltimos=20cambios=20?= =?UTF-8?q?en=20la=206.0=20de=20estos=20m=C3=B3dulos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- l10n_es_aeat/wizard/export_to_boe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py index ba1969df55c..25aded844fc 100755 --- a/l10n_es_aeat/wizard/export_to_boe.py +++ b/l10n_es_aeat/wizard/export_to_boe.py @@ -122,7 +122,7 @@ def _formatNumber(self, number, int_length, dec_length=0, include_sign=False): number = 0.0 number = float(number) - sign = number > 0 and ' ' or 'N' + sign = number >= 0 and ' ' or 'N' number = abs(number) int_part = int(number) From 1d0990d40a2155c2966ae0ea63978a5057132c26 Mon Sep 17 00:00:00 2001 From: "Omar (Pexego)" Date: Mon, 28 Jan 2013 11:29:06 +0100 Subject: [PATCH 006/173] =?UTF-8?q?Commit=20inicial=20de=20una=20rama=20pa?= =?UTF-8?q?ra=20la=20versi=C3=B3n=207.0.=20Todos=20los=20m=C3=B3dulos=20fu?= =?UTF-8?q?eron=20marcados=20como=20no=20instalables=20mientras=20no=20se?= =?UTF-8?q?=20compruebe=20que=20funcionan=20o=20migren,=20para=20poder=20u?= =?UTF-8?q?sarlos=20o=20probarlos=20se=20deber=C3=ADa=20poner=20el=20atrib?= =?UTF-8?q?uto=20installable=20de=20los=20ficheros=20=5F=5Fopenerp=5F=5F.p?= =?UTF-8?q?y=20de=20cada=20m=C3=B3dulo=20a=20True?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- l10n_es_aeat/__openerp__.py | 2 +- l10n_es_aeat/i18n/ca.po | 14 +-- l10n_es_aeat/i18n/es.po | 14 +-- l10n_es_aeat/i18n/gl.po | 195 ++++++++++++++++++++++++++++++++++++ 4 files changed, 212 insertions(+), 13 deletions(-) create mode 100644 l10n_es_aeat/i18n/gl.po diff --git a/l10n_es_aeat/__openerp__.py b/l10n_es_aeat/__openerp__.py index 3d0fff4e2a6..d89962bfbfe 100755 --- a/l10n_es_aeat/__openerp__.py +++ b/l10n_es_aeat/__openerp__.py @@ -35,7 +35,7 @@ ], 'demo_xml' : [], 'test' : [], - 'installable' : True, + 'installable' : False, 'active' : False, } diff --git a/l10n_es_aeat/i18n/ca.po b/l10n_es_aeat/i18n/ca.po index 07c6c819d96..8e53afaed24 100755 --- a/l10n_es_aeat/i18n/ca.po +++ b/l10n_es_aeat/i18n/ca.po @@ -6,14 +6,15 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 6.0.0-rc1\n" "Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2010-12-13 17:34:49+0000\n" -"PO-Revision-Date: 2011-03-11 21:07+0100\n" +"POT-Creation-Date: 2010-12-13 17:34+0000\n" +"PO-Revision-Date: 2013-10-10 16:51+0000\n" "Last-Translator: Jordi Esteve (Zikzakmedia) \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" +"X-Launchpad-Export-Date: 2013-10-14 05:33+0000\n" +"X-Generator: Launchpad (build 16799)\n" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,type:0 @@ -95,7 +96,8 @@ msgstr "Tipus de suport" #. module: l10n_es_aeat #: help:account.invoice,origin_invoices_ids:0 msgid "Links to original invoice which is referred by current refund invoice" -msgstr "Enllaça amb la factura original a la qual fa referència la factura actual." +msgstr "" +"Enllaça amb la factura original a la qual fa referència la factura actual." #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat @@ -127,7 +129,8 @@ msgstr "NIF / CIF" #: code:addons/l10n_es_aeat/aeat_report.py:107 #, python-format msgid "Only reports in 'draft' or 'cancel' state can be removed" -msgstr "Només declaracions en estat 'Esborrany' o 'Cancel·lada' poden ser eliminades" +msgstr "" +"Només declaracions en estat 'Esborrany' o 'Cancel·lada' poden ser eliminades" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 @@ -190,4 +193,3 @@ msgstr "Factura" #: selection:l10n.es.aeat.report,state:0 msgid "Processed" msgstr "Calculada" - diff --git a/l10n_es_aeat/i18n/es.po b/l10n_es_aeat/i18n/es.po index 6a2a2d59390..a5e7be97ab1 100755 --- a/l10n_es_aeat/i18n/es.po +++ b/l10n_es_aeat/i18n/es.po @@ -6,14 +6,15 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 6.0.0-rc1\n" "Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2010-12-13 17:34:49+0000\n" -"PO-Revision-Date: 2011-03-11 21:02+0100\n" +"POT-Creation-Date: 2010-12-13 17:34+0000\n" +"PO-Revision-Date: 2013-10-10 16:51+0000\n" "Last-Translator: Jordi Esteve (Zikzakmedia) \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" +"X-Launchpad-Export-Date: 2013-10-14 05:33+0000\n" +"X-Generator: Launchpad (build 16799)\n" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,type:0 @@ -95,7 +96,8 @@ msgstr "Tipo de soporte" #. module: l10n_es_aeat #: help:account.invoice,origin_invoices_ids:0 msgid "Links to original invoice which is referred by current refund invoice" -msgstr "Enlaza con la factura original a la que hace referencia la factura actual." +msgstr "" +"Enlaza con la factura original a la que hace referencia la factura actual." #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat @@ -127,7 +129,8 @@ msgstr "CIF/NIF" #: code:addons/l10n_es_aeat/aeat_report.py:107 #, python-format msgid "Only reports in 'draft' or 'cancel' state can be removed" -msgstr "Sólo declaraciones en estado 'Borrador' o 'Cancelada' pueden ser eliminadas" +msgstr "" +"Sólo declaraciones en estado 'Borrador' o 'Cancelada' pueden ser eliminadas" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 @@ -190,4 +193,3 @@ msgstr "Factura" #: selection:l10n.es.aeat.report,state:0 msgid "Processed" msgstr "Calculada" - diff --git a/l10n_es_aeat/i18n/gl.po b/l10n_es_aeat/i18n/gl.po new file mode 100644 index 00000000000..101c689c264 --- /dev/null +++ b/l10n_es_aeat/i18n/gl.po @@ -0,0 +1,195 @@ +# Galician translation for openerp-spain +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openerp-spain package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openerp-spain\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2010-12-13 17:34+0000\n" +"PO-Revision-Date: 2013-10-28 03:17+0000\n" +"Last-Translator: Alejandro Santana \n" +"Language-Team: Galician \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-10-29 05:14+0000\n" +"X-Generator: Launchpad (build 16818)\n" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,type:0 +msgid "Statement Type" +msgstr "Tipo de declaración" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:104 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:144 +#, python-format +msgid "The formated string must match the given length" +msgstr "A cadea formateada debe satisfacer o tamaño dado." + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,support_type:0 +msgid "DVD" +msgstr "DVD" + +#. module: l10n_es_aeat +#: field:account.invoice,refund_invoices_description:0 +msgid "Refund invoices description" +msgstr "Descripción de facturas rectificativas." + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,state:0 +msgid "State" +msgstr "Provincia" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Draft" +msgstr "Borrador" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,type:0 +msgid "Normal" +msgstr "Normal" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,company_id:0 +msgid "Company" +msgstr "Compañía" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Processing" +msgstr "Procesando" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,type:0 +msgid "Substitutive" +msgstr "Substitutiva" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fical Year" +msgstr "Exercicio fiscal" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,previous_number:0 +msgid "Previous Declaration Number" +msgstr "Número da declaración anterior" + +#. module: l10n_es_aeat +#: field:account.invoice,origin_invoices_ids:0 +msgid "Refund invoice" +msgstr "Factura rectificativa" + +#. module: l10n_es_aeat +#: help:l10n.es.aeat.report,representative_vat:0 +msgid "Legal Representative VAT number." +msgstr "NIF do representante legal." + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,support_type:0 +msgid "Support Type" +msgstr "Tipo de soporte" + +#. module: l10n_es_aeat +#: help:account.invoice,origin_invoices_ids:0 +msgid "Links to original invoice which is referred by current refund invoice" +msgstr "Enlaza coa factura orixinal á que fai referencia a factura actual." + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat +#: model:ir.module.module,shortdesc:l10n_es_aeat.module_meta_information +msgid "AEAT Base" +msgstr "AEAT Base" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report +msgid "AEAT Report base module" +msgstr "Módulo base para as declaracións da Axencia Tributaria" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,calculation_date:0 +msgid "Calculation date" +msgstr "Data de cálculo" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,representative_vat:0 +msgid "L.R. VAT number" +msgstr "NIF Repr. legal" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,company_vat:0 +msgid "VAT number" +msgstr "NIF" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/aeat_report.py:107 +#, python-format +msgid "Only reports in 'draft' or 'cancel' state can be removed" +msgstr "" +"Só declaracions en estado 'Borrador' ou 'Cancelada' poden ser eliminadas" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,support_type:0 +msgid "Telematics" +msgstr "Telemática" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/aeat_report.py:107 +#, python-format +msgid "Error!" +msgstr "¡Erro!" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fiscal Year" +msgstr "Exercicio fiscal" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,number:0 +msgid "Declaration Number" +msgstr "Número de declaración" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:100 +#, python-format +msgid "Wrong aling option. It should be < or >" +msgstr "Opción de aliñamento errada. Debería ser < ou >" + +#. module: l10n_es_aeat +#: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat +msgid "AEAT Reports" +msgstr "Declaracións Axencia Tributaria" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report_export_to_boe +msgid "Export Report to BOE Format" +msgstr "Exportar a formato BOE" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,type:0 +msgid "Complementary" +msgstr "Complementaria" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Canceled" +msgstr "Cancelada" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Done" +msgstr "Realizada" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_account_invoice +msgid "Invoice" +msgstr "Factura" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Processed" +msgstr "Procesada" From fcb77b5d872c67cc9bdc7cbd292f91d9b4652d06 Mon Sep 17 00:00:00 2001 From: "Ignacio Ibeas - Acysos S.L" Date: Sun, 10 Nov 2013 21:08:07 +0100 Subject: [PATCH 007/173] =?UTF-8?q?[ADD]=20l10n=5Fes=5Faeat:=20migraci?= =?UTF-8?q?=C3=B3n=20a=20OpenERP=207.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- l10n_es_aeat/__openerp__.py | 23 ++- l10n_es_aeat/aeat_report.py | 90 +++++++---- l10n_es_aeat/i18n/ca.po | 172 +++++++++++----------- l10n_es_aeat/i18n/es.po | 170 ++++++++++----------- l10n_es_aeat/i18n/gl.po | 162 ++++++++++---------- l10n_es_aeat/i18n/l10n_es_aeat.pot | 123 +++++++--------- l10n_es_aeat/security/aeat_security.xml | 12 ++ l10n_es_aeat/security/ir.model.access.csv | 5 +- l10n_es_aeat/wizard/export_to_boe.py | 72 ++++++--- 9 files changed, 453 insertions(+), 376 deletions(-) mode change 100755 => 100644 l10n_es_aeat/i18n/ca.po mode change 100755 => 100644 l10n_es_aeat/i18n/es.po mode change 100755 => 100644 l10n_es_aeat/i18n/l10n_es_aeat.pot create mode 100644 l10n_es_aeat/security/aeat_security.xml diff --git a/l10n_es_aeat/__openerp__.py b/l10n_es_aeat/__openerp__.py index d89962bfbfe..d2e73cff5ab 100755 --- a/l10n_es_aeat/__openerp__.py +++ b/l10n_es_aeat/__openerp__.py @@ -4,6 +4,10 @@ # Copyright (C) 2004-2011 # Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved # +# Copyright (C) 2013 +# Ignacio Ibeas - Acysos S.L. (http://acysos.com) All Rights Reserved +# Migración a OpenERP 7.0 +# # 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 @@ -24,19 +28,22 @@ 'version' : "1.0", 'author' : "Pexego", 'license' : "AGPL-3", - 'website' : "http://www.pexego.es", + 'contributors': ['Ignacio Ibeas (Acysos S.L.)'], + 'website' : "http://www.pexego.es, http://www.acysos.com", 'category' : "Localisation/Accounting", 'init_xml' : [ ], - 'depends' : ["account"], + 'depends' : [ + "account", + ], 'update_xml' : [ + 'security/aeat_security.xml', + 'security/ir.model.access.csv', 'aeat_menuitem.xml', - 'security/ir.model.access.csv' ], 'demo_xml' : [], 'test' : [], - 'installable' : False, - 'active' : False, -} - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + 'auto_install': False, + 'installable': True, + 'application': False, +} \ No newline at end of file diff --git a/l10n_es_aeat/aeat_report.py b/l10n_es_aeat/aeat_report.py index e4fc3a75f1b..4a6e65ead08 100755 --- a/l10n_es_aeat/aeat_report.py +++ b/l10n_es_aeat/aeat_report.py @@ -3,6 +3,10 @@ # # Copyright (C) 2004-2011 # Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved +# Luis Manuel Angueira Blanco (Pexego) +# Copyright (C) 2013 +# Ignacio Ibeas - Acysos S.L. (http://acysos.com) All Rights Reserved +# Migración a OpenERP 7.0 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -19,16 +23,13 @@ # ############################################################################## -__author__ = "Luis Manuel Angueira Blanco (Pexego)" - import netsvc import re -from tools.translate import _ - -from osv import osv, fields +from openerp.tools.translate import _ +from openerp.osv import orm, fields -class l10n_es_aeat_report(osv.osv): +class l10n_es_aeat_report(orm.Model): _name = "l10n.es.aeat.report" _description = "AEAT Report base module" @@ -42,35 +43,55 @@ def on_change_company_id(self, cr, uid, ids, company_id): if company_id: company = self.pool.get('res.company').browse(cr, uid, company_id) if company.partner_id and company.partner_id.vat: - # Remove the ES part from spanish vat numbers (ES12345678Z => 12345678Z) - company_vat = re.match("(ES){0,1}(.*)", company.partner_id.vat).groups()[1] + # Remove the ES part from spanish vat numbers + # (ES12345678Z => 12345678Z) + company_vat = re.match("(ES){0,1}(.*)", + company.partner_id.vat).groups()[1] return { 'value': { 'company_vat': company_vat } } _columns = { - 'company_id': fields.many2one('res.company', 'Company', required=True, states={'done':[('readonly',True)]}), - - 'number': fields.char('Declaration Number', size=13, states={'calculated':[('required',True)],'done':[('readonly',True)]}), - 'previous_number' : fields.char('Previous Declaration Number', size=13, states={'done':[('readonly',True)]}), - - 'representative_vat': fields.char('L.R. VAT number', size=9, help="Legal Representative VAT number.", - states={'calculated':[('required',True)],'confirmed':[('readonly',True)]}), - - 'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, states={'done': [('readonly', True)]}), - - 'company_vat': fields.char('VAT number', size=9, states={'calculated':[('required',True)],'done':[('readonly',True)]}), - - 'type': fields.selection([ - ('N','Normal'), + 'company_id': fields.many2one( + 'res.company', 'Company', + required=True, states={'done':[('readonly',True)]} + ), + 'number': fields.char( + 'Declaration Number', size=13, + states={'calculated':[('required',True)], + 'done':[('readonly',True)]} + ), + 'previous_number' : fields.char( + 'Previous Declaration Number', + size=13, states={'done':[('readonly',True)]} + ), + 'representative_vat': fields.char( + 'L.R. VAT number', size=9, + help="Legal Representative VAT number.", + states={'calculated':[('required',True)], + 'confirmed':[('readonly',True)]} + ), + 'fiscalyear_id': fields.many2one( + 'account.fiscalyear', 'Fiscal Year', required=True, + states={'done': [('readonly', True)]} + ), + 'company_vat': fields.char( + 'VAT number', size=9, + states={'calculated':[('required',True)], + 'done':[('readonly',True)]} + ), + 'type': fields.selection( + [('N','Normal'), ('C','Complementary'), - ('S','Substitutive')], 'Statement Type', - states={'calculated':[('required',True)],'done':[('readonly',True)]}), - + ('S','Substitutive')], + 'Statement Type', + states={'calculated':[('required',True)], + 'done':[('readonly',True)]} + ), 'support_type': fields.selection([ ('C','DVD'), ('T','Telematics')], 'Support Type', - states={'calculated':[('required',True)],'done':[('readonly',True)]}), - + states={'calculated':[('required',True)], + 'done':[('readonly',True)]}), 'calculation_date': fields.datetime("Calculation date"), 'state' : fields.selection([ ('draft', 'Draft'), @@ -79,12 +100,17 @@ def on_change_company_id(self, cr, uid, ids, company_id): ('done', 'Done'), ('canceled', 'Canceled') ], 'State', readonly=True), + 'attach_id':fields.many2one( + 'ir.attachment', 'BOE file', readonly=True + ), } _defaults = { 'company_id' : lambda self, cr, uid, context: - self.pool.get('res.users').browse(cr, uid, uid, context).company_id and - self.pool.get('res.users').browse(cr, uid, uid, context).company_id.id, + self.pool.get('res.users').browse(cr, uid, + uid, context).company_id and + self.pool.get('res.users').browse(cr, uid, + uid, context).company_id.id, 'type' : lambda *a: 'N', 'support_type' : lambda *a: 'T', 'state' : lambda *a: 'draft', @@ -105,7 +131,11 @@ def unlink(self, cr, uid, ids, context=None): for item in self.browse(cr, uid, ids): if item.state not in ['draft', 'canceled']: - raise osv.except_osv(_('Error!'), _("Only reports in 'draft' or 'cancel' state can be removed")) + raise orm.orm_exception( + _('Error!'), + _("Only reports in 'draft' or 'cancel'" + \ + "state can be removed") + ) return super(l10n_es_aeat_report, self).unlink(cr, uid, ids, context) diff --git a/l10n_es_aeat/i18n/ca.po b/l10n_es_aeat/i18n/ca.po old mode 100755 new mode 100644 index 8e53afaed24..509601843e7 --- a/l10n_es_aeat/i18n/ca.po +++ b/l10n_es_aeat/i18n/ca.po @@ -1,43 +1,31 @@ # Translation of OpenERP Server. # This file contains the translation of the following modules: -# * l10n_es_aeat +# * l10n_es_aeat # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 6.0.0-rc1\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2010-12-13 17:34+0000\n" -"PO-Revision-Date: 2013-10-10 16:51+0000\n" -"Last-Translator: Jordi Esteve (Zikzakmedia) \n" +"Project-Id-Version: OpenERP Server 7.0-20130519-231019\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-10-11 15:20+0000\n" +"PO-Revision-Date: 2013-11-11 23:17+0000\n" +"Last-Translator: Ignacio Ibeas (www.acysos.com) \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-10-14 05:33+0000\n" -"X-Generator: Launchpad (build 16799)\n" +"X-Launchpad-Export-Date: 2013-11-12 06:23+0000\n" +"X-Generator: Launchpad (build 16820)\n" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,type:0 msgid "Statement Type" msgstr "Tipus declaració" -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:104 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:144 -#, python-format -msgid "The formated string must match the given length" -msgstr "La cadena formatejada ha de satisfer la llargada donada." - #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 msgid "DVD" msgstr "DVD" -#. module: l10n_es_aeat -#: field:account.invoice,refund_invoices_description:0 -msgid "Refund invoices description" -msgstr "Descripció de factures rectificatives." - #. module: l10n_es_aeat #: field:l10n.es.aeat.report,state:0 msgid "State" @@ -50,8 +38,8 @@ msgstr "Esborrany" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,type:0 -msgid "Normal" -msgstr "Normal" +msgid "Complementary" +msgstr "Complementària" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,company_id:0 @@ -69,9 +57,9 @@ msgid "Substitutive" msgstr "Substitutiva" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,fiscalyear_id:0 -msgid "Fical Year" -msgstr "Exercici fiscal" +#: help:l10n.es.aeat.report,representative_vat:0 +msgid "Legal Representative VAT number." +msgstr "NIF del representant legal." #. module: l10n_es_aeat #: field:l10n.es.aeat.report,previous_number:0 @@ -79,14 +67,29 @@ msgid "Previous Declaration Number" msgstr "Número declaració anterior" #. module: l10n_es_aeat -#: field:account.invoice,origin_invoices_ids:0 -msgid "Refund invoice" -msgstr "Factura rectificativa" +#: field:l10n.es.aeat.report,company_vat:0 +msgid "VAT number" +msgstr "NIF / CIF" #. module: l10n_es_aeat -#: help:l10n.es.aeat.report,representative_vat:0 -msgid "Legal Representative VAT number." -msgstr "NIF del representant legal." +#: code:addons/l10n_es_aeat/aeat_report.py:109 +#, python-format +msgid "Only reports in 'draft' or 'cancel' state can be removed" +msgstr "" +"Només declaracions en estat 'Esborrany' o 'Cancel·lada' poden ser eliminades" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 +#, python-format +msgid "%Y-%m-%d" +msgstr "%Y-%m-%d" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:109 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:147 +#, python-format +msgid "The formated string must match the given length" +msgstr "La cadena formatejada ha de satisfer la llargada donada." #. module: l10n_es_aeat #: field:l10n.es.aeat.report,support_type:0 @@ -94,16 +97,20 @@ msgid "Support Type" msgstr "Tipus de suport" #. module: l10n_es_aeat -#: help:account.invoice,origin_invoices_ids:0 -msgid "Links to original invoice which is referred by current refund invoice" -msgstr "" -"Enllaça amb la factura original a la qual fa referència la factura actual." +#: field:l10n.es.aeat.report,attach_id:0 +msgid "BOE file" +msgstr "Fitxer BOE" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat -#: model:ir.module.module,shortdesc:l10n_es_aeat.module_meta_information -msgid "AEAT Base" -msgstr "AEAT Base" +#: code:addons/l10n_es_aeat/aeat_report.py:109 +#, python-format +msgid "Error!" +msgstr "Error!" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fiscal Year" +msgstr "Exercici fiscal" #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report @@ -111,54 +118,20 @@ msgid "AEAT Report base module" msgstr "Mòdul base per les declaracions de l'Agència Tributària" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,calculation_date:0 -msgid "Calculation date" -msgstr "Data del càlcul" +#: selection:l10n.es.aeat.report,state:0 +msgid "Processed" +msgstr "Calculada" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,representative_vat:0 msgid "L.R. VAT number" msgstr "NIF R.L." -#. module: l10n_es_aeat -#: field:l10n.es.aeat.report,company_vat:0 -msgid "VAT number" -msgstr "NIF / CIF" - -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:107 -#, python-format -msgid "Only reports in 'draft' or 'cancel' state can be removed" -msgstr "" -"Només declaracions en estat 'Esborrany' o 'Cancel·lada' poden ser eliminades" - #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 msgid "Telematics" msgstr "Telemàtica" -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:107 -#, python-format -msgid "Error!" -msgstr "Error!" - -#. module: l10n_es_aeat -#: field:l10n.es.aeat.report,fiscalyear_id:0 -msgid "Fiscal Year" -msgstr "Exercici fiscal" - -#. module: l10n_es_aeat -#: field:l10n.es.aeat.report,number:0 -msgid "Declaration Number" -msgstr "Número declaració" - -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:100 -#, python-format -msgid "Wrong aling option. It should be < or >" -msgstr "Opció d'alineament errònia. Hauria de ser < o >" - #. module: l10n_es_aeat #: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat msgid "AEAT Reports" @@ -171,25 +144,56 @@ msgstr "Exporta a fitxer BOE" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,type:0 -msgid "Complementary" -msgstr "Complementària" +msgid "Normal" +msgstr "Normal" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,number:0 +msgid "Declaration Number" +msgstr "Número declaració" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 msgid "Canceled" msgstr "Cancel·lada" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:105 +#, python-format +msgid "Wrong aling option. It should be < or >" +msgstr "Opció d'alineament errònia. Hauria de ser < o >" + #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 msgid "Done" msgstr "Realitzada" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_account_invoice -msgid "Invoice" -msgstr "Factura" +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 +#, python-format +msgid "%s_report_%s.txt" +msgstr "%s_report_%s.txt" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Processed" -msgstr "Calculada" +#: field:l10n.es.aeat.report,calculation_date:0 +msgid "Calculation date" +msgstr "Data del càlcul" + +#~ msgid "Refund invoices description" +#~ msgstr "Descripció de factures rectificatives." + +#~ msgid "Fical Year" +#~ msgstr "Exercici fiscal" + +#~ msgid "Refund invoice" +#~ msgstr "Factura rectificativa" + +#~ msgid "Links to original invoice which is referred by current refund invoice" +#~ msgstr "" +#~ "Enllaça amb la factura original a la qual fa referència la factura actual." + +#~ msgid "AEAT Base" +#~ msgstr "AEAT Base" + +#~ msgid "Invoice" +#~ msgstr "Factura" diff --git a/l10n_es_aeat/i18n/es.po b/l10n_es_aeat/i18n/es.po old mode 100755 new mode 100644 index a5e7be97ab1..37ae88ad001 --- a/l10n_es_aeat/i18n/es.po +++ b/l10n_es_aeat/i18n/es.po @@ -4,40 +4,28 @@ # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 6.0.0-rc1\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2010-12-13 17:34+0000\n" -"PO-Revision-Date: 2013-10-10 16:51+0000\n" -"Last-Translator: Jordi Esteve (Zikzakmedia) \n" +"Project-Id-Version: OpenERP Server 7.0-20130519-231019\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-10-11 15:20+0000\n" +"PO-Revision-Date: 2013-11-11 23:16+0000\n" +"Last-Translator: Ignacio Ibeas (www.acysos.com) \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-10-14 05:33+0000\n" -"X-Generator: Launchpad (build 16799)\n" +"X-Launchpad-Export-Date: 2013-11-12 06:23+0000\n" +"X-Generator: Launchpad (build 16820)\n" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,type:0 msgid "Statement Type" msgstr "Tipo de declaración" -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:104 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:144 -#, python-format -msgid "The formated string must match the given length" -msgstr "La cadena formateada debe satisfacer el tamaño dado." - #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 msgid "DVD" msgstr "DVD" -#. module: l10n_es_aeat -#: field:account.invoice,refund_invoices_description:0 -msgid "Refund invoices description" -msgstr "Descripción de facturas rectificativas." - #. module: l10n_es_aeat #: field:l10n.es.aeat.report,state:0 msgid "State" @@ -50,8 +38,8 @@ msgstr "Borrador" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,type:0 -msgid "Normal" -msgstr "Normal" +msgid "Complementary" +msgstr "Complementaria" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,company_id:0 @@ -69,9 +57,9 @@ msgid "Substitutive" msgstr "Sustitutiva" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,fiscalyear_id:0 -msgid "Fical Year" -msgstr "Ejercicio fiscal" +#: help:l10n.es.aeat.report,representative_vat:0 +msgid "Legal Representative VAT number." +msgstr "Nombre del representante legal." #. module: l10n_es_aeat #: field:l10n.es.aeat.report,previous_number:0 @@ -79,14 +67,29 @@ msgid "Previous Declaration Number" msgstr "Número de declaración previa" #. module: l10n_es_aeat -#: field:account.invoice,origin_invoices_ids:0 -msgid "Refund invoice" -msgstr "Factura rectificativa" +#: field:l10n.es.aeat.report,company_vat:0 +msgid "VAT number" +msgstr "CIF/NIF" #. module: l10n_es_aeat -#: help:l10n.es.aeat.report,representative_vat:0 -msgid "Legal Representative VAT number." -msgstr "Nombre del representante legal." +#: code:addons/l10n_es_aeat/aeat_report.py:109 +#, python-format +msgid "Only reports in 'draft' or 'cancel' state can be removed" +msgstr "" +"Sólo declaraciones en estado 'Borrador' o 'Cancelada' pueden ser eliminadas" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 +#, python-format +msgid "%Y-%m-%d" +msgstr "%Y-%m-%d" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:109 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:147 +#, python-format +msgid "The formated string must match the given length" +msgstr "La cadena formateada debe satisfacer el tamaño dado." #. module: l10n_es_aeat #: field:l10n.es.aeat.report,support_type:0 @@ -94,16 +97,20 @@ msgid "Support Type" msgstr "Tipo de soporte" #. module: l10n_es_aeat -#: help:account.invoice,origin_invoices_ids:0 -msgid "Links to original invoice which is referred by current refund invoice" -msgstr "" -"Enlaza con la factura original a la que hace referencia la factura actual." +#: field:l10n.es.aeat.report,attach_id:0 +msgid "BOE file" +msgstr "Archivo BOE" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat -#: model:ir.module.module,shortdesc:l10n_es_aeat.module_meta_information -msgid "AEAT Base" -msgstr "AEAT Base" +#: code:addons/l10n_es_aeat/aeat_report.py:109 +#, python-format +msgid "Error!" +msgstr "¡Error!" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fiscal Year" +msgstr "Ejercicio fiscal" #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report @@ -111,54 +118,20 @@ msgid "AEAT Report base module" msgstr "Módulo base para las declaraciones de la Agencia Tributaria" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,calculation_date:0 -msgid "Calculation date" -msgstr "Fecha de cálculo" +#: selection:l10n.es.aeat.report,state:0 +msgid "Processed" +msgstr "Calculada" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,representative_vat:0 msgid "L.R. VAT number" msgstr "CIF/NIF Repr. legal" -#. module: l10n_es_aeat -#: field:l10n.es.aeat.report,company_vat:0 -msgid "VAT number" -msgstr "CIF/NIF" - -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:107 -#, python-format -msgid "Only reports in 'draft' or 'cancel' state can be removed" -msgstr "" -"Sólo declaraciones en estado 'Borrador' o 'Cancelada' pueden ser eliminadas" - #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 msgid "Telematics" msgstr "Telemática" -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:107 -#, python-format -msgid "Error!" -msgstr "¡Error!" - -#. module: l10n_es_aeat -#: field:l10n.es.aeat.report,fiscalyear_id:0 -msgid "Fiscal Year" -msgstr "Ejercicio fiscal" - -#. module: l10n_es_aeat -#: field:l10n.es.aeat.report,number:0 -msgid "Declaration Number" -msgstr "Número declaración" - -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:100 -#, python-format -msgid "Wrong aling option. It should be < or >" -msgstr "Opción de alineamiento errónea. Debería ser < o >" - #. module: l10n_es_aeat #: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat msgid "AEAT Reports" @@ -171,25 +144,56 @@ msgstr "Exportar a formato BOE" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,type:0 -msgid "Complementary" -msgstr "Complementaria" +msgid "Normal" +msgstr "Normal" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,number:0 +msgid "Declaration Number" +msgstr "Número declaración" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 msgid "Canceled" msgstr "Cancelada" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:105 +#, python-format +msgid "Wrong aling option. It should be < or >" +msgstr "Opción de alineamiento errónea. Debería ser < o >" + #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 msgid "Done" msgstr "Realizada" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_account_invoice -msgid "Invoice" -msgstr "Factura" +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 +#, python-format +msgid "%s_report_%s.txt" +msgstr "%s_report_%s.txt" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Processed" -msgstr "Calculada" +#: field:l10n.es.aeat.report,calculation_date:0 +msgid "Calculation date" +msgstr "Fecha de cálculo" + +#~ msgid "Refund invoices description" +#~ msgstr "Descripción de facturas rectificativas." + +#~ msgid "Fical Year" +#~ msgstr "Ejercicio fiscal" + +#~ msgid "Refund invoice" +#~ msgstr "Factura rectificativa" + +#~ msgid "Links to original invoice which is referred by current refund invoice" +#~ msgstr "" +#~ "Enlaza con la factura original a la que hace referencia la factura actual." + +#~ msgid "AEAT Base" +#~ msgstr "AEAT Base" + +#~ msgid "Invoice" +#~ msgstr "Factura" diff --git a/l10n_es_aeat/i18n/gl.po b/l10n_es_aeat/i18n/gl.po index 101c689c264..b79fee4d2df 100644 --- a/l10n_es_aeat/i18n/gl.po +++ b/l10n_es_aeat/i18n/gl.po @@ -7,38 +7,26 @@ msgid "" msgstr "" "Project-Id-Version: openerp-spain\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2010-12-13 17:34+0000\n" -"PO-Revision-Date: 2013-10-28 03:17+0000\n" +"POT-Creation-Date: 2013-10-11 15:20+0000\n" +"PO-Revision-Date: 2013-11-12 01:55+0000\n" "Last-Translator: Alejandro Santana \n" "Language-Team: Galician \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-10-29 05:14+0000\n" -"X-Generator: Launchpad (build 16818)\n" +"X-Launchpad-Export-Date: 2013-11-13 06:09+0000\n" +"X-Generator: Launchpad (build 16820)\n" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,type:0 msgid "Statement Type" msgstr "Tipo de declaración" -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:104 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:144 -#, python-format -msgid "The formated string must match the given length" -msgstr "A cadea formateada debe satisfacer o tamaño dado." - #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 msgid "DVD" msgstr "DVD" -#. module: l10n_es_aeat -#: field:account.invoice,refund_invoices_description:0 -msgid "Refund invoices description" -msgstr "Descripción de facturas rectificativas." - #. module: l10n_es_aeat #: field:l10n.es.aeat.report,state:0 msgid "State" @@ -51,8 +39,8 @@ msgstr "Borrador" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,type:0 -msgid "Normal" -msgstr "Normal" +msgid "Complementary" +msgstr "Complementaria" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,company_id:0 @@ -70,9 +58,9 @@ msgid "Substitutive" msgstr "Substitutiva" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,fiscalyear_id:0 -msgid "Fical Year" -msgstr "Exercicio fiscal" +#: help:l10n.es.aeat.report,representative_vat:0 +msgid "Legal Representative VAT number." +msgstr "NIF do representante legal." #. module: l10n_es_aeat #: field:l10n.es.aeat.report,previous_number:0 @@ -80,14 +68,29 @@ msgid "Previous Declaration Number" msgstr "Número da declaración anterior" #. module: l10n_es_aeat -#: field:account.invoice,origin_invoices_ids:0 -msgid "Refund invoice" -msgstr "Factura rectificativa" +#: field:l10n.es.aeat.report,company_vat:0 +msgid "VAT number" +msgstr "NIF" #. module: l10n_es_aeat -#: help:l10n.es.aeat.report,representative_vat:0 -msgid "Legal Representative VAT number." -msgstr "NIF do representante legal." +#: code:addons/l10n_es_aeat/aeat_report.py:109 +#, python-format +msgid "Only reports in 'draft' or 'cancel' state can be removed" +msgstr "" +"Só declaracions en estado 'Borrador' ou 'Cancelada' poden ser eliminadas" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 +#, python-format +msgid "%Y-%m-%d" +msgstr "%Y-%m-%d" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:109 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:147 +#, python-format +msgid "The formated string must match the given length" +msgstr "A cadea formateada debe satisfacer o tamaño dado." #. module: l10n_es_aeat #: field:l10n.es.aeat.report,support_type:0 @@ -95,15 +98,20 @@ msgid "Support Type" msgstr "Tipo de soporte" #. module: l10n_es_aeat -#: help:account.invoice,origin_invoices_ids:0 -msgid "Links to original invoice which is referred by current refund invoice" -msgstr "Enlaza coa factura orixinal á que fai referencia a factura actual." +#: field:l10n.es.aeat.report,attach_id:0 +msgid "BOE file" +msgstr "Arquivo BOE" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat -#: model:ir.module.module,shortdesc:l10n_es_aeat.module_meta_information -msgid "AEAT Base" -msgstr "AEAT Base" +#: code:addons/l10n_es_aeat/aeat_report.py:109 +#, python-format +msgid "Error!" +msgstr "¡Erro!" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fiscal Year" +msgstr "Exercicio fiscal" #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report @@ -111,54 +119,20 @@ msgid "AEAT Report base module" msgstr "Módulo base para as declaracións da Axencia Tributaria" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,calculation_date:0 -msgid "Calculation date" -msgstr "Data de cálculo" +#: selection:l10n.es.aeat.report,state:0 +msgid "Processed" +msgstr "Procesada" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,representative_vat:0 msgid "L.R. VAT number" msgstr "NIF Repr. legal" -#. module: l10n_es_aeat -#: field:l10n.es.aeat.report,company_vat:0 -msgid "VAT number" -msgstr "NIF" - -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:107 -#, python-format -msgid "Only reports in 'draft' or 'cancel' state can be removed" -msgstr "" -"Só declaracions en estado 'Borrador' ou 'Cancelada' poden ser eliminadas" - #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 msgid "Telematics" msgstr "Telemática" -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:107 -#, python-format -msgid "Error!" -msgstr "¡Erro!" - -#. module: l10n_es_aeat -#: field:l10n.es.aeat.report,fiscalyear_id:0 -msgid "Fiscal Year" -msgstr "Exercicio fiscal" - -#. module: l10n_es_aeat -#: field:l10n.es.aeat.report,number:0 -msgid "Declaration Number" -msgstr "Número de declaración" - -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:100 -#, python-format -msgid "Wrong aling option. It should be < or >" -msgstr "Opción de aliñamento errada. Debería ser < ou >" - #. module: l10n_es_aeat #: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat msgid "AEAT Reports" @@ -171,25 +145,55 @@ msgstr "Exportar a formato BOE" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,type:0 -msgid "Complementary" -msgstr "Complementaria" +msgid "Normal" +msgstr "Normal" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,number:0 +msgid "Declaration Number" +msgstr "Número de declaración" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 msgid "Canceled" msgstr "Cancelada" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:105 +#, python-format +msgid "Wrong aling option. It should be < or >" +msgstr "Opción de aliñamento errada. Debería ser < ou >" + #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 msgid "Done" msgstr "Realizada" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_account_invoice -msgid "Invoice" -msgstr "Factura" +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 +#, python-format +msgid "%s_report_%s.txt" +msgstr "%s_report_%s.txt" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Processed" -msgstr "Procesada" +#: field:l10n.es.aeat.report,calculation_date:0 +msgid "Calculation date" +msgstr "Data de cálculo" + +#~ msgid "Refund invoices description" +#~ msgstr "Descripción de facturas rectificativas." + +#~ msgid "Links to original invoice which is referred by current refund invoice" +#~ msgstr "Enlaza coa factura orixinal á que fai referencia a factura actual." + +#~ msgid "Fical Year" +#~ msgstr "Exercicio fiscal" + +#~ msgid "Refund invoice" +#~ msgstr "Factura rectificativa" + +#~ msgid "AEAT Base" +#~ msgstr "AEAT Base" + +#~ msgid "Invoice" +#~ msgstr "Factura" diff --git a/l10n_es_aeat/i18n/l10n_es_aeat.pot b/l10n_es_aeat/i18n/l10n_es_aeat.pot old mode 100755 new mode 100644 index d62be831968..47efe87d9df --- a/l10n_es_aeat/i18n/l10n_es_aeat.pot +++ b/l10n_es_aeat/i18n/l10n_es_aeat.pot @@ -4,15 +4,15 @@ # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 6.0.0-rc1\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2010-12-13 17:34:49+0000\n" -"PO-Revision-Date: 2010-12-13 18:44+0100\n" -"Last-Translator: Luis Manuel Angueira Blanco \n" +"Project-Id-Version: OpenERP Server 7.0-20130519-231019\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-10-11 15:20+0000\n" +"PO-Revision-Date: 2013-10-11 15:20+0000\n" +"Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Content-Transfer-Encoding: \n" "Plural-Forms: \n" #. module: l10n_es_aeat @@ -20,23 +20,11 @@ msgstr "" msgid "Statement Type" msgstr "" -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:104 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:144 -#, python-format -msgid "The formated string must match the given length" -msgstr "" - #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 msgid "DVD" msgstr "" -#. module: l10n_es_aeat -#: field:account.invoice,refund_invoices_description:0 -msgid "Refund invoices description" -msgstr "" - #. module: l10n_es_aeat #: field:l10n.es.aeat.report,state:0 msgid "State" @@ -49,7 +37,7 @@ msgstr "" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,type:0 -msgid "Normal" +msgid "Complementary" msgstr "" #. module: l10n_es_aeat @@ -68,8 +56,8 @@ msgid "Substitutive" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,fiscalyear_id:0 -msgid "Fical Year" +#: help:l10n.es.aeat.report,representative_vat:0 +msgid "Legal Representative VAT number." msgstr "" #. module: l10n_es_aeat @@ -78,82 +66,68 @@ msgid "Previous Declaration Number" msgstr "" #. module: l10n_es_aeat -#: field:account.invoice,origin_invoices_ids:0 -msgid "Refund invoice" -msgstr "" - -#. module: l10n_es_aeat -#: help:l10n.es.aeat.report,representative_vat:0 -msgid "Legal Representative VAT number." -msgstr "" - -#. module: l10n_es_aeat -#: field:l10n.es.aeat.report,support_type:0 -msgid "Support Type" +#: field:l10n.es.aeat.report,company_vat:0 +msgid "VAT number" msgstr "" #. module: l10n_es_aeat -#: help:account.invoice,origin_invoices_ids:0 -msgid "Links to original invoice which is referred by current refund invoice" +#: code:addons/l10n_es_aeat/aeat_report.py:109 +#, python-format +msgid "Only reports in 'draft' or 'cancel' state can be removed" msgstr "" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat -#: model:ir.module.module,shortdesc:l10n_es_aeat.module_meta_information -msgid "AEAT Base" +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 +#, python-format +msgid "%Y-%m-%d" msgstr "" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report -msgid "AEAT Report base module" +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:109 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:147 +#, python-format +msgid "The formated string must match the given length" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,calculation_date:0 -msgid "Calculation date" +#: field:l10n.es.aeat.report,support_type:0 +msgid "Support Type" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,representative_vat:0 -msgid "L.R. VAT number" +#: field:l10n.es.aeat.report,attach_id:0 +msgid "BOE file" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,company_vat:0 -msgid "VAT number" -msgstr "" - -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:107 +#: code:addons/l10n_es_aeat/aeat_report.py:109 #, python-format -msgid "Only reports in 'draft' or 'cancel' state can be removed" +msgid "Error!" msgstr "" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,support_type:0 -msgid "Telematics" +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fiscal Year" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:107 -#, python-format -msgid "Error!" +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report +msgid "AEAT Report base module" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,fiscalyear_id:0 -msgid "Fiscal Year" +#: selection:l10n.es.aeat.report,state:0 +msgid "Processed" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,number:0 -msgid "Declaration Number" +#: field:l10n.es.aeat.report,representative_vat:0 +msgid "L.R. VAT number" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:100 -#, python-format -msgid "Wrong aling option. It should be < or >" +#: selection:l10n.es.aeat.report,support_type:0 +msgid "Telematics" msgstr "" #. module: l10n_es_aeat @@ -168,7 +142,12 @@ msgstr "" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,type:0 -msgid "Complementary" +msgid "Normal" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,number:0 +msgid "Declaration Number" msgstr "" #. module: l10n_es_aeat @@ -176,17 +155,25 @@ msgstr "" msgid "Canceled" msgstr "" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:105 +#, python-format +msgid "Wrong aling option. It should be < or >" +msgstr "" + #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 msgid "Done" msgstr "" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_account_invoice -msgid "Invoice" +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 +#, python-format +msgid "%s_report_%s.txt" msgstr "" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Processed" +#: field:l10n.es.aeat.report,calculation_date:0 +msgid "Calculation date" msgstr "" + diff --git a/l10n_es_aeat/security/aeat_security.xml b/l10n_es_aeat/security/aeat_security.xml new file mode 100644 index 00000000000..23a8707461b --- /dev/null +++ b/l10n_es_aeat/security/aeat_security.xml @@ -0,0 +1,12 @@ + + + + + + AEAT Manager + + + + + + diff --git a/l10n_es_aeat/security/ir.model.access.csv b/l10n_es_aeat/security/ir.model.access.csv index 8e593714cca..63cea390cc0 100755 --- a/l10n_es_aeat/security/ir.model.access.csv +++ b/l10n_es_aeat/security/ir.model.access.csv @@ -1,3 +1,2 @@ -"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_l10n_es_aeat_report","l10n.es.aeat.report","model_l10n_es_aeat_report","account.group_account_user",1,0,0,0 -"access_l10n_es_aeat_report_manager","l10n.es.aeat.report manager","model_l10n_es_aeat_report","account.group_account_manager",1,1,1,1 \ No newline at end of file +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_l10n_es_aeat_report_manager,l10n.es.aeat.report manager,model_l10n_es_aeat_report,group_account_aeat,1,1,1,1 diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py index 25aded844fc..70eab426d8c 100755 --- a/l10n_es_aeat/wizard/export_to_boe.py +++ b/l10n_es_aeat/wizard/export_to_boe.py @@ -3,6 +3,11 @@ # # Copyright (C) 2004-2011 # Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved +# Luis Manuel Angueira Blanco (Pexego) +# +# Copyright (C) 2013 +# Ignacio Ibeas - Acysos S.L. (http://acysos.com) All Rights Reserved +# Migración a OpenERP 7.0 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -19,20 +24,20 @@ # ############################################################################## -__author__ = "Luis Manuel Angueira Blanco (Pexego)" - import base64 import time -from tools.translate import _ -from osv import osv +from openerp.osv import orm, fields +from openerp.tools.translate import _ +from openerp.tools import DEFAULT_SERVER_DATE_FORMAT -class l10n_es_aeat_report_export_to_boe(osv.osv_memory): +class l10n_es_aeat_report_export_to_boe(orm.TransientModel): _name = "l10n.es.aeat.report.export_to_boe" _description = "Export Report to BOE Format" + ######################## ### HELPER FUNCTIONS ### ######################## @@ -41,11 +46,13 @@ def _formatString(self, text, length, fill=' ', align='<'): Formats the string into a fixed length ASCII (iso-8859-1) record. Note: - 'Todos los campos alfanuméricos y alfabéticos se presentarán alineados a la izquierda y - rellenos de blancos por la derecha, en mayúsculas sin caracteres especiales, y sin vocales acentuadas. - Para los caracteres específicos del idioma se utilizará la codificación ISO-8859-1. De esta - forma la letra “Ñ” tendrá el valor ASCII 209 (Hex. D1) y la “Ç”(cedilla mayúscula) el valor ASCII - 199 (Hex. C7).' + 'Todos los campos alfanuméricos y alfabéticos se presentarán + alineados a la izquierda y rellenos de blancos por la derecha, + en mayúsculas sin caracteres especiales, y sin vocales acentuadas. + Para los caracteres específicos del idioma se utilizará la + codificación ISO-8859-1. De esta forma la letra “Ñ” tendrá el + valor ASCII 209 (Hex. D1) y la “Ç”(cedilla mayúscula) el valor + ASCII 199 (Hex. C7).' """ if not text: @@ -92,22 +99,26 @@ def _formatString(self, text, length, fill=' ', align='<'): if len(ascii_string) > length: ascii_string = ascii_string[:length] # Format the string - #ascii_string = '{0:{1}{2}{3}s}'.format(ascii_string, fill, align, length) #for python >= 2.6 + #ascii_string = '{0:{1}{2}{3}s}'.format(ascii_string, fill, align, + # length) #for python >= 2.6 if align == '<': - ascii_string = str(ascii_string) + (length-len(str(ascii_string)))*fill + ascii_string = str(ascii_string) + \ + (length-len(str(ascii_string)))*fill elif align == '>': - ascii_string = (length-len(str(ascii_string)))*fill + str(ascii_string) + ascii_string = (length-len(str(ascii_string)))* \ + fill + str(ascii_string) else: assert False, _('Wrong aling option. It should be < or >') # Sanity-check assert len(ascii_string) == length, \ - _("The formated string must match the given length") + _("The formated string must match the given length") # Return string return ascii_string - def _formatNumber(self, number, int_length, dec_length=0, include_sign=False): + def _formatNumber(self, number, int_length, dec_length=0, + include_sign=False): """ Formats the number into a fixed length ASCII (iso-8859-1) record. Note: @@ -116,7 +127,8 @@ def _formatNumber(self, number, int_length, dec_length=0, include_sign=False): (http://www.boe.es/boe/dias/2008/10/23/pdfs/A42154-42190.pdf) """ # - # Separate the number parts (-55.23 => int_part=55, dec_part=0.23, sign='N') + # Separate the number parts (-55.23 => int_part=55, + # dec_part=0.23, sign='N') # if number == '': number = 0.0 @@ -133,14 +145,15 @@ def _formatNumber(self, number, int_length, dec_length=0, include_sign=False): ascii_string += sign if dec_length > 0: - ascii_string += '%0*.*f' % (int_length+dec_length+1,dec_length, number) + ascii_string += '%0*.*f' % (int_length+ \ + dec_length+1,dec_length, number) ascii_string = ascii_string.replace('.','') elif int_length > 0: ascii_string += '%.*d' % (int_length, int_part) # Sanity-check - assert len(ascii_string) == (include_sign and 1 or 0) + int_length + dec_length, \ - _("The formated string must match the given length") + assert len(ascii_string) == (include_sign and 1 or 0) + int_length + \ + dec_length, _("The formated string must match the given length") # Return the string return ascii_string @@ -182,7 +195,8 @@ def _export_boe_file(self, cr, uid, ids, report, model=None, context=None): ## ## Add the partner records for partner_record in report.partner_record_ids: - file_contents += self._get_formated_partner_record(report, partner_record) + file_contents += self._get_formated_partner_record(report, + partner_record) ## ## Adds other fields @@ -192,7 +206,18 @@ def _export_boe_file(self, cr, uid, ids, report, model=None, context=None): ## Generate the file and save as attachment file = base64.encodestring(file_contents) - file_name = _("%s_report_%s.txt") % (model, time.strftime(_("%Y-%m-%d"))) + file_name = _("%s_report_%s.txt") % \ + (model,time.strftime(_(DEFAULT_SERVER_DATE_FORMAT))) + + # Delete old files + obj_attachment = self.pool.get('ir.attachment') + attachment_ids = obj_attachment.search( + cr, uid, [('name', '=', file_name), + ('res_model', '=', report._model._name)] + ) + if len(attachment_ids): + obj_attachment.unlink(cr, uid, attachment_ids) + self.pool.get("ir.attachment").create(cr, uid, { "name" : file_name, "datas" : file, @@ -200,5 +225,10 @@ def _export_boe_file(self, cr, uid, ids, report, model=None, context=None): "res_model" : "l10n.es.aeat.mod%s.report" % model, "res_id" : ids and ids[0] }, context=context) + + mod_obj = self.pool.get(report._model._name) + mod_obj.write(cr,uid,[report.id],{'attach_id':attach_id},context) + + return True l10n_es_aeat_report_export_to_boe() From 45bd48885a7c2edf479a89a09d1d814a145b9b42 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 13 Nov 2013 11:36:03 +0100 Subject: [PATCH 008/173] [FIX] l10n_es_aeat: fix exception call (except_orm instead of orm_exception) --- l10n_es_aeat/aeat_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10n_es_aeat/aeat_report.py b/l10n_es_aeat/aeat_report.py index 4a6e65ead08..5450eb37dc1 100755 --- a/l10n_es_aeat/aeat_report.py +++ b/l10n_es_aeat/aeat_report.py @@ -131,7 +131,7 @@ def unlink(self, cr, uid, ids, context=None): for item in self.browse(cr, uid, ids): if item.state not in ['draft', 'canceled']: - raise orm.orm_exception( + raise orm.except_orm( _('Error!'), _("Only reports in 'draft' or 'cancel'" + \ "state can be removed") From 5271b4b5ce012609102a77b8069051779d4fecd1 Mon Sep 17 00:00:00 2001 From: "Ignacio Ibeas - Acysos S.L" Date: Sun, 17 Nov 2013 14:21:43 +0100 Subject: [PATCH 009/173] [FIX] l10n_es_aeat: bug atthach_id --- l10n_es_aeat/wizard/export_to_boe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py index 70eab426d8c..d62ca32e717 100755 --- a/l10n_es_aeat/wizard/export_to_boe.py +++ b/l10n_es_aeat/wizard/export_to_boe.py @@ -218,7 +218,7 @@ def _export_boe_file(self, cr, uid, ids, report, model=None, context=None): if len(attachment_ids): obj_attachment.unlink(cr, uid, attachment_ids) - self.pool.get("ir.attachment").create(cr, uid, { + attach_id = self.pool.get("ir.attachment").create(cr, uid, { "name" : file_name, "datas" : file, "datas_fname" : file_name, From c4398c5f77360d1429adfd762b5e66a4ae85e594 Mon Sep 17 00:00:00 2001 From: Alejandro Santana Date: Sat, 23 Nov 2013 00:44:11 +0100 Subject: [PATCH 010/173] [FIX] msgstr in .pot files should be empty --- l10n_es_aeat/__init__.py | 0 l10n_es_aeat/__openerp__.py | 0 l10n_es_aeat/aeat_menuitem.xml | 0 l10n_es_aeat/aeat_report.py | 0 l10n_es_aeat/i18n/ca.po | 4 ++-- l10n_es_aeat/i18n/es.po | 4 ++-- l10n_es_aeat/i18n/gl.po | 4 ++-- l10n_es_aeat/security/ir.model.access.csv | 0 l10n_es_aeat/wizard/__init__.py | 0 l10n_es_aeat/wizard/export_to_boe.py | 0 10 files changed, 6 insertions(+), 6 deletions(-) mode change 100755 => 100644 l10n_es_aeat/__init__.py mode change 100755 => 100644 l10n_es_aeat/__openerp__.py mode change 100755 => 100644 l10n_es_aeat/aeat_menuitem.xml mode change 100755 => 100644 l10n_es_aeat/aeat_report.py mode change 100755 => 100644 l10n_es_aeat/security/ir.model.access.csv mode change 100755 => 100644 l10n_es_aeat/wizard/__init__.py mode change 100755 => 100644 l10n_es_aeat/wizard/export_to_boe.py diff --git a/l10n_es_aeat/__init__.py b/l10n_es_aeat/__init__.py old mode 100755 new mode 100644 diff --git a/l10n_es_aeat/__openerp__.py b/l10n_es_aeat/__openerp__.py old mode 100755 new mode 100644 diff --git a/l10n_es_aeat/aeat_menuitem.xml b/l10n_es_aeat/aeat_menuitem.xml old mode 100755 new mode 100644 diff --git a/l10n_es_aeat/aeat_report.py b/l10n_es_aeat/aeat_report.py old mode 100755 new mode 100644 diff --git a/l10n_es_aeat/i18n/ca.po b/l10n_es_aeat/i18n/ca.po index 509601843e7..72b58f878b2 100644 --- a/l10n_es_aeat/i18n/ca.po +++ b/l10n_es_aeat/i18n/ca.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-11-12 06:23+0000\n" -"X-Generator: Launchpad (build 16820)\n" +"X-Launchpad-Export-Date: 2014-01-07 05:30+0000\n" +"X-Generator: Launchpad (build 16877)\n" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,type:0 diff --git a/l10n_es_aeat/i18n/es.po b/l10n_es_aeat/i18n/es.po index 37ae88ad001..9960aa82999 100644 --- a/l10n_es_aeat/i18n/es.po +++ b/l10n_es_aeat/i18n/es.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-11-12 06:23+0000\n" -"X-Generator: Launchpad (build 16820)\n" +"X-Launchpad-Export-Date: 2014-01-07 05:30+0000\n" +"X-Generator: Launchpad (build 16877)\n" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,type:0 diff --git a/l10n_es_aeat/i18n/gl.po b/l10n_es_aeat/i18n/gl.po index b79fee4d2df..1219bbf8fd9 100644 --- a/l10n_es_aeat/i18n/gl.po +++ b/l10n_es_aeat/i18n/gl.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2013-11-13 06:09+0000\n" -"X-Generator: Launchpad (build 16820)\n" +"X-Launchpad-Export-Date: 2014-01-07 05:30+0000\n" +"X-Generator: Launchpad (build 16877)\n" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,type:0 diff --git a/l10n_es_aeat/security/ir.model.access.csv b/l10n_es_aeat/security/ir.model.access.csv old mode 100755 new mode 100644 diff --git a/l10n_es_aeat/wizard/__init__.py b/l10n_es_aeat/wizard/__init__.py old mode 100755 new mode 100644 diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py old mode 100755 new mode 100644 From f2922c0416bf14d08339b0aa871baf3880790147 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 15 Jan 2014 10:26:56 +0100 Subject: [PATCH 011/173] =?UTF-8?q?[IMP]=20l10n=5Fes=5Faeat:=20Icono=20par?= =?UTF-8?q?a=20el=20m=C3=B3dulo.=20-=20Algo=20de=20PEP8=20y=20refactorizac?= =?UTF-8?q?i=C3=B3n=20de=20c=C3=B3digo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [MIG] l10n_es_aeat_mod303: Migración a v7 del módulo con las siguientes mejoras: - Convenciones de la comunidad. - PEP8 en la mayoría de código. - Icono para el módulo. - Adaptación de vistas a las posibilidades de la v7. - Restringidas las cuentas bancarias a las de la compañía. --- l10n_es_aeat/aeat_report.py | 56 +++++-------- l10n_es_aeat/i18n/ca.po | 58 +++++++------ l10n_es_aeat/i18n/es.po | 67 ++++++++------- l10n_es_aeat/i18n/gl.po | 58 +++++++------ l10n_es_aeat/i18n/l10n_es_aeat.pot | 46 +++++----- l10n_es_aeat/security/aeat_security.xml | 2 +- l10n_es_aeat/static/src/img/icon.png | Bin 0 -> 4342 bytes l10n_es_aeat/static/src/img/icon_source.svg | 88 ++++++++++++++++++++ l10n_es_aeat/wizard/export_to_boe.py | 34 ++------ 9 files changed, 240 insertions(+), 169 deletions(-) create mode 100644 l10n_es_aeat/static/src/img/icon.png create mode 100644 l10n_es_aeat/static/src/img/icon_source.svg diff --git a/l10n_es_aeat/aeat_report.py b/l10n_es_aeat/aeat_report.py index 5450eb37dc1..6e80607d5fd 100644 --- a/l10n_es_aeat/aeat_report.py +++ b/l10n_es_aeat/aeat_report.py @@ -22,18 +22,15 @@ # along with this program. If not, see . # ############################################################################## - - -import netsvc -import re from openerp.tools.translate import _ from openerp.osv import orm, fields +import netsvc +import re class l10n_es_aeat_report(orm.Model): _name = "l10n.es.aeat.report" _description = "AEAT Report base module" - def on_change_company_id(self, cr, uid, ids, company_id): """ Loads some company data (the VAT number) when the selected @@ -41,7 +38,7 @@ def on_change_company_id(self, cr, uid, ids, company_id): """ company_vat = '' if company_id: - company = self.pool.get('res.company').browse(cr, uid, company_id) + company = self.pool['res.company'].browse(cr, uid, company_id) if company.partner_id and company.partner_id.vat: # Remove the ES part from spanish vat numbers # (ES12345678Z => 12345678Z) @@ -49,7 +46,6 @@ def on_change_company_id(self, cr, uid, ids, company_id): company.partner_id.vat).groups()[1] return { 'value': { 'company_vat': company_vat } } - _columns = { 'company_id': fields.many2one( 'res.company', 'Company', @@ -80,16 +76,16 @@ def on_change_company_id(self, cr, uid, ids, company_id): 'done':[('readonly',True)]} ), 'type': fields.selection( - [('N','Normal'), - ('C','Complementary'), - ('S','Substitutive')], + [('N', 'Normal'), + ('C', 'Complementary'), + ('S', 'Substitutive')], 'Statement Type', states={'calculated':[('required',True)], 'done':[('readonly',True)]} ), 'support_type': fields.selection([ - ('C','DVD'), - ('T','Telematics')], 'Support Type', + ('C', 'DVD'), + ('T', 'Telematics')], 'Support Type', states={'calculated':[('required',True)], 'done':[('readonly',True)]}), 'calculation_date': fields.datetime("Calculation date"), @@ -106,37 +102,27 @@ def on_change_company_id(self, cr, uid, ids, company_id): } _defaults = { - 'company_id' : lambda self, cr, uid, context: - self.pool.get('res.users').browse(cr, uid, - uid, context).company_id and - self.pool.get('res.users').browse(cr, uid, - uid, context).company_id.id, - 'type' : lambda *a: 'N', - 'support_type' : lambda *a: 'T', - 'state' : lambda *a: 'draft', + 'company_id': lambda self, cr, uid, c: ( + self.pool['res.company']._company_default_get(cr, uid, + 'l10n.es.aeat.report', + context=c)), + 'type': 'N', + 'support_type': 'T', + 'state': 'draft', } - def action_recover(self, cr, uid, ids, context=None): - self.write(cr, uid, ids, {'state': 'draft', 'calculation_date': None}) + self.write(cr, uid, ids, {'state': 'draft', 'calculation_date': None}) wf_service = netsvc.LocalService("workflow") for item_id in ids: wf_service.trg_create(uid, self._name, item_id, cr) return True - def unlink(self, cr, uid, ids, context=None): - if context is None: - context = {} - for item in self.browse(cr, uid, ids): if item.state not in ['draft', 'canceled']: - raise orm.except_orm( - _('Error!'), - _("Only reports in 'draft' or 'cancel'" + \ - "state can be removed") - ) - - return super(l10n_es_aeat_report, self).unlink(cr, uid, ids, context) - -l10n_es_aeat_report() \ No newline at end of file + raise orm.except_orm(_('Error!'), + _("Only reports in 'draft' or 'cancel' " + "state can be removed")) + return super(l10n_es_aeat_report, self).unlink(cr, uid, ids, + context=context) diff --git a/l10n_es_aeat/i18n/ca.po b/l10n_es_aeat/i18n/ca.po index 72b58f878b2..a2818ecab97 100644 --- a/l10n_es_aeat/i18n/ca.po +++ b/l10n_es_aeat/i18n/ca.po @@ -6,15 +6,15 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 7.0-20130519-231019\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-10-11 15:20+0000\n" -"PO-Revision-Date: 2013-11-11 23:17+0000\n" -"Last-Translator: Ignacio Ibeas (www.acysos.com) \n" +"POT-Creation-Date: 2014-01-16 17:49+0000\n" +"PO-Revision-Date: 2014-01-17 07:21+0000\n" +"Last-Translator: Pedro Manuel Baeza \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-01-07 05:30+0000\n" -"X-Generator: Launchpad (build 16877)\n" +"X-Launchpad-Export-Date: 2014-01-18 07:06+0000\n" +"X-Generator: Launchpad (build 16901)\n" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,type:0 @@ -42,9 +42,14 @@ msgid "Complementary" msgstr "Complementària" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,company_id:0 -msgid "Company" -msgstr "Companyia" +#: model:res.groups,name:l10n_es_aeat.group_account_aeat +msgid "AEAT manager" +msgstr "Responsable AEAT" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_account_period +msgid "Account period" +msgstr "" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 @@ -72,21 +77,15 @@ msgid "VAT number" msgstr "NIF / CIF" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:109 +#: code:addons/l10n_es_aeat/aeat_report.py:125 #, python-format msgid "Only reports in 'draft' or 'cancel' state can be removed" msgstr "" "Només declaracions en estat 'Esborrany' o 'Cancel·lada' poden ser eliminades" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 -#, python-format -msgid "%Y-%m-%d" -msgstr "%Y-%m-%d" - -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:109 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:147 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:115 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:156 #, python-format msgid "The formated string must match the given length" msgstr "La cadena formatejada ha de satisfer la llargada donada." @@ -102,7 +101,7 @@ msgid "BOE file" msgstr "Fitxer BOE" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:109 +#: code:addons/l10n_es_aeat/aeat_report.py:124 #, python-format msgid "Error!" msgstr "Error!" @@ -118,9 +117,9 @@ msgid "AEAT Report base module" msgstr "Mòdul base per les declaracions de l'Agència Tributària" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Processed" -msgstr "Calculada" +#: field:l10n.es.aeat.report,calculation_date:0 +msgid "Calculation date" +msgstr "Data del càlcul" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,representative_vat:0 @@ -135,7 +134,7 @@ msgstr "Telemàtica" #. module: l10n_es_aeat #: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat msgid "AEAT Reports" -msgstr "Declaracions Agència Tributària" +msgstr "Declaracions AEAT" #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report_export_to_boe @@ -158,7 +157,7 @@ msgid "Canceled" msgstr "Cancel·lada" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:105 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:111 #, python-format msgid "Wrong aling option. It should be < or >" msgstr "Opció d'alineament errònia. Hauria de ser < o >" @@ -169,15 +168,20 @@ msgid "Done" msgstr "Realitzada" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:209 #, python-format msgid "%s_report_%s.txt" msgstr "%s_report_%s.txt" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,calculation_date:0 -msgid "Calculation date" -msgstr "Data del càlcul" +#: field:l10n.es.aeat.report,company_id:0 +msgid "Company" +msgstr "Companyia" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Processed" +msgstr "Calculada" #~ msgid "Refund invoices description" #~ msgstr "Descripció de factures rectificatives." diff --git a/l10n_es_aeat/i18n/es.po b/l10n_es_aeat/i18n/es.po index 9960aa82999..5f711ddfccb 100644 --- a/l10n_es_aeat/i18n/es.po +++ b/l10n_es_aeat/i18n/es.po @@ -4,17 +4,17 @@ # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 7.0-20130519-231019\n" +"Project-Id-Version: OpenERP Server 7.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-10-11 15:20+0000\n" -"PO-Revision-Date: 2013-11-11 23:16+0000\n" -"Last-Translator: Ignacio Ibeas (www.acysos.com) \n" +"POT-Creation-Date: 2014-01-16 17:49+0000\n" +"PO-Revision-Date: 2014-01-17 07:23+0000\n" +"Last-Translator: Pedro Manuel Baeza \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-01-07 05:30+0000\n" -"X-Generator: Launchpad (build 16877)\n" +"X-Launchpad-Export-Date: 2014-01-18 07:06+0000\n" +"X-Generator: Launchpad (build 16901)\n" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,type:0 @@ -42,9 +42,14 @@ msgid "Complementary" msgstr "Complementaria" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,company_id:0 -msgid "Company" -msgstr "Compañía" +#: model:res.groups,name:l10n_es_aeat.group_account_aeat +msgid "AEAT manager" +msgstr "Responsable AEAT" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_account_period +msgid "Account period" +msgstr "Período contable" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 @@ -69,24 +74,19 @@ msgstr "Número de declaración previa" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,company_vat:0 msgid "VAT number" -msgstr "CIF/NIF" +msgstr "NIF" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:109 +#: code:addons/l10n_es_aeat/aeat_report.py:125 #, python-format msgid "Only reports in 'draft' or 'cancel' state can be removed" msgstr "" -"Sólo declaraciones en estado 'Borrador' o 'Cancelada' pueden ser eliminadas" +"Sólo las declaraciones en estado 'Borrador' o 'Cancelada' pueden ser " +"eliminadas" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 -#, python-format -msgid "%Y-%m-%d" -msgstr "%Y-%m-%d" - -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:109 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:147 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:115 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:156 #, python-format msgid "The formated string must match the given length" msgstr "La cadena formateada debe satisfacer el tamaño dado." @@ -102,7 +102,7 @@ msgid "BOE file" msgstr "Archivo BOE" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:109 +#: code:addons/l10n_es_aeat/aeat_report.py:124 #, python-format msgid "Error!" msgstr "¡Error!" @@ -118,14 +118,14 @@ msgid "AEAT Report base module" msgstr "Módulo base para las declaraciones de la Agencia Tributaria" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Processed" -msgstr "Calculada" +#: field:l10n.es.aeat.report,calculation_date:0 +msgid "Calculation date" +msgstr "Fecha de cálculo" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,representative_vat:0 msgid "L.R. VAT number" -msgstr "CIF/NIF Repr. legal" +msgstr "NIF repr. legal" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 @@ -135,7 +135,7 @@ msgstr "Telemática" #. module: l10n_es_aeat #: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat msgid "AEAT Reports" -msgstr "Declaraciones Agencia Tributaria" +msgstr "Declaraciones AEAT" #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report_export_to_boe @@ -158,7 +158,7 @@ msgid "Canceled" msgstr "Cancelada" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:105 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:111 #, python-format msgid "Wrong aling option. It should be < or >" msgstr "Opción de alineamiento errónea. Debería ser < o >" @@ -169,15 +169,20 @@ msgid "Done" msgstr "Realizada" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:209 #, python-format msgid "%s_report_%s.txt" msgstr "%s_report_%s.txt" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,calculation_date:0 -msgid "Calculation date" -msgstr "Fecha de cálculo" +#: field:l10n.es.aeat.report,company_id:0 +msgid "Company" +msgstr "Compañía" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Processed" +msgstr "Calculada" #~ msgid "Refund invoices description" #~ msgstr "Descripción de facturas rectificativas." diff --git a/l10n_es_aeat/i18n/gl.po b/l10n_es_aeat/i18n/gl.po index 1219bbf8fd9..716305c3fbe 100644 --- a/l10n_es_aeat/i18n/gl.po +++ b/l10n_es_aeat/i18n/gl.po @@ -7,15 +7,15 @@ msgid "" msgstr "" "Project-Id-Version: openerp-spain\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2013-10-11 15:20+0000\n" -"PO-Revision-Date: 2013-11-12 01:55+0000\n" -"Last-Translator: Alejandro Santana \n" +"POT-Creation-Date: 2014-01-16 17:49+0000\n" +"PO-Revision-Date: 2014-01-17 07:22+0000\n" +"Last-Translator: Pedro Manuel Baeza \n" "Language-Team: Galician \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-01-07 05:30+0000\n" -"X-Generator: Launchpad (build 16877)\n" +"X-Launchpad-Export-Date: 2014-01-18 07:06+0000\n" +"X-Generator: Launchpad (build 16901)\n" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,type:0 @@ -43,9 +43,14 @@ msgid "Complementary" msgstr "Complementaria" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,company_id:0 -msgid "Company" -msgstr "Compañía" +#: model:res.groups,name:l10n_es_aeat.group_account_aeat +msgid "AEAT manager" +msgstr "Responsable AEAT" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_account_period +msgid "Account period" +msgstr "" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 @@ -73,21 +78,15 @@ msgid "VAT number" msgstr "NIF" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:109 +#: code:addons/l10n_es_aeat/aeat_report.py:125 #, python-format msgid "Only reports in 'draft' or 'cancel' state can be removed" msgstr "" "Só declaracions en estado 'Borrador' ou 'Cancelada' poden ser eliminadas" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 -#, python-format -msgid "%Y-%m-%d" -msgstr "%Y-%m-%d" - -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:109 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:147 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:115 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:156 #, python-format msgid "The formated string must match the given length" msgstr "A cadea formateada debe satisfacer o tamaño dado." @@ -103,7 +102,7 @@ msgid "BOE file" msgstr "Arquivo BOE" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:109 +#: code:addons/l10n_es_aeat/aeat_report.py:124 #, python-format msgid "Error!" msgstr "¡Erro!" @@ -119,9 +118,9 @@ msgid "AEAT Report base module" msgstr "Módulo base para as declaracións da Axencia Tributaria" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Processed" -msgstr "Procesada" +#: field:l10n.es.aeat.report,calculation_date:0 +msgid "Calculation date" +msgstr "Data de cálculo" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,representative_vat:0 @@ -136,7 +135,7 @@ msgstr "Telemática" #. module: l10n_es_aeat #: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat msgid "AEAT Reports" -msgstr "Declaracións Axencia Tributaria" +msgstr "Declaracións AEAT" #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report_export_to_boe @@ -159,7 +158,7 @@ msgid "Canceled" msgstr "Cancelada" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:105 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:111 #, python-format msgid "Wrong aling option. It should be < or >" msgstr "Opción de aliñamento errada. Debería ser < ou >" @@ -170,15 +169,20 @@ msgid "Done" msgstr "Realizada" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:209 #, python-format msgid "%s_report_%s.txt" msgstr "%s_report_%s.txt" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,calculation_date:0 -msgid "Calculation date" -msgstr "Data de cálculo" +#: field:l10n.es.aeat.report,company_id:0 +msgid "Company" +msgstr "Compañía" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Processed" +msgstr "Procesada" #~ msgid "Refund invoices description" #~ msgstr "Descripción de facturas rectificativas." diff --git a/l10n_es_aeat/i18n/l10n_es_aeat.pot b/l10n_es_aeat/i18n/l10n_es_aeat.pot index 47efe87d9df..2f7fd7cadf2 100644 --- a/l10n_es_aeat/i18n/l10n_es_aeat.pot +++ b/l10n_es_aeat/i18n/l10n_es_aeat.pot @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 7.0-20130519-231019\n" +"Project-Id-Version: OpenERP Server 7.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-10-11 15:20+0000\n" -"PO-Revision-Date: 2013-10-11 15:20+0000\n" +"POT-Creation-Date: 2014-01-16 17:49+0000\n" +"PO-Revision-Date: 2014-01-16 17:49+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -41,8 +41,13 @@ msgid "Complementary" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,company_id:0 -msgid "Company" +#: model:res.groups,name:l10n_es_aeat.group_account_aeat +msgid "AEAT manager" +msgstr "" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_account_period +msgid "Account period" msgstr "" #. module: l10n_es_aeat @@ -71,20 +76,14 @@ msgid "VAT number" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:109 +#: code:addons/l10n_es_aeat/aeat_report.py:125 #, python-format msgid "Only reports in 'draft' or 'cancel' state can be removed" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 -#, python-format -msgid "%Y-%m-%d" -msgstr "" - -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:109 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:147 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:115 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:156 #, python-format msgid "The formated string must match the given length" msgstr "" @@ -100,7 +99,7 @@ msgid "BOE file" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:109 +#: code:addons/l10n_es_aeat/aeat_report.py:124 #, python-format msgid "Error!" msgstr "" @@ -116,8 +115,8 @@ msgid "AEAT Report base module" msgstr "" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Processed" +#: field:l10n.es.aeat.report,calculation_date:0 +msgid "Calculation date" msgstr "" #. module: l10n_es_aeat @@ -156,7 +155,7 @@ msgid "Canceled" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:105 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:111 #, python-format msgid "Wrong aling option. It should be < or >" msgstr "" @@ -167,13 +166,18 @@ msgid "Done" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:209 #, python-format msgid "%s_report_%s.txt" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,calculation_date:0 -msgid "Calculation date" +#: field:l10n.es.aeat.report,company_id:0 +msgid "Company" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Processed" msgstr "" diff --git a/l10n_es_aeat/security/aeat_security.xml b/l10n_es_aeat/security/aeat_security.xml index 23a8707461b..f85b0c79de7 100644 --- a/l10n_es_aeat/security/aeat_security.xml +++ b/l10n_es_aeat/security/aeat_security.xml @@ -3,7 +3,7 @@ - AEAT Manager + AEAT manager diff --git a/l10n_es_aeat/static/src/img/icon.png b/l10n_es_aeat/static/src/img/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..e1a7bbed5ec36bb00803b52eb35d785cae170978 GIT binary patch literal 4342 zcmbtYhd0~b8%~7SLEBidN)=VBMr^6QH*M{zS)14+Q7ffdYPP6+QEFDzo-tdkB4(`; zMeR}4mS6l0zkANT_k7;-eBN`O`#$gU8PAOkwdiTsX#fBKy^glJDQQPvO)4;H?N)yL zowSh$sOp$gkwyfS6NYq6?W_GLfP|mCnm|>-oDfow4XN=EY3AdC41VnI3ztn>JL(j^*9&T_TCzwdB7jnw!0gYO{TM zYd2zKx{T5tIRFTJvR?H3R|x^%y9+kL#g)|4j2&*Ko*+woYr_*+G}(X&Qtc`xI1L<` zg=}VxSq`g5OWcPMSWG!^iS96Tf^)3}uf7@bw+AUmS>pmgyW_rGo1uN}17HAq#d2#0 z0ECOTD7Mqb?Wn~q@yTzo$-c>@GIeJ9D|Be+XeOZCsh*9;AX@G|%!HiiT9RT;sU0Bf zI~)@fgMC#1D|{x?B~d)hb_^_*uQ4`RgE;io9!2MW^M)h1Op%4Q!Ah|`_!?5AfD z6m8i+02iP>WUPKZ7obl)O_e~WPgDXns@QiHJRl2@setiCmngZYyw#-yJdlnWoCg?L>jOv23ASE=mDtDL5!WX}eqO zRJd6}(T&ejoacLRT@x3TQXq+CC1@pVDq%>mU{x~*n=FXKam>3$@*ISL0gVhl*VR;_ ze6NWMx$*fsmWiNg1J2(bMh^#2Ry$5Z9112cj=#!kz*XOJw(cl5B&)fqN&iD zbJ7`nMdEP}&EqEDrUF=uiRTUA0I67^h)8>S+2{6jzerl5 z-=wZay~zd7G8xYYabE&t7!AD!&UwYJaxpKUo~_S=ZVNZ#`zN^!>I8i2W7vl#h`e9f z01nK?r{SCb+-L_5nufUL@6O|ZinLUpk_uoTbQVZjRkV&I-K|iu;%VBD>t`%`R$Zl^ z*HLT-S7NgSCdJgN@dn(OtA@VbVrTk$5s;f~A5+eqKp)aC>)g6*k^N6%_xeY#y;RB@bH+;UQ|3mhxQ#EVi|m`ujt})}2&245guf;+qZ1Ar2n4=kGvwfls4bXfhfcr=u2RK5kN@ zJ)m>451u9!hp{7b@stg%zIGqCqS@?_~ zhMTg~S1?8D6;DItU;8xFxn=lbeZ2)l3k9$0Gco)Y~-$628a zMNQem;FfskcOn^at9mfj=@xsPNmXtwI1E(il_fLI=y*7|#_EOZ6e$tB%9Qncd#+7r z(J}>IR!>(4b`fk&h1+uj%)DstQnasEU#Q`tL)Jvdgm2`A?uC z?q9jvnw-ue!$X4^`EmXu?5pLgedB@c65~F66Pt53=?#pAkxPAyT6z3@_<9VE49-;T zheZi8&D&KwF_Vtcp|}8M4}4j*FQ&1{E597tRa!F3P8geU0eYJj66xru_!oPN;|z); zYQgfLqhjt;X0kb(+C3&-p&sdaPLk*#UmlTlnOxG)(eN*}*p5}kKu3d2?W{n--oNGu zeh%45%`NDgv1STM61YszEk1l2lZ2b$$qiO!-5#%wtZA%gE%^44j8*PPR7;NVF{3X( zVJy6N+94SH5WTPQJQ9bByS9gtt;ovq$Fn#7Xgku;F4mu3b9km6Kr;w{1LlK%t|T2}i=2CFy`=6{M*F#bbkek+6k_y1dr*}W{W|rR zN1W!(muhZnI+zPGi7A5zxso+K7GAFIWKa2|&aCI4|BE%VXTGzV9wCXd9n0VliKTc! z&A-_0d@jRW8EqY2wTRzQ-l;zoK%lxxhi<(^zNonBgqh!pysqAYOhh$2vs}?w9oSoW zd( zqd`S#t+|HfaBaIyKlM^~dclYKazu?4I)C`F!cpBPyW`yolUOr~eZfS2>)cD8T%{AD zVmc;Eb@SKVo=}wc#Mpa$^As>DbS=#W8r1NxDIDb?YK1JRanWO$WB;bxzaq^uBeK9u zc^G{2q-{)uT;I&fIftp0g8!$|q>+Yb(pINW+udK>miP-9b`d6ld2d7gJB$MS)F4)#9Y z!n@fv0YwWf6S&=7>sDod`Ml}one3UrAAdLQzTw_Wcx6;h91ZrB;ZrDX2idG(w-0!@ z&;1Dv6S(w!`=yh|DusccK~?Lh-B7JCl}Lu?WBpBuvmaOE(+*j+I0Dcl8@P?KdT=`* z@G9Ifl|ylo-ED3YFhrmC?C)vE65bSB;IaUOowaSyH1g6bz3Q~gPKF{@2d0X!5U-U zcD?$WTsI9ou+JSOuGH;5CS~aP=d#!J??#qH(6SrE`sJ4z%3aVT=bwcS(C%vD!HzuH zxQ~-NeeUUaWd)Z+o_n318~z}rTn57F-W4c}EN(YRKkhfzfXm+yb;&P;3{Se87pD)6B>v zSb8A5KIb?;7+86(7o{`9yuHI~eNq)*bO!Q|BjbZ%9sT*5ihKn(h6%Prxp zG4Ex4#o&cHJ~^vDs>}rxAL${|(HH{!(jep=p6v7D|LZNDo)_DzDgId$P71kjQm@oGE%>CyP(&q?Dy>wA55Hs8+cUOTj-jzCm)s z(NLw0s+_JsSLXZ}c`=jk6hrzvb(4nwT0Dw{n+a0p9l#)0wAvCQ%-cz7nB8rBlV{X} zWq%sOhLrQRHc3X2$QQnVv9|b2oiT(rCxEbv$~s4^-%j7!&3p*Xc3{p-xVBfr=wpt2 za%+vThCpZtX`JUZblNYD9~GvK#8s;_8FAP-b{ zYQdt4Yu$C_T7wSw>Lyb#iqP_hDe`H}d<=uCGk?nj+93Te=!l50-S?1+N+P z$jr7d#`s2NYO+UX5a~ae7JMO&wpE~($R|b6Q5)N$MCV5&n_XUlkcaZ8V`jo4?>y44 z<9B=%a&7RLZNTf<|NNInavo-VyPdeMKqNQ(?D+Qg)=A-m&b*~4jWB$r1%I^h&nSkQ z^PBF$s;S(mv7BYXVF;`%>Q z7au?P=xA49X_F)*T;iVlOU#QPWa8Q*Q|pGoE`f@eU}x8Rq1LvY|c~Yz}nPlmGQZ zlkUi)wuTaw%j+R}RbH>fEhx-5<4fD4W#6c)EiS-o%G;Go77$uO8>tfg+DM6Nk#r2p zdjvnHnHSI|=BrIT47ZNa3>%+xRq<_xj?&!DSh1>Zr*c;Spo-BBKmb8aSn;y z$dq%b{5S^mUaXmB=KQuMdB5%>X}WC2#h`a)8j6im+@{+E81hO7q^aig%l+{?$Y|(Wd;zQjT$S!(QQgWgRum`o z^6?+$-Mgw3Jvx8gj9Zhl+w(JuO5qSD0lcQF_5D$LCbkRhm8^f>q|Y_huV>0^JPFax zxVv4YlTPre)xKLjO>N6KF7<`4pKuSu6ZA9Mw-??n)ofinqXX z%adhC)n=TY7-yERupt|AW6mumB!5t7ZTxHYjyM0Xc>>RpZV({f^`wRKr?#wxs8%Z{ zpUBj|I_y?TPwL1Fq-s%k#G<53O0*1OOfcufc9qH_;>-fkG$rc*sNp#9PHq{SW} literal 0 HcmV?d00001 diff --git a/l10n_es_aeat/static/src/img/icon_source.svg b/l10n_es_aeat/static/src/img/icon_source.svg new file mode 100644 index 00000000000..2aadfaa4c95 --- /dev/null +++ b/l10n_es_aeat/static/src/img/icon_source.svg @@ -0,0 +1,88 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py index d62ca32e717..cb73d52587f 100644 --- a/l10n_es_aeat/wizard/export_to_boe.py +++ b/l10n_es_aeat/wizard/export_to_boe.py @@ -36,8 +36,7 @@ class l10n_es_aeat_report_export_to_boe(orm.TransientModel): _name = "l10n.es.aeat.report.export_to_boe" _description = "Export Report to BOE Format" - - + ######################## ### HELPER FUNCTIONS ### ######################## @@ -116,7 +115,6 @@ def _formatString(self, text, length, fill=' ', align='<'): # Return string return ascii_string - def _formatNumber(self, number, int_length, dec_length=0, include_sign=False): """ @@ -157,14 +155,12 @@ def _formatNumber(self, number, int_length, dec_length=0, # Return the string return ascii_string - def _formatBoolean(self, value, yes='X', no=' '): """ Formats a boolean value into a fixed length ASCII (iso-8859-1) record. """ return value and yes or no - ######################### ### RECORDS FUNCTIONS ### ######################### @@ -177,38 +173,25 @@ def _get_formated_partner_record(self, report, partner_record): def _get_formated_other_records(self, report): return '' - def _export_boe_file(self, cr, uid, ids, report, model=None, context=None): + def _export_boe_file(self, cr, uid, ids, report, model=None, + context=None): """ Action that exports the data into a BOE formated text file """ - if context is None: - context = {} - assert model , u"AEAT Model is necessary" - file_contents = '' - - ## ## Add header record file_contents += self._get_formated_declaration_record(report) - - ## ## Add the partner records for partner_record in report.partner_record_ids: file_contents += self._get_formated_partner_record(report, partner_record) - - ## ## Adds other fields file_contents += self._get_formated_other_records(report) - - ## ## Generate the file and save as attachment file = base64.encodestring(file_contents) - file_name = _("%s_report_%s.txt") % \ (model,time.strftime(_(DEFAULT_SERVER_DATE_FORMAT))) - # Delete old files obj_attachment = self.pool.get('ir.attachment') attachment_ids = obj_attachment.search( @@ -217,18 +200,15 @@ def _export_boe_file(self, cr, uid, ids, report, model=None, context=None): ) if len(attachment_ids): obj_attachment.unlink(cr, uid, attachment_ids) - - attach_id = self.pool.get("ir.attachment").create(cr, uid, { + attach_id = self.pool["ir.attachment"].create(cr, uid, { "name" : file_name, "datas" : file, "datas_fname" : file_name, "res_model" : "l10n.es.aeat.mod%s.report" % model, "res_id" : ids and ids[0] }, context=context) - - mod_obj = self.pool.get(report._model._name) - mod_obj.write(cr,uid,[report.id],{'attach_id':attach_id},context) + mod_obj = self.pool[report._model._name] + mod_obj.write(cr, uid, [report.id], {'attach_id': attach_id}, + context=context) return True - -l10n_es_aeat_report_export_to_boe() From e80183926530b53f65fd505c82122238699aab11 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 23 Jan 2014 17:41:59 +0100 Subject: [PATCH 012/173] =?UTF-8?q?[IMP]=20l10n=5Fes=5Faeat:=20Mejorado=20?= =?UTF-8?q?mecanismo=20de=20herencia=20para=20reaprovechar=20m=C3=A1s=20c?= =?UTF-8?q?=C3=B3digo.=20-=20A=C3=B1adido=20wizard=20para=20ver=20el=20res?= =?UTF-8?q?ultado=20de=20la=20exportaci=C3=B3n=20sin=20necesidad=20de=20te?= =?UTF-8?q?ner=20el=20m=C3=B3dulo=20document.=20-=20Puesta=20transici?= =?UTF-8?q?=C3=B3n=20de=20estados=20sin=20workflow.=20-=20Peque=C3=B1os=20?= =?UTF-8?q?ajustes=20de=20interfaz.=20[IMP]=20l10n=5Fes=5Faeat=5Fmod303:?= =?UTF-8?q?=20Adaptado=20al=20nuevo=20mecanismo.=20Se=20elimina=20workflow?= =?UTF-8?q?=20anterior=20mediante=20un=20script=20de=20migraci=C3=B3n.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- l10n_es_aeat/__openerp__.py | 20 +- l10n_es_aeat/aeat_menuitem.xml | 4 +- l10n_es_aeat/aeat_report.py | 134 +++++----- l10n_es_aeat/aeat_view.xml | 65 +++++ l10n_es_aeat/i18n/ca.po | 256 +++++++++++++----- l10n_es_aeat/i18n/es.po | 265 ++++++++++++++----- l10n_es_aeat/i18n/gl.po | 265 ++++++++++++++----- l10n_es_aeat/i18n/l10n_es_aeat.pot | 201 +++++++++++--- l10n_es_aeat/wizard/export_to_boe.py | 101 ++++--- l10n_es_aeat/wizard/export_to_boe_wizard.xml | 48 ++++ 10 files changed, 1015 insertions(+), 344 deletions(-) create mode 100644 l10n_es_aeat/aeat_view.xml create mode 100644 l10n_es_aeat/wizard/export_to_boe_wizard.xml diff --git a/l10n_es_aeat/__openerp__.py b/l10n_es_aeat/__openerp__.py index d2e73cff5ab..3e7f890e35c 100644 --- a/l10n_es_aeat/__openerp__.py +++ b/l10n_es_aeat/__openerp__.py @@ -3,7 +3,6 @@ # # Copyright (C) 2004-2011 # Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved -# # Copyright (C) 2013 # Ignacio Ibeas - Acysos S.L. (http://acysos.com) All Rights Reserved # Migración a OpenERP 7.0 @@ -25,25 +24,24 @@ { 'name' : "AEAT Base", - 'version' : "1.0", + 'version' : "1.1", 'author' : "Pexego", 'license' : "AGPL-3", - 'contributors': ['Ignacio Ibeas (Acysos S.L.)'], + 'contributors': [ + 'Ignacio Ibeas (Acysos S.L.)', + 'Pedro M. Baeza ', + ], 'website' : "http://www.pexego.es, http://www.acysos.com", 'category' : "Localisation/Accounting", - 'init_xml' : [ - ], 'depends' : [ "account", ], - 'update_xml' : [ + 'data' : [ 'security/aeat_security.xml', 'security/ir.model.access.csv', + 'wizard/export_to_boe_wizard.xml', 'aeat_menuitem.xml', + 'aeat_view.xml', ], - 'demo_xml' : [], - 'test' : [], - 'auto_install': False, 'installable': True, - 'application': False, -} \ No newline at end of file +} diff --git a/l10n_es_aeat/aeat_menuitem.xml b/l10n_es_aeat/aeat_menuitem.xml index c17a0aabf5a..0e551b129e0 100644 --- a/l10n_es_aeat/aeat_menuitem.xml +++ b/l10n_es_aeat/aeat_menuitem.xml @@ -5,7 +5,7 @@ + name="AEAT reports"/> - \ No newline at end of file + diff --git a/l10n_es_aeat/aeat_report.py b/l10n_es_aeat/aeat_report.py index 6e80607d5fd..75e9bf24f31 100644 --- a/l10n_es_aeat/aeat_report.py +++ b/l10n_es_aeat/aeat_report.py @@ -24,12 +24,13 @@ ############################################################################## from openerp.tools.translate import _ from openerp.osv import orm, fields -import netsvc +from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT +import time import re class l10n_es_aeat_report(orm.Model): _name = "l10n.es.aeat.report" - _description = "AEAT Report base module" + _description = "AEAT report base module" def on_change_company_id(self, cr, uid, ids, company_id): """ @@ -47,82 +48,89 @@ def on_change_company_id(self, cr, uid, ids, company_id): return { 'value': { 'company_vat': company_vat } } _columns = { - 'company_id': fields.many2one( - 'res.company', 'Company', - required=True, states={'done':[('readonly',True)]} - ), - 'number': fields.char( - 'Declaration Number', size=13, - states={'calculated':[('required',True)], - 'done':[('readonly',True)]} - ), - 'previous_number' : fields.char( - 'Previous Declaration Number', - size=13, states={'done':[('readonly',True)]} - ), - 'representative_vat': fields.char( - 'L.R. VAT number', size=9, - help="Legal Representative VAT number.", - states={'calculated':[('required',True)], - 'confirmed':[('readonly',True)]} - ), - 'fiscalyear_id': fields.many2one( - 'account.fiscalyear', 'Fiscal Year', required=True, - states={'done': [('readonly', True)]} - ), - 'company_vat': fields.char( - 'VAT number', size=9, - states={'calculated':[('required',True)], - 'done':[('readonly',True)]} - ), - 'type': fields.selection( - [('N', 'Normal'), - ('C', 'Complementary'), - ('S', 'Substitutive')], - 'Statement Type', - states={'calculated':[('required',True)], - 'done':[('readonly',True)]} - ), - 'support_type': fields.selection([ - ('C', 'DVD'), - ('T', 'Telematics')], 'Support Type', - states={'calculated':[('required',True)], - 'done':[('readonly',True)]}), + 'company_id': fields.many2one('res.company', 'Company', required=True, + readonly=True, states={'draft': [('readonly', False)]}), + 'number': fields.char('Declaration number', size=13, required=True, + readonly=True), + 'previous_number' : fields.char('Previous declaration number', + size=13, states={'done':[('readonly',True)]}), + 'representative_vat': fields.char('L.R. VAT number', size=9, + help="Legal Representative VAT number.", + states={'calculated':[('required',True)], + 'confirmed':[('readonly',True)]}), + 'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal year', + required=True, readonly=True, + states={'draft': [('readonly', False)]}), + 'company_vat': fields.char('VAT number', size=9, required=True, + readonly=True, states={'draft': [('readonly', False)]}), + 'type': fields.selection([('N', 'Normal'), + ('C', 'Complementary'), + ('S', 'Substitutive')], 'Statement Type', + states={'calculated':[('required',True)], + 'done':[('readonly',True)]}), + 'support_type': fields.selection( + [('C', 'DVD'), + ('T', 'Telematics')], 'Support Type', + states={'calculated':[('required',True)], + 'done':[('readonly',True)]}), 'calculation_date': fields.datetime("Calculation date"), - 'state' : fields.selection([ - ('draft', 'Draft'), - ('calculating', 'Processing'), - ('calculated', 'Processed'), - ('done', 'Done'), - ('canceled', 'Canceled') - ], 'State', readonly=True), - 'attach_id':fields.many2one( - 'ir.attachment', 'BOE file', readonly=True - ), + 'state' : fields.selection([('draft', 'Draft'), + ('calculated', 'Processed'), + ('done', 'Done'), + ('cancelled', 'Cancelled')], + 'State', readonly=True), } _defaults = { - 'company_id': lambda self, cr, uid, c: ( + 'company_id': lambda self, cr, uid, context=None: ( self.pool['res.company']._company_default_get(cr, uid, - 'l10n.es.aeat.report', - context=c)), + 'l10n.es.aeat.report', context=context)), 'type': 'N', 'support_type': 'T', 'state': 'draft', } - def action_recover(self, cr, uid, ids, context=None): + def button_calculate(self, cr, uid, ids, context=None): + res = self.calculate(cr, uid, ids, context=context) + self.write(cr, uid, ids, + {'state': 'calculated', + 'calculation_date': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)}) + return res + + def button_recalculate(self, cr, uid, ids, context=None): + self.write(cr, uid, ids, + {'calculation_date': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)}) + return self.calculate(cr, uid, ids, context=context) + + def calculate(self, cr, uid, ids, context=None): + return True + + def button_confirm(self, cr, uid, ids, context=None): + """Set report status to done.""" + self.write(cr, uid, ids, {'state': 'done'}, context=context) + return True + + def button_cancel(self, cr, uid, ids, context=None): + """Set report status to cancelled.""" + self.write(cr, uid, ids, {'state': 'cancelled'}, context=context) + return True + + def button_recover(self, cr, uid, ids, context=None): + """Set report status to draft and reset calculation date.""" self.write(cr, uid, ids, {'state': 'draft', 'calculation_date': None}) - wf_service = netsvc.LocalService("workflow") - for item_id in ids: - wf_service.trg_create(uid, self._name, item_id, cr) + return True + + def button_export(self, cr, uid, ids, context=None): + for report in self.browse(cr, uid, ids, context=context): + export_obj = self.pool["l10n.es.aeat.report.%s.export_to_boe" %report.number] + export_obj.export_boe_file(cr, uid, report, context=context) return True def unlink(self, cr, uid, ids, context=None): for item in self.browse(cr, uid, ids): - if item.state not in ['draft', 'canceled']: + if item.state not in ['draft', 'cancelled']: raise orm.except_orm(_('Error!'), - _("Only reports in 'draft' or 'cancel' " - "state can be removed")) + _("Only reports in 'draft' or " + "'cancelled' state can be removed")) return super(l10n_es_aeat_report, self).unlink(cr, uid, ids, context=context) diff --git a/l10n_es_aeat/aeat_view.xml b/l10n_es_aeat/aeat_view.xml new file mode 100644 index 00000000000..c1b3a102c19 --- /dev/null +++ b/l10n_es_aeat/aeat_view.xml @@ -0,0 +1,65 @@ + + + + + + l10n_es.aeat.report.tree + l10n.es.aeat.report + + + + + + + + + + + + l10n_es.aeat.report.form + l10n.es.aeat.report + +
+
+
+ + + + + + + + + + + + +
+
+
+ + + AEAT Model (search) + l10n.es.aeat.report + search + + + + + + + + + + + + +
+
diff --git a/l10n_es_aeat/i18n/ca.po b/l10n_es_aeat/i18n/ca.po index a2818ecab97..8fee614f3d7 100644 --- a/l10n_es_aeat/i18n/ca.po +++ b/l10n_es_aeat/i18n/ca.po @@ -6,60 +6,124 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 7.0-20130519-231019\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-16 17:49+0000\n" +"POT-Creation-Date: 2014-01-23 16:16+0000\n" "PO-Revision-Date: 2014-01-17 07:21+0000\n" "Last-Translator: Pedro Manuel Baeza \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-01-18 07:06+0000\n" -"X-Generator: Launchpad (build 16901)\n" +"X-Launchpad-Export-Date: 2014-01-24 06:25+0000\n" +"X-Generator: Launchpad (build 16914)\n" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,type:0 -msgid "Statement Type" -msgstr "Tipus declaració" +#: model:ir.actions.act_window,name:l10n_es_aeat.action_wizard_aeat_export +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Export AEAT BOE file" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Confirmed models" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Calculate" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Confirm" +msgstr "" + +#. module: l10n_es_aeat +#: model:res.groups,name:l10n_es_aeat.group_account_aeat +msgid "AEAT manager" +msgstr "Responsable AEAT" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 msgid "DVD" msgstr "DVD" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "In process" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Cancelled models" +msgstr "" + #. module: l10n_es_aeat #: field:l10n.es.aeat.report,state:0 msgid "State" msgstr "Estat" #. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 #: selection:l10n.es.aeat.report,state:0 msgid "Draft" msgstr "Esborrany" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Declaración" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report.export_to_boe,state:0 +msgid "open" +msgstr "" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:114 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:119 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:154 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:159 +#, python-format +msgid "The formated string must match the given length" +msgstr "La cadena formatejada ha de satisfer la llargada donada." + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "AEAT report" +msgstr "" + #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,type:0 msgid "Complementary" msgstr "Complementària" #. module: l10n_es_aeat -#: model:res.groups,name:l10n_es_aeat.group_account_aeat -msgid "AEAT manager" -msgstr "Responsable AEAT" +#: view:l10n.es.aeat.report:0 +msgid "AEAT" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +#: field:l10n.es.aeat.report,company_id:0 +msgid "Company" +msgstr "Companyia" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_account_period -msgid "Account period" +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Export completed" msgstr "" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Processing" -msgstr "Processant" +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:110 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:115 +#, python-format +msgid "Wrong aling option. It should be < or >" +msgstr "Opció d'alineament errònia. Hauria de ser < o >" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,type:0 -msgid "Substitutive" -msgstr "Substitutiva" +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report +msgid "AEAT report base module" +msgstr "" #. module: l10n_es_aeat #: help:l10n.es.aeat.report,representative_vat:0 @@ -68,8 +132,17 @@ msgstr "NIF del representant legal." #. module: l10n_es_aeat #: field:l10n.es.aeat.report,previous_number:0 -msgid "Previous Declaration Number" -msgstr "Número declaració anterior" +msgid "Previous declaration number" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Export to BOE" +msgstr "" + +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Export" +msgstr "" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,company_vat:0 @@ -84,43 +157,56 @@ msgstr "" "Només declaracions en estat 'Esborrany' o 'Cancel·lada' poden ser eliminades" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:115 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:156 -#, python-format -msgid "The formated string must match the given length" -msgstr "La cadena formatejada ha de satisfer la llargada donada." +#: selection:l10n.es.aeat.report,type:0 +msgid "Substitutive" +msgstr "Substitutiva" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,support_type:0 -msgid "Support Type" -msgstr "Tipus de suport" +#: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat +msgid "AEAT reports" +msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,attach_id:0 -msgid "BOE file" -msgstr "Fitxer BOE" +#: field:l10n.es.aeat.report.export_to_boe,data:0 +msgid "File" +msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:124 -#, python-format -msgid "Error!" -msgstr "Error!" +#: selection:l10n.es.aeat.report.export_to_boe,state:0 +msgid "get" +msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,fiscalyear_id:0 -msgid "Fiscal Year" -msgstr "Exercici fiscal" +#: field:l10n.es.aeat.report.export_to_boe,name:0 +msgid "File name" +msgstr "" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report -msgid "AEAT Report base module" -msgstr "Mòdul base per les declaracions de l'Agència Tributària" +#: field:l10n.es.aeat.report,number:0 +msgid "Declaration number" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,support_type:0 +msgid "Support Type" +msgstr "Tipus de suport" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Draft models" +msgstr "" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,calculation_date:0 msgid "Calculation date" msgstr "Data del càlcul" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +#: selection:l10n.es.aeat.report,state:0 +msgid "Cancelled" +msgstr "" + #. module: l10n_es_aeat #: field:l10n.es.aeat.report,representative_vat:0 msgid "L.R. VAT number" @@ -132,9 +218,17 @@ msgid "Telematics" msgstr "Telemàtica" #. module: l10n_es_aeat -#: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat -msgid "AEAT Reports" -msgstr "Declaracions AEAT" +#: code:addons/l10n_es_aeat/aeat_report.py:135 +#, python-format +msgid "Only reports in 'draft' or 'cancelled' state can be removed" +msgstr "" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/aeat_report.py:124 +#: code:addons/l10n_es_aeat/aeat_report.py:134 +#, python-format +msgid "Error!" +msgstr "Error!" #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report_export_to_boe @@ -147,36 +241,59 @@ msgid "Normal" msgstr "Normal" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,number:0 -msgid "Declaration Number" -msgstr "Número declaració" - -#. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Canceled" -msgstr "Cancel·lada" +#: view:l10n.es.aeat.report:0 +msgid "In process models" +msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:111 -#, python-format -msgid "Wrong aling option. It should be < or >" -msgstr "Opció d'alineament errònia. Hauria de ser < o >" +#: view:l10n.es.aeat.report:0 +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fiscal year" +msgstr "" #. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 #: selection:l10n.es.aeat.report,state:0 msgid "Done" msgstr "Realitzada" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:209 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:193 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:200 #, python-format msgid "%s_report_%s.txt" msgstr "%s_report_%s.txt" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,company_id:0 -msgid "Company" -msgstr "Companyia" +#: field:l10n.es.aeat.report.export_to_boe,state:0 +msgid "unknown" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Cancel" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Close" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Recalculate" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,type:0 +msgid "Statement Type" +msgstr "Tipus declaració" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "or" +msgstr "" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 @@ -186,9 +303,15 @@ msgstr "Calculada" #~ msgid "Refund invoices description" #~ msgstr "Descripció de factures rectificatives." +#~ msgid "Processing" +#~ msgstr "Processant" + #~ msgid "Fical Year" #~ msgstr "Exercici fiscal" +#~ msgid "Previous Declaration Number" +#~ msgstr "Número declaració anterior" + #~ msgid "Refund invoice" #~ msgstr "Factura rectificativa" @@ -199,5 +322,20 @@ msgstr "Calculada" #~ msgid "AEAT Base" #~ msgstr "AEAT Base" +#~ msgid "AEAT Report base module" +#~ msgstr "Mòdul base per les declaracions de l'Agència Tributària" + +#~ msgid "Fiscal Year" +#~ msgstr "Exercici fiscal" + +#~ msgid "Declaration Number" +#~ msgstr "Número declaració" + +#~ msgid "Canceled" +#~ msgstr "Cancel·lada" + #~ msgid "Invoice" #~ msgstr "Factura" + +#~ msgid "AEAT Reports" +#~ msgstr "Declaracions AEAT" diff --git a/l10n_es_aeat/i18n/es.po b/l10n_es_aeat/i18n/es.po index 5f711ddfccb..78b4f18372f 100644 --- a/l10n_es_aeat/i18n/es.po +++ b/l10n_es_aeat/i18n/es.po @@ -6,70 +6,143 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 7.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-16 17:49+0000\n" -"PO-Revision-Date: 2014-01-17 07:23+0000\n" -"Last-Translator: Pedro Manuel Baeza \n" +"POT-Creation-Date: 2014-01-23 16:16+0000\n" +"PO-Revision-Date: 2014-02-04 03:04+0000\n" +"Last-Translator: Alejandro Santana \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-01-18 07:06+0000\n" -"X-Generator: Launchpad (build 16901)\n" +"X-Launchpad-Export-Date: 2014-02-04 06:49+0000\n" +"X-Generator: Launchpad (build 16916)\n" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,type:0 -msgid "Statement Type" -msgstr "Tipo de declaración" +#: model:ir.actions.act_window,name:l10n_es_aeat.action_wizard_aeat_export +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Export AEAT BOE file" +msgstr "Exportar archivo AEAT BOE" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Confirmed models" +msgstr "Declaraciones confirmadas" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Calculate" +msgstr "Calcular" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Confirm" +msgstr "Confirmar" + +#. module: l10n_es_aeat +#: model:res.groups,name:l10n_es_aeat.group_account_aeat +msgid "AEAT manager" +msgstr "Responsable AEAT" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 msgid "DVD" msgstr "DVD" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "In process" +msgstr "En proceso" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Cancelled models" +msgstr "Declaraciones canceladas" + #. module: l10n_es_aeat #: field:l10n.es.aeat.report,state:0 msgid "State" msgstr "Estado" #. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 #: selection:l10n.es.aeat.report,state:0 msgid "Draft" msgstr "Borrador" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Declaración" +msgstr "Declaración" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report.export_to_boe,state:0 +msgid "open" +msgstr "abierto" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:114 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:119 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:154 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:159 +#, python-format +msgid "The formated string must match the given length" +msgstr "La cadena formateada debe satisfacer el tamaño dado." + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "AEAT report" +msgstr "Informe AEAT" + #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,type:0 msgid "Complementary" msgstr "Complementaria" #. module: l10n_es_aeat -#: model:res.groups,name:l10n_es_aeat.group_account_aeat -msgid "AEAT manager" -msgstr "Responsable AEAT" +#: view:l10n.es.aeat.report:0 +msgid "AEAT" +msgstr "AEAT" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_account_period -msgid "Account period" -msgstr "Período contable" +#: view:l10n.es.aeat.report:0 +#: field:l10n.es.aeat.report,company_id:0 +msgid "Company" +msgstr "Compañía" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Processing" -msgstr "Calculando" +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Export completed" +msgstr "Export completed" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,type:0 -msgid "Substitutive" -msgstr "Sustitutiva" +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:110 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:115 +#, python-format +msgid "Wrong aling option. It should be < or >" +msgstr "Opción de alineamiento errónea. Debería ser < o >" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report +msgid "AEAT report base module" +msgstr "Módulo base para declaraciones AEAT" #. module: l10n_es_aeat #: help:l10n.es.aeat.report,representative_vat:0 msgid "Legal Representative VAT number." -msgstr "Nombre del representante legal." +msgstr "NIF del representante legal." #. module: l10n_es_aeat #: field:l10n.es.aeat.report,previous_number:0 -msgid "Previous Declaration Number" -msgstr "Número de declaración previa" +msgid "Previous declaration number" +msgstr "Nº previo de declaración" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Export to BOE" +msgstr "Exportar a BOE" + +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Export" +msgstr "Exportar" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,company_vat:0 @@ -85,43 +158,56 @@ msgstr "" "eliminadas" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:115 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:156 -#, python-format -msgid "The formated string must match the given length" -msgstr "La cadena formateada debe satisfacer el tamaño dado." +#: selection:l10n.es.aeat.report,type:0 +msgid "Substitutive" +msgstr "Sustitutiva" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,support_type:0 -msgid "Support Type" -msgstr "Tipo de soporte" +#: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat +msgid "AEAT reports" +msgstr "Declaraciones AEAT" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,attach_id:0 -msgid "BOE file" -msgstr "Archivo BOE" +#: field:l10n.es.aeat.report.export_to_boe,data:0 +msgid "File" +msgstr "Archivo" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:124 -#, python-format -msgid "Error!" -msgstr "¡Error!" +#: selection:l10n.es.aeat.report.export_to_boe,state:0 +msgid "get" +msgstr "obtener" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,fiscalyear_id:0 -msgid "Fiscal Year" -msgstr "Ejercicio fiscal" +#: field:l10n.es.aeat.report.export_to_boe,name:0 +msgid "File name" +msgstr "Nombre de archivo" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report -msgid "AEAT Report base module" -msgstr "Módulo base para las declaraciones de la Agencia Tributaria" +#: field:l10n.es.aeat.report,number:0 +msgid "Declaration number" +msgstr "Nº declaración" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,support_type:0 +msgid "Support Type" +msgstr "Tipo de soporte" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Draft models" +msgstr "Declaraciones borrador" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,calculation_date:0 msgid "Calculation date" msgstr "Fecha de cálculo" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +#: selection:l10n.es.aeat.report,state:0 +msgid "Cancelled" +msgstr "Cancelada" + #. module: l10n_es_aeat #: field:l10n.es.aeat.report,representative_vat:0 msgid "L.R. VAT number" @@ -133,9 +219,18 @@ msgid "Telematics" msgstr "Telemática" #. module: l10n_es_aeat -#: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat -msgid "AEAT Reports" -msgstr "Declaraciones AEAT" +#: code:addons/l10n_es_aeat/aeat_report.py:135 +#, python-format +msgid "Only reports in 'draft' or 'cancelled' state can be removed" +msgstr "" +"Sólo se pueden eliminar las declaraciones en estado 'borrador' o 'cancelada'" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/aeat_report.py:124 +#: code:addons/l10n_es_aeat/aeat_report.py:134 +#, python-format +msgid "Error!" +msgstr "¡Error!" #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report_export_to_boe @@ -148,36 +243,59 @@ msgid "Normal" msgstr "Normal" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,number:0 -msgid "Declaration Number" -msgstr "Número declaración" - -#. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Canceled" -msgstr "Cancelada" +#: view:l10n.es.aeat.report:0 +msgid "In process models" +msgstr "Declaraciones en proceso" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:111 -#, python-format -msgid "Wrong aling option. It should be < or >" -msgstr "Opción de alineamiento errónea. Debería ser < o >" +#: view:l10n.es.aeat.report:0 +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fiscal year" +msgstr "Ejercicio fiscal" #. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 #: selection:l10n.es.aeat.report,state:0 msgid "Done" msgstr "Realizada" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:209 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:193 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:200 #, python-format msgid "%s_report_%s.txt" msgstr "%s_report_%s.txt" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,company_id:0 -msgid "Company" -msgstr "Compañía" +#: field:l10n.es.aeat.report.export_to_boe,state:0 +msgid "unknown" +msgstr "desconocido" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Cancel" +msgstr "Cancelar" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Close" +msgstr "Cerrar" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Recalculate" +msgstr "Recalcular" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,type:0 +msgid "Statement Type" +msgstr "Tipo de declaración" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "or" +msgstr "o" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 @@ -187,9 +305,15 @@ msgstr "Calculada" #~ msgid "Refund invoices description" #~ msgstr "Descripción de facturas rectificativas." +#~ msgid "Processing" +#~ msgstr "Calculando" + #~ msgid "Fical Year" #~ msgstr "Ejercicio fiscal" +#~ msgid "Previous Declaration Number" +#~ msgstr "Número de declaración previa" + #~ msgid "Refund invoice" #~ msgstr "Factura rectificativa" @@ -200,5 +324,20 @@ msgstr "Calculada" #~ msgid "AEAT Base" #~ msgstr "AEAT Base" +#~ msgid "AEAT Report base module" +#~ msgstr "Módulo base para las declaraciones de la Agencia Tributaria" + +#~ msgid "Fiscal Year" +#~ msgstr "Ejercicio fiscal" + +#~ msgid "Declaration Number" +#~ msgstr "Número declaración" + +#~ msgid "Canceled" +#~ msgstr "Cancelada" + #~ msgid "Invoice" #~ msgstr "Factura" + +#~ msgid "AEAT Reports" +#~ msgstr "Declaraciones AEAT" diff --git a/l10n_es_aeat/i18n/gl.po b/l10n_es_aeat/i18n/gl.po index 716305c3fbe..0b4021b8ce5 100644 --- a/l10n_es_aeat/i18n/gl.po +++ b/l10n_es_aeat/i18n/gl.po @@ -7,60 +7,124 @@ msgid "" msgstr "" "Project-Id-Version: openerp-spain\n" "Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2014-01-16 17:49+0000\n" -"PO-Revision-Date: 2014-01-17 07:22+0000\n" -"Last-Translator: Pedro Manuel Baeza \n" +"POT-Creation-Date: 2014-01-23 16:16+0000\n" +"PO-Revision-Date: 2014-01-31 03:43+0000\n" +"Last-Translator: Alejandro Santana \n" "Language-Team: Galician \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-01-18 07:06+0000\n" -"X-Generator: Launchpad (build 16901)\n" +"X-Launchpad-Export-Date: 2014-02-01 06:53+0000\n" +"X-Generator: Launchpad (build 16916)\n" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,type:0 -msgid "Statement Type" -msgstr "Tipo de declaración" +#: model:ir.actions.act_window,name:l10n_es_aeat.action_wizard_aeat_export +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Export AEAT BOE file" +msgstr "Exportar a ficheiro AEAT BOE" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Confirmed models" +msgstr "Declaracións confirmadas" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Calculate" +msgstr "Calcular" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Confirm" +msgstr "Confirmar" + +#. module: l10n_es_aeat +#: model:res.groups,name:l10n_es_aeat.group_account_aeat +msgid "AEAT manager" +msgstr "Responsable AEAT" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 msgid "DVD" msgstr "DVD" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "In process" +msgstr "En proceso" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Cancelled models" +msgstr "Declaracións canceladas" + #. module: l10n_es_aeat #: field:l10n.es.aeat.report,state:0 msgid "State" msgstr "Provincia" #. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 #: selection:l10n.es.aeat.report,state:0 msgid "Draft" msgstr "Borrador" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Declaración" +msgstr "Declaración" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report.export_to_boe,state:0 +msgid "open" +msgstr "aberto" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:114 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:119 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:154 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:159 +#, python-format +msgid "The formated string must match the given length" +msgstr "A cadea formateada debe satisface-lo tamaño dado." + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "AEAT report" +msgstr "Modelo AEAT" + #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,type:0 msgid "Complementary" msgstr "Complementaria" #. module: l10n_es_aeat -#: model:res.groups,name:l10n_es_aeat.group_account_aeat -msgid "AEAT manager" -msgstr "Responsable AEAT" +#: view:l10n.es.aeat.report:0 +msgid "AEAT" +msgstr "AEAT" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_account_period -msgid "Account period" -msgstr "" +#: view:l10n.es.aeat.report:0 +#: field:l10n.es.aeat.report,company_id:0 +msgid "Company" +msgstr "Compañía" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Processing" -msgstr "Procesando" +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Export completed" +msgstr "Exportación completada" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,type:0 -msgid "Substitutive" -msgstr "Substitutiva" +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:110 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:115 +#, python-format +msgid "Wrong aling option. It should be < or >" +msgstr "Opción de aliñamento errada. Debería ser < ou >" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report +msgid "AEAT report base module" +msgstr "Módulo base modelos AEAT" #. module: l10n_es_aeat #: help:l10n.es.aeat.report,representative_vat:0 @@ -69,8 +133,17 @@ msgstr "NIF do representante legal." #. module: l10n_es_aeat #: field:l10n.es.aeat.report,previous_number:0 -msgid "Previous Declaration Number" -msgstr "Número da declaración anterior" +msgid "Previous declaration number" +msgstr "Nº da declaración anterior" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Export to BOE" +msgstr "Exportar ó formato BOE" + +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Export" +msgstr "Exportar" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,company_vat:0 @@ -85,47 +158,60 @@ msgstr "" "Só declaracions en estado 'Borrador' ou 'Cancelada' poden ser eliminadas" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:115 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:156 -#, python-format -msgid "The formated string must match the given length" -msgstr "A cadea formateada debe satisfacer o tamaño dado." +#: selection:l10n.es.aeat.report,type:0 +msgid "Substitutive" +msgstr "Substitutiva" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,support_type:0 -msgid "Support Type" -msgstr "Tipo de soporte" +#: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat +msgid "AEAT reports" +msgstr "Declaracións AEAT" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,attach_id:0 -msgid "BOE file" -msgstr "Arquivo BOE" +#: field:l10n.es.aeat.report.export_to_boe,data:0 +msgid "File" +msgstr "Ficheiro" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:124 -#, python-format -msgid "Error!" -msgstr "¡Erro!" +#: selection:l10n.es.aeat.report.export_to_boe,state:0 +msgid "get" +msgstr "obter" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,fiscalyear_id:0 -msgid "Fiscal Year" -msgstr "Exercicio fiscal" +#: field:l10n.es.aeat.report.export_to_boe,name:0 +msgid "File name" +msgstr "Nome do ficheiro" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report -msgid "AEAT Report base module" -msgstr "Módulo base para as declaracións da Axencia Tributaria" +#: field:l10n.es.aeat.report,number:0 +msgid "Declaration number" +msgstr "Nº declaración" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,support_type:0 +msgid "Support Type" +msgstr "Tipo de soporte" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Draft models" +msgstr "Declaracións borrador" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,calculation_date:0 msgid "Calculation date" msgstr "Data de cálculo" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +#: selection:l10n.es.aeat.report,state:0 +msgid "Cancelled" +msgstr "Cancelada" + #. module: l10n_es_aeat #: field:l10n.es.aeat.report,representative_vat:0 msgid "L.R. VAT number" -msgstr "NIF Repr. legal" +msgstr "NIF repr. legal" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 @@ -133,9 +219,18 @@ msgid "Telematics" msgstr "Telemática" #. module: l10n_es_aeat -#: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat -msgid "AEAT Reports" -msgstr "Declaracións AEAT" +#: code:addons/l10n_es_aeat/aeat_report.py:135 +#, python-format +msgid "Only reports in 'draft' or 'cancelled' state can be removed" +msgstr "" +"Só se poden elimina-las declaracións en estado 'borrador' ou 'cancelada'" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/aeat_report.py:124 +#: code:addons/l10n_es_aeat/aeat_report.py:134 +#, python-format +msgid "Error!" +msgstr "¡Erro!" #. module: l10n_es_aeat #: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report_export_to_boe @@ -148,42 +243,68 @@ msgid "Normal" msgstr "Normal" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,number:0 -msgid "Declaration Number" -msgstr "Número de declaración" +#: view:l10n.es.aeat.report:0 +msgid "In process models" +msgstr "Declaracións en proceso" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Canceled" -msgstr "Cancelada" - -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:111 -#, python-format -msgid "Wrong aling option. It should be < or >" -msgstr "Opción de aliñamento errada. Debería ser < ou >" +#: view:l10n.es.aeat.report:0 +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fiscal year" +msgstr "Exercicio fiscal" #. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 #: selection:l10n.es.aeat.report,state:0 msgid "Done" msgstr "Realizada" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:209 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:193 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:200 #, python-format msgid "%s_report_%s.txt" msgstr "%s_report_%s.txt" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,company_id:0 -msgid "Company" -msgstr "Compañía" +#: field:l10n.es.aeat.report.export_to_boe,state:0 +msgid "unknown" +msgstr "descoñecido" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Cancel" +msgstr "Cancelar" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Close" +msgstr "Pechar" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Recalculate" +msgstr "Recalcular" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,type:0 +msgid "Statement Type" +msgstr "Tipo de declaración" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "or" +msgstr "ou" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,state:0 msgid "Processed" msgstr "Procesada" +#~ msgid "Processing" +#~ msgstr "Procesando" + #~ msgid "Refund invoices description" #~ msgstr "Descripción de facturas rectificativas." @@ -193,11 +314,29 @@ msgstr "Procesada" #~ msgid "Fical Year" #~ msgstr "Exercicio fiscal" +#~ msgid "Previous Declaration Number" +#~ msgstr "Número da declaración anterior" + #~ msgid "Refund invoice" #~ msgstr "Factura rectificativa" +#~ msgid "AEAT Report base module" +#~ msgstr "Módulo base para as declaracións da Axencia Tributaria" + #~ msgid "AEAT Base" #~ msgstr "AEAT Base" +#~ msgid "Fiscal Year" +#~ msgstr "Exercicio fiscal" + +#~ msgid "Declaration Number" +#~ msgstr "Número de declaración" + #~ msgid "Invoice" #~ msgstr "Factura" + +#~ msgid "Canceled" +#~ msgstr "Cancelada" + +#~ msgid "AEAT Reports" +#~ msgstr "Declaracións AEAT" diff --git a/l10n_es_aeat/i18n/l10n_es_aeat.pot b/l10n_es_aeat/i18n/l10n_es_aeat.pot index 2f7fd7cadf2..2bc4765ab1b 100644 --- a/l10n_es_aeat/i18n/l10n_es_aeat.pot +++ b/l10n_es_aeat/i18n/l10n_es_aeat.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 7.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-16 17:49+0000\n" -"PO-Revision-Date: 2014-01-16 17:49+0000\n" +"POT-Creation-Date: 2014-01-23 16:16+0000\n" +"PO-Revision-Date: 2014-01-23 16:16+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,8 +16,29 @@ msgstr "" "Plural-Forms: \n" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,type:0 -msgid "Statement Type" +#: model:ir.actions.act_window,name:l10n_es_aeat.action_wizard_aeat_export +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Export AEAT BOE file" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Confirmed models" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Calculate" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Confirm" +msgstr "" + +#. module: l10n_es_aeat +#: model:res.groups,name:l10n_es_aeat.group_account_aeat +msgid "AEAT manager" msgstr "" #. module: l10n_es_aeat @@ -25,39 +46,82 @@ msgstr "" msgid "DVD" msgstr "" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "In process" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Cancelled models" +msgstr "" + #. module: l10n_es_aeat #: field:l10n.es.aeat.report,state:0 msgid "State" msgstr "" #. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 #: selection:l10n.es.aeat.report,state:0 msgid "Draft" msgstr "" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Declaración" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report.export_to_boe,state:0 +msgid "open" +msgstr "" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:114 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:119 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:154 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:159 +#, python-format +msgid "The formated string must match the given length" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "AEAT report" +msgstr "" + #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,type:0 msgid "Complementary" msgstr "" #. module: l10n_es_aeat -#: model:res.groups,name:l10n_es_aeat.group_account_aeat -msgid "AEAT manager" +#: view:l10n.es.aeat.report:0 +msgid "AEAT" msgstr "" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_account_period -msgid "Account period" +#: view:l10n.es.aeat.report:0 +#: field:l10n.es.aeat.report,company_id:0 +msgid "Company" msgstr "" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Processing" +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Export completed" msgstr "" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,type:0 -msgid "Substitutive" +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:110 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:115 +#, python-format +msgid "Wrong aling option. It should be < or >" +msgstr "" + +#. module: l10n_es_aeat +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report +msgid "AEAT report base module" msgstr "" #. module: l10n_es_aeat @@ -67,7 +131,16 @@ msgstr "" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,previous_number:0 -msgid "Previous Declaration Number" +msgid "Previous declaration number" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Export to BOE" +msgstr "" + +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Export" msgstr "" #. module: l10n_es_aeat @@ -82,36 +155,43 @@ msgid "Only reports in 'draft' or 'cancel' state can be removed" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:115 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:156 -#, python-format -msgid "The formated string must match the given length" +#: selection:l10n.es.aeat.report,type:0 +msgid "Substitutive" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,support_type:0 -msgid "Support Type" +#: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat +msgid "AEAT reports" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,attach_id:0 -msgid "BOE file" +#: field:l10n.es.aeat.report.export_to_boe,data:0 +msgid "File" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:124 -#, python-format -msgid "Error!" +#: selection:l10n.es.aeat.report.export_to_boe,state:0 +msgid "get" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,fiscalyear_id:0 -msgid "Fiscal Year" +#: field:l10n.es.aeat.report.export_to_boe,name:0 +msgid "File name" msgstr "" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report -msgid "AEAT Report base module" +#: field:l10n.es.aeat.report,number:0 +msgid "Declaration number" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,support_type:0 +msgid "Support Type" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Draft models" msgstr "" #. module: l10n_es_aeat @@ -119,6 +199,12 @@ msgstr "" msgid "Calculation date" msgstr "" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +#: selection:l10n.es.aeat.report,state:0 +msgid "Cancelled" +msgstr "" + #. module: l10n_es_aeat #: field:l10n.es.aeat.report,representative_vat:0 msgid "L.R. VAT number" @@ -130,8 +216,16 @@ msgid "Telematics" msgstr "" #. module: l10n_es_aeat -#: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat -msgid "AEAT Reports" +#: code:addons/l10n_es_aeat/aeat_report.py:135 +#, python-format +msgid "Only reports in 'draft' or 'cancelled' state can be removed" +msgstr "" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/aeat_report.py:124 +#: code:addons/l10n_es_aeat/aeat_report.py:134 +#, python-format +msgid "Error!" msgstr "" #. module: l10n_es_aeat @@ -145,35 +239,58 @@ msgid "Normal" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,number:0 -msgid "Declaration Number" +#: view:l10n.es.aeat.report:0 +msgid "In process models" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fiscal year" msgstr "" #. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 #: selection:l10n.es.aeat.report,state:0 -msgid "Canceled" +msgid "Done" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:111 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:193 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:200 #, python-format -msgid "Wrong aling option. It should be < or >" +msgid "%s_report_%s.txt" msgstr "" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Done" +#: field:l10n.es.aeat.report.export_to_boe,state:0 +msgid "unknown" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:209 -#, python-format -msgid "%s_report_%s.txt" +#: view:l10n.es.aeat.report:0 +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Cancel" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,company_id:0 -msgid "Company" +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "Close" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:0 +msgid "Recalculate" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,type:0 +msgid "Statement Type" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:0 +msgid "or" msgstr "" #. module: l10n_es_aeat diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py index cb73d52587f..c4de94f6e7f 100644 --- a/l10n_es_aeat/wizard/export_to_boe.py +++ b/l10n_es_aeat/wizard/export_to_boe.py @@ -23,11 +23,8 @@ # along with this program. If not, see . # ############################################################################## - - import base64 import time - from openerp.osv import orm, fields from openerp.tools.translate import _ from openerp.tools import DEFAULT_SERVER_DATE_FORMAT @@ -37,9 +34,17 @@ class l10n_es_aeat_report_export_to_boe(orm.TransientModel): _name = "l10n.es.aeat.report.export_to_boe" _description = "Export Report to BOE Format" - ######################## - ### HELPER FUNCTIONS ### - ######################## + _columns = { + 'name': fields.char('File name', readonly=True), + 'data': fields.binary('File', readonly=True), + 'state': fields.selection([('open', 'open'), # open wizard + ('get', 'get')]), # get file + } + + _defaults = { + 'state': 'open', + } + def _formatString(self, text, length, fill=' ', align='<'): """ Formats the string into a fixed length ASCII (iso-8859-1) record. @@ -161,54 +166,68 @@ def _formatBoolean(self, value, yes='X', no=' '): """ return value and yes or no - ######################### - ### RECORDS FUNCTIONS ### - ######################### - def _get_formated_declaration_record(self, report): + def _get_formatted_declaration_record(self, report, context=None): return '' - def _get_formated_partner_record(self, report, partner_record): + def _get_formatted_main_record(self, report, context=None): return '' - def _get_formated_other_records(self, report): + def _get_formatted_other_records(self, report, context=None): return '' - def _export_boe_file(self, cr, uid, ids, report, model=None, - context=None): + def _do_global_checks(self, report, contents, context=None): + return True + + def action_get_file(self, cr, uid, ids, context=None): """ - Action that exports the data into a BOE formated text file + Action that exports the data into a BOE formatted text file. + @return: Action dictionary for showing exported file. """ - assert model , u"AEAT Model is necessary" - file_contents = '' + if not context.get('active_id') or not context.get('active_model'): + return False + report = self.pool[context['active_model']].browse(cr, uid, + context['active_id'], context=context) + contents = '' ## Add header record - file_contents += self._get_formated_declaration_record(report) - ## Add the partner records - for partner_record in report.partner_record_ids: - file_contents += self._get_formated_partner_record(report, - partner_record) + contents += self._get_formatted_declaration_record(report, + context=context) + ## Add main record + contents += self._get_formatted_main_record(report, context=context) ## Adds other fields - file_contents += self._get_formated_other_records(report) + contents += self._get_formatted_other_records(report, context=context) ## Generate the file and save as attachment - file = base64.encodestring(file_contents) - file_name = _("%s_report_%s.txt") % \ - (model,time.strftime(_(DEFAULT_SERVER_DATE_FORMAT))) + file = base64.encodestring(contents) + file_name = _("%s_report_%s.txt") % (report.number, + time.strftime(_(DEFAULT_SERVER_DATE_FORMAT))) # Delete old files - obj_attachment = self.pool.get('ir.attachment') - attachment_ids = obj_attachment.search( - cr, uid, [('name', '=', file_name), - ('res_model', '=', report._model._name)] - ) - if len(attachment_ids): - obj_attachment.unlink(cr, uid, attachment_ids) - attach_id = self.pool["ir.attachment"].create(cr, uid, { + attachment_obj = self.pool['ir.attachment'] + attachment_ids = attachment_obj.search(cr, uid, + [('name', '=', file_name), + ('res_model', '=', report._model._name)], context=context) + if attachment_ids: + attachment_obj.unlink(cr, uid, attachment_ids, context=context) + attach_id = attachment_obj.create(cr, uid, { "name" : file_name, "datas" : file, "datas_fname" : file_name, - "res_model" : "l10n.es.aeat.mod%s.report" % model, - "res_id" : ids and ids[0] + "res_model" : "l10n.es.aeat.mod%s.report" % report.number, + "res_id" : report.id, }, context=context) - mod_obj = self.pool[report._model._name] - mod_obj.write(cr, uid, [report.id], {'attach_id': attach_id}, - context=context) - - return True + self.write(cr, uid, ids, + {'state': 'get', 'data': file, 'name': file_name}, + context=context) + # Force view to be the parent one + data_obj = self.pool['ir.model.data'] + result = data_obj._get_id(cr, uid, 'l10n_es_aeat', + 'wizard_aeat_export') + view_id = data_obj.browse(cr, uid, result, context=context).res_id + # TODO: Permitir si se quiere heredar la vista padre + return { + 'type': 'ir.actions.act_window', + 'res_model': self._name, + 'view_mode': 'form', + 'view_type': 'form', + 'view_id': [view_id], + 'res_id': ids[0], + 'target': 'new', + } diff --git a/l10n_es_aeat/wizard/export_to_boe_wizard.xml b/l10n_es_aeat/wizard/export_to_boe_wizard.xml new file mode 100644 index 00000000000..d8786f9e63d --- /dev/null +++ b/l10n_es_aeat/wizard/export_to_boe_wizard.xml @@ -0,0 +1,48 @@ + + + + + Export AEAT BOE file + l10n.es.aeat.report.export_to_boe + +
+ + +
+

Pulse el botón Exportar para iniciar el proceso de exportación del archivo BOE de la AEAT.

+
+
+

Exportación completada

+

Aquí está el archivo BOE de la AEAT exportado:

+

Ponga este archivo dentro de su carpeta personal de la AEAT, y úselo en el programa Informativas o pulsando en el botón Optativo: Importar datos de fichero en el formulario on-line.

+
+
+
+
+
+ +
+
+ + + + Export AEAT BOE file + ir.actions.act_window + l10n.es.aeat.report.export_to_boe + form + form + new + + + + form + + +
+
From 7883540d77d811c67535498e2973ce325466d5c7 Mon Sep 17 00:00:00 2001 From: "Ignacio Ibeas - Acysos S.L" Date: Fri, 31 Jan 2014 19:51:14 +0100 Subject: [PATCH 013/173] =?UTF-8?q?[FIX]=20l10n=5Fes=5Faeat:=20compatibili?= =?UTF-8?q?dad=20de=20la=20funci=C3=B3n=20export=5Fto=5Fboe=20para=20el=20?= =?UTF-8?q?modelo=20340?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- l10n_es_aeat/wizard/export_to_boe.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py index c4de94f6e7f..5c3a2acf45c 100644 --- a/l10n_es_aeat/wizard/export_to_boe.py +++ b/l10n_es_aeat/wizard/export_to_boe.py @@ -166,13 +166,13 @@ def _formatBoolean(self, value, yes='X', no=' '): """ return value and yes or no - def _get_formatted_declaration_record(self, report, context=None): + def _get_formatted_declaration_record(self, cr, uid, report, context=None): return '' - def _get_formatted_main_record(self, report, context=None): + def _get_formatted_main_record(self, cr, uid, report, context=None): return '' - def _get_formatted_other_records(self, report, context=None): + def _get_formatted_other_records(self, cr, uid, report, context=None): return '' def _do_global_checks(self, report, contents, context=None): @@ -189,12 +189,14 @@ def action_get_file(self, cr, uid, ids, context=None): context['active_id'], context=context) contents = '' ## Add header record - contents += self._get_formatted_declaration_record(report, + contents += self._get_formatted_declaration_record(cr, uid, report, context=context) ## Add main record - contents += self._get_formatted_main_record(report, context=context) + contents += self._get_formatted_main_record(cr, uid, report, + context=context) ## Adds other fields - contents += self._get_formatted_other_records(report, context=context) + contents += self._get_formatted_other_records(cr, uid, report, + context=context) ## Generate the file and save as attachment file = base64.encodestring(contents) file_name = _("%s_report_%s.txt") % (report.number, From c6a91870f3f8364e0d033b8ec3701074cf3b45bf Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 5 Feb 2014 02:21:25 +0100 Subject: [PATCH 014/173] =?UTF-8?q?[FIX]=20l10n=5Fes=5Faeat:=20Peque=C3=B1?= =?UTF-8?q?os=20cambios=20para=20acomodar=20la=20funcionalidad=20del=20347?= =?UTF-8?q?=20y=20el=20340.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- l10n_es_aeat/aeat_report.py | 5 ++--- l10n_es_aeat/i18n/ca.po | 4 ++-- l10n_es_aeat/i18n/es.po | 4 ++-- l10n_es_aeat/i18n/gl.po | 4 ++-- l10n_es_aeat/wizard/export_to_boe.py | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/l10n_es_aeat/aeat_report.py b/l10n_es_aeat/aeat_report.py index 75e9bf24f31..5924d67a406 100644 --- a/l10n_es_aeat/aeat_report.py +++ b/l10n_es_aeat/aeat_report.py @@ -56,8 +56,7 @@ def on_change_company_id(self, cr, uid, ids, company_id): size=13, states={'done':[('readonly',True)]}), 'representative_vat': fields.char('L.R. VAT number', size=9, help="Legal Representative VAT number.", - states={'calculated':[('required',True)], - 'confirmed':[('readonly',True)]}), + states={'confirmed': [('readonly',True)]}), 'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal year', required=True, readonly=True, states={'draft': [('readonly', False)]}), @@ -67,7 +66,7 @@ def on_change_company_id(self, cr, uid, ids, company_id): ('C', 'Complementary'), ('S', 'Substitutive')], 'Statement Type', states={'calculated':[('required',True)], - 'done':[('readonly',True)]}), + 'done':[('readonly', True)]}), 'support_type': fields.selection( [('C', 'DVD'), ('T', 'Telematics')], 'Support Type', diff --git a/l10n_es_aeat/i18n/ca.po b/l10n_es_aeat/i18n/ca.po index 8fee614f3d7..8835ad6c35b 100644 --- a/l10n_es_aeat/i18n/ca.po +++ b/l10n_es_aeat/i18n/ca.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-01-24 06:25+0000\n" -"X-Generator: Launchpad (build 16914)\n" +"X-Launchpad-Export-Date: 2014-03-13 07:16+0000\n" +"X-Generator: Launchpad (build 16963)\n" #. module: l10n_es_aeat #: model:ir.actions.act_window,name:l10n_es_aeat.action_wizard_aeat_export diff --git a/l10n_es_aeat/i18n/es.po b/l10n_es_aeat/i18n/es.po index 78b4f18372f..c8da26dfb31 100644 --- a/l10n_es_aeat/i18n/es.po +++ b/l10n_es_aeat/i18n/es.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-02-04 06:49+0000\n" -"X-Generator: Launchpad (build 16916)\n" +"X-Launchpad-Export-Date: 2014-03-13 07:16+0000\n" +"X-Generator: Launchpad (build 16963)\n" #. module: l10n_es_aeat #: model:ir.actions.act_window,name:l10n_es_aeat.action_wizard_aeat_export diff --git a/l10n_es_aeat/i18n/gl.po b/l10n_es_aeat/i18n/gl.po index 0b4021b8ce5..e022d22c2a5 100644 --- a/l10n_es_aeat/i18n/gl.po +++ b/l10n_es_aeat/i18n/gl.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-02-01 06:53+0000\n" -"X-Generator: Launchpad (build 16916)\n" +"X-Launchpad-Export-Date: 2014-03-13 07:16+0000\n" +"X-Generator: Launchpad (build 16963)\n" #. module: l10n_es_aeat #: model:ir.actions.act_window,name:l10n_es_aeat.action_wizard_aeat_export diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py index 5c3a2acf45c..d612861ade5 100644 --- a/l10n_es_aeat/wizard/export_to_boe.py +++ b/l10n_es_aeat/wizard/export_to_boe.py @@ -212,7 +212,7 @@ def action_get_file(self, cr, uid, ids, context=None): "name" : file_name, "datas" : file, "datas_fname" : file_name, - "res_model" : "l10n.es.aeat.mod%s.report" % report.number, + "res_model" : report._model._name, "res_id" : report.id, }, context=context) self.write(cr, uid, ids, From 24a700f22daa0c5396d11a523abf5df44d58e0bc Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 20 Mar 2014 01:33:19 +0100 Subject: [PATCH 015/173] [IMP] l10n_es_aeat: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Eliminación de la mayoría de warnings que da runbot. * Usar librería unidecode en lugar de reemplazos manuales para las tildes y caracteres no soportados. --- l10n_es_aeat/__openerp__.py | 6 ++++ l10n_es_aeat/aeat_view.xml | 1 - l10n_es_aeat/i18n/ca.po | 4 +-- l10n_es_aeat/i18n/es.po | 4 +-- l10n_es_aeat/i18n/gl.po | 4 +-- l10n_es_aeat/wizard/export_to_boe.py | 54 +++++----------------------- 6 files changed, 20 insertions(+), 53 deletions(-) diff --git a/l10n_es_aeat/__openerp__.py b/l10n_es_aeat/__openerp__.py index 3e7f890e35c..0a5878ba581 100644 --- a/l10n_es_aeat/__openerp__.py +++ b/l10n_es_aeat/__openerp__.py @@ -36,6 +36,12 @@ 'depends' : [ "account", ], + 'external_dependencies': { + 'python': ['unidecode'], + }, + 'description': """ +Módulo base para declaraciones de la AEAT. + """, 'data' : [ 'security/aeat_security.xml', 'security/ir.model.access.csv', diff --git a/l10n_es_aeat/aeat_view.xml b/l10n_es_aeat/aeat_view.xml index c1b3a102c19..cc88af4150a 100644 --- a/l10n_es_aeat/aeat_view.xml +++ b/l10n_es_aeat/aeat_view.xml @@ -48,7 +48,6 @@ AEAT Model (search) l10n.es.aeat.report - search diff --git a/l10n_es_aeat/i18n/ca.po b/l10n_es_aeat/i18n/ca.po index 8835ad6c35b..0dbff1da3da 100644 --- a/l10n_es_aeat/i18n/ca.po +++ b/l10n_es_aeat/i18n/ca.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-03-13 07:16+0000\n" -"X-Generator: Launchpad (build 16963)\n" +"X-Launchpad-Export-Date: 2014-06-22 05:56+0000\n" +"X-Generator: Launchpad (build 17058)\n" #. module: l10n_es_aeat #: model:ir.actions.act_window,name:l10n_es_aeat.action_wizard_aeat_export diff --git a/l10n_es_aeat/i18n/es.po b/l10n_es_aeat/i18n/es.po index c8da26dfb31..1be5739625c 100644 --- a/l10n_es_aeat/i18n/es.po +++ b/l10n_es_aeat/i18n/es.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-03-13 07:16+0000\n" -"X-Generator: Launchpad (build 16963)\n" +"X-Launchpad-Export-Date: 2014-06-22 05:56+0000\n" +"X-Generator: Launchpad (build 17058)\n" #. module: l10n_es_aeat #: model:ir.actions.act_window,name:l10n_es_aeat.action_wizard_aeat_export diff --git a/l10n_es_aeat/i18n/gl.po b/l10n_es_aeat/i18n/gl.po index e022d22c2a5..6b2dec9f745 100644 --- a/l10n_es_aeat/i18n/gl.po +++ b/l10n_es_aeat/i18n/gl.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-03-13 07:16+0000\n" -"X-Generator: Launchpad (build 16963)\n" +"X-Launchpad-Export-Date: 2014-06-22 05:56+0000\n" +"X-Generator: Launchpad (build 17058)\n" #. module: l10n_es_aeat #: model:ir.actions.act_window,name:l10n_es_aeat.action_wizard_aeat_export diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py index d612861ade5..91505b2f29c 100644 --- a/l10n_es_aeat/wizard/export_to_boe.py +++ b/l10n_es_aeat/wizard/export_to_boe.py @@ -27,7 +27,8 @@ import time from openerp.osv import orm, fields from openerp.tools.translate import _ -from openerp.tools import DEFAULT_SERVER_DATE_FORMAT +from openerp.tools import DEFAULT_SERVER_DATE_FORMAT +from unidecode import unidecode class l10n_es_aeat_report_export_to_boe(orm.TransientModel): @@ -60,60 +61,21 @@ def _formatString(self, text, length, fill=' ', align='<'): """ if not text: - return fill*length - - # - # Replace accents - # - replacements = [ - (u'Á', 'A'),(u'á', 'A'), - (u'É', 'E'),(u'é', 'E'), - (u'Í', 'I'),(u'í', 'I'), - (u'Ó', 'O'),(u'ó', 'O'), - (u'Ú', 'U'),(u'ú', 'U'), - (u'Ä', 'A'),(u'ä', 'A'), - (u'Ë', 'E'),(u'ë', 'E'), - (u'Ï', 'I'),(u'ï', 'I'), - (u'Ö', 'O'),(u'ö', 'O'), - (u'Ü', 'U'),(u'ü', 'U'), - (u'À', 'A'),(u'à', 'A'), - (u'È', 'E'),(u'è', 'E'), - (u'Ì', 'I'),(u'ì', 'I'), - (u'Ò', 'O'),(u'ò', 'O'), - (u'Ù', 'U'),(u'ù', 'U'), - (u'Â', 'A'),(u'â', 'A'), - (u'Ê', 'E'),(u'ê', 'E'), - (u'Î', 'I'),(u'î', 'I'), - (u'Ô', 'O'),(u'ô', 'O'), - (u'Û', 'U'),(u'û', 'U')] - - # - # String uppercase - # + return fill * length + # Replace accents and convert to upper + text = unidecode(unicode(text)) text = text.upper() - - # - # Turn text (probably unicode) into an ASCII (iso-8859-1) string - # - if isinstance(text, (unicode)): - ascii_string = text.encode('iso-8859-1', 'ignore') - else: - ascii_string = str(text or '') + ascii_string = text.encode('iso-8859-1') # Cut the string if it is too long if len(ascii_string) > length: ascii_string = ascii_string[:length] # Format the string - #ascii_string = '{0:{1}{2}{3}s}'.format(ascii_string, fill, align, - # length) #for python >= 2.6 if align == '<': - ascii_string = str(ascii_string) + \ - (length-len(str(ascii_string)))*fill + ascii_string = ascii_string.ljust(length, fill) elif align == '>': - ascii_string = (length-len(str(ascii_string)))* \ - fill + str(ascii_string) + ascii_string = ascii_string.rjust(length, fill) else: assert False, _('Wrong aling option. It should be < or >') - # Sanity-check assert len(ascii_string) == length, \ _("The formated string must match the given length") From 62708577d5a615ce4a1a1c785d2e371fcd787fbd Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 17 Jul 2014 20:03:40 +0200 Subject: [PATCH 016/173] =?UTF-8?q?[MIG]=20Movidos=20todos=20los=20m=C3=B3?= =?UTF-8?q?dulos=20a=20=5F=5Funported=5F=5F=20[MIG]=20Eliminados=20m=C3=B3?= =?UTF-8?q?dulos=20no=20migrados=20a=20v7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- l10n_es_aeat/__init__.py | 5 +- l10n_es_aeat/__openerp__.py | 22 +++--- l10n_es_aeat/aeat_report.py | 66 +++++++++--------- .../static/{src/img => description}/icon.png | Bin .../{src/img => description}/icon_source.svg | 0 l10n_es_aeat/wizard/__init__.py | 2 +- l10n_es_aeat/wizard/export_to_boe.py | 64 +++++++++-------- 7 files changed, 83 insertions(+), 76 deletions(-) rename l10n_es_aeat/static/{src/img => description}/icon.png (100%) rename l10n_es_aeat/static/{src/img => description}/icon_source.svg (100%) diff --git a/l10n_es_aeat/__init__.py b/l10n_es_aeat/__init__.py index 34c669c2b66..23a417fd91e 100644 --- a/l10n_es_aeat/__init__.py +++ b/l10n_es_aeat/__init__.py @@ -21,7 +21,6 @@ __author__ = "Luis Manuel Angueira Blanco (Pexego)" - -import aeat_report -import wizard +from . import aeat_report +from . import wizard # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/l10n_es_aeat/__openerp__.py b/l10n_es_aeat/__openerp__.py index 0a5878ba581..c78996a6804 100644 --- a/l10n_es_aeat/__openerp__.py +++ b/l10n_es_aeat/__openerp__.py @@ -23,31 +23,31 @@ ############################################################################## { - 'name' : "AEAT Base", - 'version' : "1.1", - 'author' : "Pexego", - 'license' : "AGPL-3", + 'name': "AEAT Base", + 'version': "1.1", + 'author': "Pexego", + 'license': "AGPL-3", 'contributors': [ 'Ignacio Ibeas (Acysos S.L.)', 'Pedro M. Baeza ', - ], - 'website' : "http://www.pexego.es, http://www.acysos.com", - 'category' : "Localisation/Accounting", - 'depends' : [ + ], + 'website': "http://www.pexego.es, http://www.acysos.com", + 'category': "Localisation/Accounting", + 'depends': [ "account", - ], + ], 'external_dependencies': { 'python': ['unidecode'], }, 'description': """ Módulo base para declaraciones de la AEAT. """, - 'data' : [ + 'data': [ 'security/aeat_security.xml', 'security/ir.model.access.csv', 'wizard/export_to_boe_wizard.xml', 'aeat_menuitem.xml', 'aeat_view.xml', - ], + ], 'installable': True, } diff --git a/l10n_es_aeat/aeat_report.py b/l10n_es_aeat/aeat_report.py index 5924d67a406..4e5b7076765 100644 --- a/l10n_es_aeat/aeat_report.py +++ b/l10n_es_aeat/aeat_report.py @@ -28,7 +28,8 @@ import time import re -class l10n_es_aeat_report(orm.Model): + +class L10nEsAeatReport(orm.Model): _name = "l10n.es.aeat.report" _description = "AEAT report base module" @@ -41,49 +42,51 @@ def on_change_company_id(self, cr, uid, ids, company_id): if company_id: company = self.pool['res.company'].browse(cr, uid, company_id) if company.partner_id and company.partner_id.vat: - # Remove the ES part from spanish vat numbers + # Remove the ES part from spanish vat numbers # (ES12345678Z => 12345678Z) company_vat = re.match("(ES){0,1}(.*)", company.partner_id.vat).groups()[1] - return { 'value': { 'company_vat': company_vat } } + return {'value': {'company_vat': company_vat}} _columns = { 'company_id': fields.many2one('res.company', 'Company', required=True, - readonly=True, states={'draft': [('readonly', False)]}), + readonly=True, + states={'draft': [('readonly', False)]}), 'number': fields.char('Declaration number', size=13, required=True, readonly=True), - 'previous_number' : fields.char('Previous declaration number', - size=13, states={'done':[('readonly',True)]}), + 'previous_number': fields.char('Previous declaration number', + size=13, + states={'done': [('readonly', True)]}), 'representative_vat': fields.char('L.R. VAT number', size=9, - help="Legal Representative VAT number.", - states={'confirmed': [('readonly',True)]}), + help="Legal Representative VAT number.", + states={'confirmed': [('readonly', True)]}), 'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal year', - required=True, readonly=True, - states={'draft': [('readonly', False)]}), + required=True, readonly=True, + states={'draft': [('readonly', False)]}), 'company_vat': fields.char('VAT number', size=9, required=True, - readonly=True, states={'draft': [('readonly', False)]}), + readonly=True, states={'draft': [('readonly', False)]}), 'type': fields.selection([('N', 'Normal'), ('C', 'Complementary'), - ('S', 'Substitutive')], 'Statement Type', - states={'calculated':[('required',True)], - 'done':[('readonly', True)]}), - 'support_type': fields.selection( - [('C', 'DVD'), - ('T', 'Telematics')], 'Support Type', - states={'calculated':[('required',True)], - 'done':[('readonly',True)]}), + ('S', 'Substitutive')], + 'Statement Type', + states={'calculated': [('required', True)], + 'done': [('readonly', True)]}), + 'support_type': fields.selection([('C', 'DVD'), + ('T', 'Telematics')], + 'Support Type', + states={'calculated': [('required', True)], + 'done': [('readonly', True)]}), 'calculation_date': fields.datetime("Calculation date"), - 'state' : fields.selection([('draft', 'Draft'), - ('calculated', 'Processed'), - ('done', 'Done'), - ('cancelled', 'Cancelled')], - 'State', readonly=True), + 'state': fields.selection([('draft', 'Draft'), + ('calculated', 'Processed'), + ('done', 'Done'), + ('cancelled', 'Cancelled')], + 'State', readonly=True), } _defaults = { 'company_id': lambda self, cr, uid, context=None: ( - self.pool['res.company']._company_default_get(cr, uid, - 'l10n.es.aeat.report', context=context)), + self.pool['res.company']._company_default_get(cr, uid, 'l10n.es.aeat.report', context=context)), 'type': 'N', 'support_type': 'T', 'state': 'draft', @@ -92,13 +95,13 @@ def on_change_company_id(self, cr, uid, ids, company_id): def button_calculate(self, cr, uid, ids, context=None): res = self.calculate(cr, uid, ids, context=context) self.write(cr, uid, ids, - {'state': 'calculated', - 'calculation_date': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)}) + {'state': 'calculated', + 'calculation_date': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)}) return res def button_recalculate(self, cr, uid, ids, context=None): self.write(cr, uid, ids, - {'calculation_date': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)}) + {'calculation_date': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)}) return self.calculate(cr, uid, ids, context=context) def calculate(self, cr, uid, ids, context=None): @@ -121,7 +124,7 @@ def button_recover(self, cr, uid, ids, context=None): def button_export(self, cr, uid, ids, context=None): for report in self.browse(cr, uid, ids, context=context): - export_obj = self.pool["l10n.es.aeat.report.%s.export_to_boe" %report.number] + export_obj = self.pool["l10n.es.aeat.report.%s.export_to_boe" % report.number] export_obj.export_boe_file(cr, uid, report, context=context) return True @@ -131,5 +134,4 @@ def unlink(self, cr, uid, ids, context=None): raise orm.except_orm(_('Error!'), _("Only reports in 'draft' or " "'cancelled' state can be removed")) - return super(l10n_es_aeat_report, self).unlink(cr, uid, ids, - context=context) + return super(L10nEsAeatReport, self).unlink(cr, uid, ids, context=context) diff --git a/l10n_es_aeat/static/src/img/icon.png b/l10n_es_aeat/static/description/icon.png similarity index 100% rename from l10n_es_aeat/static/src/img/icon.png rename to l10n_es_aeat/static/description/icon.png diff --git a/l10n_es_aeat/static/src/img/icon_source.svg b/l10n_es_aeat/static/description/icon_source.svg similarity index 100% rename from l10n_es_aeat/static/src/img/icon_source.svg rename to l10n_es_aeat/static/description/icon_source.svg diff --git a/l10n_es_aeat/wizard/__init__.py b/l10n_es_aeat/wizard/__init__.py index 6590e96ca13..b9d393bbc6d 100644 --- a/l10n_es_aeat/wizard/__init__.py +++ b/l10n_es_aeat/wizard/__init__.py @@ -21,4 +21,4 @@ __author__ = "Luis Manuel Angueira Blanco (Pexego)" -import export_to_boe \ No newline at end of file +from . import export_to_boe diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py index 91505b2f29c..8c9d7a2e3ad 100644 --- a/l10n_es_aeat/wizard/export_to_boe.py +++ b/l10n_es_aeat/wizard/export_to_boe.py @@ -31,7 +31,7 @@ from unidecode import unidecode -class l10n_es_aeat_report_export_to_boe(orm.TransientModel): +class L10nEsAeatReportExportToBoe(orm.TransientModel): _name = "l10n.es.aeat.report.export_to_boe" _description = "Export Report to BOE Format" @@ -51,7 +51,7 @@ def _formatString(self, text, length, fill=' ', align='<'): Formats the string into a fixed length ASCII (iso-8859-1) record. Note: - 'Todos los campos alfanuméricos y alfabéticos se presentarán + 'Todos los campos alfanuméricos y alfabéticos se presentarán alineados a la izquierda y rellenos de blancos por la derecha, en mayúsculas sin caracteres especiales, y sin vocales acentuadas. Para los caracteres específicos del idioma se utilizará la @@ -103,19 +103,18 @@ def _formatNumber(self, number, int_length, dec_length=0, number = abs(number) int_part = int(number) - ## - ## Format the string + # Format the string ascii_string = '' if include_sign: ascii_string += sign - + if dec_length > 0: - ascii_string += '%0*.*f' % (int_length+ \ - dec_length+1,dec_length, number) - ascii_string = ascii_string.replace('.','') + ascii_string += '%0*.*f' % (int_length + dec_length + 1, + dec_length, number) + ascii_string = ascii_string.replace('.', '') elif int_length > 0: ascii_string += '%.*d' % (int_length, int_part) - + # Sanity-check assert len(ascii_string) == (include_sign and 1 or 0) + int_length + \ dec_length, _("The formated string must match the given length") @@ -147,35 +146,42 @@ def action_get_file(self, cr, uid, ids, context=None): """ if not context.get('active_id') or not context.get('active_model'): return False - report = self.pool[context['active_model']].browse(cr, uid, - context['active_id'], context=context) + report = self.pool[context['active_model']].browse( + cr, uid, + context['active_id'], context=context + ) contents = '' - ## Add header record + # Add header record contents += self._get_formatted_declaration_record(cr, uid, report, - context=context) - ## Add main record - contents += self._get_formatted_main_record(cr, uid, report, + context=context) + # Add main record + contents += self._get_formatted_main_record(cr, uid, report, context=context) - ## Adds other fields - contents += self._get_formatted_other_records(cr, uid, report, + # Adds other fields + contents += self._get_formatted_other_records(cr, uid, report, context=context) - ## Generate the file and save as attachment + # Generate the file and save as attachment file = base64.encodestring(contents) - file_name = _("%s_report_%s.txt") % (report.number, - time.strftime(_(DEFAULT_SERVER_DATE_FORMAT))) + file_name = _("%s_report_%s.txt") % ( + report.number, + time.strftime(_(DEFAULT_SERVER_DATE_FORMAT)) + ) # Delete old files attachment_obj = self.pool['ir.attachment'] - attachment_ids = attachment_obj.search(cr, uid, - [('name', '=', file_name), - ('res_model', '=', report._model._name)], context=context) + attachment_ids = attachment_obj.search( + cr, uid, + [ + ('name', '=', file_name), + ('res_model', '=', report._model._name) + ], context=context) if attachment_ids: attachment_obj.unlink(cr, uid, attachment_ids, context=context) - attach_id = attachment_obj.create(cr, uid, { - "name" : file_name, - "datas" : file, - "datas_fname" : file_name, - "res_model" : report._model._name, - "res_id" : report.id, + attachment_obj.create(cr, uid, { + "name": file_name, + "datas": file, + "datas_fname": file_name, + "res_model": report._model._name, + "res_id": report.id, }, context=context) self.write(cr, uid, ids, {'state': 'get', 'data': file, 'name': file_name}, From 314a395873e0ec504ff739a3aac5dcc1b7fe30fd Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sun, 27 Jul 2014 23:35:13 +0200 Subject: [PATCH 017/173] [FIX] l10n_es_aeat: New PEP8 checks - Mover import de unidecode para evitar error --- l10n_es_aeat/__init__.py | 6 +-- l10n_es_aeat/__openerp__.py | 7 ++-- l10n_es_aeat/aeat_report.py | 62 ++++++++++++++++------------ l10n_es_aeat/wizard/__init__.py | 5 +-- l10n_es_aeat/wizard/export_to_boe.py | 2 +- 5 files changed, 42 insertions(+), 40 deletions(-) diff --git a/l10n_es_aeat/__init__.py b/l10n_es_aeat/__init__.py index 23a417fd91e..e76f25c699a 100644 --- a/l10n_es_aeat/__init__.py +++ b/l10n_es_aeat/__init__.py @@ -2,7 +2,7 @@ ############################################################################## # # Copyright (C) 2004-2011 -# Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved +# Pexego Sistemas Informáticos. (http://pexego.es) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -18,9 +18,5 @@ # along with this program. If not, see . # ############################################################################## - -__author__ = "Luis Manuel Angueira Blanco (Pexego)" - from . import aeat_report from . import wizard -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/l10n_es_aeat/__openerp__.py b/l10n_es_aeat/__openerp__.py index c78996a6804..0ef690e1725 100644 --- a/l10n_es_aeat/__openerp__.py +++ b/l10n_es_aeat/__openerp__.py @@ -2,9 +2,10 @@ ############################################################################## # # Copyright (C) 2004-2011 -# Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved +# Pexego Sistemas Informáticos. (http://pexego.es) +# Luis Manuel Angueira Blanco # Copyright (C) 2013 -# Ignacio Ibeas - Acysos S.L. (http://acysos.com) All Rights Reserved +# Ignacio Ibeas - Acysos S.L. (http://acysos.com) # Migración a OpenERP 7.0 # # This program is free software: you can redistribute it and/or modify @@ -25,7 +26,7 @@ { 'name': "AEAT Base", 'version': "1.1", - 'author': "Pexego", + 'author': "Pexego,Odoo Community Association (OCA)", 'license': "AGPL-3", 'contributors': [ 'Ignacio Ibeas (Acysos S.L.)', diff --git a/l10n_es_aeat/aeat_report.py b/l10n_es_aeat/aeat_report.py index 4e5b7076765..4c326b4b7ac 100644 --- a/l10n_es_aeat/aeat_report.py +++ b/l10n_es_aeat/aeat_report.py @@ -2,10 +2,10 @@ ############################################################################## # # Copyright (C) 2004-2011 -# Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved +# Pexego Sistemas Informáticos. (http://pexego.es) # Luis Manuel Angueira Blanco (Pexego) # Copyright (C) 2013 -# Ignacio Ibeas - Acysos S.L. (http://acysos.com) All Rights Reserved +# Ignacio Ibeas - Acysos S.L. (http://acysos.com) # Migración a OpenERP 7.0 # # This program is free software: you can redistribute it and/or modify @@ -49,33 +49,34 @@ def on_change_company_id(self, cr, uid, ids, company_id): return {'value': {'company_vat': company_vat}} _columns = { - 'company_id': fields.many2one('res.company', 'Company', required=True, - readonly=True, - states={'draft': [('readonly', False)]}), + 'company_id': fields.many2one( + 'res.company', 'Company', required=True, readonly=True, + states={'draft': [('readonly', False)]}), 'number': fields.char('Declaration number', size=13, required=True, readonly=True), 'previous_number': fields.char('Previous declaration number', size=13, states={'done': [('readonly', True)]}), - 'representative_vat': fields.char('L.R. VAT number', size=9, - help="Legal Representative VAT number.", - states={'confirmed': [('readonly', True)]}), - 'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal year', - required=True, readonly=True, - states={'draft': [('readonly', False)]}), - 'company_vat': fields.char('VAT number', size=9, required=True, - readonly=True, states={'draft': [('readonly', False)]}), + 'representative_vat': fields.char( + 'L.R. VAT number', size=9, help="Legal Representative VAT number.", + states={'confirmed': [('readonly', True)]}), + 'fiscalyear_id': fields.many2one( + 'account.fiscalyear', 'Fiscal year', required=True, readonly=True, + states={'draft': [('readonly', False)]}), + 'company_vat': fields.char( + 'VAT number', size=9, required=True, readonly=True, + states={'draft': [('readonly', False)]}), 'type': fields.selection([('N', 'Normal'), ('C', 'Complementary'), ('S', 'Substitutive')], 'Statement Type', states={'calculated': [('required', True)], 'done': [('readonly', True)]}), - 'support_type': fields.selection([('C', 'DVD'), - ('T', 'Telematics')], - 'Support Type', - states={'calculated': [('required', True)], - 'done': [('readonly', True)]}), + 'support_type': fields.selection( + [('C', 'DVD'), + ('T', 'Telematics')], + 'Support Type', states={'calculated': [('required', True)], + 'done': [('readonly', True)]}), 'calculation_date': fields.datetime("Calculation date"), 'state': fields.selection([('draft', 'Draft'), ('calculated', 'Processed'), @@ -85,8 +86,9 @@ def on_change_company_id(self, cr, uid, ids, company_id): } _defaults = { - 'company_id': lambda self, cr, uid, context=None: ( - self.pool['res.company']._company_default_get(cr, uid, 'l10n.es.aeat.report', context=context)), + 'company_id': (lambda self, cr, uid, context=None: + self.pool['res.company']._company_default_get( + cr, uid, 'l10n.es.aeat.report', context=context)), 'type': 'N', 'support_type': 'T', 'state': 'draft', @@ -94,14 +96,18 @@ def on_change_company_id(self, cr, uid, ids, company_id): def button_calculate(self, cr, uid, ids, context=None): res = self.calculate(cr, uid, ids, context=context) - self.write(cr, uid, ids, - {'state': 'calculated', - 'calculation_date': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)}) + self.write( + cr, uid, ids, + {'state': 'calculated', + 'calculation_date': time.strftime( + DEFAULT_SERVER_DATETIME_FORMAT)}) return res def button_recalculate(self, cr, uid, ids, context=None): - self.write(cr, uid, ids, - {'calculation_date': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)}) + self.write( + cr, uid, ids, + {'calculation_date': time.strftime( + DEFAULT_SERVER_DATETIME_FORMAT)}) return self.calculate(cr, uid, ids, context=context) def calculate(self, cr, uid, ids, context=None): @@ -124,7 +130,8 @@ def button_recover(self, cr, uid, ids, context=None): def button_export(self, cr, uid, ids, context=None): for report in self.browse(cr, uid, ids, context=context): - export_obj = self.pool["l10n.es.aeat.report.%s.export_to_boe" % report.number] + export_obj = self.pool["l10n.es.aeat.report.%s.export_to_boe" % + report.number] export_obj.export_boe_file(cr, uid, report, context=context) return True @@ -134,4 +141,5 @@ def unlink(self, cr, uid, ids, context=None): raise orm.except_orm(_('Error!'), _("Only reports in 'draft' or " "'cancelled' state can be removed")) - return super(L10nEsAeatReport, self).unlink(cr, uid, ids, context=context) + return super(L10nEsAeatReport, self).unlink(cr, uid, ids, + context=context) diff --git a/l10n_es_aeat/wizard/__init__.py b/l10n_es_aeat/wizard/__init__.py index b9d393bbc6d..4165366f4ee 100644 --- a/l10n_es_aeat/wizard/__init__.py +++ b/l10n_es_aeat/wizard/__init__.py @@ -2,7 +2,7 @@ ############################################################################## # # Copyright (C) 2004-2011 -# Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved +# Pexego Sistemas Informáticos. (http://pexego.es) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -18,7 +18,4 @@ # along with this program. If not, see . # ############################################################################## - -__author__ = "Luis Manuel Angueira Blanco (Pexego)" - from . import export_to_boe diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py index 8c9d7a2e3ad..6ad5ff18a5c 100644 --- a/l10n_es_aeat/wizard/export_to_boe.py +++ b/l10n_es_aeat/wizard/export_to_boe.py @@ -28,7 +28,6 @@ from openerp.osv import orm, fields from openerp.tools.translate import _ from openerp.tools import DEFAULT_SERVER_DATE_FORMAT -from unidecode import unidecode class L10nEsAeatReportExportToBoe(orm.TransientModel): @@ -63,6 +62,7 @@ def _formatString(self, text, length, fill=' ', align='<'): if not text: return fill * length # Replace accents and convert to upper + from unidecode import unidecode text = unidecode(unicode(text)) text = text.upper() ascii_string = text.encode('iso-8859-1') From 3f999fd7c12c4e43a219d860d938ce704b1e3340 Mon Sep 17 00:00:00 2001 From: agaldona Date: Mon, 23 Mar 2015 18:13:36 +0100 Subject: [PATCH 018/173] [IMP] l10n_es_aeat: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * unificar campos en el módulo base + migrar a la nueva api. * README.rst mejorado * mejora de código * usabilidad del atributo _aeat_number * secuencia automatica * control al instanciar los modelos * correcciones necesarias para el correcto funcionamiento de los módulos --- l10n_es_aeat/README.rst | 40 ++++ l10n_es_aeat/__init__.py | 2 +- l10n_es_aeat/__openerp__.py | 10 +- l10n_es_aeat/aeat_report.py | 145 ------------ l10n_es_aeat/data/aeat_sequence_type.xml | 9 + l10n_es_aeat/models/__init__.py | 21 ++ .../models/aeat_export_configuration.py | 87 +++++++ l10n_es_aeat/models/aeat_report.py | 175 ++++++++++++++ l10n_es_aeat/models/aeat_tax_code_mapping.py | 73 ++++++ .../views/aeat_export_configuration_view.xml | 107 +++++++++ l10n_es_aeat/{ => views}/aeat_menuitem.xml | 5 + .../views/aeat_tax_code_mapping_view.xml | 70 ++++++ l10n_es_aeat/{ => views}/aeat_view.xml | 18 +- l10n_es_aeat/wizard/export_to_boe.py | 213 ++++++++++++------ 14 files changed, 757 insertions(+), 218 deletions(-) create mode 100644 l10n_es_aeat/README.rst delete mode 100644 l10n_es_aeat/aeat_report.py create mode 100644 l10n_es_aeat/data/aeat_sequence_type.xml create mode 100644 l10n_es_aeat/models/__init__.py create mode 100644 l10n_es_aeat/models/aeat_export_configuration.py create mode 100644 l10n_es_aeat/models/aeat_report.py create mode 100644 l10n_es_aeat/models/aeat_tax_code_mapping.py create mode 100644 l10n_es_aeat/views/aeat_export_configuration_view.xml rename l10n_es_aeat/{ => views}/aeat_menuitem.xml (61%) create mode 100644 l10n_es_aeat/views/aeat_tax_code_mapping_view.xml rename l10n_es_aeat/{ => views}/aeat_view.xml (75%) diff --git a/l10n_es_aeat/README.rst b/l10n_es_aeat/README.rst new file mode 100644 index 00000000000..30c54c299f3 --- /dev/null +++ b/l10n_es_aeat/README.rst @@ -0,0 +1,40 @@ +AEAT Base +========= +Módulo base para declaraciones de la AEAT. +* Crea campos base de los modelos aeat. +* Especifica un esqueleto base para todos los modelos. +* Crea una secuencia automática para los registros diferenciando por modelo. +* La exportación del BOE. Define una exportación básica, definiendo los diferentes registros del fichero. + Genera el registro del declarante con los campos genericos de los modelos. + +Configuration +============= + +Todos aquellos modelos que se especifiquen en los módulos adicionales y hereden el AEAT base, deberán +definir una variable interna que se llame '_aeat_number' asignándole como valor, el nombre del modelo. + +Credits +======= + +Contributors +------------ + +* Pexego (http://www.pexego.es) +* Acysos (http://www.acysos.com) +* Pedro M. Baeza +* AvanzOSC (http://www.avanzosc.es) + +Maintainer +---------- + +.. image:: http://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: http://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/l10n_es_aeat/__init__.py b/l10n_es_aeat/__init__.py index e76f25c699a..262264acf96 100644 --- a/l10n_es_aeat/__init__.py +++ b/l10n_es_aeat/__init__.py @@ -18,5 +18,5 @@ # along with this program. If not, see . # ############################################################################## -from . import aeat_report +from . import models from . import wizard diff --git a/l10n_es_aeat/__openerp__.py b/l10n_es_aeat/__openerp__.py index 0ef690e1725..aceb0e82819 100644 --- a/l10n_es_aeat/__openerp__.py +++ b/l10n_es_aeat/__openerp__.py @@ -40,15 +40,15 @@ 'external_dependencies': { 'python': ['unidecode'], }, - 'description': """ -Módulo base para declaraciones de la AEAT. - """, 'data': [ 'security/aeat_security.xml', 'security/ir.model.access.csv', + 'data/aeat_sequence_type.xml', 'wizard/export_to_boe_wizard.xml', - 'aeat_menuitem.xml', - 'aeat_view.xml', + 'views/aeat_menuitem.xml', + 'views/aeat_view.xml', + 'views/aeat_export_configuration_view.xml', + 'views/aeat_tax_code_mapping_view.xml' ], 'installable': True, } diff --git a/l10n_es_aeat/aeat_report.py b/l10n_es_aeat/aeat_report.py deleted file mode 100644 index 4c326b4b7ac..00000000000 --- a/l10n_es_aeat/aeat_report.py +++ /dev/null @@ -1,145 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2004-2011 -# Pexego Sistemas Informáticos. (http://pexego.es) -# Luis Manuel Angueira Blanco (Pexego) -# Copyright (C) 2013 -# Ignacio Ibeas - Acysos S.L. (http://acysos.com) -# Migración a OpenERP 7.0 -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## -from openerp.tools.translate import _ -from openerp.osv import orm, fields -from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT -import time -import re - - -class L10nEsAeatReport(orm.Model): - _name = "l10n.es.aeat.report" - _description = "AEAT report base module" - - def on_change_company_id(self, cr, uid, ids, company_id): - """ - Loads some company data (the VAT number) when the selected - company changes. - """ - company_vat = '' - if company_id: - company = self.pool['res.company'].browse(cr, uid, company_id) - if company.partner_id and company.partner_id.vat: - # Remove the ES part from spanish vat numbers - # (ES12345678Z => 12345678Z) - company_vat = re.match("(ES){0,1}(.*)", - company.partner_id.vat).groups()[1] - return {'value': {'company_vat': company_vat}} - - _columns = { - 'company_id': fields.many2one( - 'res.company', 'Company', required=True, readonly=True, - states={'draft': [('readonly', False)]}), - 'number': fields.char('Declaration number', size=13, required=True, - readonly=True), - 'previous_number': fields.char('Previous declaration number', - size=13, - states={'done': [('readonly', True)]}), - 'representative_vat': fields.char( - 'L.R. VAT number', size=9, help="Legal Representative VAT number.", - states={'confirmed': [('readonly', True)]}), - 'fiscalyear_id': fields.many2one( - 'account.fiscalyear', 'Fiscal year', required=True, readonly=True, - states={'draft': [('readonly', False)]}), - 'company_vat': fields.char( - 'VAT number', size=9, required=True, readonly=True, - states={'draft': [('readonly', False)]}), - 'type': fields.selection([('N', 'Normal'), - ('C', 'Complementary'), - ('S', 'Substitutive')], - 'Statement Type', - states={'calculated': [('required', True)], - 'done': [('readonly', True)]}), - 'support_type': fields.selection( - [('C', 'DVD'), - ('T', 'Telematics')], - 'Support Type', states={'calculated': [('required', True)], - 'done': [('readonly', True)]}), - 'calculation_date': fields.datetime("Calculation date"), - 'state': fields.selection([('draft', 'Draft'), - ('calculated', 'Processed'), - ('done', 'Done'), - ('cancelled', 'Cancelled')], - 'State', readonly=True), - } - - _defaults = { - 'company_id': (lambda self, cr, uid, context=None: - self.pool['res.company']._company_default_get( - cr, uid, 'l10n.es.aeat.report', context=context)), - 'type': 'N', - 'support_type': 'T', - 'state': 'draft', - } - - def button_calculate(self, cr, uid, ids, context=None): - res = self.calculate(cr, uid, ids, context=context) - self.write( - cr, uid, ids, - {'state': 'calculated', - 'calculation_date': time.strftime( - DEFAULT_SERVER_DATETIME_FORMAT)}) - return res - - def button_recalculate(self, cr, uid, ids, context=None): - self.write( - cr, uid, ids, - {'calculation_date': time.strftime( - DEFAULT_SERVER_DATETIME_FORMAT)}) - return self.calculate(cr, uid, ids, context=context) - - def calculate(self, cr, uid, ids, context=None): - return True - - def button_confirm(self, cr, uid, ids, context=None): - """Set report status to done.""" - self.write(cr, uid, ids, {'state': 'done'}, context=context) - return True - - def button_cancel(self, cr, uid, ids, context=None): - """Set report status to cancelled.""" - self.write(cr, uid, ids, {'state': 'cancelled'}, context=context) - return True - - def button_recover(self, cr, uid, ids, context=None): - """Set report status to draft and reset calculation date.""" - self.write(cr, uid, ids, {'state': 'draft', 'calculation_date': None}) - return True - - def button_export(self, cr, uid, ids, context=None): - for report in self.browse(cr, uid, ids, context=context): - export_obj = self.pool["l10n.es.aeat.report.%s.export_to_boe" % - report.number] - export_obj.export_boe_file(cr, uid, report, context=context) - return True - - def unlink(self, cr, uid, ids, context=None): - for item in self.browse(cr, uid, ids): - if item.state not in ['draft', 'cancelled']: - raise orm.except_orm(_('Error!'), - _("Only reports in 'draft' or " - "'cancelled' state can be removed")) - return super(L10nEsAeatReport, self).unlink(cr, uid, ids, - context=context) diff --git a/l10n_es_aeat/data/aeat_sequence_type.xml b/l10n_es_aeat/data/aeat_sequence_type.xml new file mode 100644 index 00000000000..03f79b620ce --- /dev/null +++ b/l10n_es_aeat/data/aeat_sequence_type.xml @@ -0,0 +1,9 @@ + + + + + Aeat Sequence + aeat.sequence.type + + + diff --git a/l10n_es_aeat/models/__init__.py b/l10n_es_aeat/models/__init__.py new file mode 100644 index 00000000000..91da779d320 --- /dev/null +++ b/l10n_es_aeat/models/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from . import aeat_report +from . import aeat_export_configuration +from . import aeat_tax_code_mapping diff --git a/l10n_es_aeat/models/aeat_export_configuration.py b/l10n_es_aeat/models/aeat_export_configuration.py new file mode 100644 index 00000000000..6320084f31b --- /dev/null +++ b/l10n_es_aeat/models/aeat_export_configuration.py @@ -0,0 +1,87 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# 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/. +# +############################################################################## + +from openerp import models, fields, api + + +class AeatModelExportConfig(models.Model): + + _name = 'aeat.model.export.config' + + name = fields.Char(string='Name') + model_number = fields.Char(string='Model number', size=3) + model = fields.Many2one('ir.model', 'Odoo Model') + date_start = fields.Date(string='Start date') + date_end = fields.Date(string='End date') + config_lines = fields.One2many('aeat.model.export.config.line', + 'export_config_id', string='Lines') + + +class AeatModelExportConfigLine(models.Model): + + _name = 'aeat.model.export.config.line' + _order = 'sequence' + + sequence = fields.Integer("Sequence") + export_config_id = fields.Many2one('aeat.model.export.config', + string='Config parent') + name = fields.Char(string="Name") + repeat = fields.Boolean(string='Repeat') + sub_config = fields.Many2one('aeat.model.export.config', 'Subconfig') + position = fields.Integer("First character position") + export_type = fields.Selection([('string', 'Alphanumeric'), + ('float', 'Number with decimals'), + ('integer', 'Number without decimals'), + ('boolean', 'Boolean')], default='string', + string="Export field type") + apply_sign = fields.Boolean("Apply sign") + sign = fields.Char("Sign character", size=1, default='N') + size = fields.Integer("Field size") + alignment = fields.Selection([('left', 'Left'), ('right', 'Right')], + default='left', string="Alignment") + bool_no = fields.Char("No value", size=1, default=' ') + bool_yes = fields.Char("Yes value", size=1, default='X') + decimal_size = fields.Integer("Number of char for decimals", default=0) + expression = fields.Text('Expression') + fixed_value = fields.Char('Fixed Value') + + @api.one + @api.onchange('export_type') + def onchange_type(self): + if self.export_type: + self.sub_config = False + self.repeat = False + if self.export_type == 'float': + self.decimal_size = 2 + self.alignment = 'right' + elif self.export_type == 'integer': + self.decimal_size = 0 + self.alignment = 'right' + elif self.export_type in ('string', 'boolean'): + self.alignment = 'left' + self.decimal_size = 0 + self.apply_sign = False + + @api.one + @api.onchange('sub_config') + def onchange_subconfig(self): + if self.sub_config: + self.export_type = False + self.decimal_size = 0 + self.alignment = False + self.apply_sign = False diff --git a/l10n_es_aeat/models/aeat_report.py b/l10n_es_aeat/models/aeat_report.py new file mode 100644 index 00000000000..f698ec4dea0 --- /dev/null +++ b/l10n_es_aeat/models/aeat_report.py @@ -0,0 +1,175 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2004-2011 +# Pexego Sistemas Informáticos. (http://pexego.es) +# Luis Manuel Angueira Blanco (Pexego) +# Copyright (C) 2013 +# Ignacio Ibeas - Acysos S.L. (http://acysos.com) +# Migración a OpenERP 7.0 +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from openerp import fields, models, api, exceptions, _ +from openerp import SUPERUSER_ID +import re + + +class L10nEsAeatReport(models.AbstractModel): + _name = "l10n.es.aeat.report" + _description = "AEAT report base module" + + def _default_company(self): + company_obj = self.env['res.company'] + return company_obj._company_default_get('l10n.es.aeat.report') + + @api.onchange('company_id') + def on_change_company_id(self): + """ + Loads some company data (the VAT number) when the selected + company changes. + """ + comp_vat = '' + if self.company_id: + if self.company_id.partner_id and self.company_id.partner_id.vat: + # Remove the ES part from spanish vat numbers + # (ES12345678Z => 12345678Z) + comp_vat = re.match("(ES){0,1}(.*)", + self.company_id.partner_id.vat).groups()[1] + self.company_vat = comp_vat + + company_id = fields.Many2one( + 'res.company', string='Company', required=True, readonly=True, + default=_default_company, states={'draft': [('readonly', False)]}) + company_vat = fields.Char( + string='VAT number', size=9, required=True, readonly=True, + states={'draft': [('readonly', False)]}) + phone = fields.Char( + string="Phone", size=9, states={'calculated': [('required', True)], + 'confirmed': [('readonly', True)]}) + number = fields.Char(string='Declaration number', size=13, + required=True, readonly=True) + previous_number = fields.Char( + string='Previous declaration number', size=13, + states={'done': [('readonly', True)]}) + contact_name = fields.Char( + string="Full Name", size=40, help="Must have name and surname.", + states={'calculated': [('required', True)], + 'confirmed': [('readonly', True)]}) + contact_phone = fields.Char( + string="Phone", size=9, states={'calculated': [('required', True)], + 'confirmed': [('readonly', True)]}) + representative_vat = fields.Char( + string='L.R. VAT number', size=9, + help="Legal Representative VAT number.", + states={'confirmed': [('readonly', True)]}) + fiscalyear_id = fields.Many2one( + 'account.fiscalyear', string='Fiscal year', required=True, + readonly=True, states={'draft': [('readonly', False)]}) + type = fields.Selection( + [('N', 'Normal'), ('C', 'Complementary'), ('S', 'Substitutive')], + string='Statement Type', default='N', + states={'calculated': [('required', True)], + 'done': [('readonly', True)]}) + support_type = fields.Selection( + [('C', 'DVD'), ('T', 'Telematics')], string='Support Type', + default='T', states={'calculated': [('required', True)], + 'done': [('readonly', True)]}) + calculation_date = fields.Datetime(string="Calculation date") + state = fields.Selection( + [('draft', 'Draft'), ('calculated', 'Processed'), ('done', 'Done'), + ('cancelled', 'Cancelled')], string='State', readonly=True, + default='draft') + sequence = fields.Char(string="Sequence", size=16) + export_config = fields.Many2one('aeat.model.export.config', + string='Export config') + + @api.model + def create(self, values): + seq_obj = self.env['ir.sequence'] + sequence = "aeat%s-sequence" % self._model._aeat_number + seq = seq_obj.next_by_id(seq_obj.search([('name', '=', sequence)]).id) + values['sequence'] = seq + return super(L10nEsAeatReport, self).create(values) + + @api.multi + def button_calculate(self): + res = self.calculate() + self.write({'state': 'calculated', + 'calculation_date': fields.Datetime.now()}) + return res + + @api.multi + def button_recalculate(self): + self.write({'calculation_date': fields.Datetime.now()}) + return self.calculate() + + @api.multi + def calculate(self): + return True + + @api.multi + def button_confirm(self): + """Set report status to done.""" + self.write({'state': 'done'}) + return True + + @api.multi + def button_cancel(self): + """Set report status to cancelled.""" + self.write({'state': 'cancelled'}) + return True + + @api.multi + def button_recover(self): + """Set report status to draft and reset calculation date.""" + self.write({'state': 'draft', 'calculation_date': None}) + return True + + @api.multi + def button_export(self): + for report in self: + export_obj = self.env["l10n.es.aeat.report.%s.export_to_boe" % + report.number] + export_obj.export_boe_file(report) + return True + + @api.multi + def unlink(self): + if any(item.state not in ['draft', 'cancelled'] for item in self): + raise exceptions.Warning(_("Only reports in 'draft' or " + "'cancelled' state can be removed")) + return super(L10nEsAeatReport, self).unlink() + + def init(self, cr): + seq_obj = self.pool['ir.sequence'] + try: + aeat_num = getattr(self, '_aeat_number') + sequence = "aeat%s-sequence" % aeat_num + if not seq_obj.search(cr, SUPERUSER_ID, [('name', '=', sequence)]): + seq_vals = {'name': sequence, + 'code': 'aeat.sequence.type', + 'number_increment': 1, + 'implementation': 'standard', + 'padding': 5, + 'number_next_actual': 1, + 'prefix': aeat_num + '-' + } + seq_obj.create(cr, SUPERUSER_ID, seq_vals) + except: + if self._name != 'l10n.es.aeat.report': + raise exceptions.Warning( + "Modelo no válido: %s. Debe declarar una variable " + "'_aeat_number'" % self) diff --git a/l10n_es_aeat/models/aeat_tax_code_mapping.py b/l10n_es_aeat/models/aeat_tax_code_mapping.py new file mode 100644 index 00000000000..8dfad0ecb40 --- /dev/null +++ b/l10n_es_aeat/models/aeat_tax_code_mapping.py @@ -0,0 +1,73 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from openerp import models, fields, api, exceptions, _ + + +class AeatModMapTaxCode(models.Model): + _name = 'aeat.mod.map.tax.code' + + date_from = fields.Date(string="From Date") + date_to = fields.Date(string="To Date") + map_lines = fields.One2many('aeat.mod.map.tax.code.line', 'map_parent_id', + string="Map lines") + model = fields.Char("Aeat Model", size=3) + + @api.one + @api.constrains('date_from', 'date_to') + def _unique_date_range(self): + domain = [('id', '!=', self.id)] + if self.date_from and self.date_to: + domain += ['|', '&', + ('date_from', '<=', self.date_to), + ('date_from', '>=', self.date_from), + '|', '&', + ('date_to', '<=', self.date_to), + ('date_to', '>=', self.date_from), + '|', '&', + ('date_from', '=', False), + ('date_to', '>=', self.date_from), + '|', '&', + ('date_to', '=', False), + ('date_from', '<=', self.date_to), + ] + elif self.date_from: + domain += [('date_to', '>=', self.date_from)] + elif self.date_to: + domain += [('date_from', '<=', self.date_to)] + date_lst = self.search(domain) + if date_lst: + raise exceptions.Warning( + _("Error! The dates of the record overlap with an existing " + "record.")) + + +class AeatModMapTaxCodeLine(models.Model): + _name = 'aeat.mod.map.tax.code.line' + + field_number = fields.Integer(string="Field number") + tax_code = fields.Many2one('account.tax.code.template', string="Tax code") + map_parent_id = fields.Many2one('aeat.mod.map.tax.code') + + @api.multi + def name_get(self): + vals = [] + for record in self: + name = "Field: " + str(record.field_number) + ' Code: ' + \ + str(record.tax_code.code) + vals.append(tuple([record.id, name])) + return vals diff --git a/l10n_es_aeat/views/aeat_export_configuration_view.xml b/l10n_es_aeat/views/aeat_export_configuration_view.xml new file mode 100644 index 00000000000..90460d7c453 --- /dev/null +++ b/l10n_es_aeat/views/aeat_export_configuration_view.xml @@ -0,0 +1,107 @@ + + + + + + aeat.model.export.config.tree + aeat.model.export.config + + + + + + + + + + + + aeat.model.export.config.form + aeat.model.export.config + +
+ + + + + + + + + + + + + +
+ + + aeat.model.export.config.line.tree + aeat.model.export.config.line + + + + + + + + + + + + + + aeat.model.export.config.line.form + aeat.model.export.config.line + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + Export config + aeat.model.export.config + form + tree,form + + + + +
+
diff --git a/l10n_es_aeat/aeat_menuitem.xml b/l10n_es_aeat/views/aeat_menuitem.xml similarity index 61% rename from l10n_es_aeat/aeat_menuitem.xml rename to l10n_es_aeat/views/aeat_menuitem.xml index 0e551b129e0..c3dea9d00ad 100644 --- a/l10n_es_aeat/aeat_menuitem.xml +++ b/l10n_es_aeat/views/aeat_menuitem.xml @@ -7,5 +7,10 @@ parent="account.menu_finance_legal_statement" name="AEAT reports"/> + + diff --git a/l10n_es_aeat/views/aeat_tax_code_mapping_view.xml b/l10n_es_aeat/views/aeat_tax_code_mapping_view.xml new file mode 100644 index 00000000000..7852b98701a --- /dev/null +++ b/l10n_es_aeat/views/aeat_tax_code_mapping_view.xml @@ -0,0 +1,70 @@ + + + + + + aeat.mod.map.tax.code.tree + aeat.mod.map.tax.code + + + + + + + + + + + aeat.mod.map.tax.code.form + aeat.mod.map.tax.code + +
+ + + + + + + + + +
+ + + aeat.mod.map.tax.code.line.tree + aeat.mod.map.tax.code.line + + + + + + + + + + aeat.mod.map.tax.code.line.form + aeat.mod.map.tax.code.line + +
+ + + + +
+
+
+ + + Tax code mapping + aeat.mod.map.tax.code + form + tree,form + + + + +
+
diff --git a/l10n_es_aeat/aeat_view.xml b/l10n_es_aeat/views/aeat_view.xml similarity index 75% rename from l10n_es_aeat/aeat_view.xml rename to l10n_es_aeat/views/aeat_view.xml index cc88af4150a..0d766de3815 100644 --- a/l10n_es_aeat/aeat_view.xml +++ b/l10n_es_aeat/views/aeat_view.xml @@ -32,12 +32,26 @@ + - + + + + + + - + + + + + + + + + diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py index 6ad5ff18a5c..1b0b44f2f5d 100644 --- a/l10n_es_aeat/wizard/export_to_boe.py +++ b/l10n_es_aeat/wizard/export_to_boe.py @@ -24,26 +24,22 @@ # ############################################################################## import base64 -import time -from openerp.osv import orm, fields -from openerp.tools.translate import _ -from openerp.tools import DEFAULT_SERVER_DATE_FORMAT +from openerp import tools +import re +from openerp.tools.safe_eval import safe_eval as eval +from openerp import models, fields, api, _ +EXPRESSION_PATTERN = re.compile('(\$\{.+?\})') -class L10nEsAeatReportExportToBoe(orm.TransientModel): + +class L10nEsAeatReportExportToBoe(models.TransientModel): _name = "l10n.es.aeat.report.export_to_boe" _description = "Export Report to BOE Format" - _columns = { - 'name': fields.char('File name', readonly=True), - 'data': fields.binary('File', readonly=True), - 'state': fields.selection([('open', 'open'), # open wizard - ('get', 'get')]), # get file - } - - _defaults = { - 'state': 'open', - } + name = fields.Char(string='File name', readonly=True) + data = fields.Binary(string='File', readonly=True) + state = fields.Selection([('open', 'open'), ('get', 'get')], + string="State", default='open') def _formatString(self, text, length, fill=' ', align='<'): """ @@ -58,7 +54,6 @@ def _formatString(self, text, length, fill=' ', align='<'): valor ASCII 209 (Hex. D1) y la “Ç”(cedilla mayúscula) el valor ASCII 199 (Hex. C7).' """ - if not text: return fill * length # Replace accents and convert to upper @@ -127,77 +122,165 @@ def _formatBoolean(self, value, yes='X', no=' '): """ return value and yes or no - def _get_formatted_declaration_record(self, cr, uid, report, context=None): - return '' + @api.multi + def _get_formatted_declaration_record(self, report): + """ + Returns a type 1, declaration/company, formated record. + Format of the record: + Tipo registro 1 – Registro de declarante: + Posiciones Descripción + 1 Tipo de Registro + 2-4 Modelo Declaración + 5-8 Ejercicio + 9-17 NIF del declarante + 18-57 Apellidos y nombre o razón social del declarante + 58 Tipo de soporte + 59-67 Teléfono contacto + 68-107 Apellidos y nombre contacto + 108-120 Número identificativo de la declaración + 121-122 Declaración complementaria o substitutiva + 123-135 Número identificativo de la declaración anterior + """ + text = '' + # Tipo de Registro + text += '1' + # Modelo Declaración + text += getattr(report._model, '_aeat_number') + # Ejercicio + text += self._formatString(report.fiscalyear_id.code, 4) + # NIF del declarante + text += self._formatString(report.company_vat, 9) + # Apellidos y nombre o razón social del declarante + text += self._formatString(report.company_id.name, 40) + # Tipo de soporte + text += self._formatString(report.support_type, 1) + # Persona de contacto (Teléfono) + text += self._formatString(report.contact_phone, 9) + # Persona de contacto (Apellidos y nombre) + text += self._formatString(report.contact_name, 40) + # Número identificativo de la declaración + text += self._formatNumber(report.number, 13) + # Declaración complementaria + text += self._formatString(report.type, 2).replace('N', ' ') + # Número identificativo de la declaración anterior + text += self._formatNumber(report.previous_number, 13) + return text - def _get_formatted_main_record(self, cr, uid, report, context=None): + @api.multi + def _get_formatted_main_record(self, record): return '' - def _get_formatted_other_records(self, cr, uid, report, context=None): + @api.multi + def _get_formatted_other_records(self, record): return '' - def _do_global_checks(self, report, contents, context=None): + @api.multi + def _do_global_checks(self, record, contents): return True - def action_get_file(self, cr, uid, ids, context=None): + @api.multi + def action_get_file(self): """ Action that exports the data into a BOE formatted text file. @return: Action dictionary for showing exported file. """ - if not context.get('active_id') or not context.get('active_model'): + active_id = self.env.context.get('active_id', False) + active_model = self.env.context.get('active_model', False) + if not active_id or not active_model: return False - report = self.pool[context['active_model']].browse( - cr, uid, - context['active_id'], context=context - ) + report = self.env[active_model].browse(active_id) contents = '' - # Add header record - contents += self._get_formatted_declaration_record(cr, uid, report, - context=context) - # Add main record - contents += self._get_formatted_main_record(cr, uid, report, - context=context) - # Adds other fields - contents += self._get_formatted_other_records(cr, uid, report, - context=context) - # Generate the file and save as attachment + if report.export_config: + contents += self.action_get_file_from_config(report) + else: + # Add header record + contents += self._get_formatted_declaration_record(report) + # Add main record + contents += self._get_formatted_main_record(report) + # Adds other fields + contents += self._get_formatted_other_records(report) + # Generate the file and save as attachment file = base64.encodestring(contents) - file_name = _("%s_report_%s.txt") % ( - report.number, - time.strftime(_(DEFAULT_SERVER_DATE_FORMAT)) - ) + file_name = _("%s_report_%s.txt") % (report.number, + fields.Date.today()) # Delete old files - attachment_obj = self.pool['ir.attachment'] + attachment_obj = self.env['ir.attachment'] attachment_ids = attachment_obj.search( - cr, uid, - [ - ('name', '=', file_name), - ('res_model', '=', report._model._name) - ], context=context) - if attachment_ids: - attachment_obj.unlink(cr, uid, attachment_ids, context=context) - attachment_obj.create(cr, uid, { - "name": file_name, - "datas": file, - "datas_fname": file_name, - "res_model": report._model._name, - "res_id": report.id, - }, context=context) - self.write(cr, uid, ids, - {'state': 'get', 'data': file, 'name': file_name}, - context=context) + [('name', '=', file_name), + ('res_model', '=', report._model._name)]) + attachment_ids.unlink() + attachment_obj.create({"name": file_name, + "datas": file, + "datas_fname": file_name, + "res_model": report._model._name, + "res_id": report.id, + }) + self.write({'state': 'get', 'data': file, 'name': file_name}) # Force view to be the parent one - data_obj = self.pool['ir.model.data'] - result = data_obj._get_id(cr, uid, 'l10n_es_aeat', - 'wizard_aeat_export') - view_id = data_obj.browse(cr, uid, result, context=context).res_id + data_obj = self.env.ref('l10n_es_aeat.wizard_aeat_export') # TODO: Permitir si se quiere heredar la vista padre return { 'type': 'ir.actions.act_window', 'res_model': self._name, 'view_mode': 'form', 'view_type': 'form', - 'view_id': [view_id], - 'res_id': ids[0], + 'view_id': [data_obj.id], + 'res_id': self.id, 'target': 'new', } + + @api.multi + def action_get_file_from_config(self, report): + contents = '' + for line in report.export_config.config_lines: + if line.position and (len(contents) + 1 < line.position): + contents = self._formatString(contents, + (line.position - 1)) + contents += self._export_line_process(report, line) + return contents + + @api.multi + def _export_line_process(self, obj, line): + def merge(match): + exp = str(match.group()[2:-1]).strip() + result = eval(exp, { + 'user': self.env.user, + 'object': obj, + # copy context to prevent side-effects of eval + 'context': self.env.context.copy(), + }) + return result and tools.ustr(result) or '' + val = '' + field_val = False + if line.fixed_value: + field_val = line.fixed_value + elif line.expression: + field_val = line.expression and \ + EXPRESSION_PATTERN.sub(merge, line.expression) or False + if line.repeat: + for report_line in field_val: + if line.sub_config: + for subline in line.sub_config.config_lines: + val += self._export_line_process(report_line, subline) + else: + if line.sub_config: + for subline in line.sub_config.config_lines: + val += self._export_line_process(obj, subline) + else: + val += self._export_simple_record(line, field_val) + return val + + @api.multi + def _export_simple_record(self, line, val): + if line.export_type == 'string': + align = '<' + if line.alignment == 'right': + align = '>' + return self._formatString(val or '', line.size, align=align) + elif line.export_type == 'boolean': + return self._formatBoolean(val, line.bool_yes, line.bool_no) + else: + return self._formatNumber(val or 0, + (line.size - line.decimal_size - + (line.apply_sign and 1 or 0)), + line.decimal_size, line.apply_sign) From f48be085b50f7b124bfe46adc8d70c469c528b17 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 25 Jun 2015 18:31:47 +0200 Subject: [PATCH 019/173] [FIX] l10n_es_aeat_*: PEP8 + Refinamientos varios --- l10n_es_aeat/README.rst | 30 +- l10n_es_aeat/__openerp__.py | 10 +- l10n_es_aeat/i18n/es.po | 705 +++++++++++++----- l10n_es_aeat/i18n/l10n_es_aeat.pot | 592 ++++++++++++--- l10n_es_aeat/models/aeat_report.py | 62 +- l10n_es_aeat/models/aeat_tax_code_mapping.py | 19 +- l10n_es_aeat/security/aeat_security.xml | 2 +- l10n_es_aeat/security/ir.model.access.csv | 8 + .../views/aeat_export_configuration_view.xml | 14 +- l10n_es_aeat/views/aeat_menuitem.xml | 15 +- .../views/aeat_tax_code_mapping_view.xml | 12 +- l10n_es_aeat/views/aeat_view.xml | 11 +- l10n_es_aeat/wizard/export_to_boe.py | 11 +- 13 files changed, 1106 insertions(+), 385 deletions(-) diff --git a/l10n_es_aeat/README.rst b/l10n_es_aeat/README.rst index 30c54c299f3..9e4c83e33d5 100644 --- a/l10n_es_aeat/README.rst +++ b/l10n_es_aeat/README.rst @@ -1,23 +1,31 @@ AEAT Base ========= -Módulo base para declaraciones de la AEAT. -* Crea campos base de los modelos aeat. -* Especifica un esqueleto base para todos los modelos. + +Módulo base para declaraciones de la AEAT, que incluye: + +* Campos base para todo los modelos AEAT. +* Vista base para todos los modelos. * Crea una secuencia automática para los registros diferenciando por modelo. -* La exportación del BOE. Define una exportación básica, definiendo los diferentes registros del fichero. - Genera el registro del declarante con los campos genericos de los modelos. +* Exportación del BOE. Define una exportación básica, con los diferentes + registros del fichero. +* Generación del registro del declarante con los campos genéricos de los + modelos. +* Motor de exportación paramétrica basado en una configuración que puede ser + introducida por datos XML o por interfaz. +* Motor de cálculo de importes por códigos de impuestos. Configuration ============= -Todos aquellos modelos que se especifiquen en los módulos adicionales y hereden el AEAT base, deberán -definir una variable interna que se llame '_aeat_number' asignándole como valor, el nombre del modelo. +Todos aquellos modelos que se especifiquen en los módulos adicionales y +hereden el AEAT base, deberán definir una variable interna que se llame +'_aeat_number' asignándole como valor, el número del modelo (130, 340, 347...). -Credits -======= +Créditos +======== -Contributors ------------- +Contribudores +------------- * Pexego (http://www.pexego.es) * Acysos (http://www.acysos.com) diff --git a/l10n_es_aeat/__openerp__.py b/l10n_es_aeat/__openerp__.py index aceb0e82819..64169526902 100644 --- a/l10n_es_aeat/__openerp__.py +++ b/l10n_es_aeat/__openerp__.py @@ -26,14 +26,18 @@ { 'name': "AEAT Base", 'version': "1.1", - 'author': "Pexego,Odoo Community Association (OCA)", + 'author': "Pexego," + "Serv. Tecnol. Avanzados - Pedro M. Baeza," + "AvanzOSC," + "Odoo Community Association (OCA)", 'license': "AGPL-3", 'contributors': [ 'Ignacio Ibeas (Acysos S.L.)', + 'Ainara Galdona', 'Pedro M. Baeza ', ], - 'website': "http://www.pexego.es, http://www.acysos.com", - 'category': "Localisation/Accounting", + 'website': "https://github.com/OCA/l10n-spain", + 'category': "Accounting & Finance", 'depends': [ "account", ], diff --git a/l10n_es_aeat/i18n/es.po b/l10n_es_aeat/i18n/es.po index 1be5739625c..5fe7a967aef 100644 --- a/l10n_es_aeat/i18n/es.po +++ b/l10n_es_aeat/i18n/es.po @@ -1,41 +1,41 @@ -# Translation of OpenERP Server. +# Translation of Odoo Server. # This file contains the translation of the following modules: # * l10n_es_aeat # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" +"Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-23 16:16+0000\n" -"PO-Revision-Date: 2014-02-04 03:04+0000\n" -"Last-Translator: Alejandro Santana \n" +"POT-Creation-Date: 2015-06-25 18:26+0000\n" +"PO-Revision-Date: 2015-06-25 18:26+0000\n" +"Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-06-22 05:56+0000\n" -"X-Generator: Launchpad (build 17058)\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" #. module: l10n_es_aeat -#: model:ir.actions.act_window,name:l10n_es_aeat.action_wizard_aeat_export -#: view:l10n.es.aeat.report.export_to_boe:0 -msgid "Export AEAT BOE file" -msgstr "Exportar archivo AEAT BOE" +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:203 +#, python-format +msgid "%s_report_%s.txt" +msgstr "%s_report_%s.txt" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "Confirmed models" -msgstr "Declaraciones confirmadas" +#: model:ir.ui.menu,name:l10n_es_aeat.menu_l10n_es_aeat_config +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +msgid "AEAT" +msgstr "AEAT" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "Calculate" -msgstr "Calcular" +#: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_form +msgid "AEAT export configuration line" +msgstr "Línea de configuración de exportación de la AEAT" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "Confirm" -msgstr "Confirmar" +#: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_tree +msgid "AEAT export configurationline" +msgstr "Línea de configuración de exportación de la AEAT" #. module: l10n_es_aeat #: model:res.groups,name:l10n_es_aeat.group_account_aeat @@ -43,170 +43,329 @@ msgid "AEAT manager" msgstr "Responsable AEAT" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,support_type:0 -msgid "DVD" -msgstr "DVD" +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_tree +msgid "AEAT report" +msgstr "Informe AEAT" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "In process" -msgstr "En proceso" +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report +msgid "AEAT report base module" +msgstr "Módulo base para declaraciones AEAT" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "Cancelled models" -msgstr "Declaraciones canceladas" +#: sql_constraint:l10n.es.aeat.report:0 +msgid "AEAT report sequence must be unique" +msgstr "La secuencia de la declaración AEAT debe ser única" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,state:0 -msgid "State" -msgstr "Estado" +#: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat +msgid "AEAT reports" +msgstr "Declaraciones AEAT" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -#: selection:l10n.es.aeat.report,state:0 -msgid "Draft" -msgstr "Borrador" +#: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_form +msgid "Advanced configuration" +msgstr "Configuración avanzada" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "Declaración" -msgstr "Declaración" +#: field:aeat.mod.map.tax.code,model:0 +msgid "Aeat Model" +msgstr "Modelo AEAT" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report.export_to_boe,state:0 -msgid "open" -msgstr "abierto" +#: field:aeat.model.export.config.line,alignment:0 +msgid "Alignment" +msgstr "Alineación" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:114 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:119 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:154 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:159 -#, python-format -msgid "The formated string must match the given length" -msgstr "La cadena formateada debe satisfacer el tamaño dado." +#: selection:aeat.model.export.config.line,export_type:0 +msgid "Alphanumeric" +msgstr "Alfanumérico" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "AEAT report" -msgstr "Informe AEAT" +#: field:aeat.model.export.config.line,apply_sign:0 +msgid "Apply sign" +msgstr "Aplicar signo" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,type:0 -msgid "Complementary" -msgstr "Complementaria" +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Aquí está el archivo BOE de la AEAT exportado:" +msgstr "Aquí está el archivo BOE de la AEAT exportado:" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "AEAT" -msgstr "AEAT" +#: view:aeat.model.export.config:l10n_es_aeat.aeat_model_export_config_form +#: model:ir.ui.menu,name:l10n_es_aeat.menu_aeat_export_config +msgid "BOE export configuration" +msgstr "Configuración de exportación a BOE" + +#. module: l10n_es_aeat +#: view:aeat.model.export.config:l10n_es_aeat.aeat_model_export_config_tree +msgid "BOE export configurations" +msgstr "Configuraciones de exportación a BOE" + +#. module: l10n_es_aeat +#: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_form +msgid "Basic configuration" +msgstr "Configuración básica" + +#. module: l10n_es_aeat +#: selection:aeat.model.export.config.line,export_type:0 +msgid "Boolean" +msgstr "Booleano" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +msgid "Calculate" +msgstr "Calcular" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,calculation_date:0 +msgid "Calculation date" +msgstr "Fecha de cálculo" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Cancel" +msgstr "Cancelar" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +#: selection:l10n.es.aeat.report,state:0 +msgid "Cancelled" +msgstr "Cancelada" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +msgid "Cancelled models" +msgstr "Declaraciones canceladas" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Close" +msgstr "Cerrar" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search #: field:l10n.es.aeat.report,company_id:0 msgid "Company" msgstr "Compañía" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report.export_to_boe:0 -msgid "Export completed" -msgstr "Export completed" +#: selection:l10n.es.aeat.report,type:0 +msgid "Complementary" +msgstr "Complementaria" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:110 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:115 +#: field:aeat.model.export.config.line,export_config_id:0 +msgid "Config parent" +msgstr "Configuración padre" + +#. module: l10n_es_aeat +#: view:aeat.model.export.config:l10n_es_aeat.aeat_model_export_config_form +msgid "Configuration lines" +msgstr "Líneas de configuración" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +msgid "Confirm" +msgstr "Confirmar" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +msgid "Confirmed models" +msgstr "Declaraciones confirmadas" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +msgid "Contact data" +msgstr "Datos de contacto" + +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code,create_uid:0 +#: field:aeat.mod.map.tax.code.line,create_uid:0 +#: field:aeat.model.export.config,create_uid:0 +#: field:aeat.model.export.config.line,create_uid:0 +#: field:l10n.es.aeat.report.export_to_boe,create_uid:0 +msgid "Created by" +msgstr "Creado por" + +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code,create_date:0 +#: field:aeat.mod.map.tax.code.line,create_date:0 +#: field:aeat.model.export.config,create_date:0 +#: field:aeat.model.export.config.line,create_date:0 +#: field:l10n.es.aeat.report.export_to_boe,create_date:0 +msgid "Created on" +msgstr "Creado en" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,support_type:0 +msgid "DVD" +msgstr "DVD" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +msgid "Declaración" +msgstr "Declaración" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,number:0 +msgid "Declaration number" +msgstr "Nº declaración" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +#: selection:l10n.es.aeat.report,state:0 +msgid "Done" +msgstr "Realizada" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +#: selection:l10n.es.aeat.report,state:0 +msgid "Draft" +msgstr "Borrador" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +msgid "Draft models" +msgstr "Declaraciones borrador" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config,date_end:0 +msgid "End date" +msgstr "Fecha final" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/models/aeat_tax_code_mapping.py:55 #, python-format -msgid "Wrong aling option. It should be < or >" -msgstr "Opción de alineamiento errónea. Debería ser < o >" +msgid "Error! The dates of the record overlap with an existing record." +msgstr "Error! Las fechas de los registro se solapan con un registro existente." #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report -msgid "AEAT report base module" -msgstr "Módulo base para declaraciones AEAT" +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Export" +msgstr "Exportar" #. module: l10n_es_aeat -#: help:l10n.es.aeat.report,representative_vat:0 -msgid "Legal Representative VAT number." -msgstr "NIF del representante legal." +#: model:ir.actions.act_window,name:l10n_es_aeat.action_wizard_aeat_export +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Export AEAT BOE file" +msgstr "Exportar archivo AEAT BOE" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,previous_number:0 -msgid "Previous declaration number" -msgstr "Nº previo de declaración" +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report_export_to_boe +msgid "Export Report to BOE Format" +msgstr "Exportar a formato BOE" + +#. module: l10n_es_aeat +#: model:ir.actions.act_window,name:l10n_es_aeat.action_aeat_export_config +#: field:l10n.es.aeat.report,export_config:0 +msgid "Export config" +msgstr "Configuración de exportación" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 +#: field:aeat.model.export.config.line,export_type:0 +msgid "Export field type" +msgstr "Tipo de campo de exportación" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form msgid "Export to BOE" msgstr "Exportar a BOE" -#: view:l10n.es.aeat.report.export_to_boe:0 -msgid "Export" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Exportación completada" +msgstr "Exportación completada" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Exportar" msgstr "Exportar" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,company_vat:0 -msgid "VAT number" -msgstr "NIF" +#: field:aeat.model.export.config.line,expression:0 +msgid "Expression" +msgstr "Expresión" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:125 -#, python-format -msgid "Only reports in 'draft' or 'cancel' state can be removed" -msgstr "" -"Sólo las declaraciones en estado 'Borrador' o 'Cancelada' pueden ser " -"eliminadas" +#: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_form +msgid "Field especification" +msgstr "Especificación de campo" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,type:0 -msgid "Substitutive" -msgstr "Sustitutiva" +#: field:aeat.mod.map.tax.code.line,field_number:0 +msgid "Field number" +msgstr "Nº de casilla" #. module: l10n_es_aeat -#: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat -msgid "AEAT reports" -msgstr "Declaraciones AEAT" +#: field:aeat.model.export.config.line,size:0 +msgid "Field size" +msgstr "Tamaño del campo" #. module: l10n_es_aeat #: field:l10n.es.aeat.report.export_to_boe,data:0 msgid "File" msgstr "Archivo" -#. module: l10n_es_aeat -#: selection:l10n.es.aeat.report.export_to_boe,state:0 -msgid "get" -msgstr "obtener" - #. module: l10n_es_aeat #: field:l10n.es.aeat.report.export_to_boe,name:0 msgid "File name" msgstr "Nombre de archivo" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,number:0 -msgid "Declaration number" -msgstr "Nº declaración" +#: field:aeat.model.export.config.line,position:0 +msgid "First character position" +msgstr "Posición del primer carácter" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,support_type:0 -msgid "Support Type" -msgstr "Tipo de soporte" +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fiscal year" +msgstr "Ejercicio fiscal" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "Draft models" -msgstr "Declaraciones borrador" +#: field:aeat.model.export.config.line,fixed_value:0 +msgid "Fixed Value" +msgstr "Valor fijo" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,calculation_date:0 -msgid "Calculation date" -msgstr "Fecha de cálculo" +#: field:aeat.mod.map.tax.code,date_from:0 +msgid "From Date" +msgstr "Desde la fecha" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -#: selection:l10n.es.aeat.report,state:0 -msgid "Cancelled" -msgstr "Cancelada" +#: field:l10n.es.aeat.report,contact_name:0 +msgid "Full Name" +msgstr "Nombre completo" + +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code,id:0 +#: field:aeat.mod.map.tax.code.line,id:0 +#: field:aeat.model.export.config,id:0 +#: field:aeat.model.export.config.line,id:0 +#: field:l10n.es.aeat.report,id:0 +#: field:l10n.es.aeat.report.export_to_boe,id:0 +msgid "ID" +msgstr "ID" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +msgid "In process" +msgstr "En proceso" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +msgid "In process models" +msgstr "Declaraciones en proceso" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Informativas" +msgstr "Informativas" #. module: l10n_es_aeat #: field:l10n.es.aeat.report,representative_vat:0 @@ -214,28 +373,73 @@ msgid "L.R. VAT number" msgstr "NIF repr. legal" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,support_type:0 -msgid "Telematics" -msgstr "Telemática" +#: field:aeat.mod.map.tax.code,write_uid:0 +#: field:aeat.mod.map.tax.code.line,write_uid:0 +#: field:aeat.model.export.config,write_uid:0 +#: field:aeat.model.export.config.line,write_uid:0 +#: field:l10n.es.aeat.report.export_to_boe,write_uid:0 +msgid "Last Updated by" +msgstr "Última actualización por" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:135 -#, python-format -msgid "Only reports in 'draft' or 'cancelled' state can be removed" -msgstr "" -"Sólo se pueden eliminar las declaraciones en estado 'borrador' o 'cancelada'" +#: field:aeat.mod.map.tax.code,write_date:0 +#: field:aeat.mod.map.tax.code.line,write_date:0 +#: field:aeat.model.export.config,write_date:0 +#: field:aeat.model.export.config.line,write_date:0 +#: field:l10n.es.aeat.report.export_to_boe,write_date:0 +msgid "Last Updated on" +msgstr "Última actualización en" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:124 -#: code:addons/l10n_es_aeat/aeat_report.py:134 -#, python-format -msgid "Error!" -msgstr "¡Error!" +#: selection:aeat.model.export.config.line,alignment:0 +msgid "Left" +msgstr "Izquierda" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report_export_to_boe -msgid "Export Report to BOE Format" -msgstr "Exportar a formato BOE" +#: help:l10n.es.aeat.report,representative_vat:0 +msgid "Legal Representative VAT number." +msgstr "NIF del representante legal." + +#. module: l10n_es_aeat +#: field:aeat.model.export.config,config_lines:0 +msgid "Lines" +msgstr "Líneas" + +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code,map_lines:0 +msgid "Map lines" +msgstr "Líneas de mapeo" + +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code.line,map_parent_id:0 +msgid "Map parent id" +msgstr "Padre del mapeo" + +#. module: l10n_es_aeat +#: view:aeat.mod.map.tax.code:l10n_es_aeat.aeat_mod_map_tax_code_form +msgid "Mapping Lines" +msgstr "Líneas de mapeo" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config,model_number:0 +msgid "Model number" +msgstr "Nº modelo" + +#. module: l10n_es_aeat +#: help:l10n.es.aeat.report,contact_name:0 +msgid "Must have name and surname." +msgstr "Debe tener apellidos y nombre." + +#. module: l10n_es_aeat +#: field:aeat.model.export.config,name:0 +#: field:aeat.model.export.config.line,name:0 +msgid "Name" +msgstr "Nombre" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,bool_no:0 +msgid "No value" +msgstr "Valor para el no" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,type:0 @@ -243,101 +447,222 @@ msgid "Normal" msgstr "Normal" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "In process models" -msgstr "Declaraciones en proceso" +#: field:aeat.model.export.config.line,decimal_size:0 +msgid "Number of char for decimals" +msgstr "Número de caracteres para los decimales" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -#: field:l10n.es.aeat.report,fiscalyear_id:0 -msgid "Fiscal year" -msgstr "Ejercicio fiscal" +#: selection:aeat.model.export.config.line,export_type:0 +msgid "Number with decimals" +msgstr "Número con decimales" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -#: selection:l10n.es.aeat.report,state:0 -msgid "Done" -msgstr "Realizada" +#: selection:aeat.model.export.config.line,export_type:0 +msgid "Number without decimals" +msgstr "Número sin decimales" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:193 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:200 +#: field:aeat.model.export.config,model:0 +msgid "Odoo Model" +msgstr "Modelo Odoo" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/models/aeat_report.py:153 #, python-format -msgid "%s_report_%s.txt" -msgstr "%s_report_%s.txt" +msgid "Only reports in 'draft' or 'cancelled' state can be removed" +msgstr "Sólo los informes en estado 'borrador' or 'cancelado' pueden ser eliminados" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report.export_to_boe,state:0 -msgid "unknown" -msgstr "desconocido" +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Optativo: Importar datos de fichero" +msgstr "Optativo: Importar datos de fichero" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -#: view:l10n.es.aeat.report.export_to_boe:0 -msgid "Cancel" -msgstr "Cancelar" +#: field:l10n.es.aeat.report,contact_phone:0 +msgid "Phone" +msgstr "Teléfono" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report.export_to_boe:0 -msgid "Close" -msgstr "Cerrar" +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Ponga este archivo dentro de su carpeta personal de la AEAT, y úselo en el programa" +msgstr "Ponga este archivo dentro de su carpeta personal de la AEAT, y úselo en el programa" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,previous_number:0 +msgid "Previous declaration number" +msgstr "Nº previo de declaración" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Processed" +msgstr "Calculada" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Pulse el botón" +msgstr "Pulse el botón" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form msgid "Recalculate" msgstr "Recalcular" +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,repeat:0 +msgid "Repeat" +msgstr "Repetir" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +msgid "Report" +msgstr "Declaración" + +#. module: l10n_es_aeat +#: selection:aeat.model.export.config.line,alignment:0 +msgid "Right" +msgstr "Derecha" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,sequence:0 +#: field:l10n.es.aeat.report,sequence:0 +msgid "Sequence" +msgstr "Secuencia" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,sign:0 +msgid "Sign character" +msgstr "Carácter del signo" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config,date_start:0 +msgid "Start date" +msgstr "Fecha de inicio" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,state:0 +#: field:l10n.es.aeat.report.export_to_boe,state:0 +msgid "State" +msgstr "Estado" + #. module: l10n_es_aeat #: field:l10n.es.aeat.report,type:0 msgid "Statement Type" msgstr "Tipo de declaración" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report.export_to_boe:0 -msgid "or" -msgstr "o" +#: field:aeat.model.export.config.line,sub_config:0 +msgid "Subconfig" +msgstr "Subconfiguración" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Processed" -msgstr "Calculada" +#: selection:l10n.es.aeat.report,type:0 +msgid "Substitutive" +msgstr "Sustitutiva" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,support_type:0 +msgid "Support Type" +msgstr "Tipo de soporte" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +msgid "Susbtitutive/complementary declaration" +msgstr "Declaración sustitutiva/complementaria" + +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code.line,tax_code:0 +msgid "Tax codes" +msgstr "Códigos de impuesto" + +#. module: l10n_es_aeat +#: view:aeat.mod.map.tax.code:l10n_es_aeat.aeat_mod_map_tax_code_form +#: view:aeat.mod.map.tax.code:l10n_es_aeat.aeat_mod_map_tax_code_tree +#: model:ir.actions.act_window,name:l10n_es_aeat.action_aeat_mod_map_tax_code +#: model:ir.ui.menu,name:l10n_es_aeat.menu_aeat_mod_map_tax_code +msgid "Tax code mapping" +msgstr "Mapeo de códigos de impuesto" -#~ msgid "Refund invoices description" -#~ msgstr "Descripción de facturas rectificativas." +#. module: l10n_es_aeat +#: view:aeat.mod.map.tax.code.line:l10n_es_aeat.aeat_mod_map_tax_code_line_form +msgid "Tax code mapping line" +msgstr "Línea de mapeo de códigos de impuesto" -#~ msgid "Processing" -#~ msgstr "Calculando" +#. module: l10n_es_aeat +#: view:aeat.mod.map.tax.code.line:l10n_es_aeat.aeat_mod_map_tax_code_line_tree +msgid "Tax code mapping lines" +msgstr "Líneas de mapeo de códigos de impuesto" -#~ msgid "Fical Year" -#~ msgstr "Ejercicio fiscal" +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,support_type:0 +msgid "Telematics" +msgstr "Telemática" -#~ msgid "Previous Declaration Number" -#~ msgstr "Número de declaración previa" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:75 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:114 +#, python-format +msgid "The formated string must match the given length" +msgstr "La cadena formateada debe satisfacer el tamaño dado." -#~ msgid "Refund invoice" -#~ msgstr "Factura rectificativa" +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code,date_to:0 +msgid "To Date" +msgstr "Hasta la fecha" -#~ msgid "Links to original invoice which is referred by current refund invoice" -#~ msgstr "" -#~ "Enlaza con la factura original a la que hace referencia la factura actual." +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,company_vat:0 +msgid "VAT number" +msgstr "NIF" -#~ msgid "AEAT Base" -#~ msgstr "AEAT Base" +#. module: l10n_es_aeat +#: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_form +msgid "Value" +msgstr "Valor" -#~ msgid "AEAT Report base module" -#~ msgstr "Módulo base para las declaraciones de la Agencia Tributaria" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:72 +#, python-format +msgid "Wrong aling option. It should be < or >" +msgstr "Opción de alineamiento errónea. Debería ser < o >" -#~ msgid "Fiscal Year" -#~ msgstr "Ejercicio fiscal" +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,bool_yes:0 +msgid "Yes value" +msgstr "Valor para el sí" -#~ msgid "Declaration Number" -#~ msgstr "Número declaración" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "en el formulario on-line." +msgstr "en el formulario on-line." -#~ msgid "Canceled" -#~ msgstr "Cancelada" +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report.export_to_boe,state:0 +msgid "get" +msgstr "obtener" -#~ msgid "Invoice" -#~ msgstr "Factura" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "o pulsando en el botón" +msgstr "o pulsando en el botón" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report.export_to_boe,state:0 +msgid "open" +msgstr "abierto" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "or" +msgstr "o" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "para iniciar el proceso de exportación del archivo BOE de la AEAT." +msgstr "para iniciar el proceso de exportación del archivo BOE de la AEAT." + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/models/aeat_tax_code_mapping.py:72 +#, python-format +msgid "Field: %s - Code(s): %s" +msgstr "Campo: %s - Código(s): %s" -#~ msgid "AEAT Reports" -#~ msgstr "Declaraciones AEAT" diff --git a/l10n_es_aeat/i18n/l10n_es_aeat.pot b/l10n_es_aeat/i18n/l10n_es_aeat.pot index 2bc4765ab1b..e9be7dda3c3 100644 --- a/l10n_es_aeat/i18n/l10n_es_aeat.pot +++ b/l10n_es_aeat/i18n/l10n_es_aeat.pot @@ -1,13 +1,13 @@ -# Translation of OpenERP Server. +# Translation of Odoo Server. # This file contains the translation of the following modules: # * l10n_es_aeat # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" +"Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-23 16:16+0000\n" -"PO-Revision-Date: 2014-01-23 16:16+0000\n" +"POT-Creation-Date: 2015-06-25 19:07+0000\n" +"PO-Revision-Date: 2015-06-25 19:07+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,24 +16,25 @@ msgstr "" "Plural-Forms: \n" #. module: l10n_es_aeat -#: model:ir.actions.act_window,name:l10n_es_aeat.action_wizard_aeat_export -#: view:l10n.es.aeat.report.export_to_boe:0 -msgid "Export AEAT BOE file" +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:203 +#, python-format +msgid "%s_report_%s.txt" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "Confirmed models" +#: model:ir.ui.menu,name:l10n_es_aeat.menu_l10n_es_aeat_config +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +msgid "AEAT" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "Calculate" +#: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_form +msgid "AEAT export configuration line" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "Confirm" +#: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_tree +msgid "AEAT export configurationline" msgstr "" #. module: l10n_es_aeat @@ -42,136 +43,278 @@ msgid "AEAT manager" msgstr "" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,support_type:0 -msgid "DVD" +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_tree +msgid "AEAT report" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "In process" +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report +msgid "AEAT report base module" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "Cancelled models" +#: sql_constraint:l10n.es.aeat.report:0 +msgid "AEAT report sequence must be unique" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,state:0 -msgid "State" +#: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat +msgid "AEAT reports" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -#: selection:l10n.es.aeat.report,state:0 -msgid "Draft" +#: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_form +msgid "Advanced configuration" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "Declaración" +#: field:aeat.mod.map.tax.code,model:0 +msgid "Aeat Model" msgstr "" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report.export_to_boe,state:0 -msgid "open" +#: field:aeat.model.export.config.line,alignment:0 +msgid "Alignment" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:114 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:119 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:154 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:159 -#, python-format -msgid "The formated string must match the given length" +#: selection:aeat.model.export.config.line,export_type:0 +msgid "Alphanumeric" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "AEAT report" +#: field:aeat.model.export.config.line,apply_sign:0 +msgid "Apply sign" msgstr "" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,type:0 -msgid "Complementary" +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Aquí está el archivo BOE de la AEAT exportado:" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "AEAT" +#: view:aeat.model.export.config:l10n_es_aeat.aeat_model_export_config_form +#: model:ir.ui.menu,name:l10n_es_aeat.menu_aeat_export_config +msgid "BOE export configuration" +msgstr "" + +#. module: l10n_es_aeat +#: view:aeat.model.export.config:l10n_es_aeat.aeat_model_export_config_tree +msgid "BOE export configurations" +msgstr "" + +#. module: l10n_es_aeat +#: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_form +msgid "Basic configuration" +msgstr "" + +#. module: l10n_es_aeat +#: selection:aeat.model.export.config.line,export_type:0 +msgid "Boolean" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +msgid "Calculate" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,calculation_date:0 +msgid "Calculation date" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Cancel" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +#: selection:l10n.es.aeat.report,state:0 +msgid "Cancelled" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +msgid "Cancelled models" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Close" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search #: field:l10n.es.aeat.report,company_id:0 msgid "Company" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report.export_to_boe:0 -msgid "Export completed" +#: selection:l10n.es.aeat.report,type:0 +msgid "Complementary" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,export_config_id:0 +msgid "Config parent" +msgstr "" + +#. module: l10n_es_aeat +#: view:aeat.model.export.config:l10n_es_aeat.aeat_model_export_config_form +msgid "Configuration lines" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +msgid "Confirm" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +msgid "Confirmed models" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +msgid "Contact data" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code,create_uid:0 +#: field:aeat.mod.map.tax.code.line,create_uid:0 +#: field:aeat.model.export.config,create_uid:0 +#: field:aeat.model.export.config.line,create_uid:0 +#: field:l10n.es.aeat.report.export_to_boe,create_uid:0 +msgid "Created by" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code,create_date:0 +#: field:aeat.mod.map.tax.code.line,create_date:0 +#: field:aeat.model.export.config,create_date:0 +#: field:aeat.model.export.config.line,create_date:0 +#: field:l10n.es.aeat.report.export_to_boe,create_date:0 +msgid "Created on" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,support_type:0 +msgid "DVD" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +msgid "Declaración" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:110 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:115 +#: field:l10n.es.aeat.report,number:0 +msgid "Declaration number" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +#: selection:l10n.es.aeat.report,state:0 +msgid "Done" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +#: selection:l10n.es.aeat.report,state:0 +msgid "Draft" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +msgid "Draft models" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config,date_end:0 +msgid "End date" +msgstr "" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/models/aeat_tax_code_mapping.py:55 #, python-format -msgid "Wrong aling option. It should be < or >" +msgid "Error! The dates of the record overlap with an existing record." msgstr "" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report -msgid "AEAT report base module" +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Export" msgstr "" #. module: l10n_es_aeat -#: help:l10n.es.aeat.report,representative_vat:0 -msgid "Legal Representative VAT number." +#: model:ir.actions.act_window,name:l10n_es_aeat.action_wizard_aeat_export +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Export AEAT BOE file" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,previous_number:0 -msgid "Previous declaration number" +#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report_export_to_boe +msgid "Export Report to BOE Format" +msgstr "" + +#. module: l10n_es_aeat +#: model:ir.actions.act_window,name:l10n_es_aeat.action_aeat_export_config +#: field:l10n.es.aeat.report,export_config:0 +msgid "Export config" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,export_type:0 +msgid "Export field type" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form msgid "Export to BOE" msgstr "" -#: view:l10n.es.aeat.report.export_to_boe:0 -msgid "Export" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Exportación completada" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,company_vat:0 -msgid "VAT number" +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Exportar" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:125 -#, python-format -msgid "Only reports in 'draft' or 'cancel' state can be removed" +#: field:aeat.model.export.config.line,expression:0 +msgid "Expression" msgstr "" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,type:0 -msgid "Substitutive" +#: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_form +msgid "Field especification" msgstr "" #. module: l10n_es_aeat -#: model:ir.ui.menu,name:l10n_es_aeat.menu_root_aeat -msgid "AEAT reports" +#: field:aeat.mod.map.tax.code.line,field_number:0 +msgid "Field number" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report.export_to_boe,data:0 -msgid "File" +#: field:aeat.model.export.config.line,size:0 +msgid "Field size" msgstr "" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report.export_to_boe,state:0 -msgid "get" +#: code:addons/l10n_es_aeat/models/aeat_tax_code_mapping.py:72 +#, python-format +msgid "Field: %s - Code(s): %s" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report.export_to_boe,data:0 +msgid "File" msgstr "" #. module: l10n_es_aeat @@ -180,29 +323,54 @@ msgid "File name" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,number:0 -msgid "Declaration number" +#: field:aeat.model.export.config.line,position:0 +msgid "First character position" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,support_type:0 -msgid "Support Type" +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +#: field:l10n.es.aeat.report,fiscalyear_id:0 +msgid "Fiscal year" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "Draft models" +#: field:aeat.model.export.config.line,fixed_value:0 +msgid "Fixed Value" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report,calculation_date:0 -msgid "Calculation date" +#: field:aeat.mod.map.tax.code,date_from:0 +msgid "From Date" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -#: selection:l10n.es.aeat.report,state:0 -msgid "Cancelled" +#: field:l10n.es.aeat.report,contact_name:0 +msgid "Full Name" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code,id:0 +#: field:aeat.mod.map.tax.code.line,id:0 +#: field:aeat.model.export.config,id:0 +#: field:aeat.model.export.config.line,id:0 +#: field:l10n.es.aeat.report,id:0 +#: field:l10n.es.aeat.report.export_to_boe,id:0 +msgid "ID" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +msgid "In process" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search +msgid "In process models" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Informativas" msgstr "" #. module: l10n_es_aeat @@ -211,26 +379,72 @@ msgid "L.R. VAT number" msgstr "" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,support_type:0 -msgid "Telematics" +#: field:aeat.mod.map.tax.code,write_uid:0 +#: field:aeat.mod.map.tax.code.line,write_uid:0 +#: field:aeat.model.export.config,write_uid:0 +#: field:aeat.model.export.config.line,write_uid:0 +#: field:l10n.es.aeat.report.export_to_boe,write_uid:0 +msgid "Last Updated by" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:135 -#, python-format -msgid "Only reports in 'draft' or 'cancelled' state can be removed" +#: field:aeat.mod.map.tax.code,write_date:0 +#: field:aeat.mod.map.tax.code.line,write_date:0 +#: field:aeat.model.export.config,write_date:0 +#: field:aeat.model.export.config.line,write_date:0 +#: field:l10n.es.aeat.report.export_to_boe,write_date:0 +msgid "Last Updated on" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/aeat_report.py:124 -#: code:addons/l10n_es_aeat/aeat_report.py:134 -#, python-format -msgid "Error!" +#: selection:aeat.model.export.config.line,alignment:0 +msgid "Left" msgstr "" #. module: l10n_es_aeat -#: model:ir.model,name:l10n_es_aeat.model_l10n_es_aeat_report_export_to_boe -msgid "Export Report to BOE Format" +#: help:l10n.es.aeat.report,representative_vat:0 +msgid "Legal Representative VAT number." +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config,config_lines:0 +msgid "Lines" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code,map_lines:0 +msgid "Map lines" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code.line,map_parent_id:0 +msgid "Map parent id" +msgstr "" + +#. module: l10n_es_aeat +#: view:aeat.mod.map.tax.code:l10n_es_aeat.aeat_mod_map_tax_code_form +msgid "Mapping Lines" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config,model_number:0 +msgid "Model number" +msgstr "" + +#. module: l10n_es_aeat +#: help:l10n.es.aeat.report,contact_name:0 +msgid "Must have name and surname." +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config,name:0 +#: field:aeat.model.export.config.line,name:0 +msgid "Name" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,bool_no:0 +msgid "No value" msgstr "" #. module: l10n_es_aeat @@ -239,62 +453,216 @@ msgid "Normal" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -msgid "In process models" +#: field:aeat.model.export.config.line,decimal_size:0 +msgid "Number of char for decimals" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -#: field:l10n.es.aeat.report,fiscalyear_id:0 -msgid "Fiscal year" +#: selection:aeat.model.export.config.line,export_type:0 +msgid "Number with decimals" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -#: selection:l10n.es.aeat.report,state:0 -msgid "Done" +#: selection:aeat.model.export.config.line,export_type:0 +msgid "Number without decimals" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:193 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:200 +#: field:aeat.model.export.config,model:0 +msgid "Odoo Model" +msgstr "" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/models/aeat_report.py:153 #, python-format -msgid "%s_report_%s.txt" +msgid "Only reports in 'draft' or 'cancelled' state can be removed" msgstr "" #. module: l10n_es_aeat -#: field:l10n.es.aeat.report.export_to_boe,state:0 -msgid "unknown" +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Optativo: Importar datos de fichero" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 -#: view:l10n.es.aeat.report.export_to_boe:0 -msgid "Cancel" +#: field:l10n.es.aeat.report,contact_phone:0 +msgid "Phone" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report.export_to_boe:0 -msgid "Close" +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Ponga este archivo dentro de su carpeta personal de la AEAT, y úselo en el programa" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report:0 +#: field:l10n.es.aeat.report,previous_number:0 +msgid "Previous declaration number" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,state:0 +msgid "Processed" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "Pulse el botón" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form msgid "Recalculate" msgstr "" +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,repeat:0 +msgid "Repeat" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +msgid "Report" +msgstr "" + +#. module: l10n_es_aeat +#: selection:aeat.model.export.config.line,alignment:0 +msgid "Right" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,sequence:0 +#: field:l10n.es.aeat.report,sequence:0 +msgid "Sequence" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,sign:0 +msgid "Sign character" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config,date_start:0 +msgid "Start date" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,state:0 +#: field:l10n.es.aeat.report.export_to_boe,state:0 +msgid "State" +msgstr "" + #. module: l10n_es_aeat #: field:l10n.es.aeat.report,type:0 msgid "Statement Type" msgstr "" #. module: l10n_es_aeat -#: view:l10n.es.aeat.report.export_to_boe:0 +#: field:aeat.model.export.config.line,sub_config:0 +msgid "Subconfig" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,type:0 +msgid "Substitutive" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,support_type:0 +msgid "Support Type" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +msgid "Susbtitutive/complementary declaration" +msgstr "" + +#. module: l10n_es_aeat +#: view:aeat.mod.map.tax.code:l10n_es_aeat.aeat_mod_map_tax_code_form +#: view:aeat.mod.map.tax.code:l10n_es_aeat.aeat_mod_map_tax_code_tree +#: model:ir.actions.act_window,name:l10n_es_aeat.action_aeat_mod_map_tax_code +#: model:ir.ui.menu,name:l10n_es_aeat.menu_aeat_mod_map_tax_code +msgid "Tax code mapping" +msgstr "" + +#. module: l10n_es_aeat +#: view:aeat.mod.map.tax.code.line:l10n_es_aeat.aeat_mod_map_tax_code_line_form +msgid "Tax code mapping line" +msgstr "" + +#. module: l10n_es_aeat +#: view:aeat.mod.map.tax.code.line:l10n_es_aeat.aeat_mod_map_tax_code_line_tree +msgid "Tax code mapping lines" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code.line,tax_codes:0 +msgid "Tax codes" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report,support_type:0 +msgid "Telematics" +msgstr "" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:75 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:114 +#, python-format +msgid "The formated string must match the given length" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code,date_to:0 +msgid "To Date" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,company_vat:0 +msgid "VAT number" +msgstr "" + +#. module: l10n_es_aeat +#: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_form +msgid "Value" +msgstr "" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:72 +#, python-format +msgid "Wrong aling option. It should be < or >" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,bool_yes:0 +msgid "Yes value" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "en el formulario on-line." +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report.export_to_boe,state:0 +msgid "get" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "o pulsando en el botón" +msgstr "" + +#. module: l10n_es_aeat +#: selection:l10n.es.aeat.report.export_to_boe,state:0 +msgid "open" +msgstr "" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export msgid "or" msgstr "" #. module: l10n_es_aeat -#: selection:l10n.es.aeat.report,state:0 -msgid "Processed" +#: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export +msgid "para iniciar el proceso de exportación del archivo BOE de la AEAT." msgstr "" diff --git a/l10n_es_aeat/models/aeat_report.py b/l10n_es_aeat/models/aeat_report.py index f698ec4dea0..b81634f08d5 100644 --- a/l10n_es_aeat/models/aeat_report.py +++ b/l10n_es_aeat/models/aeat_report.py @@ -30,6 +30,7 @@ class L10nEsAeatReport(models.AbstractModel): _name = "l10n.es.aeat.report" _description = "AEAT report base module" + _rec_name = 'sequence' def _default_company(self): company_obj = self.env['res.company'] @@ -37,18 +38,16 @@ def _default_company(self): @api.onchange('company_id') def on_change_company_id(self): - """ - Loads some company data (the VAT number) when the selected + """Loads some company data (the VAT number) when the selected company changes. """ - comp_vat = '' - if self.company_id: - if self.company_id.partner_id and self.company_id.partner_id.vat: - # Remove the ES part from spanish vat numbers - # (ES12345678Z => 12345678Z) - comp_vat = re.match("(ES){0,1}(.*)", - self.company_id.partner_id.vat).groups()[1] - self.company_vat = comp_vat + if self.company_id.vat: + # Remove the ES part from spanish vat numbers + # (ES12345678Z => 12345678Z) + self.company_vat = re.match( + "(ES){0,1}(.*)", self.company_id.vat).groups()[1] + self.contact_name = self.env.user.name + self.contact_phone = self.env.user.partner_id.phone company_id = fields.Many2one( 'res.company', string='Company', required=True, readonly=True, @@ -56,9 +55,6 @@ def on_change_company_id(self): company_vat = fields.Char( string='VAT number', size=9, required=True, readonly=True, states={'draft': [('readonly', False)]}) - phone = fields.Char( - string="Phone", size=9, states={'calculated': [('required', True)], - 'confirmed': [('readonly', True)]}) number = fields.Char(string='Declaration number', size=13, required=True, readonly=True) previous_number = fields.Char( @@ -96,6 +92,11 @@ def on_change_company_id(self): export_config = fields.Many2one('aeat.model.export.config', string='Export config') + _sql_constraints = [ + ('sequence_uniq', 'unique(sequence)', + 'AEAT report sequence must be unique'), + ] + @api.model def create(self, values): seq_obj = self.env['ir.sequence'] @@ -154,22 +155,23 @@ def unlink(self): return super(L10nEsAeatReport, self).unlink() def init(self, cr): - seq_obj = self.pool['ir.sequence'] - try: - aeat_num = getattr(self, '_aeat_number') - sequence = "aeat%s-sequence" % aeat_num - if not seq_obj.search(cr, SUPERUSER_ID, [('name', '=', sequence)]): - seq_vals = {'name': sequence, - 'code': 'aeat.sequence.type', - 'number_increment': 1, - 'implementation': 'standard', - 'padding': 5, - 'number_next_actual': 1, - 'prefix': aeat_num + '-' - } - seq_obj.create(cr, SUPERUSER_ID, seq_vals) - except: - if self._name != 'l10n.es.aeat.report': + if self._name != 'l10n.es.aeat.report': + seq_obj = self.pool['ir.sequence'] + try: + aeat_num = getattr(self, '_aeat_number') + sequence = "aeat%s-sequence" % aeat_num + if not seq_obj.search(cr, SUPERUSER_ID, + [('name', '=', sequence)]): + seq_vals = {'name': sequence, + 'code': 'aeat.sequence.type', + 'number_increment': 1, + 'implementation': 'no_gap', + 'padding': 5, + 'number_next_actual': 1, + 'prefix': aeat_num + '-' + } + seq_obj.create(cr, SUPERUSER_ID, seq_vals) + except: raise exceptions.Warning( "Modelo no válido: %s. Debe declarar una variable " - "'_aeat_number'" % self) + "'_aeat_number'" % self._name) diff --git a/l10n_es_aeat/models/aeat_tax_code_mapping.py b/l10n_es_aeat/models/aeat_tax_code_mapping.py index 8dfad0ecb40..c0303dfa0ed 100644 --- a/l10n_es_aeat/models/aeat_tax_code_mapping.py +++ b/l10n_es_aeat/models/aeat_tax_code_mapping.py @@ -21,11 +21,11 @@ class AeatModMapTaxCode(models.Model): _name = 'aeat.mod.map.tax.code' - date_from = fields.Date(string="From Date") - date_to = fields.Date(string="To Date") + date_from = fields.Date(string="From Date", required=True) + date_to = fields.Date(string="To Date", required=True) map_lines = fields.One2many('aeat.mod.map.tax.code.line', 'map_parent_id', - string="Map lines") - model = fields.Char("Aeat Model", size=3) + string="Map lines", required=True) + model = fields.Integer(string="AEAT Model", required=True) @api.one @api.constrains('date_from', 'date_to') @@ -59,15 +59,18 @@ def _unique_date_range(self): class AeatModMapTaxCodeLine(models.Model): _name = 'aeat.mod.map.tax.code.line' - field_number = fields.Integer(string="Field number") - tax_code = fields.Many2one('account.tax.code.template', string="Tax code") + field_number = fields.Integer(string="Field number", required=True) + tax_codes = fields.Many2many( + comodel_name='account.tax.code.template', string="Tax codes", + required=True) map_parent_id = fields.Many2one('aeat.mod.map.tax.code') @api.multi def name_get(self): vals = [] for record in self: - name = "Field: " + str(record.field_number) + ' Code: ' + \ - str(record.tax_code.code) + name = _("Field: %s - Code(s): %s") % ( + record.field_number, + ", ".join(x.code for x in record.tax_codes)) vals.append(tuple([record.id, name])) return vals diff --git a/l10n_es_aeat/security/aeat_security.xml b/l10n_es_aeat/security/aeat_security.xml index f85b0c79de7..fe11017bc17 100644 --- a/l10n_es_aeat/security/aeat_security.xml +++ b/l10n_es_aeat/security/aeat_security.xml @@ -4,7 +4,7 @@ AEAT manager - + diff --git a/l10n_es_aeat/security/ir.model.access.csv b/l10n_es_aeat/security/ir.model.access.csv index 63cea390cc0..9e99f523f33 100644 --- a/l10n_es_aeat/security/ir.model.access.csv +++ b/l10n_es_aeat/security/ir.model.access.csv @@ -1,2 +1,10 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_l10n_es_aeat_report_manager,l10n.es.aeat.report manager,model_l10n_es_aeat_report,group_account_aeat,1,1,1,1 +access_aeat_model_export_config_admin,aeat.model.export.config admin,model_aeat_model_export_config,base.group_system,1,1,1,1 +access_aeat_model_export_config_aeat,aeat.model.export.config aeat,model_aeat_model_export_config,group_account_aeat,1,0,0,0 +access_aeat_model_export_config_line_admin,aeat.model.export.config admin,model_aeat_model_export_config_line,base.group_system,1,1,1,1 +access_aeat_model_export_config_line_aeat,aeat.model.export.config aeat,model_aeat_model_export_config_line,group_account_aeat,1,0,0,0 +access_model_aeat_mod_map_tax_code_admin,aeat.mod.map.tax.code admin,model_aeat_mod_map_tax_code,base.group_system,1,1,1,1 +access_model_aeat_mod_map_tax_code_aeat,aeat.mod.map.tax.code aeat,model_aeat_mod_map_tax_code,group_account_aeat,1,0,0,0 +access_model_aeat_mod_map_tax_code_line_admin,aeat.mod.map.tax.code.line admin,model_aeat_mod_map_tax_code_line,base.group_system,1,1,1,1 +access_model_aeat_mod_map_tax_code_line_aeat,aeat.mod.map.tax.code.line aeat,model_aeat_mod_map_tax_code_line,group_account_aeat,1,0,0,0 diff --git a/l10n_es_aeat/views/aeat_export_configuration_view.xml b/l10n_es_aeat/views/aeat_export_configuration_view.xml index 90460d7c453..3bb2a439a56 100644 --- a/l10n_es_aeat/views/aeat_export_configuration_view.xml +++ b/l10n_es_aeat/views/aeat_export_configuration_view.xml @@ -6,7 +6,7 @@ aeat.model.export.config.tree aeat.model.export.config - + @@ -19,14 +19,14 @@ aeat.model.export.config.form aeat.model.export.config -
+ - + @@ -40,7 +40,7 @@ aeat.model.export.config.line - + @@ -99,9 +99,9 @@ + parent="menu_l10n_es_aeat_config" + action="action_aeat_export_config" + name="BOE export configuration"/> diff --git a/l10n_es_aeat/views/aeat_menuitem.xml b/l10n_es_aeat/views/aeat_menuitem.xml index c3dea9d00ad..875fa5a51a6 100644 --- a/l10n_es_aeat/views/aeat_menuitem.xml +++ b/l10n_es_aeat/views/aeat_menuitem.xml @@ -2,15 +2,16 @@ - + + parent="account.menu_finance_configuration" + sequence="35" + groups="group_account_aeat" + name="AEAT"/> diff --git a/l10n_es_aeat/views/aeat_tax_code_mapping_view.xml b/l10n_es_aeat/views/aeat_tax_code_mapping_view.xml index 7852b98701a..57854f633cc 100644 --- a/l10n_es_aeat/views/aeat_tax_code_mapping_view.xml +++ b/l10n_es_aeat/views/aeat_tax_code_mapping_view.xml @@ -36,7 +36,7 @@ - + @@ -47,8 +47,8 @@ - - + + @@ -62,9 +62,9 @@
+ parent="menu_l10n_es_aeat_config" + action="action_aeat_mod_map_tax_code" + name="Tax code mapping"/> diff --git a/l10n_es_aeat/views/aeat_view.xml b/l10n_es_aeat/views/aeat_view.xml index 0d766de3815..3bca5ff0b4a 100644 --- a/l10n_es_aeat/views/aeat_view.xml +++ b/l10n_es_aeat/views/aeat_view.xml @@ -7,6 +7,7 @@ l10n.es.aeat.report + @@ -19,7 +20,7 @@ l10n_es.aeat.report.form l10n.es.aeat.report -
+
+ +

+

- - - diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py index 1b0b44f2f5d..d52d9008aa9 100644 --- a/l10n_es_aeat/wizard/export_to_boe.py +++ b/l10n_es_aeat/wizard/export_to_boe.py @@ -24,12 +24,11 @@ # ############################################################################## import base64 -from openerp import tools import re from openerp.tools.safe_eval import safe_eval as eval -from openerp import models, fields, api, _ +from openerp import tools, models, fields, api, _ -EXPRESSION_PATTERN = re.compile('(\$\{.+?\})') +EXPRESSION_PATTERN = re.compile(r'(\$\{.+?\})') class L10nEsAeatReportExportToBoe(models.TransientModel): @@ -42,8 +41,7 @@ class L10nEsAeatReportExportToBoe(models.TransientModel): string="State", default='open') def _formatString(self, text, length, fill=' ', align='<'): - """ - Formats the string into a fixed length ASCII (iso-8859-1) record. + """Formats the string into a fixed length ASCII (iso-8859-1) record. Note: 'Todos los campos alfanuméricos y alfabéticos se presentarán @@ -147,7 +145,8 @@ def _get_formatted_declaration_record(self, report): # Modelo Declaración text += getattr(report._model, '_aeat_number') # Ejercicio - text += self._formatString(report.fiscalyear_id.code, 4) + text += self._formatString( + fields.Date.from_string(report.fiscalyear_id.date_start).year, 4) # NIF del declarante text += self._formatString(report.company_vat, 9) # Apellidos y nombre o razón social del declarante From 87203278966606e0cfb7f6c475b43ca8caba071e Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sun, 28 Jun 2015 15:18:53 +0200 Subject: [PATCH 020/173] =?UTF-8?q?[IMP+FIX]=20l10n=5Fes=5Faeat=5F*:=20C?= =?UTF-8?q?=C3=A1lculo=20por=20c=C3=B3digos=20de=20impuestos=20generalizad?= =?UTF-8?q?o=20+=20tratamiento=20residentes=20216=20y=20c=C3=A1lculo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- l10n_es_aeat/models/aeat_report.py | 26 +++++++++++++++++++++++++- l10n_es_aeat/wizard/export_to_boe.py | 6 +----- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/l10n_es_aeat/models/aeat_report.py b/l10n_es_aeat/models/aeat_report.py index b81634f08d5..a368706f786 100644 --- a/l10n_es_aeat/models/aeat_report.py +++ b/l10n_es_aeat/models/aeat_report.py @@ -166,7 +166,7 @@ def init(self, cr): 'code': 'aeat.sequence.type', 'number_increment': 1, 'implementation': 'no_gap', - 'padding': 5, + 'padding': 9, 'number_next_actual': 1, 'prefix': aeat_num + '-' } @@ -175,3 +175,27 @@ def init(self, cr): raise exceptions.Warning( "Modelo no válido: %s. Debe declarar una variable " "'_aeat_number'" % self._name) + + # Helper functions + @api.multi + def _get_partner_domain(self): + return [] + + @api.multi + def _get_tax_code_lines(self, tax_code, periods=None): + self.ensure_one() + tax_code_obj = self.env['account.tax.code'] + tax_codes = tax_code_obj.search( + [('code', '=', tax_code), + ('company_id', '=', self.company_id.id)]) + move_line_obj = self.env['account.move.line'] + if not periods: + period_obj = self.env['account.period'] + periods = period_obj.search( + [('fiscalyear_id', '=', self.fiscalyear_id.id)]) + move_line_domain = [('company_id', '=', self.company_id.id), + ('tax_code_id', 'child_of', tax_codes.ids), + ('period_id', 'in', periods.ids)] + move_line_domain += self._get_partner_domain() + move_lines = move_line_obj.search(move_line_domain) + return move_lines diff --git a/l10n_es_aeat/wizard/export_to_boe.py b/l10n_es_aeat/wizard/export_to_boe.py index d52d9008aa9..a1a992f2cf6 100644 --- a/l10n_es_aeat/wizard/export_to_boe.py +++ b/l10n_es_aeat/wizard/export_to_boe.py @@ -90,24 +90,20 @@ def _formatNumber(self, number, int_length, dec_length=0, # if number == '': number = 0.0 - number = float(number) sign = number >= 0 and ' ' or 'N' number = abs(number) int_part = int(number) - # Format the string ascii_string = '' if include_sign: ascii_string += sign - if dec_length > 0: ascii_string += '%0*.*f' % (int_length + dec_length + 1, dec_length, number) ascii_string = ascii_string.replace('.', '') elif int_length > 0: ascii_string += '%.*d' % (int_length, int_part) - # Sanity-check assert len(ascii_string) == (include_sign and 1 or 0) + int_length + \ dec_length, _("The formated string must match the given length") @@ -158,7 +154,7 @@ def _get_formatted_declaration_record(self, report): # Persona de contacto (Apellidos y nombre) text += self._formatString(report.contact_name, 40) # Número identificativo de la declaración - text += self._formatNumber(report.number, 13) + text += self._formatString(report.sequence, 13) # Declaración complementaria text += self._formatString(report.type, 2).replace('N', ' ') # Número identificativo de la declaración anterior From 0ab3ecc2ede3864e3fdab3d792a48ac7339893b6 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 10 Jul 2015 12:36:11 +0200 Subject: [PATCH 021/173] [MIG] l10n_es_aeat_mod303: Modelo 303 de la AEAT totalmente refactorizado MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Presentación del Modelo AEAT 303 ================================ * Incluye un motor genérico para obtener los totales de códigos de impuestos de manera parametrizada y con posibilidad de versionado por fechas * Incluye un motor de parametrización de las exportaciones a formato BOE con posibilidad de versionado por fechas. * Se incluyen las parametrizaciones de ambos motores para el 303. --- l10n_es_aeat/README.rst | 9 +- l10n_es_aeat/__init__.py | 19 -- l10n_es_aeat/__openerp__.py | 5 +- l10n_es_aeat/i18n/es.po | 189 ++++++++++---- l10n_es_aeat/i18n/l10n_es_aeat.pot | 171 +++++++++--- .../models/aeat_export_configuration.py | 112 +++++--- l10n_es_aeat/models/aeat_report.py | 246 +++++++++++++++--- l10n_es_aeat/models/aeat_tax_code_mapping.py | 41 ++- l10n_es_aeat/security/ir.model.access.csv | 1 - .../views/aeat_export_configuration_view.xml | 95 ++++--- .../views/aeat_tax_code_mapping_view.xml | 18 +- l10n_es_aeat/views/aeat_view.xml | 42 ++- l10n_es_aeat/wizard/export_to_boe.py | 61 +++-- 13 files changed, 750 insertions(+), 259 deletions(-) diff --git a/l10n_es_aeat/README.rst b/l10n_es_aeat/README.rst index 9e4c83e33d5..2c75e639677 100644 --- a/l10n_es_aeat/README.rst +++ b/l10n_es_aeat/README.rst @@ -13,14 +13,21 @@ Módulo base para declaraciones de la AEAT, que incluye: * Motor de exportación paramétrica basado en una configuración que puede ser introducida por datos XML o por interfaz. * Motor de cálculo de importes por códigos de impuestos. +* Las partes específicas de las Diputaciones Forales no están incluidas. -Configuration +Configuración ============= Todos aquellos modelos que se especifiquen en los módulos adicionales y hereden el AEAT base, deberán definir una variable interna que se llame '_aeat_number' asignándole como valor, el número del modelo (130, 340, 347...). +Problemas conocidos / Hoja de ruta +================================== + +* La configuración de exportación a BOE no se filtran ni se auto-selecciona por + fechas de validez. + Créditos ======== diff --git a/l10n_es_aeat/__init__.py b/l10n_es_aeat/__init__.py index 262264acf96..408a6001bda 100644 --- a/l10n_es_aeat/__init__.py +++ b/l10n_es_aeat/__init__.py @@ -1,22 +1,3 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2004-2011 -# Pexego Sistemas Informáticos. (http://pexego.es) -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## from . import models from . import wizard diff --git a/l10n_es_aeat/__openerp__.py b/l10n_es_aeat/__openerp__.py index 64169526902..293c2ed3950 100644 --- a/l10n_es_aeat/__openerp__.py +++ b/l10n_es_aeat/__openerp__.py @@ -7,6 +7,10 @@ # Copyright (C) 2013 # Ignacio Ibeas - Acysos S.L. (http://acysos.com) # Migración a OpenERP 7.0 +# Copyright (C) 2013-2015 +# Serv. Tecnol. Avanzados - Pedro M. Baeza (www.serviciosbaeza.com) +# Copyright (C) 2015 +# Ainara Galdona - AvanzOSC (https://www.avanzosc.es) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -22,7 +26,6 @@ # along with this program. If not, see . # ############################################################################## - { 'name': "AEAT Base", 'version': "1.1", diff --git a/l10n_es_aeat/i18n/es.po b/l10n_es_aeat/i18n/es.po index 5fe7a967aef..f211c0f8591 100644 --- a/l10n_es_aeat/i18n/es.po +++ b/l10n_es_aeat/i18n/es.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-06-25 18:26+0000\n" -"PO-Revision-Date: 2015-06-25 18:26+0000\n" +"POT-Creation-Date: 2015-07-10 07:46+0000\n" +"PO-Revision-Date: 2015-07-10 07:46+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,17 +16,28 @@ msgstr "" "Plural-Forms: \n" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:203 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 #, python-format msgid "%s_report_%s.txt" msgstr "%s_report_%s.txt" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/models/aeat_export_configuration.py:110 +#, python-format +msgid "" +msgstr "" + #. module: l10n_es_aeat #: model:ir.ui.menu,name:l10n_es_aeat.menu_l10n_es_aeat_config #: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search msgid "AEAT" msgstr "AEAT" +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code,model:0 +msgid "AEAT Model" +msgstr "Declaración AEAT" + #. module: l10n_es_aeat #: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_form msgid "AEAT export configuration line" @@ -68,11 +79,6 @@ msgstr "Declaraciones AEAT" msgid "Advanced configuration" msgstr "Configuración avanzada" -#. module: l10n_es_aeat -#: field:aeat.mod.map.tax.code,model:0 -msgid "Aeat Model" -msgstr "Modelo AEAT" - #. module: l10n_es_aeat #: field:aeat.model.export.config.line,alignment:0 msgid "Alignment" @@ -83,6 +89,11 @@ msgstr "Alineación" msgid "Alphanumeric" msgstr "Alfanumérico" +#. module: l10n_es_aeat +#: field:l10n.es.aeat.tax.line,amount:0 +msgid "Amount" +msgstr "Importe" + #. module: l10n_es_aeat #: field:aeat.model.export.config.line,apply_sign:0 msgid "Apply sign" @@ -157,6 +168,16 @@ msgstr "Compañía" msgid "Complementary" msgstr "Complementaria" +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,conditional:0 +msgid "Conditional" +msgstr "Condicional" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,conditional_expression:0 +msgid "Conditional expression" +msgstr "Expresión condicional" + #. module: l10n_es_aeat #: field:aeat.model.export.config.line,export_config_id:0 msgid "Config parent" @@ -188,6 +209,7 @@ msgstr "Datos de contacto" #: field:aeat.model.export.config,create_uid:0 #: field:aeat.model.export.config.line,create_uid:0 #: field:l10n.es.aeat.report.export_to_boe,create_uid:0 +#: field:l10n.es.aeat.tax.line,create_uid:0 msgid "Created by" msgstr "Creado por" @@ -197,6 +219,7 @@ msgstr "Creado por" #: field:aeat.model.export.config,create_date:0 #: field:aeat.model.export.config.line,create_date:0 #: field:l10n.es.aeat.report.export_to_boe,create_date:0 +#: field:l10n.es.aeat.tax.line,create_date:0 msgid "Created on" msgstr "Creado en" @@ -239,10 +262,10 @@ msgid "End date" msgstr "Fecha final" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/models/aeat_tax_code_mapping.py:55 +#: code:addons/l10n_es_aeat/models/aeat_tax_code_mapping.py:56 #, python-format msgid "Error! The dates of the record overlap with an existing record." -msgstr "Error! Las fechas de los registro se solapan con un registro existente." +msgstr "Error! Las fechas de los registros se solapan con un registro existente." #. module: l10n_es_aeat #: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export @@ -291,6 +314,12 @@ msgstr "Exportar" msgid "Expression" msgstr "Expresión" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/models/aeat_export_configuration.py:104 +#, python-format +msgid "Expression: " +msgstr "Expresión: " + #. module: l10n_es_aeat #: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_form msgid "Field especification" @@ -298,6 +327,7 @@ msgstr "Especificación de campo" #. module: l10n_es_aeat #: field:aeat.mod.map.tax.code.line,field_number:0 +#: field:l10n.es.aeat.tax.line,field_number:0 msgid "Field number" msgstr "Nº de casilla" @@ -316,11 +346,6 @@ msgstr "Archivo" msgid "File name" msgstr "Nombre de archivo" -#. module: l10n_es_aeat -#: field:aeat.model.export.config.line,position:0 -msgid "First character position" -msgstr "Posición del primer carácter" - #. module: l10n_es_aeat #: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search #: field:l10n.es.aeat.report,fiscalyear_id:0 @@ -329,9 +354,15 @@ msgstr "Ejercicio fiscal" #. module: l10n_es_aeat #: field:aeat.model.export.config.line,fixed_value:0 -msgid "Fixed Value" +msgid "Fixed value" msgstr "Valor fijo" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/models/aeat_export_configuration.py:110 +#, python-format +msgid "Fixed: %s" +msgstr "Fijo: %s" + #. module: l10n_es_aeat #: field:aeat.mod.map.tax.code,date_from:0 msgid "From Date" @@ -349,9 +380,20 @@ msgstr "Nombre completo" #: field:aeat.model.export.config.line,id:0 #: field:l10n.es.aeat.report,id:0 #: field:l10n.es.aeat.report.export_to_boe,id:0 +#: field:l10n.es.aeat.tax.line,id:0 msgid "ID" msgstr "ID" +#. module: l10n_es_aeat +#: help:aeat.model.export.config.line,repeat_expression:0 +msgid "If set, this expression will be used for getting the list of elements to iterate on" +msgstr "Si está establecida, esta expresión se usará para obtener una lista de los elementos por los que iterar" + +#. module: l10n_es_aeat +#: help:aeat.model.export.config.line,conditional_expression:0 +msgid "If set, this expression will be used to evaluate if this line should be added" +msgstr "Si está establecida, esta expresión será usada para evaluar si la línea debe ser añadida" + #. module: l10n_es_aeat #: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search msgid "In process" @@ -367,6 +409,17 @@ msgstr "Declaraciones en proceso" msgid "Informativas" msgstr "Informativas" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/models/aeat_report.py:196 +#, python-format +msgid "It seems that you have defined quarterly periods or periods in the middle of the month. This cannot be automatically handled. You should select manually the periods." +msgstr "Parece que ha definido periodos trimestrales o periodos en mitad del mes. Esto no se puede gestionar automáticamente, por lo que deberá seleccionar a mano los periodos." + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.tax.line,move_lines:0 +msgid "Journal items" +msgstr "Apuntes contables" + #. module: l10n_es_aeat #: field:l10n.es.aeat.report,representative_vat:0 msgid "L.R. VAT number" @@ -378,6 +431,7 @@ msgstr "NIF repr. legal" #: field:aeat.model.export.config,write_uid:0 #: field:aeat.model.export.config.line,write_uid:0 #: field:l10n.es.aeat.report.export_to_boe,write_uid:0 +#: field:l10n.es.aeat.tax.line,write_uid:0 msgid "Last Updated by" msgstr "Última actualización por" @@ -387,6 +441,7 @@ msgstr "Última actualización por" #: field:aeat.model.export.config,write_date:0 #: field:aeat.model.export.config.line,write_date:0 #: field:l10n.es.aeat.report.export_to_boe,write_date:0 +#: field:l10n.es.aeat.tax.line,write_date:0 msgid "Last Updated on" msgstr "Última actualización en" @@ -405,6 +460,11 @@ msgstr "NIF del representante legal." msgid "Lines" msgstr "Líneas" +#. module: l10n_es_aeat +#: field:l10n.es.aeat.tax.line,map_line:0 +msgid "Map line" +msgstr "Línea de mapeo" + #. module: l10n_es_aeat #: field:aeat.mod.map.tax.code,map_lines:0 msgid "Map lines" @@ -431,16 +491,13 @@ msgid "Must have name and surname." msgstr "Debe tener apellidos y nombre." #. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code.line,name:0 #: field:aeat.model.export.config,name:0 #: field:aeat.model.export.config.line,name:0 +#: field:l10n.es.aeat.tax.line,name:0 msgid "Name" msgstr "Nombre" -#. module: l10n_es_aeat -#: field:aeat.model.export.config.line,bool_no:0 -msgid "No value" -msgstr "Valor para el no" - #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,type:0 msgid "Normal" @@ -463,11 +520,11 @@ msgstr "Número sin decimales" #. module: l10n_es_aeat #: field:aeat.model.export.config,model:0 -msgid "Odoo Model" +msgid "Odoo model" msgstr "Modelo Odoo" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/models/aeat_report.py:153 +#: code:addons/l10n_es_aeat/models/aeat_report.py:290 #, python-format msgid "Only reports in 'draft' or 'cancelled' state can be removed" msgstr "Sólo los informes en estado 'borrador' or 'cancelado' pueden ser eliminados" @@ -477,6 +534,21 @@ msgstr "Sólo los informes en estado 'borrador' or 'cancelado' pueden ser elimin msgid "Optativo: Importar datos de fichero" msgstr "Optativo: Importar datos de fichero" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +msgid "Other parameters" +msgstr "Otros parámetros" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,period_type:0 +msgid "Period type" +msgstr "Tipo de periodo" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,periods:0 +msgid "Period(s)" +msgstr "Periodo(s)" + #. module: l10n_es_aeat #: field:l10n.es.aeat.report,contact_phone:0 msgid "Phone" @@ -512,8 +584,14 @@ msgstr "Recalcular" msgid "Repeat" msgstr "Repetir" +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,repeat_expression:0 +msgid "Repeat expression" +msgstr "Expresión de repetición" + #. module: l10n_es_aeat #: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +#: field:l10n.es.aeat.tax.line,report:0 msgid "Report" msgstr "Declaración" @@ -528,11 +606,22 @@ msgstr "Derecha" msgid "Sequence" msgstr "Secuencia" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +msgid "Show journal items" +msgstr "Mostrar apuntes contables" + #. module: l10n_es_aeat #: field:aeat.model.export.config.line,sign:0 msgid "Sign character" msgstr "Carácter del signo" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/models/aeat_report.py:156 +#, python-format +msgid "Split fiscal years cannot be automatically handled. You should select manually the periods." +msgstr "Los ejercicios fiscales separados no pueden ser gestionados automáticamente. Debe seleccionar manualmente los periodos." + #. module: l10n_es_aeat #: field:aeat.model.export.config,date_start:0 msgid "Start date" @@ -550,9 +639,10 @@ msgid "Statement Type" msgstr "Tipo de declaración" #. module: l10n_es_aeat +#: selection:aeat.model.export.config.line,export_type:0 #: field:aeat.model.export.config.line,sub_config:0 -msgid "Subconfig" -msgstr "Subconfiguración" +msgid "Sub-configuration" +msgstr "Sub-configuración" #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,type:0 @@ -564,16 +654,6 @@ msgstr "Sustitutiva" msgid "Support Type" msgstr "Tipo de soporte" -#. module: l10n_es_aeat -#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form -msgid "Susbtitutive/complementary declaration" -msgstr "Declaración sustitutiva/complementaria" - -#. module: l10n_es_aeat -#: field:aeat.mod.map.tax.code.line,tax_code:0 -msgid "Tax codes" -msgstr "Códigos de impuesto" - #. module: l10n_es_aeat #: view:aeat.mod.map.tax.code:l10n_es_aeat.aeat_mod_map_tax_code_form #: view:aeat.mod.map.tax.code:l10n_es_aeat.aeat_mod_map_tax_code_tree @@ -592,14 +672,25 @@ msgstr "Línea de mapeo de códigos de impuesto" msgid "Tax code mapping lines" msgstr "Líneas de mapeo de códigos de impuesto" +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code.line,tax_codes:0 +msgid "Tax codes" +msgstr "Códigos de impuesto" + +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +#: field:l10n.es.aeat.report,tax_lines:0 +msgid "Tax lines" +msgstr "Líneas de impuestos" + #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 msgid "Telematics" msgstr "Telemática" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:75 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:114 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:74 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:109 #, python-format msgid "The formated string must match the given length" msgstr "La cadena formateada debe satisfacer el tamaño dado." @@ -616,19 +707,25 @@ msgstr "NIF" #. module: l10n_es_aeat #: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_form +#: field:aeat.model.export.config.line,value:0 msgid "Value" msgstr "Valor" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:72 -#, python-format -msgid "Wrong aling option. It should be < or >" -msgstr "Opción de alineamiento errónea. Debería ser < o >" +#: field:aeat.model.export.config.line,bool_no:0 +msgid "Value for no" +msgstr "Valor para el no" #. module: l10n_es_aeat #: field:aeat.model.export.config.line,bool_yes:0 -msgid "Yes value" -msgstr "Valor para el sí" +msgid "Value for yes" +msgstr "Value para el sí" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:71 +#, python-format +msgid "Wrong aling option. It should be < or >" +msgstr "Opción de alineamiento errónea. Debería ser < o >" #. module: l10n_es_aeat #: view:l10n.es.aeat.report.export_to_boe:l10n_es_aeat.wizard_aeat_export @@ -660,9 +757,3 @@ msgstr "o" msgid "para iniciar el proceso de exportación del archivo BOE de la AEAT." msgstr "para iniciar el proceso de exportación del archivo BOE de la AEAT." -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/models/aeat_tax_code_mapping.py:72 -#, python-format -msgid "Field: %s - Code(s): %s" -msgstr "Campo: %s - Código(s): %s" - diff --git a/l10n_es_aeat/i18n/l10n_es_aeat.pot b/l10n_es_aeat/i18n/l10n_es_aeat.pot index e9be7dda3c3..c64e30e5d9d 100644 --- a/l10n_es_aeat/i18n/l10n_es_aeat.pot +++ b/l10n_es_aeat/i18n/l10n_es_aeat.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-06-25 19:07+0000\n" -"PO-Revision-Date: 2015-06-25 19:07+0000\n" +"POT-Creation-Date: 2015-07-10 07:45+0000\n" +"PO-Revision-Date: 2015-07-10 07:45+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,17 +16,28 @@ msgstr "" "Plural-Forms: \n" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:203 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:199 #, python-format msgid "%s_report_%s.txt" msgstr "" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/models/aeat_export_configuration.py:110 +#, python-format +msgid "" +msgstr "" + #. module: l10n_es_aeat #: model:ir.ui.menu,name:l10n_es_aeat.menu_l10n_es_aeat_config #: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search msgid "AEAT" msgstr "" +#. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code,model:0 +msgid "AEAT Model" +msgstr "" + #. module: l10n_es_aeat #: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_form msgid "AEAT export configuration line" @@ -68,11 +79,6 @@ msgstr "" msgid "Advanced configuration" msgstr "" -#. module: l10n_es_aeat -#: field:aeat.mod.map.tax.code,model:0 -msgid "Aeat Model" -msgstr "" - #. module: l10n_es_aeat #: field:aeat.model.export.config.line,alignment:0 msgid "Alignment" @@ -83,6 +89,11 @@ msgstr "" msgid "Alphanumeric" msgstr "" +#. module: l10n_es_aeat +#: field:l10n.es.aeat.tax.line,amount:0 +msgid "Amount" +msgstr "" + #. module: l10n_es_aeat #: field:aeat.model.export.config.line,apply_sign:0 msgid "Apply sign" @@ -157,6 +168,16 @@ msgstr "" msgid "Complementary" msgstr "" +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,conditional:0 +msgid "Conditional" +msgstr "" + +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,conditional_expression:0 +msgid "Conditional expression" +msgstr "" + #. module: l10n_es_aeat #: field:aeat.model.export.config.line,export_config_id:0 msgid "Config parent" @@ -188,6 +209,7 @@ msgstr "" #: field:aeat.model.export.config,create_uid:0 #: field:aeat.model.export.config.line,create_uid:0 #: field:l10n.es.aeat.report.export_to_boe,create_uid:0 +#: field:l10n.es.aeat.tax.line,create_uid:0 msgid "Created by" msgstr "" @@ -197,6 +219,7 @@ msgstr "" #: field:aeat.model.export.config,create_date:0 #: field:aeat.model.export.config.line,create_date:0 #: field:l10n.es.aeat.report.export_to_boe,create_date:0 +#: field:l10n.es.aeat.tax.line,create_date:0 msgid "Created on" msgstr "" @@ -239,7 +262,7 @@ msgid "End date" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/models/aeat_tax_code_mapping.py:55 +#: code:addons/l10n_es_aeat/models/aeat_tax_code_mapping.py:56 #, python-format msgid "Error! The dates of the record overlap with an existing record." msgstr "" @@ -291,6 +314,12 @@ msgstr "" msgid "Expression" msgstr "" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/models/aeat_export_configuration.py:104 +#, python-format +msgid "Expression: " +msgstr "" + #. module: l10n_es_aeat #: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_form msgid "Field especification" @@ -298,6 +327,7 @@ msgstr "" #. module: l10n_es_aeat #: field:aeat.mod.map.tax.code.line,field_number:0 +#: field:l10n.es.aeat.tax.line,field_number:0 msgid "Field number" msgstr "" @@ -306,12 +336,6 @@ msgstr "" msgid "Field size" msgstr "" -#. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/models/aeat_tax_code_mapping.py:72 -#, python-format -msgid "Field: %s - Code(s): %s" -msgstr "" - #. module: l10n_es_aeat #: field:l10n.es.aeat.report.export_to_boe,data:0 msgid "File" @@ -322,11 +346,6 @@ msgstr "" msgid "File name" msgstr "" -#. module: l10n_es_aeat -#: field:aeat.model.export.config.line,position:0 -msgid "First character position" -msgstr "" - #. module: l10n_es_aeat #: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search #: field:l10n.es.aeat.report,fiscalyear_id:0 @@ -335,7 +354,13 @@ msgstr "" #. module: l10n_es_aeat #: field:aeat.model.export.config.line,fixed_value:0 -msgid "Fixed Value" +msgid "Fixed value" +msgstr "" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/models/aeat_export_configuration.py:110 +#, python-format +msgid "Fixed: %s" msgstr "" #. module: l10n_es_aeat @@ -355,9 +380,20 @@ msgstr "" #: field:aeat.model.export.config.line,id:0 #: field:l10n.es.aeat.report,id:0 #: field:l10n.es.aeat.report.export_to_boe,id:0 +#: field:l10n.es.aeat.tax.line,id:0 msgid "ID" msgstr "" +#. module: l10n_es_aeat +#: help:aeat.model.export.config.line,repeat_expression:0 +msgid "If set, this expression will be used for getting the list of elements to iterate on" +msgstr "" + +#. module: l10n_es_aeat +#: help:aeat.model.export.config.line,conditional_expression:0 +msgid "If set, this expression will be used to evaluate if this line should be added" +msgstr "" + #. module: l10n_es_aeat #: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_search msgid "In process" @@ -373,6 +409,17 @@ msgstr "" msgid "Informativas" msgstr "" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/models/aeat_report.py:196 +#, python-format +msgid "It seems that you have defined quarterly periods or periods in the middle of the month. This cannot be automatically handled. You should select manually the periods." +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.tax.line,move_lines:0 +msgid "Journal items" +msgstr "" + #. module: l10n_es_aeat #: field:l10n.es.aeat.report,representative_vat:0 msgid "L.R. VAT number" @@ -384,6 +431,7 @@ msgstr "" #: field:aeat.model.export.config,write_uid:0 #: field:aeat.model.export.config.line,write_uid:0 #: field:l10n.es.aeat.report.export_to_boe,write_uid:0 +#: field:l10n.es.aeat.tax.line,write_uid:0 msgid "Last Updated by" msgstr "" @@ -393,6 +441,7 @@ msgstr "" #: field:aeat.model.export.config,write_date:0 #: field:aeat.model.export.config.line,write_date:0 #: field:l10n.es.aeat.report.export_to_boe,write_date:0 +#: field:l10n.es.aeat.tax.line,write_date:0 msgid "Last Updated on" msgstr "" @@ -411,6 +460,11 @@ msgstr "" msgid "Lines" msgstr "" +#. module: l10n_es_aeat +#: field:l10n.es.aeat.tax.line,map_line:0 +msgid "Map line" +msgstr "" + #. module: l10n_es_aeat #: field:aeat.mod.map.tax.code,map_lines:0 msgid "Map lines" @@ -437,16 +491,13 @@ msgid "Must have name and surname." msgstr "" #. module: l10n_es_aeat +#: field:aeat.mod.map.tax.code.line,name:0 #: field:aeat.model.export.config,name:0 #: field:aeat.model.export.config.line,name:0 +#: field:l10n.es.aeat.tax.line,name:0 msgid "Name" msgstr "" -#. module: l10n_es_aeat -#: field:aeat.model.export.config.line,bool_no:0 -msgid "No value" -msgstr "" - #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,type:0 msgid "Normal" @@ -469,11 +520,11 @@ msgstr "" #. module: l10n_es_aeat #: field:aeat.model.export.config,model:0 -msgid "Odoo Model" +msgid "Odoo model" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/models/aeat_report.py:153 +#: code:addons/l10n_es_aeat/models/aeat_report.py:290 #, python-format msgid "Only reports in 'draft' or 'cancelled' state can be removed" msgstr "" @@ -483,6 +534,21 @@ msgstr "" msgid "Optativo: Importar datos de fichero" msgstr "" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +msgid "Other parameters" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,period_type:0 +msgid "Period type" +msgstr "" + +#. module: l10n_es_aeat +#: field:l10n.es.aeat.report,periods:0 +msgid "Period(s)" +msgstr "" + #. module: l10n_es_aeat #: field:l10n.es.aeat.report,contact_phone:0 msgid "Phone" @@ -518,8 +584,14 @@ msgstr "" msgid "Repeat" msgstr "" +#. module: l10n_es_aeat +#: field:aeat.model.export.config.line,repeat_expression:0 +msgid "Repeat expression" +msgstr "" + #. module: l10n_es_aeat #: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +#: field:l10n.es.aeat.tax.line,report:0 msgid "Report" msgstr "" @@ -534,11 +606,22 @@ msgstr "" msgid "Sequence" msgstr "" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +msgid "Show journal items" +msgstr "" + #. module: l10n_es_aeat #: field:aeat.model.export.config.line,sign:0 msgid "Sign character" msgstr "" +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/models/aeat_report.py:156 +#, python-format +msgid "Split fiscal years cannot be automatically handled. You should select manually the periods." +msgstr "" + #. module: l10n_es_aeat #: field:aeat.model.export.config,date_start:0 msgid "Start date" @@ -556,8 +639,9 @@ msgid "Statement Type" msgstr "" #. module: l10n_es_aeat +#: selection:aeat.model.export.config.line,export_type:0 #: field:aeat.model.export.config.line,sub_config:0 -msgid "Subconfig" +msgid "Sub-configuration" msgstr "" #. module: l10n_es_aeat @@ -570,11 +654,6 @@ msgstr "" msgid "Support Type" msgstr "" -#. module: l10n_es_aeat -#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form -msgid "Susbtitutive/complementary declaration" -msgstr "" - #. module: l10n_es_aeat #: view:aeat.mod.map.tax.code:l10n_es_aeat.aeat_mod_map_tax_code_form #: view:aeat.mod.map.tax.code:l10n_es_aeat.aeat_mod_map_tax_code_tree @@ -598,14 +677,20 @@ msgstr "" msgid "Tax codes" msgstr "" +#. module: l10n_es_aeat +#: view:l10n.es.aeat.report:l10n_es_aeat.view_l10n_es_aeat_report_form +#: field:l10n.es.aeat.report,tax_lines:0 +msgid "Tax lines" +msgstr "" + #. module: l10n_es_aeat #: selection:l10n.es.aeat.report,support_type:0 msgid "Telematics" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:75 -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:114 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:74 +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:109 #, python-format msgid "The formated string must match the given length" msgstr "" @@ -622,18 +707,24 @@ msgstr "" #. module: l10n_es_aeat #: view:aeat.model.export.config.line:l10n_es_aeat.aeat_model_export_config_line_form +#: field:aeat.model.export.config.line,value:0 msgid "Value" msgstr "" #. module: l10n_es_aeat -#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:72 -#, python-format -msgid "Wrong aling option. It should be < or >" +#: field:aeat.model.export.config.line,bool_no:0 +msgid "Value for no" msgstr "" #. module: l10n_es_aeat #: field:aeat.model.export.config.line,bool_yes:0 -msgid "Yes value" +msgid "Value for yes" +msgstr "" + +#. module: l10n_es_aeat +#: code:addons/l10n_es_aeat/wizard/export_to_boe.py:71 +#, python-format +msgid "Wrong aling option. It should be < or >" msgstr "" #. module: l10n_es_aeat diff --git a/l10n_es_aeat/models/aeat_export_configuration.py b/l10n_es_aeat/models/aeat_export_configuration.py index 6320084f31b..78f89ce2ec6 100644 --- a/l10n_es_aeat/models/aeat_export_configuration.py +++ b/l10n_es_aeat/models/aeat_export_configuration.py @@ -16,7 +16,7 @@ # ############################################################################## -from openerp import models, fields, api +from openerp import models, fields, api, _ class AeatModelExportConfig(models.Model): @@ -25,57 +25,97 @@ class AeatModelExportConfig(models.Model): name = fields.Char(string='Name') model_number = fields.Char(string='Model number', size=3) - model = fields.Many2one('ir.model', 'Odoo Model') + model = fields.Many2one('ir.model', 'Odoo model') date_start = fields.Date(string='Start date') date_end = fields.Date(string='End date') - config_lines = fields.One2many('aeat.model.export.config.line', - 'export_config_id', string='Lines') + config_lines = fields.One2many( + comodel_name='aeat.model.export.config.line', + inverse_name='export_config_id', string='Lines') class AeatModelExportConfigLine(models.Model): - _name = 'aeat.model.export.config.line' _order = 'sequence' sequence = fields.Integer("Sequence") - export_config_id = fields.Many2one('aeat.model.export.config', - string='Config parent') - name = fields.Char(string="Name") - repeat = fields.Boolean(string='Repeat') - sub_config = fields.Many2one('aeat.model.export.config', 'Subconfig') - position = fields.Integer("First character position") - export_type = fields.Selection([('string', 'Alphanumeric'), - ('float', 'Number with decimals'), - ('integer', 'Number without decimals'), - ('boolean', 'Boolean')], default='string', - string="Export field type") - apply_sign = fields.Boolean("Apply sign") + export_config_id = fields.Many2one( + comodel_name='aeat.model.export.config', string='Config parent', + ondelete="cascade", required=True) + name = fields.Char(string="Name", required=True) + repeat_expression = fields.Char( + string='Repeat expression', + help="If set, this expression will be used for getting the list of " + "elements to iterate on") + repeat = fields.Boolean(compute='_compute_repeat', store=True) + conditional_expression = fields.Char( + string='Conditional expression', + help="If set, this expression will be used to evaluate if this line " + "should be added") + conditional = fields.Boolean(compute='_compute_conditional', store=True) + sub_config = fields.Many2one( + comodel_name='aeat.model.export.config', string='Sub-configuration') + export_type = fields.Selection( + selection=[('string', 'Alphanumeric'), + ('float', 'Number with decimals'), + ('integer', 'Number without decimals'), + ('boolean', 'Boolean'), + ('subconfig', 'Sub-configuration')], + default='string', string="Export field type", required=True) + apply_sign = fields.Boolean("Apply sign", default=True) sign = fields.Char("Sign character", size=1, default='N') size = fields.Integer("Field size") - alignment = fields.Selection([('left', 'Left'), ('right', 'Right')], - default='left', string="Alignment") - bool_no = fields.Char("No value", size=1, default=' ') - bool_yes = fields.Char("Yes value", size=1, default='X') + alignment = fields.Selection( + [('left', 'Left'), ('right', 'Right')], + default='left', string="Alignment") + bool_no = fields.Char("Value for no", size=1, default=' ') + bool_yes = fields.Char("Value for yes", size=1, default='X') decimal_size = fields.Integer("Number of char for decimals", default=0) - expression = fields.Text('Expression') - fixed_value = fields.Char('Fixed Value') + expression = fields.Char('Expression') + fixed_value = fields.Char('Fixed value') + position = fields.Integer(compute='_compute_position') + value = fields.Char(compute='_compute_value', store=True) + + @api.one + @api.depends('repeat_expression') + def _compute_repeat(self): + self.repeat = bool(self.repeat_expression) + + @api.one + @api.depends('conditional_expression') + def _compute_conditional(self): + self.conditional = bool(self.conditional_expression) + + @api.one + @api.depends('sequence') + def _compute_position(self): + # TODO: Take into account sub-configurations + self.position = 1 + for line in self.export_config_id.config_lines: + if line == self: + break + self.position += line.size + + @api.one + @api.depends('fixed_value', 'expression') + def _compute_value(self): + if self.export_type == 'subconfig': + self.value = '-' + elif self.expression: + self.value = _('Expression: ') + if len(self.expression) > 35: + self.value += u'"%s…"' % self.expression[:34] + else: + self.value += u'"%s"' % self.expression + else: + self.value = _('Fixed: %s') % (self.fixed_value or _('')) @api.one @api.onchange('export_type') def onchange_type(self): - if self.export_type: - self.sub_config = False - self.repeat = False - if self.export_type == 'float': - self.decimal_size = 2 - self.alignment = 'right' - elif self.export_type == 'integer': - self.decimal_size = 0 - self.alignment = 'right' - elif self.export_type in ('string', 'boolean'): - self.alignment = 'left' - self.decimal_size = 0 - self.apply_sign = False + if self.export_type in ('float', 'integer'): + self.alignment = 'right' + elif self.export_type in ('string', 'boolean'): + self.alignment = 'left' @api.one @api.onchange('sub_config') diff --git a/l10n_es_aeat/models/aeat_report.py b/l10n_es_aeat/models/aeat_report.py index a368706f786..6fa1a2b701f 100644 --- a/l10n_es_aeat/models/aeat_report.py +++ b/l10n_es_aeat/models/aeat_report.py @@ -24,6 +24,7 @@ ############################################################################## from openerp import fields, models, api, exceptions, _ from openerp import SUPERUSER_ID +from datetime import datetime import re @@ -31,23 +32,42 @@ class L10nEsAeatReport(models.AbstractModel): _name = "l10n.es.aeat.report" _description = "AEAT report base module" _rec_name = 'sequence' + _aeat_number = False + _period_quarterly = True + _period_monthly = True + _period_yearly = False def _default_company(self): company_obj = self.env['res.company'] return company_obj._company_default_get('l10n.es.aeat.report') - @api.onchange('company_id') - def on_change_company_id(self): - """Loads some company data (the VAT number) when the selected - company changes. - """ - if self.company_id.vat: - # Remove the ES part from spanish vat numbers - # (ES12345678Z => 12345678Z) - self.company_vat = re.match( - "(ES){0,1}(.*)", self.company_id.vat).groups()[1] - self.contact_name = self.env.user.name - self.contact_phone = self.env.user.partner_id.phone + def get_period_type_selection(self): + period_types = [] + if self._period_yearly: + period_types += [('0A', '0A - Anual')] + if self._period_quarterly: + period_types += [('1T', '1T - Primer trimestre'), + ('2T', '2T - Segundo trimestre'), + ('3T', '3T - Tercer trimestre'), + ('4T', '4T - Cuarto trimestre')] + if self._period_monthly: + period_types += [('01', '01 - Enero'), + ('02', '02 - Febrero'), + ('03', '03 - Marzo'), + ('04', '04 - Abril'), + ('05', '05 - Mayo'), + ('06', '06 - Junio'), + ('07', '07 - Julio'), + ('08', '08 - Agosto'), + ('09', '09 - Septiembre'), + ('10', '10 - Octubre'), + ('11', '11 - Noviembre'), + ('12', '12 - Diciembre')] + return period_types + + def _default_period_type(self): + selection = self.get_period_type_selection() + return selection and selection[0][0] or False company_id = fields.Many2one( 'res.company', string='Company', required=True, readonly=True, @@ -55,8 +75,8 @@ def on_change_company_id(self): company_vat = fields.Char( string='VAT number', size=9, required=True, readonly=True, states={'draft': [('readonly', False)]}) - number = fields.Char(string='Declaration number', size=13, - required=True, readonly=True) + number = fields.Char( + string='Declaration number', size=13, required=True, readonly=True) previous_number = fields.Char( string='Previous declaration number', size=13, states={'done': [('readonly', True)]}) @@ -76,9 +96,8 @@ def on_change_company_id(self): readonly=True, states={'draft': [('readonly', False)]}) type = fields.Selection( [('N', 'Normal'), ('C', 'Complementary'), ('S', 'Substitutive')], - string='Statement Type', default='N', - states={'calculated': [('required', True)], - 'done': [('readonly', True)]}) + string='Statement Type', default='N', readonly=True, required=True, + states={'draft': [('readonly', False)]}) support_type = fields.Selection( [('C', 'DVD'), ('T', 'Telematics')], string='Support Type', default='T', states={'calculated': [('required', True)], @@ -89,14 +108,106 @@ def on_change_company_id(self): ('cancelled', 'Cancelled')], string='State', readonly=True, default='draft') sequence = fields.Char(string="Sequence", size=16) - export_config = fields.Many2one('aeat.model.export.config', - string='Export config') + model = fields.Many2one( + comodel_name="ir.model", compute='_compute_report_model') + export_config = fields.Many2one( + comodel_name='aeat.model.export.config', string='Export config', + domain="[('model', '=', model)]") + period_type = fields.Selection( + selection="get_period_type_selection", string="Period type", + required=True, default=_default_period_type, + readonly=True, states={'draft': [('readonly', False)]}) + periods = fields.Many2many( + comodel_name='account.period', readonly=True, string="Period(s)", + states={'draft': [('readonly', False)]}) + tax_lines = fields.One2many( + comodel_name='l10n.es.aeat.tax.line', inverse_name='report', + readonly=True) _sql_constraints = [ ('sequence_uniq', 'unique(sequence)', 'AEAT report sequence must be unique'), ] + @api.one + def _compute_report_model(self): + self.model = self.env['ir.model'].search([('model', '=', self._name)]) + + @api.onchange('company_id') + def on_change_company_id(self): + """Loads some company data (the VAT number) when the selected + company changes. + """ + if self.company_id.vat: + # Remove the ES part from spanish vat numbers + # (ES12345678Z => 12345678Z) + self.company_vat = re.match( + "(ES){0,1}(.*)", self.company_id.vat).groups()[1] + self.contact_name = self.env.user.name + self.contact_phone = self.env.user.partner_id.phone + + @api.onchange('period_type', 'fiscalyear_id') + def onchange_period_type(self): + period_model = self.env['account.period'] + if not self.fiscalyear_id: + self.periods = False + else: + fy_date_start = fields.Date.from_string( + self.fiscalyear_id.date_start) + fy_date_stop = fields.Date.from_string( + self.fiscalyear_id.date_stop) + if self.period_type == '0A': + # Anual + if fy_date_start.year != fy_date_stop.year: + return { + 'warning': _( + 'Split fiscal years cannot be automatically ' + 'handled. You should select manually the periods.') + } + self.periods = self.fiscalyear_id.period_ids.filtered( + lambda x: not x.special) + elif self.period_type in ('1T', '2T', '3T', '4T'): + # Trimestral + start_month = (int(self.period_type[:1]) - 1) * 3 + 1 + # Para manejar ejercicios fiscales divididos en dos periodos + year = (fy_date_start.year if + start_month < fy_date_start.month else + fy_date_stop.year) + period = period_model.find( + dt=fields.Date.to_string( + datetime(year=year, month=start_month, day=1))) + period_date_stop = fields.Date.from_string(period.date_stop) + self.periods = period + if period_date_stop.month != start_month + 2: + # Los periodos no están definidos trimestralmente + for i in range(1, 3): + month = start_month + i + period = period_model.find( + dt=fields.Date.to_string( + datetime(year=year, month=month, day=1))) + self.periods += period + elif self.period_type in ('01', '02', '03', '04', '05', '06', + '07', '08', '09', '10', '11', '12'): + # Mensual + month = int(self.period_type) + # Para manejar ejercicios fiscales divididos en dos periodos + year = (fy_date_start.year if month < fy_date_start.month else + fy_date_stop.year) + period = period_model.find( + dt=fields.Date.to_string( + datetime(year=year, month=month, day=1))) + period_date_start = fields.Date.from_string(period.date_start) + period_date_stop = fields.Date.from_string(period.date_stop) + if period_date_start.month != period_date_stop.month: + return { + 'warning': _( + 'It seems that you have defined quarterly periods ' + 'or periods in the middle of the month. This ' + 'cannot be automatically handled. You should ' + 'select manually the periods.') + } + self.periods = period + @api.model def create(self, values): seq_obj = self.env['ir.sequence'] @@ -119,6 +230,39 @@ def button_recalculate(self): @api.multi def calculate(self): + for report in self: + if not report.periods: + raise exceptions.Warning( + 'There is no period defined for the report. Please set ' + 'at least one period and try again.') + report.tax_lines.unlink() + # Buscar configuración de mapeo de impuestos + tax_code_map_obj = self.env['aeat.mod.map.tax.code'] + date_start = min([fields.Date.from_string(x) for x in + self.periods.mapped('date_start')]) + date_stop = max([fields.Date.from_string(x) for x in + self.periods.mapped('date_stop')]) + tax_code_map = tax_code_map_obj.search( + [('model', '=', report.number), + '|', + ('date_from', '<=', date_start), + ('date_from', '=', False), + '|', + ('date_to', '>=', date_stop), + ('date_to', '=', False)], limit=1) + if tax_code_map: + tax_lines = [] + for line in tax_code_map.map_lines: + move_lines = self.env['account.move.line'] + for tax_code in line.tax_codes: + move_lines += report._get_tax_code_lines( + tax_code, periods=report.periods) + tax_lines.append({ + 'map_line': line.id, + 'amount': sum([x.tax_amount for x in move_lines]), + 'move_lines': [(6, 0, move_lines.ids)], + }) + report.tax_lines = [(0, 0, x) for x in tax_lines] return True @api.multi @@ -142,8 +286,8 @@ def button_recover(self): @api.multi def button_export(self): for report in self: - export_obj = self.env["l10n.es.aeat.report.%s.export_to_boe" % - report.number] + export_obj = self.env[ + "l10n.es.aeat.report.%s.export_to_boe" % report.number] export_obj.export_boe_file(report) return True @@ -159,6 +303,8 @@ def init(self, cr): seq_obj = self.pool['ir.sequence'] try: aeat_num = getattr(self, '_aeat_number') + if not aeat_num: + raise Exception() sequence = "aeat%s-sequence" % aeat_num if not seq_obj.search(cr, SUPERUSER_ID, [('name', '=', sequence)]): @@ -182,20 +328,58 @@ def _get_partner_domain(self): return [] @api.multi - def _get_tax_code_lines(self, tax_code, periods=None): + def _get_move_line_domain(self, tax_code_template, periods=None, + include_children=True): self.ensure_one() - tax_code_obj = self.env['account.tax.code'] - tax_codes = tax_code_obj.search( - [('code', '=', tax_code), - ('company_id', '=', self.company_id.id)]) - move_line_obj = self.env['account.move.line'] + tax_code_model = self.env['account.tax.code'] + tax_code = tax_code_model.search( + [('code', '=', tax_code_template.code), + ('company_id', '=', self.company_id.id)], limit=1) + if include_children and tax_code: + tax_codes = tax_code_model.search( + [('id', 'child_of', tax_code.id), + ('company_id', '=', self.company_id.id)]) + else: + tax_codes = tax_code if not periods: - period_obj = self.env['account.period'] - periods = period_obj.search( + periods = self.env['account.period'].search( [('fiscalyear_id', '=', self.fiscalyear_id.id)]) move_line_domain = [('company_id', '=', self.company_id.id), ('tax_code_id', 'child_of', tax_codes.ids), ('period_id', 'in', periods.ids)] move_line_domain += self._get_partner_domain() - move_lines = move_line_obj.search(move_line_domain) - return move_lines + return move_line_domain + + @api.multi + def _get_tax_code_lines(self, tax_code_template, periods=None, + include_children=True): + self.ensure_one() + domain = self._get_move_line_domain( + tax_code_template, periods=periods, + include_children=include_children) + return self.env['account.move.line'].search(domain) + + +class L10nEsAeatTaxLine(models.Model): + _name = "l10n.es.aeat.tax.line" + + report = fields.Many2one('l10n.es.aeat.report', required=True) + field_number = fields.Integer( + string="Field number", related="map_line.field_number", + store=True) + name = fields.Char( + string="Name", related="map_line.name", store=True) + amount = fields.Float() + map_line = fields.Many2one( + comodel_name='aeat.mod.map.tax.code.line', required=True) + move_lines = fields.Many2many( + comodel_name='account.move.line', string='Journal items') + + def _get_move_line_act_window_dict(self): + return self.env.ref('account.action_tax_code_line_open').read()[0] + + @api.multi + def get_calculated_move_lines(self): + res = self._get_move_line_act_window_dict() + res['domain'] = [('id', 'in', self.move_lines.ids)] + return res diff --git a/l10n_es_aeat/models/aeat_tax_code_mapping.py b/l10n_es_aeat/models/aeat_tax_code_mapping.py index c0303dfa0ed..f898a63b5c8 100644 --- a/l10n_es_aeat/models/aeat_tax_code_mapping.py +++ b/l10n_es_aeat/models/aeat_tax_code_mapping.py @@ -21,10 +21,11 @@ class AeatModMapTaxCode(models.Model): _name = 'aeat.mod.map.tax.code' - date_from = fields.Date(string="From Date", required=True) - date_to = fields.Date(string="To Date", required=True) - map_lines = fields.One2many('aeat.mod.map.tax.code.line', 'map_parent_id', - string="Map lines", required=True) + date_from = fields.Date(string="From Date") + date_to = fields.Date(string="To Date") + map_lines = fields.One2many( + comodel_name='aeat.mod.map.tax.code.line', + inverse_name='map_parent_id', string="Map lines", required=True) model = fields.Integer(string="AEAT Model", required=True) @api.one @@ -55,6 +56,20 @@ def _unique_date_range(self): _("Error! The dates of the record overlap with an existing " "record.")) + @api.multi + def name_get(self): + vals = [] + for record in self: + name = "%s" % record.model + if record.date_from or record.date_to: + name += " (%s-%s)" % ( + record.date_from and + fields.Date.from_string(record.date_from) or '', + record.date_to and + fields.Date.from_string(record.date_to) or '') + vals.append(tuple([record.id, name])) + return vals + class AeatModMapTaxCodeLine(models.Model): _name = 'aeat.mod.map.tax.code.line' @@ -63,14 +78,12 @@ class AeatModMapTaxCodeLine(models.Model): tax_codes = fields.Many2many( comodel_name='account.tax.code.template', string="Tax codes", required=True) - map_parent_id = fields.Many2one('aeat.mod.map.tax.code') + name = fields.Char(required=True) + map_parent_id = fields.Many2one('aeat.mod.map.tax.code', required=True) - @api.multi - def name_get(self): - vals = [] - for record in self: - name = _("Field: %s - Code(s): %s") % ( - record.field_number, - ", ".join(x.code for x in record.tax_codes)) - vals.append(tuple([record.id, name])) - return vals + def get_taxes_amount(self, report, periods): + tax_amount = 0 + for tax_code in self.tax_codes: + move_lines = report._get_tax_code_lines(tax_code, periods=periods) + tax_amount += sum([x.tax_amount for x in move_lines]) + return tax_amount diff --git a/l10n_es_aeat/security/ir.model.access.csv b/l10n_es_aeat/security/ir.model.access.csv index 9e99f523f33..b4b6f3bf298 100644 --- a/l10n_es_aeat/security/ir.model.access.csv +++ b/l10n_es_aeat/security/ir.model.access.csv @@ -1,5 +1,4 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_l10n_es_aeat_report_manager,l10n.es.aeat.report manager,model_l10n_es_aeat_report,group_account_aeat,1,1,1,1 access_aeat_model_export_config_admin,aeat.model.export.config admin,model_aeat_model_export_config,base.group_system,1,1,1,1 access_aeat_model_export_config_aeat,aeat.model.export.config aeat,model_aeat_model_export_config,group_account_aeat,1,0,0,0 access_aeat_model_export_config_line_admin,aeat.model.export.config admin,model_aeat_model_export_config_line,base.group_system,1,1,1,1 diff --git a/l10n_es_aeat/views/aeat_export_configuration_view.xml b/l10n_es_aeat/views/aeat_export_configuration_view.xml index 3bb2a439a56..8b0e4369a34 100644 --- a/l10n_es_aeat/views/aeat_export_configuration_view.xml +++ b/l10n_es_aeat/views/aeat_export_configuration_view.xml @@ -9,6 +9,7 @@ + @@ -21,15 +22,20 @@ - - - - + + + + + + + + + - - - - + + @@ -43,8 +49,11 @@ - + + + +
@@ -55,36 +64,64 @@ aeat.model.export.config.line
+

+ +

- + + - - - - - - - - + + + + + + - - - - + + + - - + + - + - - - - + + + + + + + + diff --git a/l10n_es_aeat/views/aeat_tax_code_mapping_view.xml b/l10n_es_aeat/views/aeat_tax_code_mapping_view.xml index 57854f633cc..5258870b2b5 100644 --- a/l10n_es_aeat/views/aeat_tax_code_mapping_view.xml +++ b/l10n_es_aeat/views/aeat_tax_code_mapping_view.xml @@ -13,7 +13,7 @@ - + aeat.mod.map.tax.code.form aeat.mod.map.tax.code @@ -29,31 +29,37 @@ - + aeat.mod.map.tax.code.line.tree aeat.mod.map.tax.code.line + - + aeat.mod.map.tax.code.line.form aeat.mod.map.tax.code.line
- - + + + + + + +
- + Tax code mapping aeat.mod.map.tax.code diff --git a/l10n_es_aeat/views/aeat_view.xml b/l10n_es_aeat/views/aeat_view.xml index 3bca5ff0b4a..4c5311f4a59 100644 --- a/l10n_es_aeat/views/aeat_view.xml +++ b/l10n_es_aeat/views/aeat_view.xml @@ -9,6 +9,7 @@ + @@ -32,31 +33,62 @@ +

- + + + - + - + - + - + + + + + + + + +