[FIX] l10n_ar_sale: Fix sale order line date.#249
Merged
jjscarafia merged 1 commit intoingadhoc:18.0from Jul 31, 2025
Merged
Conversation
Contributor
8ad20fe to
cc566aa
Compare
The _l10n_ar_add_taxes method of account.fiscal.position of the l10n_ar_tax module ( https://github.com/ingadhoc/odoo-argentina/blob/18.0/l10n_ar_tax/models/account_fiscal_position.py#L10 ) gets the date of the sale.order as datetime.datetime (from l10n_ar_sale module https://github.com/ingadhoc/argentina-sale/blob/18.0/l10n_ar_sale/models/sale_order_line.py#L130 ) but compares it with the from_date and to_date fields of l10n_ar.partner.tax model which are of type datetime.date then we convert the date of the sale.order.line as datetime.date to make a homogeneous comparison between date fields of the same type (datetime.date). Also we ensure to use the timezone of Argentina to avoid issues with timezones when comparing dates. Ticket adhoc side: 97262, 97292
cc566aa to
c2ebbfb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The _l10n_ar_add_taxes method of account.fiscal.position of the l10n_ar_tax module ( https://github.com/ingadhoc/odoo-argentina/blob/18.0/l10n_ar_tax/models/account_fiscal_position.py#L10 ) gets the date of the sale.order as datetime.datetime (from l10n_ar_sale module https://github.com/ingadhoc/argentina-sale/blob/18.0/l10n_ar_sale/models/sale_order_line.py#L130 ) but compares it with the from_date and to_date fields of l10n_ar.partner.tax model which are of type datetime.date then we convert the date of the sale.order.line as datetime.date to make a homogeneous comparison between date fields of the same type (datetime.date). Also we ensure to use the timezone of Argentina to avoid issues with timezones when comparing dates.
Ticket adhoc side: 97262, 97292