Remove not used fields. (#7)
* Remove not used fields. Remove from invoice 2 SII fields not used any more in there. Now us the tax deffined. Fix some bugs. * Fix bug in tax call. * Add missing import for raise messages. * Fix the way we change the anem of a field. Fix problem getting some especial taxes not duplicate. Fix translation. Update some sii tax information * Update raise error information. Update 'Sujeto Pasivo' tax information to update correctly on SII
This commit is contained in:
parent
840d82189d
commit
d9b30fb509
57
account.py
57
account.py
|
@ -3,9 +3,9 @@
|
|||
from trytond.model import fields
|
||||
from trytond.pool import PoolMeta
|
||||
from trytond.pyson import Eval
|
||||
from trytond.transaction import Transaction
|
||||
from .aeat import (BOOK_KEY, OPERATION_KEY, SEND_SPECIAL_REGIME_KEY,
|
||||
RECEIVE_SPECIAL_REGIME_KEY, IVA_SUBJECTED, EXCEMPTION_CAUSE,
|
||||
INTRACOMUNITARY_TYPE)
|
||||
RECEIVE_SPECIAL_REGIME_KEY, IVA_SUBJECTED, EXEMPTION_CAUSE)
|
||||
|
||||
|
||||
__all__ = ['Configuration', 'TemplateTax', 'Tax']
|
||||
|
@ -45,7 +45,6 @@ class Configuration(metaclass=PoolMeta):
|
|||
return False
|
||||
|
||||
|
||||
|
||||
class TemplateTax(metaclass=PoolMeta):
|
||||
__name__ = 'account.tax.template'
|
||||
|
||||
|
@ -54,18 +53,36 @@ class TemplateTax(metaclass=PoolMeta):
|
|||
sii_issued_key = fields.Selection(SEND_SPECIAL_REGIME_KEY, 'Issued Key')
|
||||
sii_received_key = fields.Selection(RECEIVE_SPECIAL_REGIME_KEY,
|
||||
'Received Key')
|
||||
sii_intracomunity_key = fields.Selection(INTRACOMUNITARY_TYPE,
|
||||
'Intracommunity Key')
|
||||
sii_subjected_key = fields.Selection(IVA_SUBJECTED, 'Subjected Key')
|
||||
sii_excemption_key = fields.Selection(EXCEMPTION_CAUSE, 'Excemption Key')
|
||||
sii_exemption_cause = fields.Selection(EXEMPTION_CAUSE, 'Exemption Cause')
|
||||
tax_used = fields.Boolean('Used in Tax')
|
||||
invoice_used = fields.Boolean('Used in invoice Total')
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
cursor = Transaction().connection.cursor()
|
||||
table = cls.__table_handler__(module_name)
|
||||
sql_table = cls.__table__()
|
||||
|
||||
exist_sii_excemption_key = table.column_exist('sii_excemption_key')
|
||||
exist_sii_intracomunity_key = table.column_exist('sii_intracomunity_key')
|
||||
|
||||
super(TemplateTax, cls).__register__(module_name)
|
||||
|
||||
if exist_sii_excemption_key:
|
||||
# Don't use UPDATE FROM because SQLite nor MySQL support it.
|
||||
cursor.execute(*sql_table.update([sql_table.sii_exemption_cause],
|
||||
[sql_table.sii_excemption_key])),
|
||||
table.drop_column('sii_excemption_key')
|
||||
|
||||
if exist_sii_intracomunity_key:
|
||||
table.drop_column('sii_intracomunity_key')
|
||||
|
||||
def _get_tax_value(self, tax=None):
|
||||
res = super(TemplateTax, self)._get_tax_value(tax)
|
||||
for field in ('sii_book_key', 'sii_operation_key', 'sii_issued_key',
|
||||
'sii_subjected_key', 'sii_excemption_key', 'sii_received_key',
|
||||
'sii_intracomunity_key', 'tax_used', 'invoice_used'):
|
||||
'sii_subjected_key', 'sii_exemption_cause', 'sii_received_key',
|
||||
'tax_used', 'invoice_used'):
|
||||
|
||||
if not tax or getattr(tax, field) != getattr(self, field):
|
||||
res[field] = getattr(self, field)
|
||||
|
@ -81,9 +98,27 @@ class Tax(metaclass=PoolMeta):
|
|||
sii_issued_key = fields.Selection(SEND_SPECIAL_REGIME_KEY, 'Issued Key')
|
||||
sii_received_key = fields.Selection(RECEIVE_SPECIAL_REGIME_KEY,
|
||||
'Received Key')
|
||||
sii_intracomunity_key = fields.Selection(INTRACOMUNITARY_TYPE,
|
||||
'Intracommunity Key')
|
||||
sii_subjected_key = fields.Selection(IVA_SUBJECTED, 'Subjected Key')
|
||||
sii_excemption_key = fields.Selection(EXCEMPTION_CAUSE, 'Excemption Key')
|
||||
sii_exemption_cause = fields.Selection(EXEMPTION_CAUSE, 'Exemption Cause')
|
||||
tax_used = fields.Boolean('Used in Tax')
|
||||
invoice_used = fields.Boolean('Used in invoice Total')
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
cursor = Transaction().connection.cursor()
|
||||
table = cls.__table_handler__(module_name)
|
||||
sql_table = cls.__table__()
|
||||
|
||||
exist_sii_excemption_key = table.column_exist('sii_excemption_key')
|
||||
exist_sii_intracomunity_key = table.column_exist('sii_intracomunity_key')
|
||||
|
||||
super(Tax, cls).__register__(module_name)
|
||||
|
||||
if exist_sii_excemption_key:
|
||||
# Don't use UPDATE FROM because SQLite nor MySQL support it.
|
||||
cursor.execute(*sql_table.update([sql_table.sii_exemption_cause],
|
||||
[sql_table.sii_excemption_key])),
|
||||
table.drop_column('sii_excemption_key')
|
||||
|
||||
if exist_sii_intracomunity_key:
|
||||
table.drop_column('sii_intracomunity_key')
|
||||
|
|
46
aeat.py
46
aeat.py
|
@ -51,7 +51,6 @@ def _date(x):
|
|||
def _datetime(x):
|
||||
return datetime.strptime(x, "%d-%m-%Y %H:%M:%S")
|
||||
|
||||
|
||||
COMMUNICATION_TYPE = [ # L0
|
||||
(None, ''),
|
||||
('A0', 'Registration of invoices/records'),
|
||||
|
@ -173,7 +172,6 @@ AEAT_INVOICE_STATE = [
|
|||
('duplicated_unsubscribed', 'Duplicated / Unsubscribed'),
|
||||
]
|
||||
|
||||
|
||||
PROPERTY_STATE = [ # L6
|
||||
('0', ''),
|
||||
('1', '1. Property with a land register reference located in any part '
|
||||
|
@ -185,7 +183,6 @@ PROPERTY_STATE = [ # L6
|
|||
('4', '4. Property located abroad'),
|
||||
]
|
||||
|
||||
|
||||
# L7 - Iva Subjected
|
||||
IVA_SUBJECTED = [
|
||||
(None, ''),
|
||||
|
@ -195,8 +192,8 @@ IVA_SUBJECTED = [
|
|||
'and VAT reverse charge')
|
||||
]
|
||||
|
||||
# L9 - Excemption cause
|
||||
EXCEMPTION_CAUSE = [
|
||||
# L9 - Exemption cause
|
||||
EXEMPTION_CAUSE = [
|
||||
(None, ''),
|
||||
('E1', 'Exempt on account of Article 20'),
|
||||
('E2', 'Exempt on account of Article 21'),
|
||||
|
@ -204,26 +201,7 @@ EXCEMPTION_CAUSE = [
|
|||
('E4', 'Exempt on account of Article 23 and Article 24'),
|
||||
('E5', 'Exempt on account of Article 25'),
|
||||
('E6', 'Exempt on other grounds'),
|
||||
]
|
||||
|
||||
# L11 Payment Type
|
||||
PAYMENT_TYPE = [
|
||||
('01', 'Transfer'),
|
||||
('02', 'Cheque'),
|
||||
('03', 'Not to be collected/paid (deadline for accrual/forced accrual '
|
||||
'as part of insolvency proceedings)'),
|
||||
('04', 'Other methods of collection/payment'),
|
||||
('05', 'Bank debit order'),
|
||||
]
|
||||
|
||||
# L12
|
||||
INTRACOMUNITARY_TYPE = [
|
||||
(None, ''),
|
||||
('A', 'The transmission or receipt of goods to undertake partial reports '
|
||||
'or works stipulated in Article 70, section one, Number 7 '
|
||||
'of the Tax Law (Law 37/1992)'),
|
||||
('B', 'Transfers of goods or intra-Community acquisitions of goods listed '
|
||||
'in Article 9.3 and Article 16.2 of the Tax Law (Law 37/1992)'),
|
||||
('NotSubject', 'Not Subject'),
|
||||
]
|
||||
|
||||
_STATES = {
|
||||
|
@ -652,7 +630,7 @@ class SIIReport(Workflow, ModelSQL, ModelView):
|
|||
taxes = SIIReportLineTax.create(taxes_to_create)
|
||||
elif sujeta.Exenta:
|
||||
exemption = sujeta.Exenta.DetalleExenta[0].CausaExencion
|
||||
for exempt in EXCEMPTION_CAUSE:
|
||||
for exempt in EXEMPTION_CAUSE:
|
||||
if exempt[0] == exemption:
|
||||
exemption = exempt[1]
|
||||
break
|
||||
|
@ -679,7 +657,7 @@ class SIIReport(Workflow, ModelSQL, ModelView):
|
|||
reg.DatosFacturaEmitida.ClaveRegimenEspecialOTrascendencia),
|
||||
'total_amount': _decimal(reg.DatosFacturaEmitida.ImporteTotal),
|
||||
'taxes': [('add', [t.id for t in taxes])] if taxes else [],
|
||||
'exemption_key': exemption,
|
||||
'exemption_cause': exemption,
|
||||
'counterpart_name': (
|
||||
reg.DatosFacturaEmitida.Contraparte.NombreRazon
|
||||
if reg.DatosFacturaEmitida.Contraparte else None),
|
||||
|
@ -1176,10 +1154,22 @@ class SIIReportLine(ModelSQL, ModelView):
|
|||
invoice_operation_key = fields.Function(
|
||||
fields.Selection(OPERATION_KEY, 'SII Operation Key'),
|
||||
'get_invoice_operation_key')
|
||||
exemption_key = fields.Char('Exemption Cause', readonly=True)
|
||||
exemption_cause = fields.Char('Exemption Cause', readonly=True)
|
||||
aeat_register = fields.Text('Register from AEAT Webservice', readonly=True)
|
||||
sii_header = fields.Text('Header')
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
cursor = Transaction().connection.cursor()
|
||||
table = cls.__table_handler__(module_name)
|
||||
sql_table = cls.__table__()
|
||||
|
||||
exist_sii_excemption_key = table.column_exist('exemption_key')
|
||||
if exist_sii_excemption_key:
|
||||
table.column_rename('exemption_key', 'exemption_cause')
|
||||
|
||||
super(SIIReportLine, cls).__register__(module_name)
|
||||
|
||||
def get_invoice_operation_key(self, name):
|
||||
return self.invoice.sii_operation_key if self.invoice else None
|
||||
|
||||
|
|
177
aeat_mapping.py
177
aeat_mapping.py
|
@ -6,6 +6,7 @@ from logging import getLogger
|
|||
from operator import attrgetter
|
||||
from datetime import date
|
||||
|
||||
from trytond.i18n import gettext
|
||||
from trytond.model import Model
|
||||
from trytond.pool import Pool
|
||||
from trytond.exceptions import UserError
|
||||
|
@ -31,8 +32,20 @@ class BaseInvoiceMapper(Model):
|
|||
issue_date = attrgetter('invoice_date')
|
||||
invoice_kind = attrgetter('sii_operation_key')
|
||||
rectified_invoice_kind = tools.fixed_value('I')
|
||||
not_exempt_kind = attrgetter('sii_subjected_key')
|
||||
exempt_kind = attrgetter('sii_excemption_key')
|
||||
|
||||
def not_exempt_kind(self, tax):
|
||||
return attrgetter('sii_subjected_key')(tax)
|
||||
|
||||
def exempt_kind(self, tax):
|
||||
return attrgetter('sii_exemption_cause')(tax)
|
||||
|
||||
def not_subject(self, invoice):
|
||||
base = 0
|
||||
for line in invoice.lines:
|
||||
for tax in line.taxes:
|
||||
if tax.sii_exemption_cause == 'NotSubject':
|
||||
base += attrgetter('amount')(line)
|
||||
return base
|
||||
|
||||
def counterpart_nif(self, invoice):
|
||||
nif = ''
|
||||
|
@ -56,13 +69,6 @@ class BaseInvoiceMapper(Model):
|
|||
val = attrgetter('company_base')(tax)
|
||||
return val
|
||||
|
||||
def get_invoice_untaxed(self, invoice):
|
||||
taxes = self.taxes(invoice)
|
||||
taxes_base = 0
|
||||
for tax in taxes:
|
||||
taxes_base += self.get_tax_base(tax)
|
||||
return taxes_base
|
||||
|
||||
def get_invoice_total(self, invoice):
|
||||
taxes = self.total_invoice_taxes(invoice)
|
||||
taxes_base = 0
|
||||
|
@ -85,10 +91,18 @@ class BaseInvoiceMapper(Model):
|
|||
if invoice.sii_operation_key == 'F5':
|
||||
return invoice.company.party.sii_identifier_type
|
||||
else:
|
||||
if (invoice.sii_received_key == '09' and
|
||||
invoice.party.sii_identifier_type != '02'):
|
||||
raise UserError(gettext('aeat_sii.msg_wrong_identifier_type',
|
||||
invoice=invoice.number, party=invoice.party.rec_name))
|
||||
for tax in invoice.taxes:
|
||||
if (self.exempt_kind(tax.tax) == 'E5' and
|
||||
invoice.party.sii_identifier_type != '02'):
|
||||
raise UserError(gettext('aeat_sii.msg_wrong_identifier_type',
|
||||
invoice=invoice.number, party=invoice.party.rec_name))
|
||||
return invoice.party.sii_identifier_type
|
||||
|
||||
counterpart_id = counterpart_nif
|
||||
untaxed_amount = get_invoice_untaxed
|
||||
total_amount = get_invoice_total
|
||||
tax_rate = attrgetter('tax.rate')
|
||||
tax_base = get_tax_base
|
||||
|
@ -171,7 +185,7 @@ class BaseInvoiceMapper(Model):
|
|||
id_type = self.counterpart_id_type(invoice)
|
||||
if id_type and id_type in OTHER_ID_TYPES:
|
||||
ret['IDOtro'] = {
|
||||
'IDType': self.counterpart_id_type(invoice),
|
||||
'IDType': id_type,
|
||||
'CodigoPais': self.counterpart_country(invoice),
|
||||
'ID': self.counterpart_id(invoice),
|
||||
}
|
||||
|
@ -234,6 +248,31 @@ class IssuedInvoiceMapper(BaseInvoiceMapper):
|
|||
'NIF': self.nif(invoice),
|
||||
}
|
||||
|
||||
def build_taxes(self, tax):
|
||||
res = {
|
||||
'TipoImpositivo': tools._rate_to_percent(self.tax_rate(tax)),
|
||||
'BaseImponible': self.tax_base(tax),
|
||||
'CuotaRepercutida': self.tax_amount(tax)
|
||||
}
|
||||
|
||||
if self.tax_equivalence_surcharge_rate(tax):
|
||||
res['TipoRecargoEquivalencia'] = (
|
||||
tools._rate_to_percent(self.tax_equivalence_surcharge_rate(
|
||||
tax)))
|
||||
|
||||
if self.tax_equivalence_surcharge_amount(tax):
|
||||
res['CuotaRecargoEquivalencia'] = (
|
||||
self.tax_equivalence_surcharge_amount(tax))
|
||||
return res
|
||||
|
||||
def location_rules(self, invoice):
|
||||
base = 0
|
||||
for line in invoice.lines:
|
||||
for tax in line.taxes:
|
||||
if tax.sii_issued_key == '08':
|
||||
base += attrgetter('amount')(line)
|
||||
return base
|
||||
|
||||
def build_issued_invoice(self, invoice):
|
||||
ret = {
|
||||
'TipoFactura': self.invoice_kind(invoice),
|
||||
|
@ -266,18 +305,10 @@ class IssuedInvoiceMapper(BaseInvoiceMapper):
|
|||
}
|
||||
self._update_counterpart(ret, invoice)
|
||||
|
||||
if (self.not_exempt_kind(invoice) in ('S2', 'S3') and
|
||||
not 'NIF' in ret.get('Contraparte', {})):
|
||||
raise UserError(gettext('aeat_sii.msg_missing_nif',
|
||||
invoice=invoice))
|
||||
|
||||
must_detail_op = (ret.get('Contraparte', {}) and (
|
||||
'IDOtro' in ret['Contraparte'] or ('NIF' in ret['Contraparte'] and
|
||||
ret['Contraparte']['NIF'].startswith('N')))
|
||||
)
|
||||
location_rules = (self.specialkey_or_trascendence(invoice) == '08' or
|
||||
(must_detail_op and self.not_exempt_kind(invoice) == 'S2'))
|
||||
|
||||
detail = {
|
||||
'Sujeta': {},
|
||||
'NoSujeta': {}
|
||||
|
@ -294,39 +325,58 @@ class IssuedInvoiceMapper(BaseInvoiceMapper):
|
|||
'DesgloseFactura': detail
|
||||
})
|
||||
|
||||
if self.not_exempt_kind(invoice):
|
||||
if self.not_exempt_kind(invoice) == 'S2':
|
||||
# inv. subj. pass.
|
||||
tax_detail = [{
|
||||
'TipoImpositivo': 0,
|
||||
'BaseImponible': self.untaxed_amount(invoice),
|
||||
'CuotaRepercutida': 0
|
||||
}]
|
||||
else:
|
||||
tax_detail = [self.build_taxes(t) for t in self.taxes(invoice)]
|
||||
if tax_detail:
|
||||
detail['Sujeta'].update({
|
||||
'NoExenta': {
|
||||
'TipoNoExenta': self.not_exempt_kind(invoice),
|
||||
'DesgloseIVA': {
|
||||
'DetalleIVA': tax_detail
|
||||
for tax in self.taxes(invoice):
|
||||
exempt_kind = self.exempt_kind(tax.tax)
|
||||
not_exempt_kind = self.not_exempt_kind(tax.tax)
|
||||
if (not_exempt_kind in ('S2', 'S3') and
|
||||
not 'NIF' in ret.get('Contraparte', {})):
|
||||
raise UserError(gettext('aeat_sii.msg_missing_nif',
|
||||
invoice=invoice))
|
||||
|
||||
if not_exempt_kind:
|
||||
if not_exempt_kind == 'S2':
|
||||
# inv. subj. pass.
|
||||
tax_detail = {
|
||||
'TipoImpositivo': 0,
|
||||
'BaseImponible': self.get_tax_base(tax),
|
||||
'CuotaRepercutida': 0
|
||||
}
|
||||
else:
|
||||
tax_detail = self.build_taxes(tax)
|
||||
if tax_detail:
|
||||
if not detail['Sujeta']:
|
||||
detail['Sujeta'].update({
|
||||
'NoExenta': {
|
||||
'TipoNoExenta': not_exempt_kind,
|
||||
'DesgloseIVA': {
|
||||
'DetalleIVA': [tax_detail]
|
||||
}
|
||||
}
|
||||
})
|
||||
else:
|
||||
detail['Sujeta']['NoExenta']['DesgloseIVA'][
|
||||
'DetalleIVA'].append(tax_detail)
|
||||
elif exempt_kind:
|
||||
if exempt_kind != 'NotSubject':
|
||||
detail['Sujeta'].update({
|
||||
'Exenta': {
|
||||
'DetalleExenta': {
|
||||
'CausaExencion': exempt_kind,
|
||||
'BaseImponible': self.get_tax_base(tax),
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
elif self.exempt_kind(invoice):
|
||||
detail['Sujeta'].update({
|
||||
'Exenta': {
|
||||
'DetalleExenta': {
|
||||
'CausaExencion': self.exempt_kind(invoice),
|
||||
'BaseImponible': self.untaxed_amount(invoice),
|
||||
}
|
||||
}
|
||||
})
|
||||
if location_rules:
|
||||
})
|
||||
if self.not_subject(invoice):
|
||||
detail['NoSujeta'].update({
|
||||
# ImportePorArticulos7_14_Otros: 0,
|
||||
'ImporteTAIReglasLocalizacion': self.untaxed_amount(invoice)
|
||||
})
|
||||
'ImportePorArticulos7_14_Otros': self.not_subject(
|
||||
invoice),
|
||||
})
|
||||
if self.location_rules(invoice):
|
||||
detail['NoSujeta'].update({
|
||||
'ImporteTAIReglasLocalizacion': self.location_rules(
|
||||
invoice)
|
||||
})
|
||||
|
||||
# remove unused key
|
||||
for key in ('Sujeta', 'NoSujeta'):
|
||||
if not detail[key]:
|
||||
|
@ -366,19 +416,6 @@ class IssuedInvoiceMapper(BaseInvoiceMapper):
|
|||
# TODO: CuotaRecargoRectificado
|
||||
}
|
||||
|
||||
def build_taxes(self, tax):
|
||||
return {
|
||||
'TipoImpositivo': tools._rate_to_percent(self.tax_rate(tax)),
|
||||
'BaseImponible': self.tax_base(tax),
|
||||
'CuotaRepercutida': self.tax_amount(tax),
|
||||
'TipoRecargoEquivalencia':
|
||||
tools._rate_to_percent(self.tax_equivalence_surcharge_rate(
|
||||
tax)),
|
||||
|
||||
'CuotaRecargoEquivalencia':
|
||||
self.tax_equivalence_surcharge_amount(tax),
|
||||
}
|
||||
|
||||
|
||||
class RecievedInvoiceMapper(BaseInvoiceMapper):
|
||||
"""
|
||||
|
@ -456,9 +493,6 @@ class RecievedInvoiceMapper(BaseInvoiceMapper):
|
|||
if _taxes:
|
||||
ret['DesgloseFactura']['DesgloseIVA']['DetalleIVA'].extend(
|
||||
self.build_taxes(invoice, tax) for tax in _taxes)
|
||||
else:
|
||||
ret['DesgloseFactura']['DesgloseIVA']['DetalleIVA'].append({
|
||||
'BaseImponible': self.untaxed_amount(invoice)})
|
||||
|
||||
self._update_rectified_invoice(ret, invoice)
|
||||
return ret
|
||||
|
@ -477,10 +511,13 @@ class RecievedInvoiceMapper(BaseInvoiceMapper):
|
|||
if self.specialkey_or_trascendence(invoice) != '02':
|
||||
ret['TipoImpositivo'] = tools._rate_to_percent(self.tax_rate(tax))
|
||||
ret['CuotaSoportada'] = self.tax_amount(tax)
|
||||
ret['TipoRecargoEquivalencia'] = \
|
||||
tools._rate_to_percent(self.tax_equivalence_surcharge_rate(tax))
|
||||
ret['CuotaRecargoEquivalencia'] = \
|
||||
self.tax_equivalence_surcharge_amount(tax)
|
||||
if self.tax_equivalence_surcharge_rate(tax):
|
||||
ret['TipoRecargoEquivalencia'] = \
|
||||
tools._rate_to_percent(self.tax_equivalence_surcharge_rate(
|
||||
tax))
|
||||
if self.tax_equivalence_surcharge_amount(tax):
|
||||
ret['CuotaRecargoEquivalencia'] = \
|
||||
self.tax_equivalence_surcharge_amount(tax)
|
||||
bieninversion = all(map(lambda w: w in tax.tax.name, (
|
||||
'bien', 'inversión')))
|
||||
ret['BienInversion'] = 'S' if bieninversion else 'N'
|
||||
|
|
56
invoice.py
56
invoice.py
|
@ -10,16 +10,14 @@ from trytond.i18n import gettext
|
|||
from trytond.exceptions import UserError, UserWarning
|
||||
from trytond.wizard import Wizard, StateView, StateTransition, Button
|
||||
from .aeat import (
|
||||
OPERATION_KEY, BOOK_KEY, SEND_SPECIAL_REGIME_KEY,
|
||||
RECEIVE_SPECIAL_REGIME_KEY, AEAT_INVOICE_STATE, IVA_SUBJECTED,
|
||||
EXCEMPTION_CAUSE, INTRACOMUNITARY_TYPE, COMMUNICATION_TYPE)
|
||||
OPERATION_KEY, BOOK_KEY, SEND_SPECIAL_REGIME_KEY, COMMUNICATION_TYPE,
|
||||
RECEIVE_SPECIAL_REGIME_KEY, AEAT_INVOICE_STATE)
|
||||
|
||||
|
||||
__all__ = ['Invoice', 'ResetSIIKeysStart', 'ResetSIIKeys', 'ResetSIIKeysEnd']
|
||||
|
||||
_SII_INVOICE_KEYS = ['sii_book_key', 'sii_operation_key', 'sii_issued_key',
|
||||
'sii_received_key', 'sii_subjected_key', 'sii_excemption_key',
|
||||
'sii_intracomunity_key']
|
||||
'sii_received_key']
|
||||
|
||||
|
||||
class Invoice(metaclass=PoolMeta):
|
||||
|
@ -37,14 +35,6 @@ class Invoice(metaclass=PoolMeta):
|
|||
states={
|
||||
'invisible': ~Eval('sii_book_key').in_(['R']),
|
||||
}, depends=['sii_book_key'])
|
||||
sii_subjected_key = fields.Selection(IVA_SUBJECTED, 'Subjected')
|
||||
sii_excemption_key = fields.Selection(EXCEMPTION_CAUSE,
|
||||
'Excemption Cause')
|
||||
sii_intracomunity_key = fields.Selection(INTRACOMUNITARY_TYPE,
|
||||
'SII Intracommunity Key',
|
||||
states={
|
||||
'invisible': ~Eval('sii_book_key').in_(['U']),
|
||||
}, depends=['sii_book_key'])
|
||||
sii_records = fields.One2Many('aeat.sii.report.lines', 'invoice',
|
||||
"SII Report Lines")
|
||||
sii_state = fields.Selection(AEAT_INVOICE_STATE,
|
||||
|
@ -59,14 +49,32 @@ class Invoice(metaclass=PoolMeta):
|
|||
def __setup__(cls):
|
||||
super(Invoice, cls).__setup__()
|
||||
sii_fields = ['sii_book_key', 'sii_operation_key',
|
||||
'sii_received_key', 'sii_issued_key', 'sii_subjected_key',
|
||||
'sii_excemption_key', 'sii_intracomunity_key','sii_pending_sending',
|
||||
'sii_communication_type', 'sii_state', 'sii_header']
|
||||
'sii_received_key', 'sii_issued_key', 'sii_state',
|
||||
'sii_pending_sending', 'sii_communication_type', 'sii_header']
|
||||
cls._check_modify_exclude += sii_fields
|
||||
if hasattr(cls, '_intercompany_excluded_fields'):
|
||||
cls._intercompany_excluded_fields += sii_fields
|
||||
cls._intercompany_excluded_fields += ['sii_records']
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
cursor = Transaction().connection.cursor()
|
||||
table = cls.__table_handler__(module_name)
|
||||
sql_table = cls.__table__()
|
||||
|
||||
exist_sii_intracomunity_key = table.column_exist('sii_intracomunity_key')
|
||||
exist_sii_subjected_key = table.column_exist('sii_subjected_key')
|
||||
exist_sii_excemption_key = table.column_exist('sii_excemption_key')
|
||||
|
||||
super(Invoice, cls).__register__(module_name)
|
||||
|
||||
if exist_sii_intracomunity_key:
|
||||
table.drop_column('sii_intracomunity_key')
|
||||
if exist_sii_subjected_key:
|
||||
table.drop_column('sii_subjected_key')
|
||||
if exist_sii_excemption_key:
|
||||
table.drop_column('sii_excemption_key')
|
||||
|
||||
@staticmethod
|
||||
def default_sii_pending_sending():
|
||||
return False
|
||||
|
@ -182,6 +190,11 @@ class Invoice(metaclass=PoolMeta):
|
|||
|
||||
super(Invoice, cls).post(invoices)
|
||||
|
||||
#TODO:
|
||||
# OUT invoice, check that all tax have the same TipoNoExenta and(or the same Exenta
|
||||
# Suejta-Exenta --> Can only be one
|
||||
# NoSujeta --> Can only be one
|
||||
|
||||
for invoice in invoices2checksii:
|
||||
values = {}
|
||||
if invoice.sii_book_key:
|
||||
|
@ -191,11 +204,12 @@ class Invoice(metaclass=PoolMeta):
|
|||
values['sii_pending_sending'] = True
|
||||
values['sii_header'] = str(cls.get_sii_header(invoice, False))
|
||||
to_write.extend(([invoice], values))
|
||||
if (invoice.sii_subjected_key in ('S2', 'S3') and
|
||||
not invoice.sii_operation_key in (
|
||||
'F1', 'R1', 'R2', 'R3', 'R4')):
|
||||
raise UserError(gettext('aeat_sii.msg_sii_operation_key_wrong',
|
||||
invoice=invoice))
|
||||
for tax in invoice.taxes:
|
||||
if (tax.tax.sii_subjected_key in ('S2', 'S3') and
|
||||
not invoice.sii_operation_key in (
|
||||
'F1', 'R1', 'R2', 'R3', 'R4')):
|
||||
raise UserError(gettext('aeat_sii.msg_sii_operation_key_wrong',
|
||||
invoice=invoice))
|
||||
if to_write:
|
||||
cls.write(*to_write)
|
||||
|
||||
|
|
153
locale/ca.po
153
locale/ca.po
|
@ -10,18 +10,10 @@ msgctxt "field:account.invoice,sii_communication_type:"
|
|||
msgid "SII Communication Type"
|
||||
msgstr "SII Tipo comunicación"
|
||||
|
||||
msgctxt "field:account.invoice,sii_excemption_key:"
|
||||
msgid "Excemption Cause"
|
||||
msgstr "Causa exempte"
|
||||
|
||||
msgctxt "field:account.invoice,sii_header:"
|
||||
msgid "Header"
|
||||
msgstr "Encapçalat"
|
||||
|
||||
msgctxt "field:account.invoice,sii_intracomunity_key:"
|
||||
msgid "SII Intracommunity Key"
|
||||
msgstr "Clave Intracomunitaria SII"
|
||||
|
||||
msgctxt "field:account.invoice,sii_issued_key:"
|
||||
msgid "SII Issued Key"
|
||||
msgstr "Clave facturas emitidas"
|
||||
|
@ -46,10 +38,6 @@ msgctxt "field:account.invoice,sii_state:"
|
|||
msgid "SII State"
|
||||
msgstr "SII Estado"
|
||||
|
||||
msgctxt "field:account.invoice,sii_subjected_key:"
|
||||
msgid "Subjected"
|
||||
msgstr "Sujeta"
|
||||
|
||||
msgctxt "field:account.tax,invoice_used:"
|
||||
msgid "Used in invoice Total"
|
||||
msgstr "Usat en total de factura"
|
||||
|
@ -58,13 +46,9 @@ msgctxt "field:account.tax,sii_book_key:"
|
|||
msgid "Book Key"
|
||||
msgstr "Clave libro"
|
||||
|
||||
msgctxt "field:account.tax,sii_excemption_key:"
|
||||
msgid "Excemption Key"
|
||||
msgstr "Clave excepción"
|
||||
|
||||
msgctxt "field:account.tax,sii_intracomunity_key:"
|
||||
msgid "Intracommunity Key"
|
||||
msgstr "Clave intracomunitaria"
|
||||
msgctxt "field:account.tax,sii_exemption_cause:"
|
||||
msgid "Exemption Cause"
|
||||
msgstr "Causa excepció"
|
||||
|
||||
msgctxt "field:account.tax,sii_issued_key:"
|
||||
msgid "Issued Key"
|
||||
|
@ -94,13 +78,9 @@ msgctxt "field:account.tax.template,sii_book_key:"
|
|||
msgid "Book Key"
|
||||
msgstr "Clave libro"
|
||||
|
||||
msgctxt "field:account.tax.template,sii_excemption_key:"
|
||||
msgid "Excemption Key"
|
||||
msgstr "Clave excepción"
|
||||
|
||||
msgctxt "field:account.tax.template,sii_intracomunity_key:"
|
||||
msgid "Intracommunity Key"
|
||||
msgstr "Clave intracomunitaria"
|
||||
msgctxt "field:account.tax.template,sii_exemption_cause:"
|
||||
msgid "Exemption Cause"
|
||||
msgstr "Causa excepción"
|
||||
|
||||
msgctxt "field:account.tax.template,sii_issued_key:"
|
||||
msgid "Issued Key"
|
||||
|
@ -338,7 +318,7 @@ msgctxt "field:aeat.sii.report.lines,csv:"
|
|||
msgid "CSV"
|
||||
msgstr "CSV"
|
||||
|
||||
msgctxt "field:aeat.sii.report.lines,exemption_key:"
|
||||
msgctxt "field:aeat.sii.report.lines,exemption_cause:"
|
||||
msgid "Exemption Cause"
|
||||
msgstr "Causa exempte"
|
||||
|
||||
|
@ -687,48 +667,6 @@ msgctxt "selection:account.invoice,sii_communication_type:"
|
|||
msgid "Registration of invoices/records"
|
||||
msgstr "Nuevas facturas"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_excemption_key:"
|
||||
msgid "Exempt on account of Article 20"
|
||||
msgstr "Exenta por el artículo 20"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_excemption_key:"
|
||||
msgid "Exempt on account of Article 21"
|
||||
msgstr "Exenta por el artículo 21"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_excemption_key:"
|
||||
msgid "Exempt on account of Article 22"
|
||||
msgstr "Exenta por el artículo 22"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_excemption_key:"
|
||||
msgid "Exempt on account of Article 23 and Article 24"
|
||||
msgstr "Exenta por el artículo 24"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_excemption_key:"
|
||||
msgid "Exempt on account of Article 25"
|
||||
msgstr "Exenta por el artículo 25"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_excemption_key:"
|
||||
msgid "Exempt on other grounds"
|
||||
msgstr "Exenta, otros"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_intracomunity_key:"
|
||||
msgid ""
|
||||
"The transmission or receipt of goods to undertake partial reports or works "
|
||||
"stipulated in Article 70, section one, Number 7 of the Tax Law (Law 37/1992)"
|
||||
msgstr ""
|
||||
"El envío o recepción de bienes para la realización de los informes parciales"
|
||||
" o trabajos mencionados en el artículo 70, apartado uno, número 7º, de la "
|
||||
"Ley del Impuesto (Ley 37/1992)"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_intracomunity_key:"
|
||||
msgid ""
|
||||
"Transfers of goods or intra-Community acquisitions of goods listed in "
|
||||
"Article 9.3 and Article 16.2 of the Tax Law (Law 37/1992)"
|
||||
msgstr ""
|
||||
"Las transferencias de bienes y las adquisiciones intracomunitarias de bienes"
|
||||
" comprendidas en los artículos 9, apartado 3º, y 16, apartado 2º, de la Ley"
|
||||
" del Impuesto (Ley 37/1992)"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_issued_key:"
|
||||
msgid ""
|
||||
"Activities subject to Canary Islands General Indirect Tax/Tax on Production,"
|
||||
|
@ -972,19 +910,6 @@ msgctxt "selection:account.invoice,sii_state:"
|
|||
msgid "Rejected"
|
||||
msgstr "Rechazado"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_subjected_key:"
|
||||
msgid ""
|
||||
"Subject - Not exempt. Both non VAT reverse charge and VAT reverse charge"
|
||||
msgstr "No exenta - Con o sin Inversion sujeto pasivo"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_subjected_key:"
|
||||
msgid "Subject - Not exempt. Non VAT reverse charge"
|
||||
msgstr "Sujeto - No exento"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_subjected_key:"
|
||||
msgid "Subject - Not exempt. VAT reverse charge"
|
||||
msgstr "No exenta - Con Inversion sujeto pasivo"
|
||||
|
||||
msgctxt "selection:account.tax,sii_book_key:"
|
||||
msgid "Investment Goods"
|
||||
msgstr "Bienes de inversión"
|
||||
|
@ -1001,47 +926,33 @@ msgctxt "selection:account.tax,sii_book_key:"
|
|||
msgid "Received Invoices"
|
||||
msgstr "Facturas recibidas"
|
||||
|
||||
msgctxt "selection:account.tax,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 20"
|
||||
msgstr "Exenta por el artículo 20"
|
||||
|
||||
msgctxt "selection:account.tax,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 21"
|
||||
msgstr "Exenta por el artículo 21"
|
||||
|
||||
msgctxt "selection:account.tax,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 22"
|
||||
msgstr "Exenta por el artículo 22"
|
||||
|
||||
msgctxt "selection:account.tax,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 23 and Article 24"
|
||||
msgstr "Exenta por el artículo 24"
|
||||
|
||||
msgctxt "selection:account.tax,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 25"
|
||||
msgstr "Exenta por el artículo 25"
|
||||
|
||||
msgctxt "selection:account.tax,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax,sii_exemption_cause:"
|
||||
msgid "Exempt on other grounds"
|
||||
msgstr "Exenta, otros"
|
||||
|
||||
msgctxt "selection:account.tax,sii_intracomunity_key:"
|
||||
msgid ""
|
||||
"The transmission or receipt of goods to undertake partial reports or works "
|
||||
"stipulated in Article 70, section one, Number 7 of the Tax Law (Law 37/1992)"
|
||||
msgstr ""
|
||||
"El envío o recepción de bienes para la realización de los informes parciales"
|
||||
" o trabajos mencionados en el artículo 70, apartado uno, número 7º, de la "
|
||||
"Ley del Impuesto (Ley 37/1992)"
|
||||
|
||||
msgctxt "selection:account.tax,sii_intracomunity_key:"
|
||||
msgid ""
|
||||
"Transfers of goods or intra-Community acquisitions of goods listed in "
|
||||
"Article 9.3 and Article 16.2 of the Tax Law (Law 37/1992)"
|
||||
msgstr ""
|
||||
"Las transferencias de bienes y las adquisiciones intracomunitarias de bienes"
|
||||
" comprendidas en los artículos 9, apartado 3º, y 16, apartado 2º, de la Ley"
|
||||
" del Impuesto (Ley 37/1992)"
|
||||
msgctxt "selection:account.tax,sii_exemption_cause:"
|
||||
msgid "Not Subject"
|
||||
msgstr "No subjecte"
|
||||
|
||||
msgctxt "selection:account.tax,sii_issued_key:"
|
||||
msgid ""
|
||||
|
@ -1287,47 +1198,33 @@ msgctxt "selection:account.tax.template,sii_book_key:"
|
|||
msgid "Received Invoices"
|
||||
msgstr "Facturas recibidas"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax.template,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 20"
|
||||
msgstr "Exenta por el artículo 20"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax.template,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 21"
|
||||
msgstr "Exenta por el artículo 21"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax.template,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 22"
|
||||
msgstr "Exenta por el artículo 22"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax.template,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 23 and Article 24"
|
||||
msgstr "Exenta por el artículo 24"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax.template,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 25"
|
||||
msgstr "Exenta por el artículo 25"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax.template,sii_exemption_cause:"
|
||||
msgid "Exempt on other grounds"
|
||||
msgstr "Exenta, otros"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_intracomunity_key:"
|
||||
msgid ""
|
||||
"The transmission or receipt of goods to undertake partial reports or works "
|
||||
"stipulated in Article 70, section one, Number 7 of the Tax Law (Law 37/1992)"
|
||||
msgstr ""
|
||||
"El envío o recepción de bienes para la realización de los informes parciales"
|
||||
" o trabajos mencionados en el artículo 70, apartado uno, número 7º, de la "
|
||||
"Ley del Impuesto (Ley 37/1992)"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_intracomunity_key:"
|
||||
msgid ""
|
||||
"Transfers of goods or intra-Community acquisitions of goods listed in "
|
||||
"Article 9.3 and Article 16.2 of the Tax Law (Law 37/1992)"
|
||||
msgstr ""
|
||||
"Las transferencias de bienes y las adquisiciones intracomunitarias de bienes"
|
||||
" comprendidas en los artículos 9, apartado 3º, y 16, apartado 2º, de la Ley"
|
||||
" del Impuesto (Ley 37/1992)"
|
||||
msgctxt "selection:account.tax.template,sii_exemption_cause:"
|
||||
msgid "Not Subject"
|
||||
msgstr "No subjecte"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_issued_key:"
|
||||
msgid ""
|
||||
|
|
153
locale/es.po
153
locale/es.po
|
@ -10,18 +10,10 @@ msgctxt "field:account.invoice,sii_communication_type:"
|
|||
msgid "SII Communication Type"
|
||||
msgstr "SII Tipo comunicación"
|
||||
|
||||
msgctxt "field:account.invoice,sii_excemption_key:"
|
||||
msgid "Excemption Cause"
|
||||
msgstr "Causa exenta"
|
||||
|
||||
msgctxt "field:account.invoice,sii_header:"
|
||||
msgid "Header"
|
||||
msgstr "Encabezado"
|
||||
|
||||
msgctxt "field:account.invoice,sii_intracomunity_key:"
|
||||
msgid "SII Intracommunity Key"
|
||||
msgstr "Clave Intracomunitaria SII"
|
||||
|
||||
msgctxt "field:account.invoice,sii_issued_key:"
|
||||
msgid "SII Issued Key"
|
||||
msgstr "Clave facturas emitidas"
|
||||
|
@ -46,10 +38,6 @@ msgctxt "field:account.invoice,sii_state:"
|
|||
msgid "SII State"
|
||||
msgstr "SII Estado"
|
||||
|
||||
msgctxt "field:account.invoice,sii_subjected_key:"
|
||||
msgid "Subjected"
|
||||
msgstr "Sujeta"
|
||||
|
||||
msgctxt "field:account.tax,invoice_used:"
|
||||
msgid "Used in invoice Total"
|
||||
msgstr "Usado en total de factura"
|
||||
|
@ -58,13 +46,9 @@ msgctxt "field:account.tax,sii_book_key:"
|
|||
msgid "Book Key"
|
||||
msgstr "Clave libro"
|
||||
|
||||
msgctxt "field:account.tax,sii_excemption_key:"
|
||||
msgid "Excemption Key"
|
||||
msgstr "Clave excepción"
|
||||
|
||||
msgctxt "field:account.tax,sii_intracomunity_key:"
|
||||
msgid "Intracommunity Key"
|
||||
msgstr "Clave intracomunitaria"
|
||||
msgctxt "field:account.tax,sii_exemption_cause:"
|
||||
msgid "Exemption Cause"
|
||||
msgstr "Causa excepción"
|
||||
|
||||
msgctxt "field:account.tax,sii_issued_key:"
|
||||
msgid "Issued Key"
|
||||
|
@ -94,13 +78,9 @@ msgctxt "field:account.tax.template,sii_book_key:"
|
|||
msgid "Book Key"
|
||||
msgstr "Clave libro"
|
||||
|
||||
msgctxt "field:account.tax.template,sii_excemption_key:"
|
||||
msgid "Excemption Key"
|
||||
msgstr "Clave excepción"
|
||||
|
||||
msgctxt "field:account.tax.template,sii_intracomunity_key:"
|
||||
msgid "Intracommunity Key"
|
||||
msgstr "Clave intracomunitaria"
|
||||
msgctxt "field:account.tax.template,sii_exemption_cause:"
|
||||
msgid "Exemption Cause"
|
||||
msgstr "Causa excepción"
|
||||
|
||||
msgctxt "field:account.tax.template,sii_issued_key:"
|
||||
msgid "Issued Key"
|
||||
|
@ -338,7 +318,7 @@ msgctxt "field:aeat.sii.report.lines,csv:"
|
|||
msgid "CSV"
|
||||
msgstr "CSV"
|
||||
|
||||
msgctxt "field:aeat.sii.report.lines,exemption_key:"
|
||||
msgctxt "field:aeat.sii.report.lines,exemption_cause:"
|
||||
msgid "Exemption Cause"
|
||||
msgstr "Causa exenta"
|
||||
|
||||
|
@ -689,48 +669,6 @@ msgctxt "selection:account.invoice,sii_communication_type:"
|
|||
msgid "Registration of invoices/records"
|
||||
msgstr "Nuevas facturas"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_excemption_key:"
|
||||
msgid "Exempt on account of Article 20"
|
||||
msgstr "Exenta por el artículo 20"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_excemption_key:"
|
||||
msgid "Exempt on account of Article 21"
|
||||
msgstr "Exenta por el artículo 21"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_excemption_key:"
|
||||
msgid "Exempt on account of Article 22"
|
||||
msgstr "Exenta por el artículo 22"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_excemption_key:"
|
||||
msgid "Exempt on account of Article 23 and Article 24"
|
||||
msgstr "Exenta por el artículo 24"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_excemption_key:"
|
||||
msgid "Exempt on account of Article 25"
|
||||
msgstr "Exenta por el artículo 25"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_excemption_key:"
|
||||
msgid "Exempt on other grounds"
|
||||
msgstr "Exenta, otros"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_intracomunity_key:"
|
||||
msgid ""
|
||||
"The transmission or receipt of goods to undertake partial reports or works "
|
||||
"stipulated in Article 70, section one, Number 7 of the Tax Law (Law 37/1992)"
|
||||
msgstr ""
|
||||
"El envío o recepción de bienes para la realización de los informes parciales"
|
||||
" o trabajos mencionados en el artículo 70, apartado uno, número 7º, de la "
|
||||
"Ley del Impuesto (Ley 37/1992)"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_intracomunity_key:"
|
||||
msgid ""
|
||||
"Transfers of goods or intra-Community acquisitions of goods listed in "
|
||||
"Article 9.3 and Article 16.2 of the Tax Law (Law 37/1992)"
|
||||
msgstr ""
|
||||
"Las transferencias de bienes y las adquisiciones intracomunitarias de bienes"
|
||||
" comprendidas en los artículos 9, apartado 3º, y 16, apartado 2º, de la Ley"
|
||||
" del Impuesto (Ley 37/1992)"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_issued_key:"
|
||||
msgid ""
|
||||
"Activities subject to Canary Islands General Indirect Tax/Tax on Production,"
|
||||
|
@ -974,19 +912,6 @@ msgctxt "selection:account.invoice,sii_state:"
|
|||
msgid "Rejected"
|
||||
msgstr "Rechazado"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_subjected_key:"
|
||||
msgid ""
|
||||
"Subject - Not exempt. Both non VAT reverse charge and VAT reverse charge"
|
||||
msgstr "No exenta - Con o sin Inversion sujeto pasivo"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_subjected_key:"
|
||||
msgid "Subject - Not exempt. Non VAT reverse charge"
|
||||
msgstr "Sujeto - No exento"
|
||||
|
||||
msgctxt "selection:account.invoice,sii_subjected_key:"
|
||||
msgid "Subject - Not exempt. VAT reverse charge"
|
||||
msgstr "No exenta - Con Inversion sujeto pasivo"
|
||||
|
||||
msgctxt "selection:account.tax,sii_book_key:"
|
||||
msgid "Investment Goods"
|
||||
msgstr "Bienes de inversión"
|
||||
|
@ -1003,47 +928,33 @@ msgctxt "selection:account.tax,sii_book_key:"
|
|||
msgid "Received Invoices"
|
||||
msgstr "Facturas recibidas"
|
||||
|
||||
msgctxt "selection:account.tax,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 20"
|
||||
msgstr "Exenta por el artículo 20"
|
||||
|
||||
msgctxt "selection:account.tax,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 21"
|
||||
msgstr "Exenta por el artículo 21"
|
||||
|
||||
msgctxt "selection:account.tax,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 22"
|
||||
msgstr "Exenta por el artículo 22"
|
||||
|
||||
msgctxt "selection:account.tax,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 23 and Article 24"
|
||||
msgstr "Exenta por el artículo 24"
|
||||
|
||||
msgctxt "selection:account.tax,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 25"
|
||||
msgstr "Exenta por el artículo 25"
|
||||
|
||||
msgctxt "selection:account.tax,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax,sii_exemption_cause:"
|
||||
msgid "Exempt on other grounds"
|
||||
msgstr "Exenta, otros"
|
||||
|
||||
msgctxt "selection:account.tax,sii_intracomunity_key:"
|
||||
msgid ""
|
||||
"The transmission or receipt of goods to undertake partial reports or works "
|
||||
"stipulated in Article 70, section one, Number 7 of the Tax Law (Law 37/1992)"
|
||||
msgstr ""
|
||||
"El envío o recepción de bienes para la realización de los informes parciales"
|
||||
" o trabajos mencionados en el artículo 70, apartado uno, número 7º, de la "
|
||||
"Ley del Impuesto (Ley 37/1992)"
|
||||
|
||||
msgctxt "selection:account.tax,sii_intracomunity_key:"
|
||||
msgid ""
|
||||
"Transfers of goods or intra-Community acquisitions of goods listed in "
|
||||
"Article 9.3 and Article 16.2 of the Tax Law (Law 37/1992)"
|
||||
msgstr ""
|
||||
"Las transferencias de bienes y las adquisiciones intracomunitarias de bienes"
|
||||
" comprendidas en los artículos 9, apartado 3º, y 16, apartado 2º, de la Ley"
|
||||
" del Impuesto (Ley 37/1992)"
|
||||
msgctxt "selection:account.tax,sii_exemption_cause:"
|
||||
msgid "Not Subject"
|
||||
msgstr "No sujeta"
|
||||
|
||||
msgctxt "selection:account.tax,sii_issued_key:"
|
||||
msgid ""
|
||||
|
@ -1289,47 +1200,33 @@ msgctxt "selection:account.tax.template,sii_book_key:"
|
|||
msgid "Received Invoices"
|
||||
msgstr "Facturas recibidas"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax.template,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 20"
|
||||
msgstr "Exenta por el artículo 20"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax.template,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 21"
|
||||
msgstr "Exenta por el artículo 21"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax.template,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 22"
|
||||
msgstr "Exenta por el artículo 22"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax.template,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 23 and Article 24"
|
||||
msgstr "Exenta por el artículo 24"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax.template,sii_exemption_cause:"
|
||||
msgid "Exempt on account of Article 25"
|
||||
msgstr "Exenta por el artículo 25"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_excemption_key:"
|
||||
msgctxt "selection:account.tax.template,sii_exemption_cause:"
|
||||
msgid "Exempt on other grounds"
|
||||
msgstr "Exenta, otros"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_intracomunity_key:"
|
||||
msgid ""
|
||||
"The transmission or receipt of goods to undertake partial reports or works "
|
||||
"stipulated in Article 70, section one, Number 7 of the Tax Law (Law 37/1992)"
|
||||
msgstr ""
|
||||
"El envío o recepción de bienes para la realización de los informes parciales"
|
||||
" o trabajos mencionados en el artículo 70, apartado uno, número 7º, de la "
|
||||
"Ley del Impuesto (Ley 37/1992)"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_intracomunity_key:"
|
||||
msgid ""
|
||||
"Transfers of goods or intra-Community acquisitions of goods listed in "
|
||||
"Article 9.3 and Article 16.2 of the Tax Law (Law 37/1992)"
|
||||
msgstr ""
|
||||
"Las transferencias de bienes y las adquisiciones intracomunitarias de bienes"
|
||||
" comprendidas en los artículos 9, apartado 3º, y 16, apartado 2º, de la Ley"
|
||||
" del Impuesto (Ley 37/1992)"
|
||||
msgctxt "selection:account.tax.template,sii_exemption_cause:"
|
||||
msgid "Not Subject"
|
||||
msgstr "No sujeta"
|
||||
|
||||
msgctxt "selection:account.tax.template,sii_issued_key:"
|
||||
msgid ""
|
||||
|
|
|
@ -35,5 +35,8 @@ If you edit them take care if you need to update again to SII</field>
|
|||
<record model="ir.message" id="msg_sii_operation_key_wrong">
|
||||
<field name="text">The invoice %(invoice)s has wrong subjected and opertion sii combination.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_wrong_identifier_type">
|
||||
<field name="text">The party [%(party)s] of the invoice %(invoice)s must has a valid SII Identifier [VAT (only for intracommunity operators)].</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
|
|
63
sii.xml
63
sii.xml
|
@ -7,7 +7,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="sii_book_key">R</field>
|
||||
<field name="sii_operation_key">F6</field>
|
||||
<field name="sii_received_key">13</field>
|
||||
<field name="sii_excemption_key">E6</field>
|
||||
<field name="sii_exemption_cause">E6</field>
|
||||
<field name="tax_used" eval="True"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
|
@ -15,7 +15,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="sii_book_key">R</field>
|
||||
<field name="sii_operation_key">F6</field>
|
||||
<field name="sii_received_key">13</field>
|
||||
<field name="sii_excemption_key">E6</field>
|
||||
<field name="sii_exemption_cause">E6</field>
|
||||
<field name="tax_used" eval="True"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
|
@ -70,70 +70,73 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<record model="account.tax.template" id="account_es.iva_X0">
|
||||
<field name="sii_book_key">E</field>
|
||||
<field name="sii_issued_key">02</field>
|
||||
<field name="sii_excemption_key">E2</field>
|
||||
<field name="sii_exemption_cause">E2</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_ISP_compras_16">
|
||||
<field name="sii_book_key">E</field>
|
||||
<field name="sii_operation_key">F1</field>
|
||||
<field name="sii_issued_key">01</field>
|
||||
<field name="sii_subjected_key">S2</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
<field name="tax_used" eval="True"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_ISP_reciclaje_0">
|
||||
<field name="sii_book_key">E</field>
|
||||
<field name="sii_operation_key">F1</field>
|
||||
<field name="sii_issued_key">01</field>
|
||||
<field name="sii_subjected_key">S2</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
<field name="tax_used" eval="True"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_ISP_obra_0">
|
||||
<field name="sii_book_key">E</field>
|
||||
<field name="sii_operation_key">F1</field>
|
||||
<field name="sii_issued_key">01</field>
|
||||
<field name="sii_subjected_key">S2</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
<field name="tax_used" eval="True"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_IO">
|
||||
<field name="sii_book_key">E</field>
|
||||
<field name="sii_issued_key">01</field>
|
||||
<field name="sii_excemption_key">E5</field>
|
||||
<field name="sii_exemption_cause">E5</field>
|
||||
<field name="tax_used" eval="True"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_IO_serv">
|
||||
<field name="sii_book_key">E</field>
|
||||
<field name="sii_issued_key">01</field>
|
||||
<field name="sii_excemption_key">E6</field>
|
||||
<field name="sii_exemption_cause">E6</field>
|
||||
<field name="tax_used" eval="True"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_dev_AI">
|
||||
<field name="sii_book_key">E</field>
|
||||
<field name="sii_issued_key">01</field>
|
||||
<field name="sii_excemption_key">E6</field>
|
||||
<field name="sii_exemption_cause">E6</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_dev_AI_serv">
|
||||
<field name="sii_book_key">E</field>
|
||||
<field name="sii_issued_key">01</field>
|
||||
<field name="sii_excemption_key">E6</field>
|
||||
<field name="sii_exemption_cause">E6</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_ded_AI">
|
||||
<field name="sii_book_key">R</field>
|
||||
<field name="sii_received_key">09</field>
|
||||
<field name="sii_excemption_key">E6</field>
|
||||
<field name="sii_exemption_cause">E6</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_ded_AI_serv">
|
||||
<field name="sii_book_key">R</field>
|
||||
<field name="sii_received_key">09</field>
|
||||
<field name="sii_excemption_key">E6</field>
|
||||
<field name="sii_exemption_cause">E6</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
|
@ -325,7 +328,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<record model="account.tax.template" id="account_es.iva_reagp_compras_12_2">
|
||||
<field name="sii_book_key">R</field>
|
||||
<field name="sii_received_key">02</field>
|
||||
<field name="sii_excemption_key">E6</field>
|
||||
<field name="sii_exemption_cause">E6</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
<field name="invoice_used" eval="False"/>
|
||||
</record>
|
||||
|
@ -335,6 +338,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_ISP_compras_1">
|
||||
<field name="sii_book_key">R</field>
|
||||
<field name="sii_operation_key">F1</field>
|
||||
<field name="sii_received_key">01</field>
|
||||
<field name="sii_subjected_key">S2</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
|
@ -342,6 +346,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_ISP_compras_2">
|
||||
<field name="sii_book_key"></field>
|
||||
<field name="sii_operation_key">F1</field>
|
||||
<field name="sii_received_key"></field>
|
||||
<field name="sii_subjected_key"></field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
|
@ -353,6 +358,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_ISP_compras_bi_1">
|
||||
<field name="sii_book_key">R</field>
|
||||
<field name="sii_operation_key">F1</field>
|
||||
<field name="sii_received_key">01</field>
|
||||
<field name="sii_subjected_key">S2</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
|
@ -360,6 +366,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_ISP_compras_bi_2">
|
||||
<field name="sii_book_key"></field>
|
||||
<field name="sii_operation_key">F1</field>
|
||||
<field name="sii_received_key"></field>
|
||||
<field name="sii_subjected_key"></field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
|
@ -368,15 +375,21 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<record model="account.tax.template" id="account_es.iva_rep_no_sujeto">
|
||||
<field name="sii_book_key">E</field>
|
||||
<field name="sii_issued_key">01</field>
|
||||
<field name="sii_excemption_key">E6</field>
|
||||
<field name="sii_exemption_cause">NotSubject</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_rep_no_sujeto_2">
|
||||
<field name="sii_book_key">E</field>
|
||||
<field name="sii_issued_key">08</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_sop_no_sujeto">
|
||||
<field name="sii_book_key">R</field>
|
||||
<field name="sii_received_key">01</field>
|
||||
<field name="sii_excemption_key">E6</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
<field name="sii_exemption_cause">E6</field>
|
||||
<field name="tax_used" eval="True"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
</data>
|
||||
|
@ -384,7 +397,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<record model="account.tax.template" id="account_es.iva_sop_ex">
|
||||
<field name="sii_book_key">R</field>
|
||||
<field name="sii_received_key">01</field>
|
||||
<field name="sii_excemption_key">E6</field>
|
||||
<field name="sii_exemption_cause">E6</field>
|
||||
<field name="tax_used" eval="True"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
|
@ -412,7 +425,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<record model="account.tax.template" id="account_es.iva_sop_ex_inv">
|
||||
<field name="sii_book_key">R</field>
|
||||
<field name="sii_received_key">01</field>
|
||||
<field name="sii_excemption_key">E6</field>
|
||||
<field name="sii_exemption_cause">E6</field>
|
||||
<field name="tax_used" eval="True"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
|
@ -440,22 +453,22 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<record model="account.tax.template" id="account_es.iva_rep_ex">
|
||||
<field name="sii_book_key">E</field>
|
||||
<field name="sii_issued_key">01</field>
|
||||
<field name="sii_excemption_key">E6</field>
|
||||
<field name="sii_exemption_cause">E6</field>
|
||||
<field name="tax_used" eval="True"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_rep_0_asis">
|
||||
<field name="sii_book_key">E</field>
|
||||
<field name="sii_issued_key">01</field>
|
||||
<field name="sii_excemption_key">E1</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
<field name="sii_exemption_cause">E1</field>
|
||||
<field name="tax_used" eval="True"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_rep_0_ter_rus">
|
||||
<field name="sii_book_key">E</field>
|
||||
<field name="sii_issued_key">01</field>
|
||||
<field name="sii_excemption_key">E1</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
<field name="sii_exemption_cause">E1</field>
|
||||
<field name="tax_used" eval="True"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_rep_4">
|
||||
|
@ -482,14 +495,14 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<record model="account.tax.template" id="account_es.iva_sop_alq_ex">
|
||||
<field name="sii_book_key">R</field>
|
||||
<field name="sii_received_key">01</field>
|
||||
<field name="sii_excemption_key">E6</field>
|
||||
<field name="sii_exemption_cause">E6</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
<record model="account.tax.template" id="account_es.iva_rep_alq_ex">
|
||||
<field name="sii_book_key">E</field>
|
||||
<field name="sii_issued_key">01</field>
|
||||
<field name="sii_excemption_key">E6</field>
|
||||
<field name="sii_exemption_cause">E6</field>
|
||||
<field name="tax_used" eval="False"/>
|
||||
<field name="invoice_used" eval="True"/>
|
||||
</record>
|
||||
|
|
|
@ -8,16 +8,10 @@ contains the full copyright notices and license terms. -->
|
|||
<field name="sii_book_key" colspan="3"/>
|
||||
<label name="sii_operation_key"/>
|
||||
<field name="sii_operation_key" colspan="3"/>
|
||||
<label name="sii_subjected_key"/>
|
||||
<field name="sii_subjected_key" colspan="3"/>
|
||||
<label name="sii_issued_key"/>
|
||||
<field name="sii_issued_key" colspan="3"/>
|
||||
<label name="sii_received_key"/>
|
||||
<field name="sii_received_key" colspan="3"/>
|
||||
<label name="sii_intracomunity_key"/>
|
||||
<field name="sii_intracomunity_key" colspan="3"/>
|
||||
<label name="sii_excemption_key"/>
|
||||
<field name="sii_excemption_key" colspan="3"/>
|
||||
<field name="sii_records" colspan="4"/>
|
||||
<label name="sii_communication_type"/>
|
||||
<field name="sii_communication_type"/>
|
||||
|
|
|
@ -16,12 +16,10 @@ contains the full copyright notices and license terms. -->
|
|||
<field name="sii_issued_key"/>
|
||||
<label name="sii_received_key"/>
|
||||
<field name="sii_received_key"/>
|
||||
<label name="sii_intracomunity_key"/>
|
||||
<field name="sii_intracomunity_key"/>
|
||||
<label name="sii_subjected_key"/>
|
||||
<field name="sii_subjected_key"/>
|
||||
<label name="sii_excemption_key"/>
|
||||
<field name="sii_excemption_key"/>
|
||||
<label name="sii_exemption_cause"/>
|
||||
<field name="sii_exemption_cause"/>
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
||||
|
|
|
@ -16,12 +16,10 @@ contains the full copyright notices and license terms. -->
|
|||
<field name="sii_issued_key"/>
|
||||
<label name="sii_received_key"/>
|
||||
<field name="sii_received_key"/>
|
||||
<label name="sii_intracomunity_key"/>
|
||||
<field name="sii_intracomunity_key"/>
|
||||
<label name="sii_subjected_key"/>
|
||||
<field name="sii_subjected_key"/>
|
||||
<label name="sii_excemption_key"/>
|
||||
<field name="sii_excemption_key"/>
|
||||
<label name="sii_exemption_cause"/>
|
||||
<field name="sii_exemption_cause"/>
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
||||
|
|
Loading…
Reference in New Issue