Skip to content

[FIX] account_invoice_tax: avoid including amount_currency when not needed #211

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

Closed
wants to merge 1 commit into from

Conversation

rov-adhoc
Copy link
Contributor

Fixed an issue in '_get_amount_updated_values' where 'amount_currency' was included in the dictionary even when unnecessary, causing errors when 'amount_company_currency' was set to 'None'.

Now, 'amount_currency' is only added if the move's currency differs from the company currency and 'self.amount' is set. This prevents operations involving 'None' values, avoiding errors when processing the data.

Reported error:
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'

@rov-adhoc rov-adhoc changed the title [FIX] account_accountant: avoid including amount_currency when not needed [FIX] account_invoice_tax: avoid including amount_currency when not needed Apr 4, 2025
…eeded

Fixed an issue in '_get_amount_updated_values' where 'amount_currency'
was included in the dictionary even when unnecessary,
causing errors when 'amount_company_currency' was set to 'None'.

Now, 'amount_currency' is only added if the move's currency differs
from the company currency and 'self.amount' is set.
This prevents operations involving 'None' values, avoiding errors when processing the data.

Reported error:
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'
@roboadhoc
Copy link

@cav-adhoc
Copy link
Contributor

@roboadhoc r+

@roboadhoc roboadhoc closed this in 34eaed8 Apr 8, 2025
@roboadhoc roboadhoc added the 17.1 label Apr 8, 2025
@fw-bot-adhoc fw-bot-adhoc deleted the 18.0-h-90461-rov branch April 22, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants