[FIX] account_move_fiscal_month: check if the company is defined.

This commit is contained in:
Adrien Peiffer (ACSONE)
2017-10-18 09:28:54 +02:00
committed by Cédric Pigeon
parent 71512e6a10
commit 93b4ce40ae

View File

@@ -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):