Skip to content

Commit

Permalink
[FIX] Adaptación del fichero generado modelo 115
Browse files Browse the repository at this point in the history
  • Loading branch information
kikopeiro committed Mar 29, 2017
1 parent 8edd2e3 commit 750ba3e
Showing 1 changed file with 52 additions and 10 deletions.
62 changes: 52 additions & 10 deletions l10n_es_aeat_mod115/wizard/export_mod115_to_boe.py
Expand Up @@ -28,6 +28,38 @@ class L10nEsAeatMod115ExportToBoe(models.TransientModel):

@api.multi
def _get_formatted_declaration_record(self, report):
res = ''
# Inicio del identificador de modelo y página: Constante "<T"
res += self._formatString('<T', 2)
# Modelo: Constante "115"
res += self._formatString('115', 3)
# Página: Constante "0"
res += self._formatString('0', 1)
# Num Identificación. Ejercicio
res += self._formatString(
fields.Date.from_string(report.fiscalyear_id.date_start).year, 4)
# Identificación. Periodo: "01" ... "12" o "1T" … "4T"
res += self._formatString(report.period_type, 2)
# Fin de identificador de modelo: Constante ">"
res += self._formatString('0000>', 5)
# Constante "<AUX>"
res += self._formatString('<AUX>', 5)
# Reservado para la Administracion. Rellenar con blancos
res += self._formatString('', 70)
# Versi0n del Programa (Nota 1)
res += self._formatString('8.0', 4)
# Reservado para la Administracion. Rellenar con blancos
res += self._formatString('', 4)
# NIF Empresa Desarrollo (Nota 1)
res += self._formatString('ODOO', 9)
# Reservado para la Administracion. Rellenar con blancos
res += self._formatString('', 213)
# Constante "</AUX>"
res += self._formatString('</AUX>', 6)
return res

@api.multi
def _get_formatted_main_record(self, report):
res = ''
# Inicio del identificador de modelo y página: Constante "<T"
res += self._formatString('<T', 2)
Expand All @@ -53,11 +85,6 @@ def _get_formatted_declaration_record(self, report):
fields.Date.from_string(report.fiscalyear_id.date_start).year, 4)
# Identificación. Periodo: "01" ... "12" o "1T" … "4T"
res += self._formatString(report.period_type, 2)
return res

@api.multi
def _get_formatted_main_record(self, report):
res = ''
# Retenciones e ingresos a cuenta
# N.º perceptores (15).
res += self._formatNumber(report.casilla_01, 15)
Expand All @@ -73,11 +100,6 @@ def _get_formatted_main_record(self, report):
# Retenciones e ingresos a cuenta
# Resultado a ingresar (17).
res += self._formatNumber(report.casilla_05, 15, dec_length=2)
return res

@api.multi
def _get_formatted_other_records(self, report):
res = ''
# Declaración complementaria (1).
res += self._formatString('X' if report.type == 'C' else ' ', 1)
# Número de justificante de la declaración anterior (13).
Expand All @@ -91,4 +113,24 @@ def _get_formatted_other_records(self, report):
res += self._formatString('', 13)
# Indicador de fin de registro (12).
res += self._formatString('</T11501000>', 12)

return res

@api.multi
def _get_formatted_other_records(self, report):
res = ''
# Inicio del identificador de modelo y página: Constante "</T"
res += self._formatString('</T', 3)
# Modelo: Constante "115"
res += self._formatString('115', 3)
# Página: Constante "0"
res += self._formatString('0', 1)
# Num Identificación. Ejercicio
res += self._formatString(
fields.Date.from_string(report.fiscalyear_id.date_start).year, 4)
# Identificación. Periodo: "01" ... "12" o "1T" … "4T"
res += self._formatString(report.period_type, 2)
# Fin de identificador de modelo: Constante "0000>"
res += self._formatString('0000>', 5)
res += '\r\n'
return res

0 comments on commit 750ba3e

Please sign in to comment.