diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2022-12-21 15:17:44 +0700 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2022-12-21 15:17:44 +0700 |
| commit | 3cae188ec17df24e8205c43c72e91b358e836452 (patch) | |
| tree | 191d348efde4b540c035fda70bf889b49f596730 /indoteknik_api/models/res_users.py | |
| parent | a553bc46cd42aa5e56a9e438d959c32bd70d10b4 (diff) | |
use jwt and api user update
Diffstat (limited to 'indoteknik_api/models/res_users.py')
| -rw-r--r-- | indoteknik_api/models/res_users.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indoteknik_api/models/res_users.py b/indoteknik_api/models/res_users.py new file mode 100644 index 00000000..608ec4df --- /dev/null +++ b/indoteknik_api/models/res_users.py @@ -0,0 +1,18 @@ +from odoo import models + + +class ResUsers(models.Model): + _inherit = 'res.users' + + def api_single_response(self, res_user, with_detail=''): + data = { + 'id': res_user.id, + 'name': res_user.name, + 'email': res_user.login, + 'phone': res_user.phone or '', + 'mobile': res_user.mobile or '', + 'external': res_user.share + } + + return data + |
