diff options
| author | Mqdd <ahmadmiqdad27@gmail.com> | 2026-02-24 15:28:52 +0700 |
|---|---|---|
| committer | Mqdd <ahmadmiqdad27@gmail.com> | 2026-02-24 15:28:52 +0700 |
| commit | 099dc9e41b2f9098eebb00ea895232e4c943d83c (patch) | |
| tree | ac43474b4009b6c0d5c64523a0d8343e5492697a /fixco_custom/models/res_company.py | |
| parent | 6274e53f46c38682c29334a9101561a8dbd53aff (diff) | |
<Miqdad> lock date
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 |
