mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] account_move_fiscal_year: check if the company is defined.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user