blob: ed3614103d74a6c5ad7c1ed4dbc3335850d533ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
from odoo import models, fields
from datetime import date
class ResCompany(models.Model):
_inherit = 'res.company'
excluded_user_ids = fields.Many2many(
'res.users',
string="Excluded Users"
)
def _get_user_fiscal_lock_date(self):
self.ensure_one()
if self.env.user in self.excluded_user_ids:
return date.min
return super()._get_user_fiscal_lock_date()
|