Skip to content

Commit 29b4506

Browse files
Merge PR #234 into 17.0
Signed-off-by jguenat
2 parents bbccf2b + 1275029 commit 29b4506

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sustainability_hr_expense_report/models/hr_expense.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ def _get_line_amount(self) -> float:
6161

6262
def can_use_account_id_carbon_value(self) -> bool:
6363
self.ensure_one()
64-
return self.account_id.can_compute_carbon_value("in")
64+
return (
65+
self.account_id.can_compute_carbon_value("in") if self.account_id else False
66+
)
6567

6668
def get_account_id_carbon_compute_values(self) -> dict:
6769
self.ensure_one()

0 commit comments

Comments
 (0)