Fix bug in field type
This commit is contained in:
parent
28b2d4f8a1
commit
fd6a3bfdef
10
aeat.py
10
aeat.py
|
@ -591,7 +591,8 @@ class SIIReport(Workflow, ModelSQL, ModelView):
|
||||||
lines_to_create = []
|
lines_to_create = []
|
||||||
for reg in registers:
|
for reg in registers:
|
||||||
taxes_to_create = []
|
taxes_to_create = []
|
||||||
taxes = exemption = None
|
taxes = None
|
||||||
|
exemption = ''
|
||||||
tipo_desglose = reg.DatosFacturaEmitida.TipoDesglose
|
tipo_desglose = reg.DatosFacturaEmitida.TipoDesglose
|
||||||
if tipo_desglose.DesgloseFactura:
|
if tipo_desglose.DesgloseFactura:
|
||||||
sujeta = tipo_desglose.DesgloseFactura.Sujeta
|
sujeta = tipo_desglose.DesgloseFactura.Sujeta
|
||||||
|
@ -626,7 +627,7 @@ class SIIReport(Workflow, ModelSQL, ModelView):
|
||||||
'invoice': invoices_ids.get(
|
'invoice': invoices_ids.get(
|
||||||
reg.IDFactura.NumSerieFacturaEmisor),
|
reg.IDFactura.NumSerieFacturaEmisor),
|
||||||
'state': reg.EstadoFactura.EstadoRegistro,
|
'state': reg.EstadoFactura.EstadoRegistro,
|
||||||
'last_modify_date': _datetime(
|
'last_modify_date': _date(
|
||||||
reg.EstadoFactura.TimestampUltimaModificacion),
|
reg.EstadoFactura.TimestampUltimaModificacion),
|
||||||
'communication_code': reg.EstadoFactura.CodigoErrorRegistro,
|
'communication_code': reg.EstadoFactura.CodigoErrorRegistro,
|
||||||
'communication_msg': reg.EstadoFactura.DescripcionErrorRegistro,
|
'communication_msg': reg.EstadoFactura.DescripcionErrorRegistro,
|
||||||
|
@ -775,7 +776,7 @@ class SIIReport(Workflow, ModelSQL, ModelView):
|
||||||
sii_report_line = {
|
sii_report_line = {
|
||||||
'report': self.id,
|
'report': self.id,
|
||||||
'state': reg.EstadoFactura.EstadoRegistro,
|
'state': reg.EstadoFactura.EstadoRegistro,
|
||||||
'last_modify_date': _datetime(
|
'last_modify_date': _date(
|
||||||
reg.EstadoFactura.TimestampUltimaModificacion),
|
reg.EstadoFactura.TimestampUltimaModificacion),
|
||||||
'communication_code': (
|
'communication_code': (
|
||||||
reg.EstadoFactura.CodigoErrorRegistro),
|
reg.EstadoFactura.CodigoErrorRegistro),
|
||||||
|
@ -861,7 +862,7 @@ class SIIReportLine(ModelSQL, ModelView):
|
||||||
'operation_type') != 'C0',
|
'operation_type') != 'C0',
|
||||||
})
|
})
|
||||||
state = fields.Selection(AEAT_INVOICE_STATE, 'State')
|
state = fields.Selection(AEAT_INVOICE_STATE, 'State')
|
||||||
last_modify_date = fields.Char('Last Modification Date', readonly=True)
|
last_modify_date = fields.Date('Last Modification Date', readonly=True)
|
||||||
communication_code = fields.Integer(
|
communication_code = fields.Integer(
|
||||||
'Communication Code', readonly=True)
|
'Communication Code', readonly=True)
|
||||||
communication_msg = fields.Char(
|
communication_msg = fields.Char(
|
||||||
|
@ -892,6 +893,7 @@ class SIIReportLine(ModelSQL, ModelView):
|
||||||
fields.Selection(OPERATION_KEY, 'SII Operation Key'),
|
fields.Selection(OPERATION_KEY, 'SII Operation Key'),
|
||||||
'get_invoice_operation_key')
|
'get_invoice_operation_key')
|
||||||
exemption_key = fields.Char('Exemption Cause', readonly=True)
|
exemption_key = fields.Char('Exemption Cause', readonly=True)
|
||||||
|
aeat_register = fields.Text('Register from AEAT Webservice', readonly=True)
|
||||||
|
|
||||||
def get_invoice_operation_key(self, name):
|
def get_invoice_operation_key(self, name):
|
||||||
return self.invoice.sii_operation_key if self.invoice else None
|
return self.invoice.sii_operation_key if self.invoice else None
|
||||||
|
|
Loading…
Reference in New Issue