diff --git a/l10n_es_aeat_sii/i18n/es.po b/l10n_es_aeat_sii/i18n/es.po index d7a342aa7a1..34676e6c7cf 100644 --- a/l10n_es_aeat_sii/i18n/es.po +++ b/l10n_es_aeat_sii/i18n/es.po @@ -4,11 +4,11 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-11-07 10:52+0000\n" -"PO-Revision-Date: 2019-07-24 07:43+0000\n" -"Last-Translator: Josep M \n" +"POT-Creation-Date: 2024-12-20 11:30+0000\n" +"PO-Revision-Date: 2024-12-20 12:31+0100\n" +"Last-Translator: Aira SCG\n" "Language-Team: \n" "Language: es\n" "MIME-Version: 1.0\n" @@ -282,7 +282,7 @@ msgid "Credit Note" msgstr "Rectificativa" #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:1348 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:1351 #, python-format msgid "Currently there's no support for multiple exempt causes." msgstr "Actualmente no hay soporte para múltiples causas de exención." @@ -371,6 +371,17 @@ msgstr "Exportación" msgid "File" msgstr "Archivo" +#. module: l10n_es_aeat_sii +#: model:ir.model.fields,field_description:l10n_es_aeat_sii.field_account_invoice__date_operation +msgid "Operation Date" +msgstr "Fecha Operación" + +#. module: l10n_es_aeat_sii +#: model:ir.model.fields,help:l10n_es_aeat_sii.field_account_invoice__date_operation +msgid "Fill only if the operation date is different from the accounting date" +msgstr "Rellenar sólo si la fecha de la operación es diferente de la fecha contable" + + #. module: l10n_es_aeat_sii #: model:ir.model.fields,help:l10n_es_aeat_sii.field_account_invoice__sii_refund_specific_invoice_type msgid "" @@ -596,7 +607,7 @@ msgid "Never sent to SII" msgstr "Nunca enviadas al SII" #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:361 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:364 #, python-format msgid "No VAT configured for the company '{}'" msgstr "La compañía '{}' no tiene ningún NIF establecido" @@ -1077,31 +1088,31 @@ msgid "The last attemp to sent to SII has failed" msgstr "El último intento de envío al SII ha fallado" #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:695 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:698 #, python-format msgid "The partner has not a VAT configured." msgstr "La empresa no tiene un NIF establecido." #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:711 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:714 #, python-format msgid "The supplier number invoice is required" msgstr "El nº de factura del proveedor es obligatorio" #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:391 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:394 #, python-format msgid "There's a mismatch in taxes for RE. Check them." msgstr "Hay un cruce erróneo para tasas en RE. Chequéelas." #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:703 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:706 #, python-format msgid "This company doesn't have SII enabled." msgstr "Esta compañía no tiene habilitado el SII." #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:707 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:710 #, python-format msgid "This invoice is not SII enabled." msgstr "Esta factura no está habilitada para el SII." @@ -1133,13 +1144,13 @@ msgid "With modifications not sent to SII" msgstr "Modificaciones no enviadas al SII" #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:1230 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:1233 #, python-format msgid "You can not cancel this invoice because there is a job running!" msgstr "¡No puede cancelar una factura porque hay un trabajo ejecutándose!" #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:1200 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:1203 #, python-format msgid "" "You can not communicate the cancellation of this invoice at this moment " @@ -1149,7 +1160,7 @@ msgstr "" "hay un trabajo ejecutándose!" #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:1139 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:1142 #, python-format msgid "" "You can not communicate this invoice at this moment because there is a job " @@ -1159,7 +1170,7 @@ msgstr "" "ejecutándose!" #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:1246 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:1249 #, python-format msgid "You can not set to draft this invoice because there is a job running!" msgstr "" @@ -1167,13 +1178,13 @@ msgstr "" "trabajo ejecutándose!" #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:690 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:693 #, python-format msgid "You can't make a supplier simplified invoice." msgstr "No puede realizar una factura simplificada a un proveedor." #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:278 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:281 #, python-format msgid "" "You cannot change the invoice date of an invoice already registered at the " @@ -1183,7 +1194,7 @@ msgstr "" "cancelar la factura y crear una nueva con la fecha correcta" #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:295 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:298 #, python-format msgid "" "You cannot change the supplier invoice number of an invoice already " @@ -1194,7 +1205,7 @@ msgstr "" "al SII. Debe cancelar la factura y crear una nueva con el número correcto" #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:288 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:291 #, python-format msgid "" "You cannot change the supplier of an invoice already registered at the SII. " @@ -1204,19 +1215,19 @@ msgstr "" "la factura y crear una nueva con el proveedor correcto" #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:317 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:320 #, python-format msgid "You cannot delete an invoice already registered at the SII." msgstr "No puede eliminar una factura enviada al SII." #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:698 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:701 #, python-format msgid "You have to select what account chart template use this company." msgstr "Debe seleccionar qué plan contable utiliza esta compañía." #. module: l10n_es_aeat_sii -#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:228 +#: code:addons/l10n_es_aeat_sii/models/account_invoice.py:231 #, python-format msgid "You must have at least one refunded invoice" msgstr "Debe tener al menos una factura rectificada" diff --git a/l10n_es_aeat_sii/models/account_invoice.py b/l10n_es_aeat_sii/models/account_invoice.py index 7c4350f96d5..2c89f221ad9 100755 --- a/l10n_es_aeat_sii/models/account_invoice.py +++ b/l10n_es_aeat_sii/models/account_invoice.py @@ -103,7 +103,9 @@ def _default_sii_registration_key(self): key = sii_key_obj.search( [('code', '=', '01'), ('type', '=', 'sale')], limit=1) return key - + date_operation = fields.Date( + string='Operation Date', copy=False, track_visibility='always', + help="Fill only if the operation date is different from the accounting date") sii_manual_description = fields.Text( string='SII manual description', size=500, copy=False, ) @@ -778,6 +780,10 @@ def _get_sii_invoice_dict_out(self, cancel=False): "TipoDesglose": tipo_desglose, "ImporteTotal": amount_total, } + if self.date_operation: + inv_dict["FacturaExpedida"].update( + {'FechaOperacion': self._change_date_format(self.date_operation)} + ) if self.sii_macrodata: inv_dict["FacturaExpedida"].update(Macrodato="S") if self.sii_registration_key_additional1: @@ -882,6 +888,10 @@ def _get_sii_invoice_dict_in(self, cancel=False): "ImporteTotal": amount_total, "CuotaDeducible": tax_amount * sign, } + if self.date_operation: + inv_dict["FacturaRecibida"].update( + {'FechaOperacion': self._change_date_format(self.date_operation)} + ) if self.sii_macrodata: inv_dict["FacturaRecibida"].update(Macrodato="S") if self.sii_registration_key_additional1: diff --git a/l10n_es_aeat_sii/views/account_invoice_view.xml b/l10n_es_aeat_sii/views/account_invoice_view.xml index a5a4ac0e7e0..48ddf38d0c6 100755 --- a/l10n_es_aeat_sii/views/account_invoice_view.xml +++ b/l10n_es_aeat_sii/views/account_invoice_view.xml @@ -20,7 +20,11 @@ ('state', 'not in', ['cancel']), ('sii_state', 'not in', ['sent','sent_w_errors','sent_modified'])]}" /> - + + + {'required':[('state','not in',['open','paid','cancel'])]} @@ -150,6 +154,11 @@ + + +