From 25edffb8ebf51e4b133132f4fbd49363b1426664 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Wed, 26 Nov 2025 10:08:16 +0700 Subject: api altama --- fixco_custom/models/token_log.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 fixco_custom/models/token_log.py (limited to 'fixco_custom/models/token_log.py') diff --git a/fixco_custom/models/token_log.py b/fixco_custom/models/token_log.py new file mode 100644 index 0000000..fdc0c03 --- /dev/null +++ b/fixco_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 -- cgit v1.2.3