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

[15.0][FIX] l10n_do_accounting: TypeError if not ncf expiration date #1143

Merged
merged 2 commits into from
Feb 26, 2024
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 l10n_do_accounting/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"category": "Localization",
"license": "LGPL-3",
"website": "https://github.com/odoo-dominicana",
"version": "15.0.0.14.0",
"version": "15.0.0.14.1",
# any module necessary for this one to work correctly
"depends": ["l10n_latam_invoice_document", "l10n_do"],
# always loaded
Expand Down
4 changes: 3 additions & 1 deletion l10n_do_accounting/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ def _l10n_do_is_new_expiration_date(self):
),
("posted_before", "=", True),
("id", "!=", self.id or self._origin.id),
("l10n_do_ncf_expiration_date", "!=", False),
],
order="invoice_date, id desc",
order="invoice_date desc, id desc",
limit=1,
)
if not last_invoice:
Expand All @@ -203,6 +204,7 @@ def _compute_l10n_do_show_expiration_date_msg(self):
and inv.l10n_latam_document_type_id
and inv.country_code == "DO"
and not inv.l10n_latam_manual_document_number
and inv.l10n_do_ncf_expiration_date
)
for invoice in l10n_do_internal_invoices:
invoice.l10n_do_show_expiration_date_msg = invoice._l10n_do_is_new_expiration_date()
Expand Down
Loading