diff options
Diffstat (limited to 'fixco_custom/models/res_company.py')
| -rw-r--r-- | fixco_custom/models/res_company.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fixco_custom/models/res_company.py b/fixco_custom/models/res_company.py new file mode 100644 index 0000000..ed36141 --- /dev/null +++ b/fixco_custom/models/res_company.py @@ -0,0 +1,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()
\ No newline at end of file |
