diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-27 11:08:02 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-27 11:08:02 +0700 |
| commit | 39e27d0187d352dfea7db1bc1c9aece42e348caa (patch) | |
| tree | 97aa953bbc865669f7f813e50024866e4d6b826d /indoteknik_api/models/rest_api.py | |
| parent | e48e4626b94f7e09b3bab95937cf4b7a5ca07e40 (diff) | |
sale order and invoice api
Diffstat (limited to 'indoteknik_api/models/rest_api.py')
| -rw-r--r-- | indoteknik_api/models/rest_api.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/indoteknik_api/models/rest_api.py b/indoteknik_api/models/rest_api.py new file mode 100644 index 00000000..35cce201 --- /dev/null +++ b/indoteknik_api/models/rest_api.py @@ -0,0 +1,13 @@ +from odoo import models +import datetime +from pytz import timezone + + +class RestApi(models.TransientModel): + _name = 'rest.api' + + def datetime_to_str(self, object, format): + time = '' + if isinstance(object, datetime.datetime): + time = object.astimezone(timezone('Asia/Jakarta')).strftime(format) + return time
\ No newline at end of file |
