From 93b4ce40aef045628b59904f1c8d5d15fa146585 Mon Sep 17 00:00:00 2001 From: "Adrien Peiffer (ACSONE)" Date: Wed, 18 Oct 2017 09:28:54 +0200 Subject: [PATCH] [FIX] account_move_fiscal_month: check if the company is defined. --- account_move_fiscal_month/models/account_move.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/account_move_fiscal_month/models/account_move.py b/account_move_fiscal_month/models/account_move.py index 2dbb6ca76..39fa46b24 100644 --- a/account_move_fiscal_month/models/account_move.py +++ b/account_move_fiscal_month/models/account_move.py @@ -27,7 +27,8 @@ class AccountMove(models.Model): for rec in self: date = rec.date company = rec.company_id - rec.date_range_fm_id = company.find_daterange_fm(date) + rec.date_range_fm_id =\ + company and company.find_daterange_fm(date) or False @api.model def _search_date_range_fm(self, operator, value):