Skip to content

Commit

Permalink
[FIX] move line created with correct currency
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiocorato committed Aug 29, 2024
1 parent b1b1dd6 commit b1a975f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions account_fiscal_year_closing/models/account_fiscalyear_closing.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,16 @@ def move_line_prepare(self, account, account_lines, partner_id=False):
"date": date,
"partner_id": partner_id,
}
if (
account.currency_id
and account.currency_id
!= self.fyc_config_id.fyc_id.company_id.currency_id

Check warning on line 610 in account_fiscal_year_closing/models/account_fiscalyear_closing.py

View check run for this annotation

Codecov / codecov/patch

account_fiscal_year_closing/models/account_fiscalyear_closing.py#L610

Added line #L610 was not covered by tests
):
move_line.update(
currency_id=account.currency_id.id,
amount_currency=sum(account_lines.mapped("amount_currency"))
* -1,
)

Check warning on line 616 in account_fiscal_year_closing/models/account_fiscalyear_closing.py

View check run for this annotation

Codecov / codecov/patch

account_fiscal_year_closing/models/account_fiscalyear_closing.py#L616

Added line #L616 was not covered by tests
else:
balance = 0
return balance, move_line
Expand Down

0 comments on commit b1a975f

Please sign in to comment.