Skip to content
Snippets Groups Projects
Commit 78f45a49 authored by Victor Feyens's avatar Victor Feyens
Browse files

[IMP] account: minor company cleanup


closes odoo/odoo#40025

Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
parent 730e4ce2
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment