Skip to content
Merged
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
2 changes: 1 addition & 1 deletion account_caba_payment_date/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Account CABA Payment Date",
"version": "17.0.3.0.0",
"version": "17.0.3.0.1",
"author": "Jarsa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-payment",
"license": "LGPL-3",
Expand Down
130 changes: 130 additions & 0 deletions account_caba_payment_date/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_caba_payment_date
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: account_caba_payment_date
#: model:ir.model.fields.selection,name:account_caba_payment_date.selection__res_company__caba_payment_date_lock_policy__block
msgid "Block the reconciliation"
msgstr "Bloquear la conciliaci贸n"

#. module: account_caba_payment_date
#: model:ir.model.fields,field_description:account_caba_payment_date.field_res_company__caba_payment_date_lock_policy
#: model:ir.model.fields,field_description:account_caba_payment_date.field_res_config_settings__caba_payment_date_lock_policy
msgid "Cash Basis Lock Policy"
msgstr "Pol铆tica de bloqueo Cash Basis"

#. module: account_caba_payment_date
#: model:ir.model.fields,field_description:account_caba_payment_date.field_res_company__caba_purchase_date_policy
#: model:ir.model.fields,field_description:account_caba_payment_date.field_res_config_settings__caba_purchase_date_policy
msgid "Cash Basis Purchase Date"
msgstr "Fecha Cash Basis en compras"

#. module: account_caba_payment_date
#: model:ir.model.fields,help:account_caba_payment_date.field_res_company__caba_purchase_date_policy
#: model:ir.model.fields,help:account_caba_payment_date.field_res_config_settings__caba_purchase_date_policy
msgid ""
"Date of the cash basis entry of vendor bills:\n"
"- Payment date: always the date of the bank/cash entry.\n"
"- Latest of payment and bill dates: use the bill date when the bill is "
"dated after the payment (e.g. Mexican creditable VAT, which is only "
"deductible once the CFDI exists)."
msgstr ""
"Fecha de la p贸liza Cash Basis de las facturas de proveedor:\n"
"- Fecha de pago: siempre la fecha del asiento de banco/efectivo.\n"
"- La m谩s reciente entre pago y factura: usar la fecha de la factura cuando "
"es posterior al pago (p. ej. el IVA acreditable mexicano, que solo es "
"deducible cuando existe el CFDI)."

#. module: account_caba_payment_date
#: model:ir.model.fields.selection,name:account_caba_payment_date.selection__res_company__caba_payment_date_lock_policy__standard
msgid "Keep the standard behavior"
msgstr "Mantener el comportamiento est谩ndar"

#. module: account_caba_payment_date
#: model:ir.model.fields.selection,name:account_caba_payment_date.selection__res_company__caba_purchase_date_policy__latest
msgid "Latest of payment and bill dates"
msgstr "La m谩s reciente entre pago y factura"

#. module: account_caba_payment_date
#: model:ir.model.fields.selection,name:account_caba_payment_date.selection__res_company__caba_purchase_date_policy__payment
msgid "Payment date"
msgstr "Fecha de pago"

#. module: account_caba_payment_date
#. odoo-python
#: code:addons/account_caba_payment_date/models/account_partial_reconcile.py:0
#, python-format
msgid ""
"The cash basis entry of this reconciliation must be dated on the payment "
"date %(date)s, but that period is locked (lock date: %(lock_date)s).\n"
"Reopen the period, or change the cash basis lock policy in the accounting "
"settings."
msgstr ""
"La p贸liza Cash Basis de esta conciliaci贸n debe fecharse en la fecha de pago"
" %(date)s, pero ese periodo est谩 bloqueado (fecha de bloqueo: "
"%(lock_date)s).\n"
"Reabra el periodo o cambie la pol铆tica de bloqueo Cash Basis en los ajustes"
" de contabilidad."

#. module: account_caba_payment_date
#. odoo-python
#: code:addons/account_caba_payment_date/models/account_move_line.py:0
#, python-format
msgid ""
"The exchange rate difference journal entry inherited the operation date "
"because the accounting period of the expected date was closed.<br/>Expected "
"date: %(expected)s<br/>Applied operation date: %(applied)s"
msgstr ""
"La p贸liza de diferencial cambiario hered贸 la fecha de operaci贸n porque el "
"periodo contable de la fecha esperada se encontraba cerrado.<br/>Fecha "
"esperada: %(expected)s<br/>Fecha de operaci贸n aplicada: %(applied)s"

#. module: account_caba_payment_date
#. odoo-python
#: code:addons/account_caba_payment_date/models/account_move.py:0
#, python-format
msgid ""
"The VAT cash basis journal entry was generated with a date different from "
"the source documents because the accounting period of the expected date was "
"closed.<br/>Expected date: %(expected)s<br/>Applied date: %(applied)s"
msgstr ""
"La p贸liza de traslado de IVA (Cash Basis) se gener贸 con una fecha distinta a"
" la de los documentos de origen porque el periodo contable de la fecha "
"esperada se encontraba cerrado.<br/>Fecha esperada: %(expected)s<br/>Fecha "
"aplicada: %(applied)s"

#. module: account_caba_payment_date
#: model:ir.model.fields,help:account_caba_payment_date.field_res_company__caba_payment_date_lock_policy
#: model:ir.model.fields,help:account_caba_payment_date.field_res_config_settings__caba_payment_date_lock_policy
msgid ""
"What to do when the payment date of a cash basis entry falls in a locked "
"period:\n"
"- Block the reconciliation: raise an error asking to reopen the period.\n"
"- Use the first open date: date the entry on the first day after the lock.\n"
"- Keep the standard behavior: let Odoo date the entry on the reconciliation "
"date."
msgstr ""
"Qu茅 hacer cuando la fecha de pago de una p贸liza Cash Basis cae en un "
"periodo bloqueado:\n"
"- Bloquear la conciliaci贸n: lanzar un error pidiendo reabrir el periodo.\n"
"- Usar la primera fecha abierta: fechar la p贸liza el primer d铆a despu茅s del "
"bloqueo.\n"
"- Mantener el comportamiento est谩ndar: dejar que Odoo feche la p贸liza en la "
"fecha de la conciliaci贸n."

#. module: account_caba_payment_date
#: model:ir.model.fields.selection,name:account_caba_payment_date.selection__res_company__caba_payment_date_lock_policy__next_open
msgid "Use the first open date"
msgstr "Usar la primera fecha abierta"
4 changes: 3 additions & 1 deletion account_caba_payment_date/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ def _log_cash_basis_lock_shift(self, expected_date_per_partial):
# The cash basis entry itself always gets its own message.
move.message_post(body=body)
# The source documents get a single message per shifted date.
source_documents = partial.debit_move_id.move_id | partial.credit_move_id.move_id
source_documents = (
partial.debit_move_id.move_id | partial.credit_move_id.move_id
)
for document in source_documents:
key = (document.id, expected_date)
if key in seen:
Expand Down
10 changes: 7 additions & 3 deletions account_caba_payment_date/models/account_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
class AccountMoveLine(models.Model):
_inherit = "account.move.line"

def _prepare_exchange_difference_move_vals(self, amounts_list, company=None, exchange_date=None, **kwargs):
def _prepare_exchange_difference_move_vals(
self, amounts_list, company=None, exchange_date=None, **kwargs
):
"""Shift the exchange difference (CABA) entry to the operation date when
its computed date falls in a closed period.

Expand All @@ -35,7 +37,9 @@ def _prepare_exchange_difference_move_vals(self, amounts_list, company=None, exc
if not move_company:
return vals
lock_date = max(
move_company.with_context(cash_basis_check_tax_lock=True)._get_user_fiscal_lock_date(),
move_company.with_context(
cash_basis_check_tax_lock=True
)._get_user_fiscal_lock_date(),
date.min,
)
expected_date = move_values.get("date")
Expand All @@ -58,7 +62,7 @@ def _create_exchange_difference_moves(self, exchange_diff_values_list):

moves = super()._create_exchange_difference_moves(exchange_diff_values_list)

for move, expected_date in zip(moves, expected_dates):
for move, expected_date in zip(moves, expected_dates, strict=False):
if not expected_date:
continue
body = Markup(
Expand Down
Loading