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

[FIX] account_fiscal_year_closing move line created with correct currency #288

Open
wants to merge 1 commit into
base: 14.0
Choose a base branch
from

Conversation

sergiocorato
Copy link
Contributor

No description provided.

):
move_line.update(
currency_id=account.currency_id.id,
amount_currency=balance,
Copy link

@lk-eska lk-eska May 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

balance calculation is incorrect. this is the balance in company currency. we get it working like this:


                if account.currency_id and account.currency_id != account.company_currency_id:
                    move_line.update(
                        currency_id=account.currency_id.id,
                        amount_currency=sum(account_lines.mapped('amount_currency')) * -1,
                    )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lk-eska , I've updated the fix, anyway account.company_currency_id does not exist afaik.

Copy link
Contributor Author

@sergiocorato sergiocorato Aug 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I computed the value of amount_currency on the balance of the account, with the date of the closing move, as the direct sum of the currency amounts is not meaningful as they are referred to many dates.

@sergiocorato sergiocorato force-pushed the 14.0-fix-account_fiscalyear_closing-currency branch 3 times, most recently from b1a975f to b892828 Compare August 29, 2024 16:53
@sergiocorato sergiocorato force-pushed the 14.0-fix-account_fiscalyear_closing-currency branch from b892828 to 41b7451 Compare August 29, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants