diff --git a/account_move_fiscal_year/models/account_move.py b/account_move_fiscal_year/models/account_move.py index 48208dd2f..eba8c0e38 100644 --- a/account_move_fiscal_year/models/account_move.py +++ b/account_move_fiscal_year/models/account_move.py @@ -26,7 +26,8 @@ class AccountMove(models.Model): for rec in self: date = fields.Date.from_string(rec.date) company = rec.company_id - rec.date_range_fy_id = company.find_daterange_fy(date) + rec.date_range_fy_id =\ + company and company.find_daterange_fy(date) or False @api.model def _search_date_range_fy(self, operator, value):