From c1a5382b19f39ff779851ec91d1ad560cf755223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sim=C3=B3=20Albert=20i=20Beltran?= Date: Wed, 6 Jun 2018 14:00:30 +0200 Subject: [PATCH] Task #034300: Adapt to new 1.1 version --- aeat.py | 27 ++++++++-------- aeat.xml | 4 +++ locale/ca_ES.po | 83 +++++++++++++++++++++++++++++++++---------------- locale/es_ES.po | 76 +++++++++++++++++++++++++++++--------------- setup.py | 2 +- 5 files changed, 126 insertions(+), 66 deletions(-) diff --git a/aeat.py b/aeat.py index 6296c9e..2cf40bc 100644 --- a/aeat.py +++ b/aeat.py @@ -46,7 +46,9 @@ def _datetime(x): COMMUNICATION_TYPE = [ # L0 ('A0', 'Registration of invoices/records'), ('A1', 'Amendment of invoices/records (registration errors)'), - # ('A4', 'Amendment of Invoice for Travellers'), # Not suported + # ('A4', 'Amendment of Invoice for Travellers'), # Not supported + # ('A5', 'Travellers registration'), # Not supported + # ('A6', 'Amendment of travellers tax devolutions'), # Not supported ('C0', 'Query Invoices'), # Not in L0 ('D0', 'Delete Invoices'), # Not In L0 ] @@ -61,8 +63,8 @@ BOOK_KEY = [ OPERATION_KEY = [ # L2_EMI - L2_RECI (None, ''), - ('F1', 'Invoice'), - ('F2', 'Simplified Invoice (ticket)'), + ('F1', 'Invoice (Art 6.7.3 y 7.3 of RD1619/2012)'), + ('F2', 'Simplified Invoice (ticket) and Invoices without destination identidication (Art 6.1.d of RD1619/2012)'), ('R1', 'Corrected Invoice (Art 80.1, 80.2 and 80.6 and error grounded in law)'), ('R2', 'Corrected Invoice (Art. 80.3)'), ('R3', 'Credit Note (Art 80.4)'), @@ -72,6 +74,7 @@ OPERATION_KEY = [ # L2_EMI - L2_RECI ('F4', 'Invoice summary entry'), ('F5', 'Import (DUA)'), ('F6', 'Other accounting documents'), + ('LC', 'Duty - Complementary clearing'), # Not supported ] @@ -115,7 +118,7 @@ SEND_SPECIAL_REGIME_KEY = [ # L3.1 'Administration recipients)'), ('15', 'Invoice with VAT pending accrual - ' 'operations of successive tract'), - ('16', 'First semester 2017'), + ('16', 'First semester 2017 and other invoices before the SII'), ] RECEIVE_SPECIAL_REGIME_KEY = [ @@ -135,7 +138,7 @@ RECEIVE_SPECIAL_REGIME_KEY = [ ('12', 'Business premises lease activities'), ('13', 'Invoice corresponding to an import ' '(reported without been associated with a DUA)'), - ('14', 'First semester 2017'), + ('14', 'First semester 2017 and other invoices before the SII'), ] AEAT_COMMUNICATION_STATE = [ @@ -194,7 +197,8 @@ PAYMENT_TYPE = [ ('02', 'Cheque'), ('03', 'Not to be collected/paid (deadline for accrual/forced accrual ' 'as part of insolvency proceedings)'), - ('04', 'Other methods of collection/payment') + ('04', 'Other methods of collection/payment'), + ('05', 'Bank debit order'), ] # L12 @@ -284,12 +288,9 @@ class SIIReport(Workflow, ModelSQL, ModelView): csv = fields.Char('CSV', readonly=True) version = fields.Selection([ ('0.7', '0.7'), - ('1.0', '1.0'), - ], 'Version', required=True, - states={ - 'readonly': Eval('state') != 'draft', - }, - depends=['state']) + ('1.0', '1.0'), + ('1.1', '1.1'), + ], 'Version', required=True, readonly=True) lines = fields.One2Many('aeat.sii.report.lines', 'report', 'Lines', states={ 'readonly': Eval('state') != 'draft', @@ -367,7 +368,7 @@ class SIIReport(Workflow, ModelSQL, ModelView): @staticmethod def default_version(): - return '1.0' + return '1.1' @fields.depends('company') def on_change_with_company_vat(self): diff --git a/aeat.xml b/aeat.xml index c6f6f50..be68aac 100644 --- a/aeat.xml +++ b/aeat.xml @@ -192,6 +192,7 @@ parent="menu_aeat_sii_report_menu" sequence="10" name="AEAT SII Report Issued"/> + SII Report Received @@ -215,6 +217,7 @@ parent="menu_aeat_sii_report_menu" sequence="10" name="AEAT SII Report Received"/> + diff --git a/locale/ca_ES.po b/locale/ca_ES.po index c821613..02dfd52 100644 --- a/locale/ca_ES.po +++ b/locale/ca_ES.po @@ -402,6 +402,14 @@ msgctxt "field:party.party,sii_identifier_type:" msgid "SII Identifier Type" msgstr "SII Identificador" +msgctxt "field:party.party,sii_vat_code:" +msgid "SII VAT Code" +msgstr "Número NIF SII" + +msgctxt "field:party.party,sii_vat_country:" +msgid "SII VAT Country" +msgstr "País NIF SII" + msgctxt "model:aeat.sii.issued.invoice.mapper,name:" msgid "Tryton Issued Invoice to AEAT mapper" msgstr "Correspondencia Tryton - Aeat facturas emitidas" @@ -646,8 +654,9 @@ msgid "Export" msgstr "Exportación" msgctxt "selection:account.invoice,sii_issued_key:" -msgid "First semester 2017" -msgstr "Primer semestre 2017" +msgid "First semester 2017 and other invoices before the SII" +msgstr "" +"Primer semestre del 2017 y altres factures abans de l'inclusió del SII" msgctxt "selection:account.invoice,sii_issued_key:" msgid "General tax regime activity" @@ -715,13 +724,17 @@ msgctxt "selection:account.invoice,sii_operation_key:" msgid "Credit Note (Art 80.4)" msgstr "Facura rectificativa (Art. 80.4)" +msgctxt "selection:account.invoice,sii_operation_key:" +msgid "Duty - Complementary clearing" +msgstr "Aduanes - Liquidació complementaria" + msgctxt "selection:account.invoice,sii_operation_key:" msgid "Import (DUA)" msgstr "Importaciones (DUA)" msgctxt "selection:account.invoice,sii_operation_key:" -msgid "Invoice" -msgstr "Factura" +msgid "Invoice (Art 6.7.3 y 7.3 of RD1619/2012)" +msgstr "Factura (Art 6.7.3 y 7.3 del RD 1619/2012)" msgctxt "selection:account.invoice,sii_operation_key:" msgid "Invoice issued to replace simplified invoices issued and filed" @@ -738,8 +751,12 @@ msgid "Other accounting documents" msgstr "Justificantes contables" msgctxt "selection:account.invoice,sii_operation_key:" -msgid "Simplified Invoice (ticket)" -msgstr "Factura simplificada (tique)" +msgid "" +"Simplified Invoice (ticket) and Invoices without destination identidication " +"(Art 6.1.d of RD1619/2012)" +msgstr "" +"Factura simplificada (tiquet) y Factures sense identificació del destinatari" +" (Art 6.1.d del RD 1619/2012)" msgctxt "selection:account.invoice,sii_received_key:" msgid "" @@ -775,8 +792,9 @@ msgid "Business premises lease activities" msgstr "Operaciones de arrendamiento de local de negocio" msgctxt "selection:account.invoice,sii_received_key:" -msgid "First semester 2017" -msgstr "Primer semestre 2017" +msgid "First semester 2017 and other invoices before the SII" +msgstr "" +"Primer semestre del 2017 y altres factures abans de l'inclusió del SII" msgctxt "selection:account.invoice,sii_received_key:" msgid "General tax regime activity" @@ -978,8 +996,9 @@ msgid "Export" msgstr "Exportación" msgctxt "selection:account.tax,sii_issued_key:" -msgid "First semester 2017" -msgstr "Primer semestre 2017" +msgid "First semester 2017 and other invoices before the SII" +msgstr "" +"Primer semestre del 2017 y altres factures abans de l'inclusió del SII" msgctxt "selection:account.tax,sii_issued_key:" msgid "General tax regime activity" @@ -1057,8 +1076,9 @@ msgid "Business premises lease activities" msgstr "Operaciones de arrendamiento de local de negocio" msgctxt "selection:account.tax,sii_received_key:" -msgid "First semester 2017" -msgstr "Primer semestre 2017" +msgid "First semester 2017 and other invoices before the SII" +msgstr "" +"Primer semestre del 2017 y altres factures abans de l'inclusió del SII" msgctxt "selection:account.tax,sii_received_key:" msgid "General tax regime activity" @@ -1311,8 +1331,9 @@ msgid "Business premises lease activities" msgstr "Operaciones de arrendamiento de local de negocio" msgctxt "selection:account.tax.template,sii_received_key:" -msgid "First semester 2017" -msgstr "Primer semestre 2017" +msgid "First semester 2017 and other invoices before the SII" +msgstr "" +"Primer semestre del 2017 y altres factures abans de l'inclusió del SII" msgctxt "selection:account.tax.template,sii_received_key:" msgid "General tax regime activity" @@ -1497,13 +1518,17 @@ msgctxt "selection:aeat.sii.report.lines,invoice_operation_key:" msgid "Credit Note (Art 80.4)" msgstr "Facura rectificativa (Art. 80.4)" +msgctxt "selection:aeat.sii.report.lines,invoice_operation_key:" +msgid "Duty - Complementary clearing" +msgstr "Aduanes - Liquidació complementaria" + msgctxt "selection:aeat.sii.report.lines,invoice_operation_key:" msgid "Import (DUA)" msgstr "Importaciones (DUA)" msgctxt "selection:aeat.sii.report.lines,invoice_operation_key:" -msgid "Invoice" -msgstr "Factura" +msgid "Invoice (Art 6.7.3 y 7.3 of RD1619/2012)" +msgstr "Factura (Art 6.7.3 y 7.3 del RD 1619/2012)" msgctxt "selection:aeat.sii.report.lines,invoice_operation_key:" msgid "Invoice issued to replace simplified invoices issued and filed" @@ -1520,8 +1545,12 @@ msgid "Other accounting documents" msgstr "Justificantes contables" msgctxt "selection:aeat.sii.report.lines,invoice_operation_key:" -msgid "Simplified Invoice (ticket)" -msgstr "Factura simplificada (tique)" +msgid "" +"Simplified Invoice (ticket) and Invoices without destination identidication " +"(Art 6.1.d of RD1619/2012)" +msgstr "" +"Factura simplificada (tiquet) y Factures sense identificació del destinatari" +" (Art 6.1.d del RD 1619/2012)" msgctxt "selection:aeat.sii.report.lines,state:" msgid "" @@ -1628,11 +1657,11 @@ msgstr "Confirmar" msgctxt "view:aeat.sii.report:" msgid "Draft" -msgstr "Esborrany" +msgstr "Borrador" msgctxt "view:aeat.sii.report:" msgid "Load Invoices" -msgstr "Carregar factures" +msgstr "Cargar facturas" msgctxt "view:aeat.sii.report:" msgid "Add Invoices" @@ -1648,20 +1677,20 @@ msgstr "Afegir factures" msgctxt "view:company.company:" msgid "Certificate" -msgstr "Certificat" +msgstr "Certificado" msgctxt "wizard_button:aeat.sii.load_pkcs12,start,end:" msgid "Cancel" -msgstr "Cancel·la" +msgstr "Cancelar" msgctxt "wizard_button:aeat.sii.load_pkcs12,start,load:" -msgid "Load" -msgstr "Carrega" +msgid "oad" +msgstr "Cargar msgctxt "wizard_button:aeat.sii.add_invoices.wizard,start,add:" -msgid "Add" -msgstr "Afegeix" +msgid "" +msgstr "Añadir" msgctxt "wizard_button:aeat.sii.add_invoices.wizard,start,end:" msgid "Cancel" -msgstr "Cancel·la" +msgstr "Cancelar" diff --git a/locale/es_ES.po b/locale/es_ES.po index 316b9cc..f068e28 100644 --- a/locale/es_ES.po +++ b/locale/es_ES.po @@ -402,6 +402,14 @@ msgctxt "field:party.party,sii_identifier_type:" msgid "SII Identifier Type" msgstr "SII Identificador" +msgctxt "field:party.party,sii_vat_code:" +msgid "SII VAT Code" +msgstr "Número NIF SII" + +msgctxt "field:party.party,sii_vat_country:" +msgid "SII VAT Country" +msgstr "País NIF SII" + msgctxt "model:aeat.sii.issued.invoice.mapper,name:" msgid "Tryton Issued Invoice to AEAT mapper" msgstr "Correspondencia Tryton - Aeat facturas emitidas" @@ -646,8 +654,9 @@ msgid "Export" msgstr "Exportación" msgctxt "selection:account.invoice,sii_issued_key:" -msgid "First semester 2017" -msgstr "Primer semestre 2017" +msgid "First semester 2017 and other invoices before the SII" +msgstr "" +"Primer semestre de 2017 y otras facturas anteriores a la inclusión en el SII" msgctxt "selection:account.invoice,sii_issued_key:" msgid "General tax regime activity" @@ -715,13 +724,17 @@ msgctxt "selection:account.invoice,sii_operation_key:" msgid "Credit Note (Art 80.4)" msgstr "Facura rectificativa (Art. 80.4)" +msgctxt "selection:account.invoice,sii_operation_key:" +msgid "Duty - Complementary clearing" +msgstr "Aduanas - Liquidación complementaria" + msgctxt "selection:account.invoice,sii_operation_key:" msgid "Import (DUA)" msgstr "Importaciones (DUA)" msgctxt "selection:account.invoice,sii_operation_key:" -msgid "Invoice" -msgstr "Factura" +msgid "Invoice (Art 6.7.3 y 7.3 of RD1619/2012)" +msgstr "Factura (Art. 6, 7.2 y 7.3 del RD 1619/2012)" msgctxt "selection:account.invoice,sii_operation_key:" msgid "Invoice issued to replace simplified invoices issued and filed" @@ -738,8 +751,12 @@ msgid "Other accounting documents" msgstr "Justificantes contables" msgctxt "selection:account.invoice,sii_operation_key:" -msgid "Simplified Invoice (ticket)" -msgstr "Factura simplificada (tique)" +msgid "" +"Simplified Invoice (ticket) and Invoices without destination identidication " +"(Art 6.1.d of RD1619/2012)" +msgstr "" +"Factura Simplificada y y Facturas sin identificación del destinatario (Art. " +"6.1.d RD 1619/2012)" msgctxt "selection:account.invoice,sii_received_key:" msgid "" @@ -775,8 +792,9 @@ msgid "Business premises lease activities" msgstr "Operaciones de arrendamiento de local de negocio" msgctxt "selection:account.invoice,sii_received_key:" -msgid "First semester 2017" -msgstr "Primer semestre 2017" +msgid "First semester 2017 and other invoices before the SII" +msgstr "" +"Primer semestre de 2017 y otras facturas anteriores a la inclusión en el SII" msgctxt "selection:account.invoice,sii_received_key:" msgid "General tax regime activity" @@ -978,8 +996,9 @@ msgid "Export" msgstr "Exportación" msgctxt "selection:account.tax,sii_issued_key:" -msgid "First semester 2017" -msgstr "Primer semestre 2017" +msgid "First semester 2017 and other invoices before the SII" +msgstr "" +"Primer semestre de 2017 y otras facturas anteriores a la inclusión en el SII" msgctxt "selection:account.tax,sii_issued_key:" msgid "General tax regime activity" @@ -1057,8 +1076,9 @@ msgid "Business premises lease activities" msgstr "Operaciones de arrendamiento de local de negocio" msgctxt "selection:account.tax,sii_received_key:" -msgid "First semester 2017" -msgstr "Primer semestre 2017" +msgid "First semester 2017 and other invoices before the SII" +msgstr "" +"Primer semestre de 2017 y otras facturas anteriores a la inclusión en el SII" msgctxt "selection:account.tax,sii_received_key:" msgid "General tax regime activity" @@ -1232,8 +1252,9 @@ msgid "Export" msgstr "Exportación" msgctxt "selection:account.tax.template,sii_issued_key:" -msgid "First semester 2017" -msgstr "Primer semestre 2017" +msgid "First semester 2017 and other invoices before the SII" +msgstr "" +"Primer semestre de 2017 y otras facturas anteriores a la inclusión en el SII" msgctxt "selection:account.tax.template,sii_issued_key:" msgid "General tax regime activity" @@ -1311,8 +1332,9 @@ msgid "Business premises lease activities" msgstr "Operaciones de arrendamiento de local de negocio" msgctxt "selection:account.tax.template,sii_received_key:" -msgid "First semester 2017" -msgstr "Primer semestre 2017" +msgid "First semester 2017 and other invoices before the SII" +msgstr "" +"Primer semestre de 2017 y otras facturas anteriores a la inclusión en el SII" msgctxt "selection:account.tax.template,sii_received_key:" msgid "General tax regime activity" @@ -1442,9 +1464,9 @@ msgctxt "selection:aeat.sii.report,version:" msgid "1.0" msgstr "1.0" -msgctxt "selection:aeat.sii.report.lines,identifier_type:" -msgid "" -msgstr "" +msgctxt "selection:aeat.sii.report,version:" +msgid "1.1" +msgstr "1.1" msgctxt "selection:aeat.sii.report.lines,identifier_type:" msgid "NIF-VAT" @@ -1497,13 +1519,17 @@ msgctxt "selection:aeat.sii.report.lines,invoice_operation_key:" msgid "Credit Note (Art 80.4)" msgstr "Facura rectificativa (Art. 80.4)" +msgctxt "selection:aeat.sii.report.lines,invoice_operation_key:" +msgid "Duty - Complementary clearing" +msgstr "Aduanas - Liquidación complementaria" + msgctxt "selection:aeat.sii.report.lines,invoice_operation_key:" msgid "Import (DUA)" msgstr "Importaciones (DUA)" msgctxt "selection:aeat.sii.report.lines,invoice_operation_key:" -msgid "Invoice" -msgstr "Factura" +msgid "Invoice (Art 6.7.3 y 7.3 of RD1619/2012)" +msgstr "Factura (Art. 6, 7.2 y 7.3 del RD 1619/2012)" msgctxt "selection:aeat.sii.report.lines,invoice_operation_key:" msgid "Invoice issued to replace simplified invoices issued and filed" @@ -1520,12 +1546,12 @@ msgid "Other accounting documents" msgstr "Justificantes contables" msgctxt "selection:aeat.sii.report.lines,invoice_operation_key:" -msgid "Simplified Invoice (ticket)" -msgstr "Factura simplificada (tique)" - -msgctxt "selection:aeat.sii.report.lines,state:" msgid "" +"Simplified Invoice (ticket) and Invoices without destination identidication " +"(Art 6.1.d of RD1619/2012)" msgstr "" +"Factura Simplificada y y Facturas sin identificación del destinatario (Art. " +"6.1.d RD 1619/2012)" msgctxt "selection:aeat.sii.report.lines,state:" msgid "Accepted" diff --git a/setup.py b/setup.py index ce95e87..6598cc1 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ minor_version = int(minor_version) requires = [ 'cryptography', 'pyOpenSSL', - 'pyAEATsii>=0.2.4' + 'pyAEATsii>=1.1.0' ] for dep in info.get('depends', []): if not re.match(r'(ir|res|webdav)(\W|$)', dep):