[IMP] account: minor company cleanup

closes odoo/odoo#40025

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
Victor Feyens
2019-11-08 12:18:41 +00:00
parent 730e4ce201
commit 78f45a498f
+1 -1
View File
@@ -226,7 +226,7 @@ class ResCompany(models.Model):
def _validate_fiscalyear_lock(self, values):
if values.get('fiscalyear_lock_date'):
nb_draft_entries = self.env['account.move'].search([
('company_id', 'in', [c.id for c in self]),
('company_id', 'in', self.ids),
('state', '=', 'draft'),
('date', '<=', values['fiscalyear_lock_date'])])
if nb_draft_entries: