Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.0][IMP] l10n_es_aeat_sii: Add operation date #3882

Open
wants to merge 2 commits into
base: 12.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 33 additions & 22 deletions l10n_es_aeat_sii/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>\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"
Expand Down Expand Up @@ -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."
Expand Down Expand Up @@ -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 ""
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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."
Expand Down Expand Up @@ -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 "
Expand All @@ -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 "
Expand All @@ -1159,21 +1170,21 @@ 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 ""
"¡En este momento no puede poner en borrador esta factura porque hay un "
"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 "
Expand All @@ -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 "
Expand All @@ -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. "
Expand All @@ -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"
Expand Down
12 changes: 11 additions & 1 deletion l10n_es_aeat_sii/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@
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,
)
Expand Down Expand Up @@ -778,6 +780,10 @@
"TipoDesglose": tipo_desglose,
"ImporteTotal": amount_total,
}
if self.date_operation:
inv_dict["FacturaExpedida"].update(

Check warning on line 784 in l10n_es_aeat_sii/models/account_invoice.py

View check run for this annotation

Codecov / codecov/patch

l10n_es_aeat_sii/models/account_invoice.py#L784

Added line #L784 was not covered by tests
{'FechaOperacion': self._change_date_format(self.date_operation)}
)
if self.sii_macrodata:
inv_dict["FacturaExpedida"].update(Macrodato="S")
if self.sii_registration_key_additional1:
Expand Down Expand Up @@ -882,6 +888,10 @@
"ImporteTotal": amount_total,
"CuotaDeducible": tax_amount * sign,
}
if self.date_operation:
inv_dict["FacturaRecibida"].update(

Check warning on line 892 in l10n_es_aeat_sii/models/account_invoice.py

View check run for this annotation

Codecov / codecov/patch

l10n_es_aeat_sii/models/account_invoice.py#L892

Added line #L892 was not covered by tests
{'FechaOperacion': self._change_date_format(self.date_operation)}
)
if self.sii_macrodata:
inv_dict["FacturaRecibida"].update(Macrodato="S")
if self.sii_registration_key_additional1:
Expand Down
11 changes: 10 additions & 1 deletion l10n_es_aeat_sii/views/account_invoice_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
('state', 'not in', ['cancel']),
('sii_state', 'not in', ['sent','sent_w_errors','sent_modified'])]}" />
</button>

<field name="date_invoice" position="after">
<field name="date_operation" groups="l10n_es_aeat.group_account_aeat"
attrs="{
'readonly': [('state','!=','draft')]}"/>
</field>
<field name="reference" position="attributes">
<attribute name="attrs">{'required':[('state','not in',['open','paid','cancel'])]}</attribute>
</field>
Expand Down Expand Up @@ -150,6 +154,11 @@
<field name="inherit_id" ref="invoice_sii_form" />
<field name="groups_id" eval="[(4, ref('l10n_es_aeat.group_account_aeat'))]"/>
<field name="arch" type="xml">
<field name="date_invoice" position="after">
<field name="date_operation" groups="l10n_es_aeat.group_account_aeat"
attrs="{
'readonly': [('state','!=','draft')]}"/>
</field>
<group name="group_sii_result" position="after">
<group string="Connector Jobs" name="group_sii_jobs">
<field name="invoice_jobs_ids"
Expand Down
Loading