summaryrefslogtreecommitdiff
path: root/fixco_custom/models/res_company.py
diff options
context:
space:
mode:
authorMqdd <ahmadmiqdad27@gmail.com>2026-02-24 15:28:52 +0700
committerMqdd <ahmadmiqdad27@gmail.com>2026-02-24 15:28:52 +0700
commit099dc9e41b2f9098eebb00ea895232e4c943d83c (patch)
treeac43474b4009b6c0d5c64523a0d8343e5492697a /fixco_custom/models/res_company.py
parent6274e53f46c38682c29334a9101561a8dbd53aff (diff)
<Miqdad> lock date
Diffstat (limited to 'fixco_custom/models/res_company.py')
-rw-r--r--fixco_custom/models/res_company.py17
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