summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/token_log.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models/token_log.py')
-rw-r--r--indoteknik_custom/models/token_log.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/indoteknik_custom/models/token_log.py b/indoteknik_custom/models/token_log.py
new file mode 100644
index 00000000..fdc0c03e
--- /dev/null
+++ b/indoteknik_custom/models/token_log.py
@@ -0,0 +1,17 @@
+from odoo import models, fields, api
+
+class FixcoTokenLog(models.Model):
+ _name = 'token.log'
+ _description = 'Log Token Fixco'
+ _order = 'create_date desc'
+
+ token = fields.Text(string="Access Token", readonly=True)
+ expires_at = fields.Datetime(string="Expires At", readonly=True)
+ created_at = fields.Datetime(string="Created At", default=lambda self: fields.Datetime.now(), readonly=True)
+ created_by = fields.Many2one('res.users', string="Generated By", readonly=True)
+ source = fields.Selection([
+ ('manual', 'Manual Request'),
+ ('auto', 'Auto Refresh'),
+ ], string="Token Source", default='auto', readonly=True)
+ token_from = fields.Char(string="From", readonly=True)
+ is_active = fields.Boolean("Active", default=True) \ No newline at end of file