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

[16.0][IMP] account_reconcile_oca: verify data is defined #584

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 5 additions & 1 deletion account_reconcile_oca/models/account_bank_statement_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,11 @@ def _compute_exchange_rate(self, data, reconcile_auxiliary_id):
foreign_currency = (
self.currency_id != self.company_id.currency_id
or self.foreign_currency_id
or any(line["currency_id"] != line["line_currency_id"] for line in data)
or any(
line.get("line_currency_id")
and line["currency_id"] != line["line_currency_id"]
for line in data
)
)
if not foreign_currency or self.is_reconciled:
return reconcile_auxiliary_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export class AccountReconcileDataWidget extends Component {
this.props.record.data.currency_id[0] !==
this.props.record.data.company_currency_id[0] ||
this.props.record.data[this.props.name].data.some(
(item) => item.line_currency_id !== item.currency_id
(item) =>
item.line_currency_id &&
item.line_currency_id !== item.currency_id
));
}
getReconcileLines() {
Expand Down
Loading