mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[CHG] prevent to declare fiscal month and/or year for all companies in a multi-company context
This commit is contained in:
@@ -17,5 +17,7 @@ class ResCompany(models.Model):
|
||||
('type_id', '=', fm_id.id),
|
||||
('date_start', '<=', date_str),
|
||||
('date_end', '>=', date_str),
|
||||
'|',
|
||||
('company_id', '=', self.id),
|
||||
])
|
||||
('company_id', '=', False),
|
||||
], limit=1, order='company_id asc')
|
||||
|
||||
@@ -19,9 +19,13 @@ class ResCompany(models.Model):
|
||||
('type_id', '=', fy_id.id),
|
||||
('date_start', '<=', date_str),
|
||||
('date_end', '>=', date_str),
|
||||
'|',
|
||||
('company_id', '=', self.id),
|
||||
('company_id', '=', False),
|
||||
]
|
||||
date_range = self.env['date.range'].search(s_args)
|
||||
date_range = self.env['date.range'].search(s_args,
|
||||
limit=1,
|
||||
order='company_id asc')
|
||||
return date_range
|
||||
|
||||
@api.multi
|
||||
|
||||
Reference in New Issue
Block a user